@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson/AtkinsonHyperlegibleNext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("fonts/atkinson-mono/AtkinsonHyperlegibleMono.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: "Inter", "Roboto", system-ui, sans-serif;
  color: #fff8e5;
  background: #102e2a;
}
* { box-sizing: border-box; }
body {
  margin: 0; height: 100svh;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: radial-gradient(ellipse at 50% 38%, #254c40, transparent 75%);
}
header {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center;
  gap: .75rem; padding: 1px clamp(.5rem, 1.3vw, 1.25rem); min-height: 2rem;
  color: #c9d9ca; background: #102e2a; border-bottom: 1px solid #a3c7a92e;
}
.brand { display: flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 650; }
.brand { font-family: inherit; color: inherit; border: 0; background: transparent; padding: .3rem .15rem; }
.brand:enabled { cursor: pointer; }
.brand:enabled:hover { color: #fff8e5; text-decoration: underline; }
.brand:focus-visible { outline: 2px solid #efb37c; outline-offset: 1px; }
.mark {
  width: .23rem; height: .75rem; background: #f2b77f; border-radius: 1px;
  transform: skew(-18deg); box-shadow: .3rem -.08rem 0 #c6dbc1; margin-right: .3rem;
}
#status { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; }
#status::before { content: ""; background: #e6ad77; width: .4rem; height: .4rem; flex-shrink: 0; border-radius: 50%; }
#status.live::before { background: #b6dea5; }
#son-minuteur {
  display: grid; place-items: center; width: 2rem; height: 1.8rem;
  color: inherit; background: transparent; border: 0; cursor: pointer;
}
#son-minuteur svg { width: 1.1rem; height: 1.1rem; }
#son-minuteur[aria-pressed="true"] .muet, #son-minuteur[aria-pressed="false"] .ondes { display: none; }
#son-minuteur:focus-visible { outline: 2px solid #efb37c; }
main { display: grid; min-height: 0; overflow: auto; }
.board { max-width: 96rem; width: 100%; margin: auto; padding: 2rem clamp(1.2rem, 7vw, 8rem); }
h1 {
  margin: 0; font: 600 clamp(2.5rem, 7.5vw, 8rem)/1.15 "Atkinson Hyperlegible Next", system-ui, sans-serif;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
h1.long { font-size: clamp(1.6rem, 3.6vw, 4rem); line-height: 1.25; }
h1::before,
#message[hidden] + #heure-meteo::before { content: ""; display: block; width: 3.4rem; height: .29rem; background: #efb37c; margin-bottom: 1.6rem; transform: rotate(-2deg); }
[hidden] { display: none !important; }
#stage { position: relative; }
.activity-frame { position: absolute; inset: 0; border: 0; width: 100%; height: 100%; min-height: 0; }
html.activity, .activity body { background: transparent; }
.activity body { display: grid; grid-template-rows: minmax(0, 1fr); }
#clock { display: block; font-size: clamp(1.8rem, 4vw, 4rem); color: #c9d9ca; font-variant-numeric: tabular-nums; }
#heure-meteo {
  display: grid; grid-template-columns: max-content minmax(0, 1fr);
  align-items: center; font-size: clamp(1.8rem, 4vw, 4rem);
}
#heure-meteo::before { grid-column: 1 / -1; }
#message:not([hidden]) + #heure-meteo { margin-top: .7em; }
#meteo {
  min-width: 0; justify-self: start;
  margin-inline-start: .65em; padding-inline-start: .65em; border-inline-start: 1px solid #a3c7a96b;
  font: 500 clamp(1.15rem, 2.4vw, 2.5rem)/1.25 "Atkinson Hyperlegible Next", system-ui, sans-serif;
  color: #e1e9de;
}
#clock[hidden] + #meteo { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; }
#activer-meteo, #source-meteo { font: inherit; color: #c9d9ca; }
#activer-meteo { padding: .25em 0; background: transparent; border: 0; cursor: pointer; }
#activer-meteo, #source-meteo { font-size: clamp(.9rem, 1.4vw, 1.2rem); }
#source-meteo { display: block; width: fit-content; text-underline-offset: .15em; }
.board.minuteur {
  width: min(92vw, 77svh, 54rem);
  padding: min(3vw, 2.4svh, 1.6rem);
  display: grid;
  justify-items: center;
  gap: min(2vw, 1.5svh);
  border-radius: 48% 48% 12% 12% / 42% 42% 10% 10%;
  border: 1px solid #787e65;
  background: linear-gradient(124deg, #53675a, #35483d 35%, #273b32 76%, #43554a);
  box-shadow: inset 1px 2px 2px #c4cbb38c, inset -2px -5px 3px #11251d,
    0 .6rem .7rem -.4rem #061810, 0 1.5rem 2.2rem -.9rem #061810aa;
}
#cadran { display: block; width: 100%; filter: drop-shadow(0 2px 2px #15271f); }
#graduations text {
  stroke: none; text-anchor: middle; dominant-baseline: central;
  font: 650 13px "Atkinson Hyperlegible Mono", monospace;
}
h1.timer {
  margin: 0; padding: .085em .16em;
  font-size: min(10vw, 7.5svh, 5rem); font-weight: 600; line-height: 1;
  white-space: nowrap; color: #fff1ce;
  border: 1px solid #24251e; border-radius: .16em;
  display: flex; align-items: center; gap: .055em;
  background: linear-gradient(#756d56, #403f32 11%, #25271f 85%, #645d49);
  box-shadow: inset 0 1px 1px #b6ac8d, 0 1px 1px #9b9f87;
}
h1.timer::before { content: none; }
.rouleau {
  position: relative; overflow: hidden; width: .79em; height: 1.08em;
  border-radius: .075em;
  background: linear-gradient(#131610, #373a30 27%, #414339 48%, #272b23 73%, #141810);
  box-shadow: inset 0 0 0 1px #171b15, 0 1px 0 #a69b795c;
}
.rouleau > span {
  display: block; position: relative; height: 100%;
  line-height: 1.08; text-align: center; text-shadow: 0 1px 1px #12140f;
}
.rouleau > span::before {
  content: attr(data-precedent); position: absolute; inset: -100% 0 auto; height: 100%;
}
.rouleau::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(#0a0d08aa, transparent 24%, transparent 75%, #0a0d0890);
  box-shadow: inset 1px 0 2px #0006, inset -1px 0 2px #0006;
}
.separateur { color: #ded2ac; width: .32em; text-align: center; }
.separateur > span { display: flex; justify-content: center; }
#clock, h1.timer { font-family: "Atkinson Hyperlegible Mono", monospace; }
#view-name {
  font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-left: .75rem; border-left: 1px solid #a3c7a942;
}
@media (max-width: 500px) {
  header { gap: .4rem; }
  #view-name { padding-left: .4rem; }
}
