/* Styles de la page, servis à part sous /assets/ : la politique de sécurité refuse les balises de style dans les pages. */
  :root {
    --bg: #f7f7f5; --surface: #ffffff; --ink: #1d1d1b; --ink-2: #5c5c57; --muted: #6e6e69; --line: #e4e4df;
    --bar: #2f6fb3; --up: #1b7a3d; --down: #b3261e;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --bg: #151514; --surface: #1f1f1d; --ink: #ededea; --ink-2: #b4b4ae; --muted: #8f8f89; --line: #33332f; --bar: #6ea3dc; --up: #7fd19b; --down: #f2b8b5; }
  }
  :root[data-theme="dark"] { --bg: #151514; --surface: #1f1f1d; --ink: #ededea; --ink-2: #b4b4ae; --muted: #8f8f89; --line: #33332f; --bar: #6ea3dc; --up: #7fd19b; --down: #f2b8b5; }
  * { box-sizing: border-box; }
  html, body { margin: 0; height: 100%; }
  body { background: var(--bg); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
  main { min-height: 100%; display: grid; grid-template-rows: auto auto 1fr; gap: clamp(12px, 2vw, 24px); padding: clamp(16px, 3vw, 40px); }
  header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; }
  h1 { margin: 0; font-size: clamp(24px, 4vw, 48px); font-weight: 650; overflow-wrap: anywhere; }
  .clock { margin-left: auto; font-size: clamp(20px, 3vw, 36px); color: var(--ink-2); }
  .status { width: 100%; font-size: 14px; color: var(--muted); }
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: clamp(12px, 2vw, 24px); }
  .tv-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: clamp(10px, 1.4vw, 20px); margin-bottom: clamp(10px, 1.4vw, 20px); }
  .tv-target { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(12px, 1.6vw, 22px); }
  .tv-target .h { display: flex; justify-content: space-between; gap: 12px; font-size: clamp(15px, 1.5vw, 24px); }
  .tv-target .bar { height: clamp(10px, 1.2vw, 18px); border-radius: 9px; background: var(--line); overflow: hidden; margin: 10px 0 6px; }
  .tv-target .bar span { display: block; height: 100%; background: var(--bar); border-radius: 9px; }
  .tv-target.done .bar span { background: var(--up); }
  .tv-target .n { font-size: clamp(13px, 1.2vw, 19px); color: var(--muted); }
  .tile, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(14px, 2vw, 28px); min-width: 0; }
  .v { font-size: clamp(40px, 7vw, 96px); font-weight: 700; line-height: 1.05; }
  .hero .v { color: var(--bar); }
  .l { font-size: clamp(15px, 1.6vw, 22px); color: var(--ink-2); margin-top: 6px; }
  .d { font-size: clamp(14px, 1.4vw, 20px); margin-top: 6px; color: var(--muted); }
  .d.up { color: var(--up); } .d.down { color: var(--down); }
  /* Les panneaux occupent toute la hauteur restante ; le graphique grandit avec. */
  .panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: clamp(12px, 2vw, 24px); align-content: stretch; }
  .panel.chart { display: flex; flex-direction: column; }
  .panel.chart #chart { flex: 1; display: flex; position: relative; margin-left: 3.2em; }
  #chart .tick { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); pointer-events: none; }
  #chart .tick.zero { border-top: 0; }
  #chart svg { position: relative; z-index: 1; }
  #chart + .axis { margin-left: 3.2em; }
  #chart .tick span { position: absolute; right: calc(100% + 8px); transform: translateY(-50%); font-size: clamp(12px, 0.9vw, 18px); color: var(--muted); font-variant-numeric: tabular-nums; }
  h2 { margin: 0 0 10px; font-size: clamp(16px, 1.6vw, 22px); color: var(--ink-2); font-weight: 600; }
  ol { margin: 0; padding: 0; list-style: none; font-size: clamp(16px, 1.8vw, 26px); }
  li { display: flex; gap: 12px; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
  li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  li b { font-weight: 650; }
  .empty { color: var(--muted); font-size: clamp(15px, 1.6vw, 22px); }
  svg { display: block; width: 100%; height: auto; min-height: clamp(90px, 16vh, 200px); flex: 1; }
  svg rect { fill: var(--bar); }
  .axis { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 4px; }
  #login { max-width: 520px; margin: 15vh auto; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 18px; }
  #login a { color: var(--bar); }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
