/* ==========================================================================
   Sereno : système visuel commun
   Identité : bleu nuit, blanc, bleu clair, vert (validation), touche de noir.
   Polices auto-hébergées (fonts.css) : Archivo (titres) et
   Atkinson Hyperlegible (texte, conçue pour la lisibilité).
   ========================================================================== */

@import url('/assets/css/fonts.css?v=20261010d');

:root {
    --nuit: #0B1F3A;        /* bleu nuit */
    --nuit-2: #13304F;
    --noir: #060B14;
    --ciel: #7CC0F5;        /* bleu clair (sur fond sombre) */
    --ciel-pale: #E3F0FC;
    --bleu: #1E63C9;        /* bleu d'action (sur fond clair, 5,6:1 sur blanc) */
    --bleu-2: #174FA3;
    --vert: #17845A;        /* validé (texte, 4,8:1 sur blanc) */
    --vert-vif: #34C77B;    /* validé (pastilles, fonds sombres) */
    --alerte: #C8372D;

    --bg: #F5F8FC;
    --surface: #FFFFFF;
    --texte: #0B1F3A;
    --texte-2: #46566E;
    --trait: #D8E1EC;
    --trait-fort: #0B1F3A;
    --accent: var(--bleu);

    --f-titre: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --f-texte: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --r: 10px;
    --r-sm: 6px;
    --page: 1180px;
    --ombre: 0 1px 2px rgb(11 31 58 / .06), 0 8px 24px -12px rgb(11 31 58 / .18);
    color-scheme: light;
}
html.dark {
    --bg: #060E1B;
    --surface: #0D1C33;
    --texte: #EAF1FA;
    --texte-2: #A3B3C9;
    --trait: #1D3150;
    --trait-fort: #EAF1FA;
    --accent: var(--ciel);
    --vert: #4ADE9A;
    --alerte: #F06A5F;
    --ombre: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .5);
    color-scheme: dark;
}

/* ---------- Base (sélecteurs à spécificité nulle) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body.sg {
    margin: 0;
    background: var(--bg);
    color: var(--texte);
    font-family: var(--f-texte);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
:where(.sg) img { max-width: 100%; height: auto; display: block; }
:where(.sg) a { color: inherit; }
:where(.sg) :where(h1, h2, h3) {
    font-family: var(--f-titre);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0;
}
:where(.sg) p { margin: 0; }
:where(.sg) :focus-visible { outline: 3px solid var(--ciel); outline-offset: 3px; border-radius: 4px; }
:where(.sg) ::selection { background: var(--ciel); color: var(--nuit); }

.sg-page { max-width: var(--page); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .sg-page { padding: 0 16px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sg-skip {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--nuit); color: #fff; padding: 10px 16px;
    font-weight: 700; border-radius: var(--r-sm); text-decoration: none;
}
.sg-skip:focus { top: 12px; }

/* ---------- Logo ---------- */
.sg-logo { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.sg-logo img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(11 31 58 / .08); }
.sg-logo b { font-family: var(--f-titre); font-weight: 750; font-size: 1.3rem; letter-spacing: -.02em; display: block; line-height: 1.1; }
.sg-logo small { display: block; font-size: .78rem; color: var(--texte-2); line-height: 1; }

/* ---------- Boutons ---------- */
.sg-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 48px; padding: 0 1.35rem;
    font-family: var(--f-titre); font-weight: 650; font-size: 1rem; letter-spacing: -.005em;
    border: 1.5px solid transparent; border-radius: 999px;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.sg-btn:active { transform: scale(.98); }
