/* WiT? · Charte de lecture (C19), version de l'atlas. Fichier produit par c19/outils/construire-charte.py. */
/* ---------- 1. Jetons : tailles, interlignes, espacements ---------- */
:root {
  --fs-xs: 0.875rem;    /* 14 px : étiquettes, sources, légendes (minimum absolu) */
  --fs-s: 0.9375rem;    /* 15 px : notes, tableaux, texte des cartes */
  --fs-m: 1.0625rem;    /* 17 px : texte courant (18 px sur grand écran) */
  --fs-l: 1.3125rem;    /* 21 px : intertitre (h3) */
  --fs-xl: 1.875rem;    /* 30 px : titre de planche (h2) */
  --fs-xxl: 2.375rem;   /* 38 px : titre de page (h1) */
  --lh-texte: 1.6; --lh-court: 1.45; --lh-titre: 1.15;
  --mesure: 68ch;
  --e1: 4px; --e2: 8px; --e3: 12px; --e4: 16px; --e5: 24px; --e6: 32px; --e7: 48px;
  --font-titre: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-text: "Newsreader", Georgia, "Times New Roman", serif;
  --font-label: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  /* Types de contenu (thème clair) */
  --c-question: #35597A;  /* bleu ardoise : « Selon vous », question posée */
  --c-retenir: #855C0E;   /* ocre : « Pour résumer », « Ce qui les rapproche » */
  --c-wit: #7A2433;       /* lie-de-vin : l'effet WiT?, ce qui est remarquable */
  --c-conseil: #3B6A4C;   /* vert sauge : conseil d'achat, de service, vin accessible */
  --c-risque: #A13A1C;    /* terre cuite : risque, menace, attention */
  --fond-teinte: 7%;      /* part de la teinte dans le fond d'un encadré */
}
@media (min-width: 820px) { :root { --fs-m: 1.125rem; --fs-xl: 2.125rem; --fs-xxl: 3rem; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-wit-theme]) { --c-question: #93B5D3; --c-retenir: #DDB25E; --c-wit: #DE96A4; --c-conseil: #8CC39F; --c-risque: #EE9277; --fond-teinte: 12%; }
}
:root[data-theme="dark"]:not([data-wit-theme]), :root[data-wit-theme="sombre"] { --c-question: #93B5D3; --c-retenir: #DDB25E; --c-wit: #DE96A4; --c-conseil: #8CC39F; --c-risque: #EE9277; --fond-teinte: 12%; }
/* Daltoniens : teintes de la palette Okabe-Ito, assombries pour le texte ; les cinq types restent distincts par la clarté, la forme et le pictogramme */
:root[data-wit-theme="rouge-vert"] { --c-question: #005A9C; --c-retenir: #8A5D00; --c-wit: #8A3B12; --c-conseil: #00705A; --c-risque: #A84400; }
:root[data-wit-theme="bleu-jaune"] { --c-question: #23395B; --c-retenir: #8F4A00; --c-wit: #A3214A; --c-conseil: #3D7346; --c-risque: #C2300E; }

:root[data-charte][data-wit-theme="facile"] { --fs-m: 1.1875rem; --fs-s: 1.0625rem; --fs-xs: 0.9375rem; --lh-texte: 1.7; --mesure: 64ch; --font-titre: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif; --font-text: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif; --font-label: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif; }

/* ---------- Atlas des vins (Jo, 27 octobre, 23 h 23 : « même format en termes de police, typologie et couleur ») ----------
   Chargée après les styles propres de atlas.html, seulement par l'atlas (charte.css n'y est pas chargée : ses classes
   .ask et .item y désignent autre chose). Les jetons ci-dessus sont repris de charte.css par construire-charte.py.
   Sans data-charte (version N-1), l'atlas garde son apparence d'avant. */

/* Couleurs : le papier et l'encre des Fiches Descriptives ; mer, terres et voiles réchauffés dans la même gamme.
   Les couleurs des régions et des vins ne changent pas. */
:root[data-charte] {
  --bg: #F5F1E9; --surface: #FBF8F2; --ink: #3B342D; --muted: #6B6258; --line: #DDD5C7;
  --accent: #7A2433; --accent-ink: #FFFFFF;
  --sea: #D8E1E5; --graticule: #C3CED4; --land-off: #CEC7BB; --land-ctx: #E7E1D6; --land-base: #F8F5EF;
  --reg-off: #A9A091; --veil: rgba(44, 32, 22, 0.56); --halo: #FBF8F2; --border: #FBF8F2;
  --display: var(--font-label); --body: var(--font-text);
}
@media (prefers-color-scheme: dark) { :root[data-charte]:not([data-theme="light"]) {
  --bg: #1B1915; --surface: #24211C; --ink: #DCD4C6; --muted: #A99F90; --line: #3A352D;
  --accent: #D98A9A; --accent-ink: #1D0F14;
  --sea: #192025; --graticule: #232C33; --land-off: #3D3933; --land-ctx: #2B2823; --land-base: #312D27;
  --reg-off: #5C564C; --veil: rgba(8, 6, 4, 0.62); --halo: #1B1915; --border: #1B1915; } }
:root[data-charte][data-theme="dark"] {
  --bg: #1B1915; --surface: #24211C; --ink: #DCD4C6; --muted: #A99F90; --line: #3A352D;
  --accent: #D98A9A; --accent-ink: #1D0F14;
  --sea: #192025; --graticule: #232C33; --land-off: #3D3933; --land-ctx: #2B2823; --land-base: #312D27;
  --reg-off: #5C564C; --veil: rgba(8, 6, 4, 0.62); --halo: #1B1915; --border: #1B1915; }
/* Daltoniens : même couleur d'action que dans les fiches */
:root[data-charte][data-wit-theme="rouge-vert"] { --accent: #8A3B12; }
:root[data-charte][data-wit-theme="bleu-jaune"] { --accent: #A3214A; }

/* Texte courant */
:root[data-charte] body { font-family: var(--font-text); font-size: var(--fs-m); line-height: var(--lh-texte); }
:root[data-charte] b, :root[data-charte] strong { font-weight: 600; }

/* Titrage : titre de page en Cormorant, en minuscules, comme les fiches et l'accueil */
:root[data-charte] header h1 { font-family: var(--font-titre); font-weight: 600; font-size: var(--fs-xxl); line-height: 1.05; letter-spacing: 0; text-transform: none; }
:root[data-charte] .side h2, :root[data-charte] .ask-card h2 { font-family: var(--font-titre); font-weight: 600; font-size: clamp(1.5rem, 1.1rem + 2vw, var(--fs-xl)); line-height: var(--lh-titre); letter-spacing: 0; text-transform: none; }
/* Étiquettes : seul texte en capitales, 14 px, espacé */
:root[data-charte] .side h3, :root[data-charte] .ask-where { font-family: var(--font-label); font-weight: 600; font-size: var(--fs-xs) !important; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
:root[data-charte] .devbadge { font-size: var(--fs-xs); }

/* Repères (fil d'Ariane, boutons, renvois) : Barlow Condensed en minuscules */
:root[data-charte] nav.crumbs { font-size: var(--fs-m); letter-spacing: 0.02em; }
:root[data-charte] .back, :root[data-charte] .ask-btns button { font-size: var(--fs-s); letter-spacing: 0.02em; text-transform: none; }
:root[data-charte] .ask-btns button { border-radius: 6px; font-weight: 600; }
:root[data-charte] .btn-retour, :root[data-charte] .wp-btn, :root[data-charte] .wp-h { text-transform: none !important; letter-spacing: 0.02em !important; }
:root[data-charte] .wp legend { font-size: var(--fs-xs) !important; }
:root[data-charte] .wp { border: 1.5px solid var(--line) !important; border-radius: 8px !important; }
:root[data-charte] .item .go { font-size: var(--fs-s); letter-spacing: 0.02em; }

/* Échelle de tailles : rien sous 14 px */
:root[data-charte] .side p, :root[data-charte] .item, :root[data-charte] .legend, :root[data-charte] .offnames, :root[data-charte] .ask-card p { font-size: var(--fs-s); line-height: var(--lh-court); }
:root[data-charte] .tip { font-size: var(--fs-s); line-height: var(--lh-court); }
:root[data-charte] .tip b { font-family: var(--font-titre); font-weight: 600; font-size: var(--fs-l); letter-spacing: 0; line-height: 1.15; }
:root[data-charte] .hint, :root[data-charte] .devnote, :root[data-charte] .ask-msg { font-size: var(--fs-xs) !important; }

/* Cadres : même trait fin et mêmes coins que les encadrés des fiches */
:root[data-charte] .map, :root[data-charte] .side { border: 1.5px solid var(--line); border-radius: 8px; }
:root[data-charte] .ask-card { border: 1.5px solid var(--line); border-radius: 8px; }
:root[data-charte] .item { border-radius: 6px; }

/* Lecture facilitée : une seule police très lisible, pas d'italique */
:root[data-charte][data-wit-theme="facile"] header h1, :root[data-charte][data-wit-theme="facile"] .side h2, :root[data-charte][data-wit-theme="facile"] .ask-card h2, :root[data-charte][data-wit-theme="facile"] .tip b { font-weight: 700; }
:root[data-charte][data-wit-theme="facile"] .hint, :root[data-charte][data-wit-theme="facile"] .lbl.v { font-style: normal; }
:root[data-charte][data-wit-theme="facile"] .side h3, :root[data-charte][data-wit-theme="facile"] .ask-where { letter-spacing: 0.04em; }
/* Noms sur la carte : la police étroite reste, sinon les noms se chevauchent */
:root[data-charte][data-wit-theme="facile"] .lbl { font-family: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; }
