/**
 * Quali-opti - Chrome commun à toutes les pages : polices, jetons, en-tête, pied de page.
 *
 * Direction D318 (maquette du propriétaire, 2026-11-24) : fond crème, vert profond pour les actions et ce qui
 * est conforme, encre presque noire, titres en Source Serif 4, texte en Public Sans. Aucun orange : ce qui reste
 * à compléter est en jaune moutarde. Polices hébergées sur le site (licences OFL dans assets/polices/).
 *
 * Contrastes mesurés : encre sur blanc 16,2:1 ; ardoise sur blanc 6,9:1 ; blanc sur vert 7,0:1 ;
 * vert sur voile vert 6,2:1 ; vert sur crème 6,6:1.
 */

@font-face {
    font-family: "Source Serif 4";
    src: url("polices/source-serif-4-latin-wght-normal.woff2") format("woff2-variations");
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
    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: "Source Serif 4";
    src: url("polices/source-serif-4-latin-ext-wght-normal.woff2") format("woff2-variations");
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("polices/source-serif-4-latin-wght-italic.woff2") format("woff2-variations");
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
    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: "Source Serif 4";
    src: url("polices/source-serif-4-latin-ext-wght-italic.woff2") format("woff2-variations");
    font-weight: 200 900;
    font-style: italic;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Public Sans";
    src: url("polices/public-sans-latin-normal.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-display: swap;
    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: "Public Sans";
    src: url("polices/public-sans-latin-ext-normal.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

/* ===================================================== Jetons de conception */

:root {
    color-scheme: light;

    --nuit: #16202b;
    --nuit-profond: #0f1f24;
    --sauge: #2f8a50;
    --sauge-fonce: #1d6a3a;
    --vert-profond: #154f2b;
    --sauge-clair: #9cc7a8;
    --sauge-voile: #e8f1ea;
    --ciel-voile: #eef1ea;
    --lin: #f7f5ef;
    --creme: #f7f5ef;
    --moutarde: #c99a1e;
    --ardoise: #4b5560;
    --ligne: #e4e1d8;
    --ligne-forte: #cdc8ba;
    --alerte: #b3403a;
    --alerte-voile: #fbeceb;
    --vigilance: #7a6418;
    --vigilance-voile: #f6efd6;

    /* Alias de rôle, lus par app.css (espace client, comptes) et les anciennes pages. */
    --encre-prusse: var(--nuit);
    --carbone: var(--nuit-profond);
    --tampon: var(--sauge-fonce);
    --surligneur: var(--sauge-clair);
    --crayon: var(--ardoise);
    --papier-admin: var(--lin);
    --papier: #ffffff;
    --craie: #ffffff;
    --encre: var(--nuit);
    --encre-douce: var(--ardoise);
    --marque: var(--nuit);
    --marque-fonce: var(--nuit-profond);
    --marque-bande: var(--nuit);
    --marque-voile: var(--ciel-voile);
    --accent: var(--sauge-fonce);
    --accent-encre: var(--sauge-fonce);
    --accent-voile: var(--sauge-voile);
    --bordure: var(--ligne);
    --bordure-forte: var(--ligne-forte);

    --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    --titre: "Source Serif 4", Georgia, "Times New Roman", serif;
    --serif: var(--titre);

    --rayon: 1rem;
    --rayon-grand: 1.5rem;
    --ombre-carte: 0 1px 2px rgb(19 40 61 / 0.06), 0 8px 24px -12px rgb(19 40 61 / 0.18);
    --ombre-produit: 0 2px 4px rgb(19 40 61 / 0.05), 0 30px 60px -28px rgb(19 40 61 / 0.35);

    --largeur-site: 75rem;
    --courbe-douce: cubic-bezier(0.22, 1, 0.36, 1);
    --courbe-ressort: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--nuit);
    background: #fff;
}

/* ================================================================ Structure */

.enveloppe {
    width: min(100% - 2.5rem, var(--largeur-site));
    margin-inline: auto;
}

/* ============================================== Chrome partagé et évitement */

.visuellement-cache {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.evitement {
    position: absolute;
    left: 1rem; top: -4rem;
    z-index: 100;
    background: var(--nuit);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.6rem;
    text-decoration: none;
    transition: top 0.15s ease;
}
.evitement:focus { top: 1rem; color: #fff; }

:focus-visible {
    outline: 3px solid var(--sauge);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ================================================================== Annonce */

.annonce {
    background: var(--nuit);
    color: #dfe8ef;
    font-size: 0.92rem;
    text-align: center;
    padding: 0.55rem 1rem;
}
.annonce a { color: #fff; font-weight: 600; text-underline-offset: 0.2em; margin-left: 0.4rem; }
.annonce a:hover { color: var(--sauge-clair); }

/* =================================================================== En-tête */

.entete {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(255 255 255 / 0.86);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.entete.est-defile { border-bottom-color: var(--ligne); box-shadow: 0 6px 20px -16px rgb(19 40 61 / 0.4); }

.entete__barre {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4.5rem;
}

.marque { gap: 0.65rem; text-decoration: none; color: var(--nuit); }
.marque img { width: 2rem; height: 2rem; }
.marque > span { display: flex; flex-direction: column; line-height: 1.1; }
.marque__mot { font-family: var(--titre); font-weight: 700; font-size: 1.6rem; letter-spacing: -0.02em; display: inline-flex; align-items: flex-end; gap: 0.1rem; }
.marque__coche { width: 1.15em; height: 1.15em; color: var(--sauge); margin-bottom: 0.08em; }
.marque__mot em { font-style: normal; color: var(--sauge-fonce); }
.marque__baseline { font-size: 0.74rem; color: var(--ardoise); margin-top: 0.15rem; }
.marque--claire { color: #fff; }
.marque--claire .marque__coche { color: var(--sauge-clair); }
.marque--claire .marque__baseline { color: #9fb2c3; }

.entete__nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.97rem;
    font-weight: 500;
}
.entete__nav a { color: var(--nuit); text-decoration: none; padding: 0 0.8rem; border-radius: 0.6rem; transition: background 0.2s ease; }
.entete__nav a:not(.entete__lien):not(.entete__cta):hover { background: var(--ciel-voile); }
.entete__nav a, .marque { display: inline-flex; align-items: center; min-height: 2.75rem; }

.entete__compte { color: var(--ardoise); font-size: 0.9rem; padding: 0 0.6rem; }

.entete__nav a.entete__lien,
.entete__nav a.entete__cta {
    font-weight: 600;
    border-radius: 999px;
    padding: 0 1.15rem;
    border: 1.5px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--courbe-douce);
}
.entete__nav a.entete__lien { border-color: var(--ligne-forte); margin-left: 0.5rem; }
.entete__nav a.entete__lien:hover { border-color: var(--sauge-fonce); }
.entete__nav a.entete__cta { background: var(--sauge-fonce); color: #fff; border-radius: 0.6rem; }
.entete__nav a.entete__cta:hover { background: var(--vert-profond); transform: translateY(-1px); }

@media (max-width: 62rem) {
    .entete__nav a:not(.entete__lien):not(.entete__cta) { display: none; }
}
@media (max-width: 30rem) {
    .marque__baseline { display: none; }
    .entete__nav a.entete__lien { display: none; }
}

/* ============================================================== Pied de page */

.pied {
    background: var(--nuit-profond);
    color: #b8c6d3;
    padding: 4.5rem 0 2rem;
    font-size: 0.97rem;
}
.pied a { color: #e7eef4; text-underline-offset: 0.2em; }
.pied a:hover { color: var(--sauge-clair); }

.pied__grille {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
}
.pied h2 {
    font-family: var(--titre);
    font-size: 1rem;
    font-weight: 650;
    color: #fff;
    margin: 0 0 0.75rem;
}
.pied p { margin: 0 0 1.15rem; }
.pied p:last-child { margin-bottom: 0; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li a { display: inline-flex; align-items: center; min-height: 2.5rem; text-decoration: none; }
.pied li a:hover { text-decoration: underline; }
.pied__resume { max-width: 22rem; margin-top: 1rem !important; }

.pied__reseaux { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.pied__reseau {
    display: inline-grid;
    place-items: center;
    width: 2.75rem; height: 2.75rem;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.08);
    color: #fff;
}
.pied__reseau:hover { background: var(--sauge); color: #fff; }
.pied__reseau svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }

.pied__gage { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.92rem; }
.pied__gage strong { color: #fff; display: block; font-weight: 600; }
.pied__drapeau { font-size: 1.4rem; line-height: 1.2; }

.pied__bas {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgb(255 255 255 / 0.1);
    font-size: 0.85rem;
    color: #8ea1b2;
}
.pied__bas p { margin: 0; }

@media (max-width: 56rem) {
    .pied__grille { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 34rem) {
    .pied__grille { grid-template-columns: 1fr; }
}

/* ======================================================== Impression, motion */

@media print {
    .entete, .pied, .evitement, .annonce, .onglets { display: none !important; }
    body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Maquette D318 : bandeau d'annonce encre avec drapeau, en-tête sur fond crème. */
.annonce { background: var(--nuit-profond); font-size: 0.85rem; padding: 0.45rem 1rem; }
.annonce__drapeau { display: inline-block; width: 1.1rem; height: 0.75rem; margin-right: 0.5rem; vertical-align: -0.05rem; border-radius: 2px;
    background: linear-gradient(90deg, #1f4fa3 0 33.3%, #fff 33.3% 66.6%, #d33a3a 66.6%); }
.entete { background: rgb(247 245 239 / 0.94); }
.pied { background: var(--nuit-profond); }