.sg-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.sg-btn-primaire { background: var(--bleu); color: #fff; border-color: var(--bleu); }
.sg-btn-primaire:hover { background: var(--bleu-2); border-color: var(--bleu-2); }
html.dark .sg-btn-primaire { background: var(--ciel); color: var(--nuit); border-color: var(--ciel); }
html.dark .sg-btn-primaire:hover { background: #A5D4F8; border-color: #A5D4F8; }
.sg-btn-ciel { background: var(--ciel); color: var(--nuit); border-color: var(--ciel); }
.sg-btn-ciel:hover { background: #A5D4F8; border-color: #A5D4F8; }
.sg-btn-trait { background: transparent; color: var(--texte); border-color: var(--trait); }
.sg-btn-trait:hover { border-color: var(--texte); }
.sg-btn-sm { min-height: 40px; padding: 0 1rem; font-size: .95rem; }

/* ---------- Navigation ---------- */
.sg-nav {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--trait);
}
.sg-nav-in { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.sg-nav-in > .sg-logo { margin-right: auto; }
.sg-nav-links { display: flex; gap: .25rem; }
.sg-nav-links a {
    padding: .5rem .8rem; text-decoration: none; color: var(--texte-2);
    font-weight: 700; font-size: .98rem; border-radius: 999px;
}
.sg-nav-links a:hover { color: var(--texte); background: color-mix(in srgb, var(--texte) 7%, transparent); }
.sg-nav-auth { display: flex; align-items: center; gap: .75rem; }
.sg-lien { color: var(--texte-2); font-weight: 700; text-decoration: none; font-size: .98rem; }
.sg-lien:hover { color: var(--texte); }
.sg-theme {
    width: 40px; height: 40px; display: grid; place-items: center;
    background: transparent; border: 1px solid var(--trait); border-radius: 50%;
    color: var(--texte); cursor: pointer; position: relative;
}
.sg-theme:hover { border-color: var(--texte-2); }
.sg-theme svg { width: 18px; height: 18px; position: absolute; }
.sg-theme .icon-sun { display: none; }
html.dark .sg-theme .icon-sun { display: block; }
html.dark .sg-theme .icon-moon { display: none; }
@media (max-width: 860px) { .sg-nav-links { display: none; } }
@media (max-width: 520px) {
    .sg-nav-auth .sg-lien, .sg-nav .sg-logo small { display: none; }
    .sg-nav-in { gap: .6rem; }
}
@media (max-width: 380px) { .sg-nav .sg-logo span { display: none; } }

/* ---------- Plaques de numéro (étapes, missions) ---------- */
.sg-num {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 2.5rem; height: 2.5rem;
    background: var(--nuit); color: var(--ciel);
    font-family: var(--f-titre); font-weight: 800; font-size: 1.15rem;
    border-radius: 50%;
    font-variant-numeric: tabular-nums;
}
html.dark .sg-num { background: var(--ciel); color: var(--nuit); }

/* ---------- Pastilles ---------- */
.sg-tag {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .15rem .6rem; border-radius: 999px;
    font-size: .85rem; font-weight: 700; line-height: 1.5;
    border: 1px solid var(--trait); color: var(--texte-2);
}
.sg-tag-vert { color: var(--vert); border-color: color-mix(in srgb, var(--vert) 45%, transparent); }
.sg-tag-plein { background: var(--nuit); color: #fff; border-color: var(--nuit); }

/* ---------- Pied de page commun ---------- */
.sg-pied { background: var(--noir); color: #B7C5D8; }
.sg-pied-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.sg-pied .sg-logo b { color: #fff; }
.sg-pied .sg-logo small { color: #8A9AB2; }
.sg-pied p { margin-top: 14px; max-width: 30ch; font-size: .98rem; }
.sg-pied h2 { font-size: 1rem; color: #fff; margin-bottom: 14px; }
.sg-pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sg-pied ul a { text-decoration: none; }
.sg-pied ul a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.sg-pied-bas { border-top: 1px solid #ffffff1a; padding-top: 20px; padding-bottom: 28px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .92rem; color: #8A9AB2; }
@media (max-width: 960px) { .sg-pied-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .sg-pied-in { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    .sg *, .sg *::before, .sg *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
