/* =============================================================================
   Socle commun DIMOBI — jetons
   =============================================================================
   Partagé par l'espace client et l'app de facturation (cf. commun/README.md).

   Ce fichier ne fait que DÉCLARER : des polices (@font-face) et des variables
   (:root, en clair et en sombre). Il n'applique rien : chargé seul, il ne
   change aucun écran — c'est ce qui permet de le brancher dans une application
   avant que ses écrans ne soient refondus. N'y mettre aucun autre sélecteur que
   :root, ni `color-scheme` (qui colore les champs natifs du navigateur) : un
   test le vérifie.

   Palette du logo : Spring Wood (#FCF8F7) et Cocoa Brown (#301F1E). Titres en
   Bricolage Grotesque, texte en Figtree, données et cotes en IBM Plex Mono —
   trois polices libres (OFL), servies par l'application elle-même.
   ============================================================================= */

/* ── Polices (auto-hébergées, sous-ensembles latin / latin étendu) ───────── */
@font-face {
    font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("fonts/bricolage-grotesque-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: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
    src: url("fonts/figtree-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: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap;
    src: url("fonts/figtree-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
    src: url("fonts/ibm-plex-mono-400-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: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
    src: url("fonts/ibm-plex-mono-500-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: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap;
    src: url("fonts/ibm-plex-mono-600-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;
}

/* ── Jetons ───────────────────────────────────────────────────────────── */
:root {
    /* Palette du logo DIMOBI : Spring Wood (#FCF8F7) et Cocoa Brown (#301F1E).
       La navigation et les scènes restent en Cocoa Brown dans les deux thèmes. */
    --spring-wood: #fcf8f7;
    --cocoa: #301f1e;
    --humus: #301f1e;
    --humus-2: #3a2826;
    --humus-3: #463230;
    --sur-humus: #fcf8f7;
    --sur-humus-2: #cfc0bc;
    --sur-humus-3: #a08c88;

    /* Strates de la carotte, du haut vers le bas (illustration). */
    --strate-1: #4a3427;   /* terre végétale */
    --strate-2: #7b5a42;   /* remblai */
    --strate-3: #c2924f;   /* limon ocre */
    --strate-4: #dfc08c;   /* sable fin */
    --strate-5: #8e8a80;   /* argile grise */
    --strate-6: #a2896d;   /* grave */

    /* Couleurs secondaires du logo, et la nappe de l'illustration. */
    --logo-bleu: #005fd1;
    --logo-rouge: #8e0000;
    --logo-vert: #436a0d;
    --logo-jaune: #ffba00;
    --cuivre: #b8704a;
    --cuivre-clair: #e6b695;
    --nappe: #1b7f8c;
    --nappe-vive: #4cc3cf;

    /* Rôles — thème clair. */
    --fond: #fcf8f7;
    --surface: #ffffff;
    --surface-2: #fefbfa;
    --creux: #f4ecea;
    --texte: #301f1e;
    --texte-2: #5f4b48;
    --texte-3: #8a7572;
    --ligne: #eee3e0;
    --ligne-forte: #dfcfcb;
    --accent: #301f1e;           /* bouton principal : Cocoa Brown, texte Spring Wood (14:1) */
    --accent-survol: #4b3331;
    --accent-texte: #fcf8f7;
    --accent-voile: #f4e9e6;
    --lien: #8a4a28;
    --focus: #005fd1;
    --succes: #436a0d;
    --succes-voile: #edf3e2;
    --attention: #8a5d00;
    --attention-voile: #fff3d4;
    --danger: #8e0000;
    --danger-voile: #f9e3e1;
    --info: #005fd1;
    --info-voile: #e3eefb;

    /* Familles de fichiers : les couleurs du logo. */
    --f-pdf: #8e0000;       --f-pdf-voile: #f8e6e4;
    --f-tableur: #436a0d;   --f-tableur-voile: #ecf2e1;
    --f-image: #005fd1;     --f-image-voile: #e4eefb;
    --f-archive: #8a5d00;   --f-archive-voile: #fff3d4;
    --f-dossier: #a8623c;   --f-dossier-voile: #f6e7dc;
    --f-autre: #6e5e5b;     --f-autre-voile: #f1eae8;

    --ombre-1: 0 1px 2px rgb(48 31 30 / .05), 0 1px 3px rgb(48 31 30 / .04);
    --ombre-2: 0 1px 2px rgb(48 31 30 / .04), 0 10px 28px -12px rgb(48 31 30 / .18);
    --ombre-3: 0 2px 6px rgb(48 31 30 / .06), 0 30px 64px -26px rgb(48 31 30 / .34);

    --rayon-s: 8px;
    --rayon: 12px;
    --rayon-l: 16px;
    --rayon-xl: 24px;

    --police-titre: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
    --police: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --police-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    --barre-largeur: 272px;
    --entete-hauteur: 64px;
    --ressort: cubic-bezier(.2, .8, .2, 1);
    --duree: .18s;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fond: #150e0d;
        --surface: #1e1514;
        --surface-2: #251a19;
        --creux: #100a09;
        --texte: #fcf8f7;
        --texte-2: #cfc0bc;
        --texte-3: #9d8985;
        --ligne: #2f2321;
        --ligne-forte: #42322f;
        --accent: #fcf8f7;       /* bouton principal : Spring Wood, texte Cocoa Brown */
        --accent-survol: #efe4e1;
        --accent-texte: #301f1e;
        --accent-voile: #2f2220;
        --lien: #e7a980;
        --focus: #6fb1ff;
        --succes: #9cc96a;       --succes-voile: #18220e;
        --attention: #ffcc4d;    --attention-voile: #2a2010;
        --danger: #ff8f85;       --danger-voile: #2e1413;
        --info: #6fb1ff;         --info-voile: #0f1d30;
        --f-pdf: #ff8f85;        --f-pdf-voile: #2e1614;
        --f-tableur: #9cc96a;    --f-tableur-voile: #18220e;
        --f-image: #6fb1ff;      --f-image-voile: #0f1d30;
        --f-archive: #ffcc4d;    --f-archive-voile: #2a2010;
        --f-dossier: #dd9a70;    --f-dossier-voile: #2d1e15;
        --f-autre: #b5a5a1;      --f-autre-voile: #241a19;
        --ombre-1: 0 1px 2px rgb(0 0 0 / .4);
        --ombre-2: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
        --ombre-3: 0 2px 6px rgb(0 0 0 / .45), 0 30px 70px -26px rgb(0 0 0 / .75);
    }
}
