@layer jetons, base, composants, ecrans;
@layer jetons {
  :root,
  [data-mode="social"],
  [data-theme="jour"] {
    color-scheme: light;
    --fond: #f4efe4;
    --fond-creux: #e9e2d2;
    --surface: #fbf8f2;
    --surface-haute: #ffffff;
    --surface-survol: #efe9dc;
    --trait: #ddd4c2;
    --trait-fort: #867b67;
    --texte: #15201b;
    --texte-doux: #45514b;
    --texte-discret: #5a645e;
    --accent: #b4400f;
    --accent-vif: #c94a16;
    --accent-appui: #963508;
    --c-accent-encre: #963508;
    --sur-accent: #ffffff;
    --balise: #f5c531;
    --balise-bas: #1e6b4c;
    --c-sur-balise: #15201b;
    --vert: #1e6b4c;
    --sur-vert: #ffffff;
    --or: #8a6400;
    --or-clair: #f5c531;
    --sur-or: #ffffff;
    --c-lac: #2b6a8a;
    --c-sur-lac: #ffffff;
    --danger: #a3172e;
    --sur-danger: #ffffff;
    --lueur: rgb(245 197 49 / 0.18);
    --ombre-teinte: 40 34 20;
    --c-posee: rgb(21 32 27 / 0.85);
    --c-voile: rgb(21 32 27 / 0.4);
    --grain-force: 0.03;
    --focus: #15201b;
    --carte-terre: #f4efe4;
    --carte-eau: #b9d3d6;
    --carte-vert: #d5e2c8;
    --carte-bati: #e6dfd0;
    --carte-route: #ffffff;
    --carte-route-bord: #ddd4c2;
    --carte-route-majeure: #f8e7ae;
    --carte-route-majeure-bord: #d9c28a;
    --carte-rail: #b8ae9c;
    --carte-limite: #867b67;
    --carte-libelle: #45514b;
    --carte-libelle-halo: #f4efe4;
    --carte-quartier: rgb(180 64 15 / 0.12);
    --carte-quartier-trait: #b4400f;
  }
  [data-theme="nuit"] {
    color-scheme: dark;
    --fond: #111915;  --fond-creux: #0b110e;  --surface: #18221d;  --surface-haute: #202c26;
    --surface-survol: #2a3730;  --trait: #2c3a33;  --trait-fort: #6e7d74;
    --texte: #eef0e8;  --texte-doux: #b4bdb4;  --texte-discret: #97a199;
    --accent: #ff8a4c;  --accent-vif: #ffa06c;  --accent-appui: #e8763a;  --sur-accent: #1a0c03;  --c-accent-encre: #ff8a4c;
    --balise: #f5c531;  --balise-bas: #6fcf9f;  --c-sur-balise: #15201b;
    --vert: #6fcf9f;  --sur-vert: #06200f;
    --or: #f5c531;  --or-clair: #ffd96b;  --sur-or: #15201b;
    --c-lac: #7fc0de;  --c-sur-lac: #06141c;  --danger: #ff7a85;  --sur-danger: #2a0509;
    --lueur: rgb(245 197 49 / 0.10);  --ombre-teinte: 3 6 4;  --c-posee: #040806;  --c-voile: rgb(0 0 0 / 0.55);  --grain-force: 0.05;
    --focus: #f5c531;
    --carte-terre: #111915;  --carte-eau: #16313a;  --carte-vert: #18291f;  --carte-bati: #1b2520;
    --carte-route: #26322c;  --carte-route-bord: #26322c;  --carte-route-majeure: #3a4136;
    --carte-route-majeure-bord: #4a5245;  --carte-rail: #3d4a43;  --carte-limite: #6e7d74;
    --carte-libelle: #b4bdb4;  --carte-libelle-halo: #111915;
    --carte-quartier: rgb(255 138 76 / 0.14);  --carte-quartier-trait: #ff8a4c;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="jour"]):not([data-mode="rencontre"]) {
      color-scheme: dark;
      --fond: #111915;  --fond-creux: #0b110e;  --surface: #18221d;  --surface-haute: #202c26;
      --surface-survol: #2a3730;  --trait: #2c3a33;  --trait-fort: #6e7d74;
      --texte: #eef0e8;  --texte-doux: #b4bdb4;  --texte-discret: #97a199;
      --accent: #ff8a4c;  --accent-vif: #ffa06c;  --accent-appui: #e8763a;  --sur-accent: #1a0c03;  --c-accent-encre: #ff8a4c;
      --balise: #f5c531;  --balise-bas: #6fcf9f;  --c-sur-balise: #15201b;
      --vert: #6fcf9f;  --sur-vert: #06200f;
      --or: #f5c531;  --or-clair: #ffd96b;  --sur-or: #15201b;
      --c-lac: #7fc0de;  --c-sur-lac: #06141c;  --danger: #ff7a85;  --sur-danger: #2a0509;
      --lueur: rgb(245 197 49 / 0.10);  --ombre-teinte: 3 6 4;  --c-posee: #040806;  --c-voile: rgb(0 0 0 / 0.55);  --grain-force: 0.05;
      --focus: #f5c531;
      --carte-terre: #111915;  --carte-eau: #16313a;  --carte-vert: #18291f;  --carte-bati: #1b2520;
      --carte-route: #26322c;  --carte-route-bord: #26322c;  --carte-route-majeure: #3a4136;
      --carte-route-majeure-bord: #4a5245;  --carte-rail: #3d4a43;  --carte-limite: #6e7d74;
      --carte-libelle: #b4bdb4;  --carte-libelle-halo: #111915;
      --carte-quartier: rgb(255 138 76 / 0.14);  --carte-quartier-trait: #ff8a4c;
    }
  }
  [data-mode="rencontre"] {
    color-scheme: dark;
    --fond: #0d1418;  --fond-creux: #081014;  --surface: #152027;  --surface-haute: #1d2a33;
    --surface-survol: #26353f;  --trait: #263540;  --trait-fort: #6f808c;
    --texte: #f1eee9;  --texte-doux: #b9c0c6;  --texte-discret: #9aa3aa;
    --accent: #f4a6c0;  --accent-vif: #f9bdd1;  --accent-appui: #e48fac;  --sur-accent: #2a0a16;  --c-accent-encre: #f4a6c0;
    --balise: #f5c531;  --balise-bas: #f4a6c0;  --c-sur-balise: #15201b;
    --vert: #6fcf9f;  --sur-vert: #06200f;
    --or: #f5c531;  --or-clair: #ffd96b;  --sur-or: #15201b;
    --c-lac: #7fc0de;  --c-sur-lac: #06141c;  --danger: #ff8a3d;  --sur-danger: #2a1002;
    --lueur: rgb(244 166 192 / 0.12);  --ombre-teinte: 2 5 8;  --c-posee: #03070a;  --c-voile: rgb(0 0 0 / 0.6);  --grain-force: 0.05;
    --focus: #f5c531;
    --carte-terre: #0d1418;  --carte-eau: #12303d;  --carte-vert: #142320;  --carte-bati: #18232b;
    --carte-route: #22303a;  --carte-route-bord: #22303a;  --carte-route-majeure: #34404a;
    --carte-route-majeure-bord: #46525c;  --carte-rail: #384650;  --carte-limite: #6f808c;
    --carte-libelle: #b9c0c6;  --carte-libelle-halo: #0d1418;
    --carte-quartier: rgb(244 166 192 / 0.14);  --carte-quartier-trait: #f4a6c0;
  }
  :root,
  [data-mode],
  [data-theme] {
    --accent-voile: color-mix(in oklab, var(--accent) 12%, transparent);
    --accent-trait: color-mix(in oklab, var(--accent) 45%, transparent);
    --vert-voile: color-mix(in oklab, var(--vert) 12%, transparent);
    --vert-trait: color-mix(in oklab, var(--vert) 40%, transparent);
    --or-voile: color-mix(in oklab, var(--balise) 22%, transparent);
    --or-trait: color-mix(in oklab, var(--or) 45%, transparent);
    --danger-voile: color-mix(in oklab, var(--danger) 12%, transparent);
    --danger-trait: color-mix(in oklab, var(--danger) 50%, transparent);
    --c-lac-voile: color-mix(in oklab, var(--c-lac) 12%, transparent);
    --c-lac-trait: color-mix(in oklab, var(--c-lac) 45%, transparent);
    --carte-zone-quartier: color-mix(in oklab, var(--accent) 12%, transparent);
    --voile-fond: var(--c-voile);
    --axe-piste: var(--fond-creux);
    --axe-plein: var(--accent);
    --axe-repere: var(--trait-fort);
    --carte-epingle: var(--balise);
    --carte-epingle-bas: var(--accent);
    --carte-epingle-contour: var(--c-sur-balise);
    --ombre-1: 0 1px 2px rgb(var(--ombre-teinte) / 0.10);
    --ombre-2: 0 2px 4px rgb(var(--ombre-teinte) / 0.08), 0 8px 20px -6px rgb(var(--ombre-teinte) / 0.16);
    --ombre-3: 0 4px 8px rgb(var(--ombre-teinte) / 0.10), 0 24px 48px -12px rgb(var(--ombre-teinte) / 0.28);
    --c-ombre-posee: 0 3px 0 var(--c-posee);
    --ombre-accent: 0 3px 0 var(--accent-appui);
  }
  :root {
    --carte-planche-sous-bois: #c9d8b6;
    --carte-planche-riviere: #b9d3d6;
    --carte-planche-lisiere: #ebcb9a;
    --carte-planche-ville: #d9cfc2;
    --carte-planche-nuit: #2e3b45;
    --carte-planche-plaine: #e8b9a0;
    --carte-sur-planche: #15201b;
    --carte-sur-planche-doux: #45514b;
    --carte-planche-accent: #8a3006;
    --carte-sur-planche-nuit: #eef0e8;
    --carte-sur-planche-nuit-doux: #b4bdb4;
    --carte-planche-nuit-accent: #ff8a4c;
    --carte-courbes: rgb(21 32 27 / 0.14);
    --carte-courbes-nuit: rgb(238 240 232 / 0.16);
  }
  :root {
    --police-titre: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --police-texte: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --police-main: "Caveat", "Segoe Print", "Bradley Hand", cursive;
    --t-1: 0.75rem;
    --t-2: 0.875rem;
    --t-3: 1rem;
    --t-4: 1.125rem;
    --t-5: 1.375rem;
    --t-6: clamp(1.625rem, 1.4rem + 1vw, 2rem);
    --t-7: clamp(2.125rem, 1.6rem + 2.4vw, 3.25rem);
    --t-8: clamp(2.75rem, 1.6rem + 5vw, 5rem);
    --interligne-serre: 1.08;
    --interligne-titre: 1.2;
    --interligne-texte: 1.55;
    --graisse-normal: 400;
    --graisse-moyen: 500;
    --graisse-fort: 650;
    --approche-capitales: 0.09em;
    --e-1: 0.25rem;
    --e-2: 0.5rem;
    --e-3: 0.75rem;
    --e-4: 1rem;
    --e-5: 1.25rem;
    --e-6: 1.5rem;
    --e-8: 2rem;
    --e-10: 2.5rem;
    --e-12: 3rem;
    --e-16: 4rem;
    --e-24: 6rem;
    --cible: 2.75rem;
    --colonne: 35rem;
    --page-max: 75rem;
    --marge-page: clamp(var(--e-4), 4vw, var(--e-8));
    --nav-hauteur: 4rem;
    --carte-panneau-min: 22rem;
    --carte-epingle-taille: 2rem;
    --axe-hauteur: 0.625rem;
    --r-1: 0.375rem;
    --r-2: 0.625rem;
    --r-3: 1rem;
    --r-4: 1.5rem;
    --r-rond: 999px;
    --forme-touche: 52% 48% 50% 50% / 50% 52% 48% 50%;
    --forme-touche-2: 48% 52% 50% 50% / 52% 48% 50% 50%;
    --balise-largeur: 1.25rem;
    --balise-barre: 0.3125rem;
    --balise-ecart: 0.1875rem;
    --balise-inclinaison: -8deg;
    --d-instant: 150ms;
    --d-vite: 180ms;
    --d-pose: 240ms;
    --d-ample: 300ms;
    --d-souffle: 7s;
    --d-decalage: 60ms;
    --c-sortie: cubic-bezier(0.2, 0.8, 0.2, 1);
    --c-entree: cubic-bezier(0.5, 0, 0.9, 0.3);
    --c-pas: cubic-bezier(0.34, 1.4, 0.64, 1);
    --c-encre: var(--c-pas);
    --c-souffle: cubic-bezier(0.45, 0.05, 0.55, 0.95);
    --z-base: 0;
    --z-pose: 10;
    --z-entete: 100;
    --z-nav: 200;
    --z-bandeau: 250;
    --z-voile: 400;
    --z-feuille: 500;
    --z-toast: 600;
    --z-grain: 900;
  }
  :root[data-calme],
  :root[data-calme]:not([data-theme="jour"]):not([data-mode="rencontre"]) {
    --d-souffle: 0s;
    --grain-force: 0;
  }
}
