/* Geist hébergée sur le site : aucune visite n'envoie l'adresse IP du visiteur à Google */
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 400 600;
    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 600;
    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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Palette Olive et pierre — valeurs choisies par Estheban, ne pas en ajouter d'autres */
:root {
    --bg: #F3F1EA;
    --text: #23241B;
    --accent: #6B6A3A;
    --muted: #5C5D4F;
    --raised: #FAF9F5;
    --sunk: #E8E6DC;
    --line: #DCD9CC;
    --glass: rgba(250, 249, 245, .72);
    --glass-line: rgba(35, 36, 27, .09);
    --feature-bg: #6B6A3A;
    --feature-text: #F3F1EA;
    --feature-muted: #ECEBE2;
    --led-off: #CFCCBE;
    --ok: #3F7A45;
    --error: #A3372E;
    --font: 'Geist', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #14140F;
        --text: #ECEBE2;
        --accent: #B7B57A;
        --muted: #A6A597;
        --raised: #1C1C16;
        --sunk: #26261E;
        --line: #303027;
        --glass: rgba(28, 28, 22, .72);
        --glass-line: rgba(236, 235, 226, .08);
        --feature-bg: #B7B57A;
        --feature-text: #14140F;
        --feature-muted: #2E2E1F;
        --led-off: #3A3A30;
        --ok: #86C08A;
        --error: #E58A80;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #14140F;
    --text: #ECEBE2;
    --accent: #B7B57A;
    --muted: #A6A597;
    --raised: #1C1C16;
    --sunk: #26261E;
    --line: #303027;
    --glass: rgba(28, 28, 22, .72);
    --glass-line: rgba(236, 235, 226, .08);
    --feature-bg: #B7B57A;
    --feature-text: #14140F;
    --feature-muted: #2E2E1F;
    --led-off: #3A3A30;
    --ok: #86C08A;
    --error: #E58A80;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

.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;
}

/* Boutons ronds (langue, thème) */
.tool {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    color: var(--muted);
    transition: color .2s, background-color .2s;
}
.tool:hover { color: var(--text); background: var(--sunk); }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tool.lang { font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }

/* Pilule en verre dépoli */
.glass {
    background: var(--glass);
    border: 1px solid var(--glass-line);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-radius: 999px;
}
