:root {
  --bg: #f5f6f8; --card: #fff; --text: #17191d; --muted: #646b76; --line: #e3e6ea; --accent: #2457d6;
  --up: #17805a; --down: #c0362c; --partial: #b87700; --off: #8a919c;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216; --card: #181b21; --text: #e8eaed; --muted: #9aa2ad; --line: #2a2f37; --accent: #7aa2ff;
    --up: #3fc08c; --down: #f0716a; --partial: #e3a83c; --off: #6f7783;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
nav { display: flex; gap: 16px; flex: 1; }
nav a { color: var(--muted); }
nav a[aria-current] { color: var(--text); font-weight: 600; }
main { max-width: 1200px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
h1 { font-size: 20px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 8px; }
small, .empty { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.summary, .grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.figure { display: block; font-size: 28px; font-weight: 600; }
.figure.up { color: var(--up); }
.figure.down { color: var(--down); }
/* Les tableaux défilent bord à bord dans leur carte. */
.scroll { overflow-x: auto; margin: 0 -16px -16px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { text-align: left; padding: 8px 16px; border-top: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
/* Colonnes identiques d'un groupe à l'autre. */
table.apps { table-layout: fixed; min-width: 900px; }
table.apps th:nth-child(1) { width: 19%; }
table.apps th:nth-child(2) { width: 9%; }
table.apps th:nth-child(3) { width: 22%; }
table.apps th:nth-child(5) { width: 151px; }
.badge { display: inline-block; padding: 0 8px; border-radius: 999px; border: 1px solid currentColor; font-size: 13px; }
.badge.up { color: var(--up); }
.badge.down { color: var(--down); }
.badge.partial { color: var(--partial); }
.badge.off, .badge.unknown { color: var(--off); }
.bars { width: 119px; height: 20px; display: block; }
.bars .up { fill: var(--up); }
.bars .down { fill: var(--down); }
.bars .partial { fill: var(--partial); }
.bars .none { fill: var(--line); }
.notice { margin: 0; padding: 8px 12px; border: 1px solid var(--partial); border-radius: 8px; }
.login { width: 100%; max-width: 360px; margin: 10vh auto 0; display: flex; flex-direction: column; gap: 8px; }
input { font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
button { font: inherit; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button.quiet { background: transparent; color: var(--text); border-color: var(--line); }
button:disabled { opacity: .5; cursor: default; }
header form { margin: 0; }
