/* ==========================================================================
   PINGPING — système de design « papier & encre »
   Minimal, deux thèmes (clair/sombre), aucune dépendance externe.
   Le thème est posé sur <html data-theme="light|dark"> par theme.js.
   ========================================================================== */

/* Self-hosted typefaces (SIL OFL 1.1) — no CDN, no third-party request. */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- thème clair (défaut) ---------- */
:root {
  color-scheme: light;
  --paper: #f8f7f4;
  --surface: #ffffff;
  --surface-2: #f3f2ee;
  --fill-1: rgba(23, 25, 27, .034);
  --fill-2: rgba(23, 25, 27, .055);
  --fill-3: rgba(23, 25, 27, .085);
  --line: #e6e4de;
  --line-strong: #d2cfc6;
  --text: #16181a;
  --text-dim: #41464a;
  --muted: #666b70;
  --accent: #cbf24a;
  --accent-hover: #d6f76b;
  --accent-ink: #101408;
  --accent-soft: rgba(203, 242, 74, .22);
  --accent-line: rgba(148, 184, 20, .45);
  --accent-text: #556f00;
  --ok: #0f7b45;
  --ok-soft: #e6f4ec;
  --ok-text: #0a6238;
  --warn: #8f5d07;
  --warn-soft: #fbf1de;
  --warn-text: #744a03;
  --down: #bf2440;
  --down-soft: #fcecef;
  --down-text: #a01d36;
  --focus: #6b8f00;
  --shadow: 0 1px 2px rgba(23, 25, 27, .05), 0 14px 34px -24px rgba(23, 25, 27, .28);
  --shadow-sm: 0 1px 2px rgba(23, 25, 27, .06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sidebar: 244px;
  /* alias historiques */
  --ink: var(--paper);
  --ink-2: var(--surface-2);
  --panel: var(--fill-1);
  --panel-strong: var(--fill-2);
}

/* ---------- thème sombre ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0b0d0c;
  --surface: #111413;
  --surface-2: #171a19;
  --fill-1: rgba(255, 255, 255, .035);
  --fill-2: rgba(255, 255, 255, .06);
  --fill-3: rgba(255, 255, 255, .1);
  --line: #212524;
  --line-strong: #323837;
  --text: #f1f3f1;
  --text-dim: #b3b9b6;
  --muted: #8a918e;
  --accent: #c8ff4d;
  --accent-hover: #d6ff74;
  --accent-ink: #0d1403;
  --accent-soft: rgba(200, 255, 77, .14);
  --accent-line: rgba(200, 255, 77, .34);
  --accent-text: #d2ff70;
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .12);
  --ok-text: #86efac;
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --warn-text: #fcd34d;
  --down: #f4717f;
  --down-soft: rgba(244, 113, 127, .13);
  --down-text: #fca7b3;
  --focus: #c8ff4d;
  --shadow: none;
  --shadow-sm: none;
}

/* Respect du réglage système quand aucun choix n'a été enregistré (sans JS). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0b0d0c;
    --surface: #111413;
    --surface-2: #171a19;
    --fill-1: rgba(255, 255, 255, .035);
    --fill-2: rgba(255, 255, 255, .06);
    --fill-3: rgba(255, 255, 255, .1);
    --line: #212524;
    --line-strong: #323837;
    --text: #f1f3f1;
    --text-dim: #b3b9b6;
    --muted: #8a918e;
    --accent: #c8ff4d;
    --accent-hover: #d6ff74;
    --accent-ink: #0d1403;
    --accent-soft: rgba(200, 255, 77, .14);
    --accent-line: rgba(200, 255, 77, .34);
    --accent-text: #d2ff70;
    --focus: #c8ff4d;
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, .12);
    --ok-text: #86efac;
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, .12);
    --warn-text: #fcd34d;
    --down: #f4717f;
    --down-soft: rgba(244, 113, 127, .13);
    --down-text: #fca7b3;
    --shadow: none;
    --shadow-sm: none;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
  transition: background-color .18s ease;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 620; letter-spacing: -.022em; line-height: 1.16; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--fill-3);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); background-clip: content-box; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- primitives ---------- */
.container { width: min(1120px, 100% - 48px); margin-inline: auto; }
.container-tight { width: min(720px, 100% - 48px); margin-inline: auto; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.stack-sm { display: grid; gap: 9px; grid-template-columns: minmax(0, 1fr); }
.stack-lg { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.muted { color: var(--muted); }
.dim { color: var(--text-dim); }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; }
.eyebrow {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nowrap { white-space: nowrap; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11.5px; }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.kpi b, .stat-value, .gauge-number, table.data .num, .ds-metric, .countdown, .atk-val {
  font-variant-numeric: tabular-nums;
}

/* ---------- boutons ---------- */
.btn {
  --btn-bg: var(--surface);
  --btn-border: var(--line-strong);
  --btn-color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: 13.5px;
  font-weight: 560;
  letter-spacing: -.005em;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { --btn-bg: var(--surface-2); --btn-border: var(--line-strong); }
.btn:active { transform: translateY(.5px); }
.btn-primary {
  --btn-bg: var(--accent);
  --btn-border: var(--accent);
  --btn-color: var(--accent-ink);
  font-weight: 600;
  box-shadow: none;
}
.btn-primary:hover { --btn-bg: var(--accent-hover); --btn-border: var(--accent-hover); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-color: var(--text-dim); box-shadow: none; }
.btn-ghost:hover { --btn-bg: var(--fill-1); --btn-border: transparent; --btn-color: var(--text); }
.btn-danger { --btn-bg: var(--down-soft); --btn-border: transparent; --btn-color: var(--down-text); box-shadow: none; }
.btn-danger:hover { --btn-bg: var(--down-soft); --btn-border: var(--down); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { min-height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-icon { width: 34px; min-height: 34px; padding: 0; }
.btn svg {
  width: 15px; height: 15px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Boutons d'icône de la barre supérieure (thème, plein écran) */
.theme-toggle,
.top-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.theme-toggle:hover,
.top-icon-btn:hover { background: var(--fill-1); color: var(--text); border-color: var(--line-strong); }
.top-icon-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.theme-toggle svg,
.top-icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.top-icon-btn[hidden] { display: none; }
.top-icon-btn .i-collapse { display: none; }
:root[data-fs="1"] .top-icon-btn .i-collapse { display: block; }
:root[data-fs="1"] .top-icon-btn .i-expand { display: none; }
.rail-btn { display: none; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
}

/* ---------- étiquettes ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0;
  color: var(--text-dim);
  white-space: nowrap;
}
.badge-accent { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.badge-ok { border-color: transparent; background: var(--ok-soft); color: var(--ok-text); }
.badge-warn { border-color: transparent; background: var(--warn-soft); color: var(--warn-text); }
.badge-down { border-color: transparent; background: var(--down-soft); color: var(--down-text); }
.badge-muted { color: var(--muted); }

.dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--muted); }
.dot-up { background: var(--ok); }
.dot-down { background: var(--down); animation: pulse-down 2s ease-in-out infinite; }
.dot-paused, .dot-restricted { background: var(--warn); }
.dot-pending { background: var(--line-strong); }
.dot-live { background: var(--accent); animation: pulse-live 2.4s ease-in-out infinite; }

@keyframes pulse-down {
  0%, 100% { box-shadow: 0 0 0 0 var(--down-soft); }
  60% { box-shadow: 0 0 0 6px transparent; }
}
@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  60% { box-shadow: 0 0 0 5px transparent; }
}

/* ---------- cartes ---------- */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }
.card-title { font-size: 14.5px; font-weight: 620; letter-spacing: -.012em; }
.card-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.card-body { padding: 18px 22px 22px; }
.card-flush { padding: 0; overflow: hidden; }
.card-hover { transition: border-color .15s ease, box-shadow .15s ease; }
.card-hover:hover { border-color: var(--line-strong); }
.glass { background: var(--surface); }

/* Carte de promotion (fin de page) */
.promo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.promo-card h3 { font-size: 17px; }
.promo-card p { margin-top: 5px; font-size: 13px; color: var(--muted); max-width: 560px; }

/* ---------- formulaires ---------- */
.field { display: grid; gap: 6px; }
.field label, .label { font-size: 12.5px; font-weight: 560; color: var(--text-dim); }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.field .error { font-size: 11.5px; color: var(--down-text); }
.input, .select, .textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 96px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23797f84' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
}
:root[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23878e8b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid > * { min-width: 0; }
.form-grid .span-2 { grid-column: span 2; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-dim); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check span b { display: block; color: var(--text); font-size: 13px; font-weight: 560; }
.check span small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.inline-form { display: inline; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i {
  position: relative; width: 36px; height: 20px; flex: none;
  border-radius: 999px; background: var(--fill-3);
  transition: background-color .16s ease;
}
.switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease;
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); background: var(--accent-ink); box-shadow: none; }
.switch input:focus-visible + i { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch-track { width: 34px; height: 20px; flex: none; position: relative; border-radius: 999px; background: var(--fill-3); transition: background-color .16s ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .16s ease; }
.switch input:checked + .switch-track { background: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(14px); background: var(--accent-ink); box-shadow: none; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- messages ---------- */
.flashes { display: grid; gap: 8px; margin-bottom: 18px; }
.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.flash::before { content: ""; width: 6px; height: 6px; flex: none; margin-top: 7px; border-radius: 50%; background: var(--muted); }
.flash-success { border-color: transparent; background: var(--ok-soft); color: var(--ok-text); }
.flash-success::before { background: var(--ok); }
.flash-error { border-color: transparent; background: var(--down-soft); color: var(--down-text); }
.flash-error::before { background: var(--down); }
.flash-warning { border-color: transparent; background: var(--warn-soft); color: var(--warn-text); }
.flash-warning::before { background: var(--warn); }

.alert-box {
  display: flex; gap: 11px; padding: 13px 15px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--warn-soft); font-size: 12.5px; line-height: 1.55; color: var(--warn-text);
}
.alert-box svg { width: 16px; height: 16px; flex: none; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.alert-box b { color: inherit; font-weight: 620; }

/* ==========================================================================
   Site public
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid transparent;
  background: var(--paper);
  transition: border-color .18s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 640;
  letter-spacing: .1em;
  color: var(--text);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
}
.brand-mark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.brand small { font-size: 10px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 13px; color: var(--text-dim); }
.site-nav a { transition: color .15s ease; }
.site-nav a:hover { color: var(--text); }
.header-right { display: flex; align-items: center; gap: 22px; }
.header-tools { display: flex; align-items: center; gap: 8px; }
@media (max-width: 860px) {
  .header-right { gap: 10px; }
}

.site-footer { margin-top: 84px; padding: 32px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.site-footer a { transition: color .15s ease; }
.site-footer a:hover { color: var(--text); }
.site-footer .brand { font-size: 11px; letter-spacing: .12em; }
.site-footer .brand-mark { width: 20px; height: 20px; border-radius: 6px; }
.site-footer .brand-mark svg { width: 12px; height: 12px; }

/* ---------- accueil ---------- */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 52px; align-items: center; }
.hero h1 {
  font-size: clamp(34px, 4.6vw, 57px);
  line-height: 1.02;
  letter-spacing: -.038em;
  font-weight: 620;
}
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero-lead { margin-top: 20px; max-width: 470px; font-size: 16px; line-height: 1.62; color: var(--text-dim); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-proof {
  display: flex; flex-wrap: wrap; gap: 28px;
  margin-top: 34px; padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.hero-proof b { display: block; margin-bottom: 2px; color: var(--text); font-size: 18px; font-weight: 620; letter-spacing: -.02em; }
.hero-live { position: relative; }
.live-badge {
  position: absolute; top: -11px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 10.5px; font-weight: 550; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted);
}

.demo-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.demo-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 12px; }
.demo-list { display: grid; gap: 0; }
.demo-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 70px 52px;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-top: 1px solid var(--line);
}
.demo-row:first-child { border-top: 0; }
.demo-row b { display: block; font-size: 13px; font-weight: 560; letter-spacing: -.005em; }
.demo-row small { display: block; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.demo-row .ms { font-family: var(--mono); font-size: 11px; color: var(--text-dim); text-align: right; }
.spark { width: 100%; height: 30px; color: var(--accent-text); overflow: visible; }
.demo-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}

/* ---------- sections ---------- */
.section { padding: 64px 0 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.028em; }
.section-head p { max-width: 420px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bento .card { padding: 22px; box-shadow: none; }
.bento .span-2 { grid-column: span 2; }
.feature-icon {
  display: grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--accent-text);
}
.feature-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bento h3 { font-size: 15px; margin-bottom: 6px; }
.bento p { color: var(--muted); font-size: 13px; line-height: 1.62; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: step; }
.step {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent-text);
}
.step h3 { font-size: 14px; margin-bottom: 5px; }
.step p { font-size: 12.5px; color: var(--muted); line-height: 1.58; }

/* ---------- tarifs ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.plan-featured { border-color: var(--accent-line); }
.plan-name { font-size: 12.5px; font-weight: 620; letter-spacing: .01em; color: var(--text-dim); }
.plan-price { display: flex; align-items: baseline; gap: 5px; margin: 10px 0 4px; font-size: 38px; font-weight: 620; letter-spacing: -.035em; }
.plan-price small { font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan-tag { font-size: 12.5px; color: var(--muted); min-height: 34px; line-height: 1.55; }
.plan ul { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; gap: 9px; font-size: 12.8px; color: var(--text-dim); }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li::before {
  content: "";
  width: 14px; height: 14px; flex: none; margin-top: 3px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1.6 4.2 3.2 5.8 6.4 2.4' stroke='%23556f00' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
:root[data-theme="dark"] .plan li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1.6 4.2 3.2 5.8 6.4 2.4' stroke='%23d2ff70' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.plan .btn { margin-top: auto; }
.plan-note { margin-top: 10px; font-size: 11px; color: var(--muted); text-align: center; }

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.faq details {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.faq summary { cursor: pointer; font-weight: 560; font-size: 13.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 9px; font-size: 12.8px; color: var(--muted); line-height: 1.65; }

/* ---------- authentification ---------- */
.auth-wrap { min-height: calc(100dvh - 64px); display: grid; place-items: center; padding: 40px 24px 64px; }
.auth-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-card-wide { width: min(520px, 100%); }
.auth-card h1 { font-size: 24px; letter-spacing: -.028em; margin-bottom: 5px; }
.auth-card > p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.auth-alt { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--muted); }
.auth-alt a { color: var(--accent-text); font-weight: 560; }
.auth-alt a:hover { text-decoration: underline; }
/* « Rester connecté » : la case est alignée avec les libellés de champ. */
.auth-remember {
  margin: -4px 0 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.auth-remember span b { font-size: 12.5px; }
.auth-remember span small { font-size: 11.5px; }

/* ---------- page de statut publique ---------- */
.status-page { padding: 44px 0 0; }
.status-hero { text-align: center; padding: 20px 0 34px; }
.status-hero h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.032em; }
.status-hero p { margin-top: 9px; color: var(--muted); font-size: 13.5px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; padding: 8px 15px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--ok-soft);
  font-size: 13px; font-weight: 560; color: var(--ok-text);
}
.status-pill.bad { background: var(--down-soft); color: var(--down-text); }
.status-head { font-size: 11px; font-weight: 560; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.status-list { display: grid; gap: 8px; }
.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 150px;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.status-row .name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.status-row b { font-size: 13px; font-weight: 560; }
.status-row small { display: block; font-size: 11px; color: var(--muted); }
.uptime-bar { display: flex; gap: 2px; align-items: flex-end; height: 24px; }
.uptime-bar i { flex: 1; min-width: 2px; border-radius: 1px; background: var(--ok); opacity: .55; height: 100%; }
.uptime-bar i.bad { background: var(--down); opacity: .9; }
.status-row .right { text-align: right; font-size: 11.5px; color: var(--muted); }
.status-row .right b { color: var(--text); }

.incident-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.incident-card + .incident-card { margin-top: 8px; }
.incident-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.incident-top b { font-size: 13px; font-weight: 560; }
.incident-meta { margin-top: 5px; font-size: 11.5px; color: var(--muted); }

/* ==========================================================================
   Tableaux, listes, états vides
   ========================================================================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 560;
  letter-spacing: .03em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text-dim); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--fill-1); }
table.data td b { color: var(--text); font-weight: 560; }
table.data .num { font-family: var(--mono); font-size: 11.5px; }
.table-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 12.5px; }

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 46px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--accent-text);
}
.empty-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty h3 { font-size: 15.5px; }
.empty p { max-width: 360px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

.timeline { display: grid; gap: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; padding-bottom: 15px; }
.tl-item::before { content: ""; position: absolute; left: 7px; top: 17px; bottom: 0; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { position: relative; z-index: 1; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); }
.tl-dot.ok { border-color: var(--ok); background: var(--ok-soft); }
.tl-dot.bad { border-color: var(--down); background: var(--down-soft); }
.tl-body { min-width: 0; }
.tl-body b { font-size: 12.5px; font-weight: 560; }
.tl-body p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.banner {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 18px;
}
.banner-down { border-color: transparent; background: var(--down-soft); }
.banner-ok { border-color: transparent; background: var(--ok-soft); }
.banner-icon {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 9px;
  background: var(--fill-1);
  color: inherit;
}
.banner-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.banner-down .banner-icon { background: var(--down-soft); color: var(--down-text); }
.banner-ok .banner-icon { background: var(--ok-soft); color: var(--ok-text); }
.banner h3 { font-size: 13.5px; }
.banner p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.banner .btn { margin-left: auto; }

/* ---------- rangées de réglage ---------- */
.setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row h4 { font-size: 13px; font-weight: 560; }
.setting-row p { font-size: 11.5px; color: var(--muted); margin-top: 3px; max-width: 520px; line-height: 1.55; }
.setting-row .control { flex: none; }

.contact-list { display: grid; gap: 8px; }
.contact-row { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.contact-row .email { font-size: 12.5px; font-weight: 540; }
.contact-row .meta { font-size: 10.5px; color: var(--muted); }
.contact-row form { margin-left: auto; }

/* ---------- divers ---------- */
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-dim);
  word-break: break-all;
}
.code-block {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-dim);
  overflow-x: auto;
  white-space: pre;
}
.help-link { font-size: 11.5px; color: var(--accent-text); }
.help-link:hover { text-decoration: underline; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }

.reveal { animation: rise .5s cubic-bezier(.22, 1, .36, 1) both; }
.reveal:nth-child(2) { animation-delay: .04s; }
.reveal:nth-child(3) { animation-delay: .08s; }
.reveal:nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Application (tableau de bord, administration)
   ========================================================================== */
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}
.sidebar .brand { padding: 4px 8px 0; }
.side-nav { display: grid; gap: 1px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background-color .14s ease, color .14s ease;
}
.nav-item svg {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: .9;
}
.nav-item:hover { background: var(--fill-1); color: var(--text); }
.nav-item.active { background: var(--fill-2); color: var(--text); font-weight: 560; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}
.nav-item .count { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav-item .nav-pro {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 9.5px;
  font-weight: 620;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nav-label {
  padding: 14px 10px 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; padding: 0 2px; }
.quota { padding: 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.quota-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.quota-top b { color: var(--text); font-size: 11.5px; font-weight: 560; font-variant-numeric: tabular-nums; }
.quota-bar { height: 3px; border-radius: 999px; background: var(--fill-3); overflow: hidden; }
.quota-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.quota-link { display: block; margin-top: 8px; font-size: 11px; color: var(--accent-text); }
.quota-link:hover { text-decoration: underline; }
.side-user { display: flex; align-items: center; gap: 9px; padding: 6px; border-radius: 7px; }
.side-user:hover { background: var(--fill-1); }
.avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .01em;
}
.side-user-meta { min-width: 0; }
.side-user-meta b { display: block; font-size: 11.5px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-meta small { display: block; font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.crumb a { transition: color .14s ease; }
.crumb a:hover { color: var(--text); }
.crumb b { color: var(--text); font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb .sep { opacity: .5; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.page { width: 100%; max-width: 1300px; padding: 26px 26px 64px; margin-inline: auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(21px, 2.4vw, 28px); letter-spacing: -.028em; }
.page-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-menu-btn { display: none; }

/* ---------- barre latérale rétractable (rail d'icônes) ----------
   Repliée par défaut : sur un écran de portable, 176 px de largeur et de
   hauteur de lecture reviennent au contenu. Le choix est mémorisé. */
.app-shell { transition: grid-template-columns .18s cubic-bezier(.4, 0, .2, 1); }
@media (min-width: 861px) {
  .rail-btn { display: inline-grid; }
  :root[data-rail="1"] { --sidebar: 68px; }
  :root[data-rail="1"] .sidebar { padding: 16px 10px; gap: 14px; }
  :root[data-rail="1"] .sidebar .brand { padding: 4px 0 0; justify-content: center; }
  :root[data-rail="1"] .brand-text,
  :root[data-rail="1"] .nav-text,
  :root[data-rail="1"] .nav-item .count,
  :root[data-rail="1"] .nav-item .nav-pro,
  :root[data-rail="1"] .nav-label,
  :root[data-rail="1"] .quota,
  :root[data-rail="1"] .side-user-meta,
  :root[data-rail="1"] .sidebar-version { display: none; }
  :root[data-rail="1"] .side-nav { gap: 3px; }
  :root[data-rail="1"] .nav-item { justify-content: center; padding: 9px 0; }
  :root[data-rail="1"] .nav-item.active::before { left: -10px; }
  :root[data-rail="1"] .side-user { justify-content: center; padding: 4px 0; }
  :root[data-rail="1"] .sidebar-foot { gap: 8px; padding: 0; }
}

/* ---------- liste des sites : 1 vue / 2 vues ---------- */
.view-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}
.view-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 520;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.view-switch-btn svg {
  width: 14px; height: 14px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.view-switch-btn:hover { color: var(--text); }
.view-switch-btn[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  .view-switch-btn span { display: none; }
  .view-switch-btn { padding: 0 8px; }
}
/* Bascule « Full grid » : même gabarit que le sélecteur de vues. */
.switch-chip {
  height: 33px;
  padding: 0 11px 0 9px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
  user-select: none;
  transition: border-color .14s ease, color .14s ease;
}
.switch-chip:hover { color: var(--text); border-color: var(--line-strong); }
.switch-chip .switch-text { white-space: nowrap; }
@media (max-width: 640px) {
  .switch-chip { padding: 0 9px; }
  .switch-chip .switch-text { display: none; }
}
/* Sélecteur compact dans l'en-tête d'une carte : icônes seules. */
.view-switch-sm .view-switch-btn { height: 24px; padding: 0 7px; }

/* Pleine largeur : seules les pages de listes s'étirent d'un bord à l'autre.
   Les formulaires et la console gardent une largeur de lecture confortable. */
:root[data-wide="1"] .page-wide { max-width: none; }

/* Grille compacte : 2 colonnes (mode 2 vues, mode 3 vues sur écran moyen,
   tableau de bord en 2 colonnes). Chaque ligne perd son graphique et ses
   colonnes secondaires : seul l'essentiel reste, sans faire défiler. */
@media (min-width: 1001px) {
  :root[data-sites-view="2"] [data-sites-list] .monitor-list,
  :root[data-sites-view="3"] [data-sites-list] .monitor-list,
  :root[data-dash-view="2"] [data-dash-sites] .monitor-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  :root[data-sites-view="2"] [data-sites-list] .list-head,
  :root[data-sites-view="3"] [data-sites-list] .list-head,
  :root[data-dash-view="2"] [data-dash-sites] .list-head { display: none; }
  :root[data-sites-view="2"] [data-sites-list] .monitor,
  :root[data-sites-view="3"] [data-sites-list] .monitor,
  :root[data-dash-view="2"] [data-dash-sites] .monitor {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 9px 12px;
  }
  :root[data-sites-view="2"] [data-sites-list] .monitor .cell-hide,
  :root[data-sites-view="3"] [data-sites-list] .monitor .cell-hide,
  :root[data-dash-view="2"] [data-dash-sites] .monitor .cell-hide,
  :root[data-sites-view="2"] [data-sites-list] .monitor .uptime-cell,
  :root[data-sites-view="3"] [data-sites-list] .monitor .uptime-cell,
  :root[data-dash-view="2"] [data-dash-sites] .monitor .uptime-cell { display: none; }
  :root[data-sites-view="2"] [data-sites-list] .monitor-name b,
  :root[data-sites-view="3"] [data-sites-list] .monitor-name b,
  :root[data-dash-view="2"] [data-dash-sites] .monitor-name b { font-size: 12.5px; }
  :root[data-sites-view="2"] [data-sites-list] .monitor-name small,
  :root[data-sites-view="3"] [data-sites-list] .monitor-name small,
  :root[data-dash-view="2"] [data-dash-sites] .monitor-name small { font-size: 10.5px; }
  :root[data-sites-view="2"] [data-sites-list] .monitor-actions,
  :root[data-sites-view="3"] [data-sites-list] .monitor-actions,
  :root[data-dash-view="2"] [data-dash-sites] .monitor-actions { gap: 2px; }
  :root[data-sites-view="2"] [data-sites-list] .monitor-actions .btn-icon,
  :root[data-sites-view="3"] [data-sites-list] .monitor-actions .btn-icon,
  :root[data-dash-view="2"] [data-dash-sites] .monitor-actions .btn-icon { width: 30px; min-height: 30px; }
}

/* Trois colonnes : il faut de la place pour que le nom du site reste lisible. */
@media (min-width: 1280px) {
  :root[data-sites-view="3"] [data-sites-list] .monitor-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Full grid : autant de colonnes que l'écran en accepte, d'un bord à l'autre.
   Le choix 2/3 vues règle la densité (largeur minimale d'une carte), donc les
   deux réglages restent utiles ensemble. */
@media (min-width: 1001px) {
  :root[data-wide="1"][data-sites-view="2"] [data-sites-list] .monitor-list,
  :root[data-wide="1"][data-dash-view="2"] [data-dash-sites] .monitor-list {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  }
  :root[data-wide="1"][data-sites-view="3"] [data-sites-list] .monitor-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* ---------- indicateurs ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 520; color: var(--muted); }
.stat-value { margin-top: 6px; font-size: 26px; font-weight: 620; letter-spacing: -.03em; line-height: 1.1; }
.stat-value small { margin-left: 3px; font-size: 12px; font-weight: 520; letter-spacing: 0; color: var(--muted); }
.stat-foot { margin-top: 3px; font-size: 11px; color: var(--muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.kpi .k-label { font-size: 11px; color: var(--muted); }
.kpi b { display: block; margin-top: 6px; font-size: 21px; font-weight: 620; letter-spacing: -.028em; }
.kpi small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }

/* ---------- liste des sites ---------- */
.monitor-list { display: grid; gap: 6px; }
.monitor {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 120px 100px 92px 84px auto;
  align-items: center;
  gap: 14px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .14s ease, background-color .14s ease;
}
.monitor:hover { border-color: var(--line-strong); }
.monitor.is-down { border-color: transparent; box-shadow: inset 2px 0 0 var(--down); background: var(--down-soft); }
.monitor-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.monitor-name { min-width: 0; }
.monitor-name b { display: block; font-size: 13px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-name small { display: block; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-cell { font-size: 11.5px; color: var(--text-dim); }
.monitor-cell label { display: block; font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.monitor-actions { display: flex; gap: 4px; justify-content: flex-end; }
.monitor .spark { height: 24px; max-width: 110px; }
.uptime-cell b { font-size: 12.5px; font-weight: 560; }
.uptime-cell span { display: block; font-size: 10.5px; color: var(--muted); }
.list-head {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 120px 100px 92px 84px auto;
  gap: 14px;
  padding: 0 15px 6px;
  font-size: 10.5px;
  font-weight: 560;
  letter-spacing: .03em;
  color: var(--muted);
}

/* ---------- fiche d’un site ---------- */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.detail-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.detail-title h1 { font-size: clamp(21px, 2.6vw, 28px); letter-spacing: -.028em; }
.detail-title .url { margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); word-break: break-all; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.chart { width: 100%; height: 150px; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .area { fill: url(#chartFill); }
.chart .line { fill: none; stroke: var(--accent-text); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.chart .down-dot { fill: var(--down); }
.chart-legend { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 6px; }
.config-list { display: grid; gap: 0; font-size: 12.5px; }
.config-list div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.config-list div:last-child { border-bottom: 0; }
.config-list dt { color: var(--muted); }
.config-list dd { margin: 0; text-align: right; font-weight: 540; word-break: break-word; }

/* ---------- abonnement ---------- */
.current-plan {
  position: relative;
  padding: 24px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.current-plan h2 { font-size: 26px; letter-spacing: -.03em; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }

/* Bouton d’abonnement PayPal.
   Le SDK dessine ses boutons dans une iframe qui peint un fond blanc dès
   qu’une zone n’est pas couverte par un bouton (gouttière entre deux
   financements, ligne « Optimisé par »). On n’en dessine donc qu’un seul,
   sur un fond transparent, et on masque la marge du message d’état tant
   qu’il est vide. */
.paypal-slot { max-width: 340px; }
.paypal-slot [data-paypal-container] { background: transparent; }
.paypal-slot [data-paypal-status] { margin-top: 8px; }
.paypal-slot [data-paypal-status]:empty { margin-top: 0; }
.paypal-note { margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* ==========================================================================
   Tableau de bord — compteurs et colonne latérale
   ========================================================================== */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; }
.dash-main { display: grid; gap: 12px; min-width: 0; }
.dash-side { display: grid; gap: 12px; align-content: start; position: sticky; top: 70px; }

.gauge-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px 10px;
  border-radius: var(--radius);
  color: inherit;
  text-align: center;
  outline: none;
  transition: background-color .15s ease;
  --gauge-color: var(--ok);
}
a.gauge:hover, .gauge:hover { background: var(--fill-1); }
.gauge[data-tone="ok"] { --gauge-color: var(--ok); }
.gauge[data-tone="warn"] { --gauge-color: var(--warn); }
.gauge[data-tone="down"] { --gauge-color: var(--down); }
.gauge[data-tone="idle"] { --gauge-color: var(--line-strong); }
.gauge-canvas { position: relative; width: 100%; max-width: 168px; }
.gauge-svg { width: 100%; height: auto; display: block; overflow: visible; }
.gauge-ticks line { stroke: var(--line-strong); stroke-width: 1.1; stroke-linecap: round; }
.gauge-ticks line.major { stroke: var(--muted); stroke-width: 1.5; }
.gauge-track { fill: none; stroke: var(--fill-3); stroke-width: 9; stroke-linecap: round; }
.gauge-arc {
  fill: none;
  stroke: var(--gauge-color);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--off);
  animation: gauge-draw 1s cubic-bezier(.22, 1, .36, 1) backwards;
}
.gauge-needle {
  transform: rotate(var(--angle));
  transform-origin: 110px 100px;
  transform-box: view-box;
  animation: gauge-needle 1s cubic-bezier(.22, 1, .36, 1) backwards;
}
.gauge-blade { fill: var(--gauge-color); opacity: .9; }
.gauge-hub { fill: var(--surface); stroke: var(--gauge-color); stroke-width: 1.6; }
.gauge-hub-in { fill: var(--gauge-color); }
.gauge-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform: translateY(19%); pointer-events: none; }
.gauge-number { font-size: 25px; font-weight: 620; letter-spacing: -.04em; line-height: 1; color: var(--text); }
.gauge-number i { font-style: normal; font-size: .46em; font-weight: 520; color: var(--muted); margin-left: 1px; letter-spacing: 0; }
.gauge-label { margin-top: 2px; font-size: 12px; font-weight: 560; color: var(--text); }
.gauge-legend { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 0; padding: 0; list-style: none; }
.gauge-key { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.gauge-key b { font-weight: 560; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.gauge-key .dot { box-shadow: none; animation: none; }
.gauge-note {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
}
.gauge-note b { color: var(--text-dim); font-weight: 560; }

@keyframes gauge-draw { from { stroke-dashoffset: var(--len); } }
@keyframes gauge-needle { from { transform: rotate(-126deg); } }

.side-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.side-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.side-panel-head h2 { font-size: 12.5px; font-weight: 600; }
.side-panel-body { padding: 10px 14px 12px; }
.side-link { font-size: 11px; color: var(--accent-text); }
.side-link:hover { text-decoration: underline; }

.mini-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.mini-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mini-row:last-child { border-bottom: 0; }
.mini-row .mini-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.mini-row .mini-meta { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.mini-empty { padding: 6px 0; font-size: 12px; color: var(--muted); }

.alert-feed { display: grid; gap: 9px; }
.alert-item { display: grid; gap: 2px; padding-left: 10px; border-left: 2px solid var(--line); font-size: 12px; }
.alert-item[data-tone="down"] { border-left-color: var(--down); }
.alert-item[data-tone="ok"] { border-left-color: var(--ok); }
.alert-item b { font-size: 12.5px; font-weight: 560; color: var(--text); }
.alert-item span { color: var(--muted); font-size: 11px; }

.report-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.report-line b { color: var(--text-dim); font-weight: 560; }

/* ==========================================================================
   Downselector
   ========================================================================== */
.ds-hero { padding: 56px 0 22px; }
.ds-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 40px; align-items: start; }
.ds-hero h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -.034em; margin-top: 8px; }
.ds-hero h1 em { font-style: normal; color: var(--accent-text); }
.ds-live-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.ds-side { display: grid; gap: 10px; }
.ds-side-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ds-side-card h3 { font-size: 15px; margin: 5px 0 0; }
.ds-side-card > p { margin-top: 5px; }
.ds-incident { display: flex; align-items: flex-start; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ds-incident:last-child { border-bottom: 0; padding-bottom: 0; }
.ds-incident .dot { margin-top: 5px; }
.ds-incident b { display: block; font-size: 12.5px; font-weight: 560; }
.ds-incident small { display: block; font-size: 10.5px; color: var(--muted); }

.ds-filters { display: grid; gap: 11px; margin: 16px 0 10px; }
.ds-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.ds-chips::-webkit-scrollbar { display: none; }
.ds-chip {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 540;
  white-space: nowrap;
  transition: border-color .14s ease, background-color .14s ease, color .14s ease;
}
.ds-chip:hover { color: var(--text); border-color: var(--line-strong); }
.ds-chip.is-active { background: var(--text); border-color: var(--text); color: var(--paper); font-weight: 560; }
.ds-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 170px 170px auto; gap: 8px; }
.ds-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 2px 11px; font-size: 12px; color: var(--muted); }
.ds-summary b { color: var(--text); font-weight: 620; }

.ds-list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.ds-head, .ds-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 128px 92px 74px 140px; align-items: center; gap: 12px; padding: 0 15px; }
.ds-head { height: 34px; font-size: 10.5px; font-weight: 560; letter-spacing: .03em; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ds-row { min-height: 54px; border-bottom: 1px solid var(--line); transition: background-color .13s ease; }
.ds-row:last-of-type { border-bottom: 0; }
.ds-row:hover { background: var(--fill-1); }
.ds-rank { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.ds-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ds-logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 620;
  color: var(--text-dim);
}
.ds-name-text { min-width: 0; }
.ds-name-text b { display: block; font-size: 13px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-name-text small { display: block; font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-col-status { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ds-check { font-size: 10px; color: var(--muted); white-space: nowrap; }
.ds-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 15px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.ds-locked b { font-size: 13px; }
.ds-locked p { font-size: 11.5px; color: var(--muted); margin-top: 3px; max-width: 520px; }
.ds-foot { margin-top: 13px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.ds-foot a { color: var(--accent-text); }
.ds-foot a:hover { text-decoration: underline; }

/* ==========================================================================
   Attaques DDoS — globe WebGL
   ========================================================================== */
.atk-hero { padding: 48px 0 16px; }
.atk-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 10.5px;
  font-weight: 560;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
}
.atk-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--down); animation: pulse-down 2s ease-in-out infinite; }
.atk-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr); gap: 12px; align-items: start; }

.globe-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.globe-canvas { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 540px; }
canvas[data-globe] { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
canvas[data-globe]:active { cursor: grabbing; }
.globe-fallback { display: none; position: absolute; inset: 0; place-items: center; text-align: center; padding: 24px; }
.no-globe .globe-fallback { display: grid; }
.no-globe canvas[data-globe] { display: none; }
.globe-fallback-sphere {
  width: min(220px, 60%);
  aspect-ratio: 1;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.globe-legend {
  position: absolute;
  left: 14px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  pointer-events: none;
}
.globe-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.globe-hint {
  position: absolute;
  right: 14px;
  top: 12px;
  font-size: 10.5px;
  color: var(--muted);
  pointer-events: none;
}
/* Affiché quand la source DDoS ne renvoie rien : le globe reste lisible
   (continents) mais aucun point chaud n'est inventé. */
.globe-nodata {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, 82%);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  pointer-events: none;
}
.globe-nodata p + p { margin-top: 6px; }

.atk-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.atk-stat { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.atk-stat b { display: block; margin-top: 5px; font-size: 21px; font-weight: 620; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.atk-stat small { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }

.atk-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.atk-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background-color .13s ease;
}
.atk-row:hover, .atk-row:focus-visible { background: var(--fill-1); outline: none; }
.atk-row:last-child { border-bottom: 0; }
.atk-flag { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.atk-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--text-dim); }
.atk-bar { position: relative; height: 3px; margin-top: 5px; border-radius: 999px; background: var(--fill-3); overflow: hidden; }
.atk-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--down); opacity: .75; }
.atk-row[data-kind="target"] .atk-bar i { background: var(--warn); }
.atk-val { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.atk-val-locked { letter-spacing: .12em; color: var(--muted); opacity: .8; }
.atk-hidden {
  padding: 8px 4px 2px;
  border-top: 1px dashed var(--line);
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}
.atk-mask { letter-spacing: .16em; color: var(--muted) !important; font-weight: 500 !important; }

/* Guide de configuration du jeton Radar (console). */
.radar-steps {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.radar-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.radar-steps b { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.radar-steps p { margin-top: 4px; font-size: 12.5px; line-height: 1.65; color: var(--text-dim); }
.radar-steps .btn { margin-top: 8px; }
.radar-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.radar-steps code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--fill-2);
  font-family: var(--mono);
  font-size: 11.5px;
}

/* Encart d’abonnement affiché quand la carte est en aperçu. */.atk-gate { border-color: var(--accent-line); }
.atk-gate-list { display: grid; gap: 7px; margin: 0 0 16px; padding: 0; list-style: none; }
.atk-gate-list li { position: relative; padding-left: 22px; font-size: 12.8px; color: var(--text-dim); }
.atk-gate-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.atk-gate-actions { padding-top: 14px; border-top: 1px solid var(--line); }
.atk-cta { border-color: var(--accent-line); background: var(--accent-soft); }
.atk-cta .card-title { font-size: 16px; }
/* Sur le fond teinté de l’encart, `--muted` tombe à 4,3:1 en thème sombre. */
.atk-cta p { color: var(--text-dim); }

.atk-tabs { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.atk-tab {
  padding: 5px 12px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 540;
  cursor: pointer;
  transition: background-color .14s ease, color .14s ease;
}
.atk-tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.atk-source { margin-top: 13px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.atk-source b { color: var(--text-dim); }
.atk-empty { padding: 24px 16px; text-align: center; }

/* ==========================================================================
   Adaptations
   ========================================================================== */
@media (max-width: 1180px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .dash-side { position: static; grid-template-columns: 1fr 1fr; }
  .dash-side .side-panel:first-child { grid-column: span 2; }
}
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .ds-hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .ds-toolbar { grid-template-columns: minmax(0, 1fr) 150px 150px auto; }
  .hero-live { max-width: 540px; }
  .bento, .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid, .atk-grid { grid-template-columns: minmax(0, 1fr); }
  .monitor, .list-head { grid-template-columns: minmax(0, 1.5fr) 100px 84px auto; }
  .monitor .cell-hide, .list-head .cell-hide { display: none; }
  .globe-canvas { aspect-ratio: 4 / 3; max-height: 420px; }
}
@media (max-width: 900px) {
  .detail-grid > * { min-width: 0; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .ds-head, .ds-row { grid-template-columns: 32px minmax(0, 1fr) minmax(84px, auto); }
  .ds-hide-sm, .ds-hide-md { display: none; }
  .ds-toolbar { grid-template-columns: minmax(0, 1fr) 1fr; }
  .ds-toolbar .input { grid-column: span 2; }
  .ds-side { max-width: 520px; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(78vw, 272px);
    height: 100dvh;
    transform: translateX(-102%);
    transition: transform .22s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 0 0 0 1px var(--line);
    background: var(--surface);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; z-index: 35; background: rgba(10, 12, 11, .5); }
  .app-menu-btn { display: inline-grid; }
  .page { padding: 20px 18px 56px; }
  .topbar { padding: 0 18px; }
  .top-actions .hide-sm { display: none; }
  .monitor, .list-head { grid-template-columns: minmax(0, 1fr) auto; }
  .monitor .cell-hide, .list-head .cell-hide, .monitor .uptime-cell, .list-head .uptime-head { display: none; }
  .monitor-actions { display: none; }
  .list-head span:last-child { display: none; }
  .monitor-cell.status-cell { justify-self: end; }
  .status-row { grid-template-columns: minmax(0, 1fr) auto; }
  .status-row .bar-cell { display: none; }
  .site-nav { display: none; }
  .hero { padding: 48px 0 20px; }
  .section { padding-top: 48px; }
}
@media (max-width: 760px) {
  .dash-side { grid-template-columns: 1fr; }
  .dash-side .side-panel:first-child { grid-column: span 1; }
}
@media (max-width: 640px) {
  .container, .container-tight { width: min(100% - 32px, 1120px); }
  .bento, .pricing, .faq, .steps { grid-template-columns: 1fr; }
  .bento .span-2 { grid-column: span 1; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: span 1; }
  .stats { gap: 8px; }
  .stat { padding: 13px 14px; }
  .stat-value { font-size: 23px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .demo-row { grid-template-columns: auto minmax(0, 1fr) 52px; }
  .demo-row .spark-cell { display: none; }
  .hero-proof { gap: 18px; }
  .card-pad, .card-body { padding: 16px; }
  .card-head { padding: 16px 16px 0; }
  .page-head { margin-bottom: 16px; }
  .auth-card { padding: 22px 18px; }
  .detail-head .page-actions { width: 100%; }
  .setting-row { flex-direction: column; gap: 10px; }
  .setting-row .control { width: 100%; }
  .banner { flex-wrap: wrap; }
  .banner .btn { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .globe-canvas { aspect-ratio: 1 / 1; max-height: 330px; }
  .globe-legend { left: 8px; bottom: 8px; gap: 5px; font-size: 10px; }
  .atk-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .gauge-number { font-size: 21px; }
  .gauge-pair { gap: 0; }
}

/* Micro-titres : la taille reste la même quel que soit leur conteneur. */
.eyebrow,
.page-head .eyebrow,
.section-head .eyebrow,
.hero .eyebrow,
.ds-hero .eyebrow,
.atk-hero .eyebrow {
  margin: 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .gauge-arc, .gauge-needle { animation: none; }
  .atk-live i, .dot-down, .dot-live { animation: none; }
}
