/* Fichier produit par build.py à partir de palettes.json : ne pas modifier à la main. */

@font-face {
  font-family: "Kalam";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("polices/kalam-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;
}

:root {
  --jbc-police-texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --jbc-police-titre: "Kalam", "Segoe Print", "Bradley Hand", cursive;
}

/* Espacements verticaux (téléphone, puis >= 768 px, >= 1024 px). */
:root {
  --jbc-espace-bloc: 2rem;
  --jbc-espace-colonne: 1.5rem;
  --jbc-espace-cartes: 1.25rem;
  --jbc-espace-s: 1rem;
  --jbc-espace-m: 2rem;
  --jbc-espace-l: 3rem;
  --jbc-espace-xl: 5rem;
}

@media (min-width: 768px) {
  :root {
    --jbc-espace-bloc: 2.5rem;
    --jbc-espace-colonne: 1.75rem;
    --jbc-espace-cartes: 1.5rem;
    --jbc-espace-s: 1.5rem;
    --jbc-espace-m: 3rem;
    --jbc-espace-l: 4.5rem;
    --jbc-espace-xl: 7rem;
  }
}

@media (min-width: 1024px) {
  :root {
    --jbc-espace-bloc: 3rem;
    --jbc-espace-colonne: 2rem;
    --jbc-espace-s: 2rem;
    --jbc-espace-m: 4rem;
    --jbc-espace-l: 6rem;
    --jbc-espace-xl: 9rem;
  }
}

/* Lisière : Sous-bois, mousse (ambiance par défaut) */
:root,
[data-ambiance="lisiere"] {
  --jbc-fond: #f3f4ef;
  --jbc-surface: #ffffff;
  --jbc-texte: #1f2a22;
  --jbc-texte-doux: #56635a;
  --jbc-ligne: #d8ded4;
  --jbc-accent: #3d5c40;
  --jbc-accent-texte: #3d5c40;
  --jbc-sur-accent: #ffffff;
  --jbc-note: #e3eadf;
  --jbc-nuit: #1f2a22;
  --jbc-nuit-texte: #e6ebe2;
  --jbc-nuit-accent: #c9d8a8;
  color-scheme: light;
}

/* Grand air : Ciel, rapaces, altitude */
[data-ambiance="grandair"] {
  --jbc-fond: #f2f5f8;
  --jbc-surface: #ffffff;
  --jbc-texte: #1b2633;
  --jbc-texte-doux: #55636f;
  --jbc-ligne: #d6dee6;
  --jbc-accent: #2f5d8a;
  --jbc-accent-texte: #2a5582;
  --jbc-sur-accent: #ffffff;
  --jbc-note: #e2ebf3;
  --jbc-nuit: #17222e;
  --jbc-nuit-texte: #e5edf5;
  --jbc-nuit-accent: #9cc3e6;
  color-scheme: light;
}

/* Herbes sèches : Fin d'été, paille, roux du renard */
[data-ambiance="herbes"] {
  --jbc-fond: #f4f2ec;
  --jbc-surface: #fffdf8;
  --jbc-texte: #2b261d;
  --jbc-texte-doux: #665d4d;
  --jbc-ligne: #e0dacb;
  --jbc-accent: #94561d;
  --jbc-accent-texte: #87501b;
  --jbc-sur-accent: #fffdf8;
  --jbc-note: #ece5d4;
  --jbc-nuit: #2b261d;
  --jbc-nuit-texte: #f1ebdd;
  --jbc-nuit-accent: #e3b878;
  color-scheme: light;
}

/* Givre : Hiver, matins froids, bleu-gris */
[data-ambiance="givre"] {
  --jbc-fond: #f6f7f9;
  --jbc-surface: #ffffff;
  --jbc-texte: #20232b;
  --jbc-texte-doux: #5a5f6f;
  --jbc-ligne: #dfe2e8;
  --jbc-accent: #575d86;
  --jbc-accent-texte: #4f547b;
  --jbc-sur-accent: #ffffff;
  --jbc-note: #e9eaf2;
  --jbc-nuit: #1c1e29;
  --jbc-nuit-texte: #e7e8f0;
  --jbc-nuit-accent: #b9bde0;
  color-scheme: light;
}

/* Crépuscule : Sombre et chaud, dernières lueurs */
[data-ambiance="crepuscule"] {
  --jbc-fond: #1a1916;
  --jbc-surface: #23221e;
  --jbc-texte: #ece7dc;
  --jbc-texte-doux: #a9a292;
  --jbc-ligne: #36342e;
  --jbc-accent: #d39a4f;
  --jbc-accent-texte: #e0ad66;
  --jbc-sur-accent: #1a1916;
  --jbc-note: #2a2823;
  --jbc-nuit: #0f0f0d;
  --jbc-nuit-texte: #ece7dc;
  --jbc-nuit-accent: #e0ad66;
  color-scheme: dark;
}

/* Nuit : Sombre et froid, clair de lune */
[data-ambiance="nuit"] {
  --jbc-fond: #10141a;
  --jbc-surface: #171c24;
  --jbc-texte: #e3e8ef;
  --jbc-texte-doux: #9aa5b4;
  --jbc-ligne: #273040;
  --jbc-accent: #c8d3e0;
  --jbc-accent-texte: #d5deea;
  --jbc-sur-accent: #10141a;
  --jbc-note: #1b2230;
  --jbc-nuit: #070a0e;
  --jbc-nuit-texte: #e3e8ef;
  --jbc-nuit-accent: #f0e6c4;
  color-scheme: dark;
}

/* Couleurs dérivées, recalculées là où une ambiance est posée. */
:root,
[data-ambiance] {
  --jbc-voile: color-mix(in srgb, var(--jbc-texte) 7%, var(--jbc-fond));
  --jbc-anneau: color-mix(in srgb, var(--jbc-texte) 10%, transparent);
  --jbc-accent-survol: color-mix(in srgb, var(--jbc-accent) 82%, var(--jbc-texte));
  --jbc-focus: var(--jbc-accent-texte);
}
