/* ==========================================================================
   geist — VARIANTE opt-in du thème homelab-sta-inc (2026-11-09)
   Se charge APRÈS homelab-sta-inc.css : il n'écrase que des tokens
   (polices, surfaces, texte, accents, arrondis), titres et code — rien qui change la mise en page.
   Les statuts (--ok/--warn/--bad/--info), les séries et toutes les
   primitives (table, pill, note, card…) viennent du thème du parc.

   Polices : Geist + Geist Mono v1.9.0 (Vercel, licence OFL — fonts/OFL.txt),
   sous-ensemble Latin complet (accents FR, œ, « », €, ponctuation générale).
   Les url(fonts/…) sont remplacées par des data: URI par new-deliverable.py
   (--style geist) ; une appli les sert en statique à côté de ce fichier.
   Régénérer les polices : fonts/README.md.

   Contrastes : python3 check-contrast.py --overlay geist.css
   ========================================================================== */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
}

/* ---------- 1. Clair (défaut) --------------------------------------------- */
:root {
  --sans:  "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI",
           "Helvetica Neue", Arial, sans-serif;
  --mono:  "Geist Mono", ui-monospace, SFMono-Regular, Consolas,
           "Liberation Mono", Menlo, monospace;
  --ui-font: var(--sans);

  --bg:            #ffffff;
  --card:          #fafafa;
  --surface:       #fafafa;
  --elevated:      #f2f2f2;
  --line:          #ebebeb;
  --line-soft:     #f2f2f2;
  --border:        #c9c9c9;
  --fg:            #171717;
  --fg-soft:       #2e2e2e;
  --muted:         #4d4d4d;
  --accent:        #005ec2;   /* lien, icône — bleu Geist assombri pour AA sur #f2f2f2 */
  --accent-fill:   #171717;   /* bouton plein = couleur du texte, inversé */
  --accent-soft:   #ebf5ff;
  --accent-vivid:  #0070f3;   /* filet, focus — jamais du texte */
  --cta:           #005ec2;
  --cta-fill:      #171717;
  --cta-soft:      #ebf5ff;
  --cta-vivid:     #0070f3;
  --onacc:         #ffffff;

  --radius:        6px;
  --radius-sm:     4px;
  --radius-lg:     12px;
  --shadow:        0 1px 2px rgba(0,0,0,.04), 0 0 0 1px rgba(0,0,0,.06);
  --shadow-lg:     0 4px 12px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.06);
}

/* ---------- 2. Sombre — auto (media) puis explicite (attribut) ------------- */
/* Les deux blocs sont IDENTIQUES ; check-contrast.py --overlay le vérifie. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:           #0a0a0a;
    --card:         #111111;
    --surface:      #111111;
    --elevated:     #1a1a1a;
    --line:         #2e2e2e;
    --line-soft:    #1f1f1f;
    --border:       #454545;
    --fg:           #ededed;
    --fg-soft:      #d4d4d4;
    --muted:        #a1a1a1;
    --accent:       #52a8ff;
    --accent-fill:  #ededed;
    --accent-soft:  #0f2440;
    --accent-vivid: #0070f3;
    --cta:          #52a8ff;
    --cta-fill:     #ededed;
    --cta-soft:     #0f2440;
    --cta-vivid:    #0070f3;
    --onacc:        #0a0a0a;
    --shadow:       0 0 0 1px rgba(255,255,255,.08);
    --shadow-lg:    0 8px 24px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
  }
}
:root[data-theme="dark"] {
  --bg:           #0a0a0a;
  --card:         #111111;
  --surface:      #111111;
  --elevated:     #1a1a1a;
  --line:         #2e2e2e;
  --line-soft:    #1f1f1f;
  --border:       #454545;
  --fg:           #ededed;
  --fg-soft:      #d4d4d4;
  --muted:        #a1a1a1;
  --accent:       #52a8ff;
  --accent-fill:  #ededed;
  --accent-soft:  #0f2440;
  --accent-vivid: #0070f3;
  --cta:          #52a8ff;
  --cta-fill:     #ededed;
  --cta-soft:     #0f2440;
  --cta-vivid:    #0070f3;
  --onacc:        #0a0a0a;
  --shadow:       0 0 0 1px rgba(255,255,255,.08);
  --shadow-lg:    0 8px 24px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
}

/* ---------- 3. Rendu typographique ---------------------------------------- */
body {
  font-family: var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.04em; }
h3, h4 { letter-spacing: -.02em; }
code, pre, kbd, samp, .mono { font-family: var(--mono); }

/* Contour de focus au bleu Geist — sélecteurs d'ÉTAT, sans effet sur la mise en page. */
.btn:focus-visible,
#themebtn:focus-visible, [data-themebtn]:focus-visible {
  outline: 2px solid var(--accent-vivid); outline-offset: 2px;
}

/* PAS ICI : majuscules mono sur .meta/.label/th, gabarit de .btn. Ces classes
   portent un autre sens dans les applis (sitrep : .meta = rangée flex de badges,
   et text-transform s'hérite). Elles vivent dans GEIST_REPORT_CSS de
   new-deliverable.py, réservées au format rapport. Ce fichier ne pose que ce qui
   se transpose à toute page : polices, tokens, titres, code, focus. */
