/* Chrono deep work. Sombre comme Discord, une seule information en grand. */
:root {
  --fond: #1e1f22;
  --anneau-fond: #3a3c42;
  --texte: #ffffff;
  --doux: #949ba4;
  --travail: #8e9bff;
  --travail-doux: rgba(142, 155, 255, 0.32);
  --pause: #f2aa3e;
  --pause-doux: rgba(242, 170, 62, 0.32);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: grid;
  place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  overflow: hidden;
}
.chrono { width: min(100%, 420px); display: grid; gap: 18px; justify-items: center; }
.cadran { position: relative; width: min(100%, 72vh, 340px); }
.anneau { display: block; width: 100%; height: auto; transform: rotate(-90deg); }
.anneau circle { fill: none; stroke-width: 12; }
.anneau-fond { stroke: var(--anneau-fond); }
.anneau-plein { stroke: var(--travail); stroke-linecap: round; stroke-dasharray: 603.19; transition: stroke 0.4s; }
.centre { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; }
.phase { font-size: clamp(11px, 3.4vmin, 15px); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--travail); }
.temps { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: clamp(36px, 15vmin, 72px); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1; }
.cible { font-size: clamp(12px, 3.6vmin, 16px); color: var(--doux); }
body.pause .anneau-plein { stroke: var(--pause); }
body.pause .phase { color: var(--pause); }
.heure { width: min(100%, 360px); display: grid; gap: 6px; }
.barre { position: relative; height: 8px; display: grid; grid-template-columns: 3fr 1fr; gap: 2px; }
.barre .t { background: var(--travail-doux); border-radius: 4px 0 0 4px; }
.barre .p { background: var(--pause-doux); border-radius: 0 4px 4px 0; }
.barre i { position: absolute; top: -3px; bottom: -3px; left: 0; width: 3px; margin-left: -1.5px; background: var(--texte); border-radius: 2px; }
.graduation { position: relative; height: 14px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--doux); }
.graduation span { position: absolute; top: 0; }
.graduation span:nth-child(1) { left: 0; }
.graduation span:nth-child(2) { left: 75%; transform: translateX(-50%); }
.graduation span:nth-child(3) { right: 0; }
/* Petite fenêtre (Discord réduit l'Activité quand on change de salon) : le chiffre seul. */
@media (max-height: 260px) {
  body { padding-block: 8px; }
  .heure, .cible { display: none; }
  .cadran { width: min(100%, calc(100vh - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .anneau-plein { transition: none; }
}
