/* ======================================================================
   Direction A « Console » — Design tokens
   Variables de thème (clair + sombre) + polices auto-hébergées.
   Chargé en PREMIER, globalement (base + base_public).
   Le thème actif est porté par <html data-theme="light|dark">.
   ⚠ Ne JAMAIS poser de transition background/color sur :root/html/body
     (la valeur var() se fige pendant la transition de thème).
   ====================================================================== */

/* ---------- Polices auto-hébergées (variables, sous-ensembles latin) ---------- */
@font-face {
    font-family: 'Hanken Grotesk';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/HankenGrotesk-latin-vOuBqtB.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: 'Hanken Grotesk';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/HankenGrotesk-latinext-ga7Qi-c.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: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/JetBrainsMono-latin-AcnlIJe.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: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/JetBrainsMono-latinext-c8h-btv.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;
}

/* ---------- Thème clair (défaut) ---------- */
:root {
    --font-ui: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

    /* Rayons */
    --radius-card: 0.9375rem;
    --radius-lg: 1rem;
    --radius: 0.625rem;
    --radius-pill: 6.1875rem;

    /* Couleurs */
    --bg: #f5f5f8;
    --surface: #ffffff;
    --surface-2: #f1f1f5;
    --border: #e8e8ee;
    --border-strong: #d8d8e1;
    --text: #191921;
    --muted: #5f5f6b;
    --faint: #9696a3;
    --accent: #5b5bd6;
    --accent-fg: #ffffff;
    --accent-soft: #ececfb;
    --positive: #178a50;
    --positive-soft: #e3f5ea;
    --warning: #b5710d;
    --warning-soft: #faf0dd;
    --danger: #d23b3b;
    --danger-soft: #fbe9e9;
    --ring: rgba(91, 91, 214, 0.32);
    --shadow: 0 1px 0.125rem rgba(20, 20, 35, 0.05), 0 0.375rem 1rem -0.625rem rgba(20, 20, 35, 0.10);

    color-scheme: light;
}

/* ---------- Thème sombre ---------- */
:root[data-theme="dark"] {
    --bg: #0a0a0d;
    --surface: #141418;
    --surface-2: #1c1c22;
    --border: #27272e;
    --border-strong: #37373f;
    --text: #f3f3f6;
    --muted: #9d9daa;
    --faint: #6c6c79;
    --accent: #8585f0;
    --accent-fg: #ffffff;
    --accent-soft: #222240;
    --positive: #3fc97c;
    --positive-soft: #142a1f;
    --warning: #e3ad48;
    --warning-soft: #2a2110;
    --danger: #f06a6a;
    --danger-soft: #2c1616;
    --ring: rgba(133, 133, 240, 0.45);
    --shadow: 0 1px 0.125rem rgba(0, 0, 0, 0.5), 0 0.625rem 1.75rem -0.875rem rgba(0, 0, 0, 0.7);

    color-scheme: dark;
}
