/* L'ATELIER : COMPOSANTS. N'utilise que les jetons de atelier-jetons.css, jamais une couleur en dur.
   Proposition du 2026-10-16, sur la planche 06-planche-de-style.html. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 15px/1.5 var(--sans); }
/* Les liens à l'accent (charte) : sans cette règle, le bleu et le violet du navigateur, mesurés nulle part.
   ⚠️ Pas sur un lien habillé en bouton : `a:hover` l'emportait sur la couleur du bouton, et
   « Essayer » devenait accent sur accent, illisible au survol (signalé le 2026-10-16). */
a:not(.bouton) { color: var(--accent); }
a:not(.bouton):hover { color: var(--accent-vif); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.invisible { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chiffre { font-weight: 800; font-variant-numeric: tabular-nums; }
.doux { color: var(--encre-doux); }
.petit { font-size: 0.85rem; }

/* Pictogrammes : le trait fait 1,8 px à toute taille (43,2 = 1,8 × 24), comme sur le site. */
.picto {
  --t: 20; width: calc(var(--t) * 1px); height: calc(var(--t) * 1px); flex: none;
  fill: none; stroke: currentColor; stroke-width: calc(43.2 / var(--t));
  stroke-linecap: round; stroke-linejoin: round;
}
.picto--16 { --t: 16; } .picto--24 { --t: 24; } .picto--32 { --t: 32; } .picto--48 { --t: 48; } .picto--96 { --t: 96; }

/* ---- Boutons ---- */
.bouton {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 38px; padding: 0 1rem;
  font: 600 0.9rem var(--sans); border-radius: var(--rayon-plein); cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.bouton--principal { background: var(--accent-plein); color: #fff; box-shadow: var(--ombre); }
.bouton--principal:hover { background: var(--accent-plein-vif); transform: translateY(-1px); }
.bouton--secondaire { background: var(--surface); color: var(--encre); border-color: var(--trait-controle); }
.bouton--secondaire:hover { background: var(--surface-creux); }
.bouton--discret { background: none; color: var(--accent); padding: 0 0.6rem; }
.bouton--discret:hover { background: var(--accent-doux); }
.bouton-icone {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--rayon-petit);
  background: none; border: 0; color: var(--encre-doux); cursor: pointer;
}
.bouton-icone:hover { background: var(--surface-creux); color: var(--encre); }

/* ---- Les étapes, en onglets ---- */
.etapes { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.3rem; background: var(--surface-creux); border-radius: var(--rayon-plein); width: fit-content; }
.etape {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 1rem; border: 0; border-radius: var(--rayon-plein);
  font: 600 0.9rem var(--sans); color: var(--encre-doux); background: none; cursor: pointer; transition: background var(--transition), color var(--transition);
}
.etape:hover { color: var(--encre); }
.etape[aria-current="page"] { background: var(--surface); color: var(--accent); box-shadow: var(--ombre); }
.etape__num { font-size: 0.72rem; opacity: 0.7; }

/* ---- Les jeux de données ---- */
.jeux { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.carte-jeu {
  display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.7rem; align-items: center; text-align: left;
  min-width: 12rem; max-width: 16rem; padding: 0.7rem 0.9rem; border-radius: var(--rayon);
  background: var(--surface); border: 1.5px solid transparent; box-shadow: var(--ombre); color: var(--encre);
  font: inherit; cursor: pointer; transition: transform var(--transition), border-color var(--transition);
}
.carte-jeu:hover { transform: translateY(-2px); }
.carte-jeu[aria-pressed="true"] { border-color: var(--accent); }
.carte-jeu__icone { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-doux); color: var(--accent); }
.carte-jeu strong { font-size: 0.95rem; }
.carte-jeu span { font-size: 0.78rem; color: var(--encre-doux); }
.carte-jeu--avenir { box-shadow: none; background: none; border: 1.5px dashed var(--trait); cursor: default; }
.carte-jeu--avenir .carte-jeu__icone { background: var(--surface-creux); color: var(--encre-doux); }
.carte-jeu--avenir:hover { transform: none; }

/* ---- Pastilles (filtres actifs) ---- */
.pastille {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.35rem 0.15rem 0.7rem; border-radius: var(--rayon-plein);
  background: var(--accent-doux); color: var(--accent); font: 700 0.8rem var(--sans); border: 0;
}
.pastille button { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 0; background: none; color: inherit; cursor: pointer; }
.pastille button:hover { background: var(--surface); }

/* ---- Les tuiles du tableau de bord ---- */
.tuile {
  position: relative; background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: 0.8rem 1rem 1rem; min-width: 0; transition: box-shadow var(--transition), transform var(--transition);
}
.tuile__tete { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.5rem; }
.tuile__titre { flex: 1; margin: 0; font: 700 0.92rem var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tuile__outils { display: flex; gap: 0.1rem; opacity: 0; transition: opacity var(--transition); }
.tuile:hover .tuile__outils, .tuile:focus-within .tuile__outils, .edition .tuile__outils, .grille2--edition .tuile__outils { opacity: 1; }
/* Sur un écran sans survol (un téléphone), les outils d'une tuile restaient invisibles, et
   pourtant cliquables à l'aveugle : ils s'y montrent toujours (2026-10-16). */
@media (hover: none) { .tuile__outils { opacity: 1; } }
.tuile--chiffre .tuile__modifier { color: #fff; }
.tuile__poignee { display: none; color: var(--encre-doux); cursor: grab; }
.edition .tuile { outline: 1.5px dashed var(--trait-controle); outline-offset: -1.5px; }
.edition .tuile__poignee { display: inline-grid; }
.tuile--levee { box-shadow: var(--ombre-levee); transform: rotate(-1deg) scale(1.02); }
.tuile--fantome { background: var(--accent-doux); box-shadow: none; outline: 2px dashed var(--accent) !important; }
.tuile__source { margin: 0.6rem 0 0; font-size: 0.72rem; color: var(--encre-doux); }

/* La signature, reprise d'onestcombien : le grand chiffre en aplat de couleur. */
.tuile--chiffre { background: var(--accent-plein); color: #fff; overflow: hidden; }
.tuile--chiffre .tuile__outils .bouton-icone, .tuile--chiffre .tuile__poignee { color: #fff; }
.tuile--chiffre .tuile__outils .bouton-icone:hover { background: rgb(255 255 255 / 15%); }
/* La taille suit la largeur de la TUILE, pas de la fenêtre : un grand chiffre ne déborde jamais. */
.tuile { container-type: inline-size; }
.grand-chiffre { font: 800 clamp(1.6rem, 15cqi, 3.2rem)/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.tuile--chiffre p { margin: 0.35rem 0 0; font-size: 0.88rem; }
.tuile--chiffre .filigrane { position: absolute; right: -10px; bottom: -14px; opacity: 0.18; }
.tuile--chiffre .tuile__source { color: #fff; opacity: 0.85; }

/* Barres : une piste discrète, une marque arrondie. */
.barres { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.barre { display: grid; grid-template-columns: minmax(0, 7rem) 1fr auto; gap: 0.6rem; align-items: center; font-size: 0.85rem; }
.barre__nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre__piste { height: 10px; border-radius: var(--rayon-plein); background: var(--surface-creux); overflow: hidden; }
.barre__marque { display: block; height: 100%; border-radius: var(--rayon-plein); background: var(--accent); }
.barre__valeur { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 0.8rem; color: var(--encre-doux); }

/* Une pile de catégories : les couleurs de série, toujours avec leur nom à côté. */
.pile { display: flex; height: 14px; border-radius: var(--rayon-plein); overflow: hidden; gap: 2px; }
.pile span { display: block; height: 100%; }
.legende { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin: 0.5rem 0 0; padding: 0; list-style: none; font-size: 0.8rem; }
.legende li { display: inline-flex; align-items: center; gap: 0.35rem; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---- États ---- */
.vide {
  display: grid; place-items: center; gap: 0.5rem; text-align: center; padding: 1.5rem; min-height: 9rem;
  border: 2px dashed var(--trait); border-radius: var(--rayon); color: var(--encre-doux);
}
.vide strong { color: var(--encre); }
.toast {
  display: inline-flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0.6rem 0.55rem 1rem; border-radius: var(--rayon-plein);
  background: var(--encre); color: var(--fond); box-shadow: var(--ombre-levee); font-size: 0.88rem;
}
.toast button { font: 700 0.85rem var(--sans); color: var(--fond); background: none; border: 1px solid currentColor; border-radius: var(--rayon-plein); padding: 0.15rem 0.7rem; cursor: pointer; }

/* ---- L'éditeur de tableau de bord (maquette 07) ----
   Principes de l'état de l'art du 2026-10-16 (étude 06) : grille de 12 colonnes à placement
   automatique, tailles fixes, un mode édition franc, le clavier en premier rang. */
.atelier { max-width: 92rem; margin: 0 auto; padding: 1rem 1.25rem 3rem; display: grid; gap: 1rem; }
/* Un enfant de grille s'élargit à son contenu : un tableau large (les rôles d'un fichier) élargissait tout l'écran. */
.atelier > * { min-width: 0; }
.atelier__tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem 1.5rem; }
.marque { display: flex; align-items: center; gap: 0.7rem; }
.marque__symbole { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--accent-plein); color: #fff; }
.marque strong { font: 800 1.15rem var(--sans); display: block; }
/* Le texte seulement : « .marque span » attrapait aussi le carré du logo, et grisait son pictogramme. */
.marque div span { font-size: 0.8rem; color: var(--encre-doux); }
.titre-jeu h1 { margin: 0; font: 800 1.45rem/1.2 var(--sans); }
.titre-jeu > p { margin: 0.35rem 0 0; color: var(--encre-doux); font-size: 0.9rem; max-width: 60rem; }

/* ---- Le jeu de données : le titre de la page, qui ouvre la liste des jeux (2026-10-16) ---- */
.choix-jeu { position: relative; width: fit-content; max-width: 100%; }
.choix-jeu__bouton { display: flex; align-items: center; gap: 0.8rem; max-width: 100%; padding: 0.55rem 0.9rem 0.55rem 0.6rem; border: 1.5px solid var(--trait); border-radius: var(--rayon); background: var(--surface); box-shadow: var(--ombre); color: var(--encre); font: inherit; text-align: left; cursor: pointer; }
.choix-jeu__bouton:hover, .choix-jeu__bouton[aria-expanded="true"] { border-color: var(--accent); }
.choix-jeu__icone { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--accent-doux); color: var(--accent); }
.choix-jeu__texte { display: grid; min-width: 0; }
.choix-jeu__nom { font: 800 1.4rem/1.2 var(--sans); }
.choix-jeu__source { font: 600 0.85rem var(--sans); color: var(--encre-doux); }
.choix-jeu__chevron { flex: none; display: flex; align-items: center; gap: 0.3rem; margin-left: 0.6rem; padding-left: 0.8rem; border-left: 1px solid var(--trait); color: var(--accent); font: 700 0.85rem var(--sans); }
.choix-jeu__bouton[aria-expanded="true"] .choix-jeu__chevron .picto { transform: rotate(180deg); }
.choix-jeu__liste { position: absolute; z-index: 30; top: calc(100% + 0.4rem); left: 0; width: min(34rem, calc(100vw - 2.5rem)); max-height: min(70vh, 36rem); overflow: auto; padding: 0.5rem; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre-levee); }
.choix-jeu__groupe + .choix-jeu__groupe { margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px solid var(--trait); }
.choix-jeu__intertitre { margin: 0.3rem 0.6rem 0.2rem; font: 800 0.72rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--encre-doux); }
.choix-jeu__liste ul { list-style: none; margin: 0; padding: 0; }
.jeu-option { display: flex; align-items: center; gap: 0.75rem; width: 100%; padding: 0.55rem 0.6rem; border: 0; border-radius: var(--rayon-petit); background: none; color: var(--encre); font: inherit; text-align: left; cursor: pointer; }
.jeu-option:hover:not(:disabled), .jeu-option:focus-visible { background: var(--surface-creux); }
.jeu-option[aria-current="true"] { background: var(--accent-doux); }
.jeu-option:disabled { cursor: default; color: var(--encre-doux); }
.jeu-option__icone { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent-doux); color: var(--accent); }
.jeu-option:disabled .jeu-option__icone { background: var(--surface-creux); color: var(--encre-doux); }
.jeu-option__texte { display: grid; min-width: 0; flex: 1; }
.jeu-option__texte strong { font-size: 0.95rem; }
.jeu-option__source { font: 700 0.8rem var(--sans); color: var(--encre-doux); }
.jeu-option__resume { font-size: 0.8rem; color: var(--encre-doux); }
.jeu-option__coche { flex: none; color: var(--accent); }
@media (max-width: 36rem) {
  .choix-jeu, .choix-jeu__bouton { width: 100%; }
  .choix-jeu__nom { font-size: 1.15rem; }
  .choix-jeu__chevron { margin-left: auto; padding-left: 0.5rem; }
  .choix-jeu__chevron span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.badge { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.45rem; border-radius: var(--rayon-plein); background: var(--surface-creux); color: var(--encre-doux); font: 700 0.68rem var(--sans); vertical-align: middle; }

.barre-tableau { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem 1rem; min-height: 44px; }
.filtres-actifs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.88rem; }
.barre-edition {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.5rem 0.6rem 0.5rem 1rem;
  border-radius: var(--rayon); background: var(--accent-doux); color: var(--encre); font-size: 0.88rem;
}
.barre-edition strong { color: var(--accent); }

.grille { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; grid-auto-flow: row; align-items: start; }
.taille-S { grid-column: span 3; } .taille-M { grid-column: span 4; } .taille-L { grid-column: span 6; } .taille-XL { grid-column: span 12; }
.taille-M.tuile--carte, .taille-L.tuile--carte { grid-row: span 2; }
@media (max-width: 70rem) { .taille-S { grid-column: span 4; } .taille-M { grid-column: span 6; } .taille-L { grid-column: span 12; } }
@media (max-width: 44rem) { .grille > * { grid-column: span 12 !important; } }
.tuile.focus-edition { outline: 2.5px solid var(--accent) !important; }
.tailles { display: inline-flex; border: 1px solid var(--trait); border-radius: var(--rayon-plein); overflow: hidden; }
.tailles button { font: 700 0.7rem var(--sans); border: 0; background: none; color: var(--encre-doux); padding: 0.15rem 0.45rem; cursor: pointer; }
.tailles button[aria-pressed="true"] { background: var(--accent); color: var(--surface); }
.tuile--chiffre .tailles { border-color: rgb(255 255 255 / 40%); }
.tuile--chiffre .tailles button { color: #fff; }
.tuile--chiffre .tailles button[aria-pressed="true"] { background: #fff; color: var(--accent-plein); }
.ajout-tuile {
  display: grid; place-items: center; gap: 0.3rem; min-height: 8rem; border: 2px dashed var(--trait-controle); border-radius: var(--rayon);
  background: none; color: var(--encre-doux); font: 700 0.9rem var(--sans); cursor: pointer; transition: border-color var(--transition), color var(--transition);
}
.ajout-tuile:hover { border-color: var(--accent); color: var(--accent); }

/* Les barres suivent le filtrage croisé : ce qui n'est pas retenu s'atténue, rien ne disparaît. */
button.barre { width: 100%; border: 0; background: none; color: inherit; font: inherit; padding: 0.15rem 0.25rem; border-radius: 8px; cursor: pointer; text-align: left; }
button.barre:hover { background: var(--surface-creux); }
.barres--filtrees .barre[aria-pressed="false"] .barre__marque { background: var(--trait-controle); }
.barres--filtrees .barre[aria-pressed="true"] .barre__nom { font-weight: 800; }
.plus-de { font-size: 0.78rem; color: var(--encre-doux); margin: 0.3rem 0 0; }

.carte-svg { display: block; width: 100%; height: auto; }
.carte-svg path { stroke: var(--surface); stroke-width: 0.9; cursor: pointer; transition: fill var(--transition); }
.carte-svg path:hover, .carte-svg path:focus-visible { stroke: var(--encre); stroke-width: 1.6; outline: none; }
.carte-svg path.choisi { stroke: var(--encre); stroke-width: 2.2; }
.legende-rampe { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--encre-doux); margin-top: 0.3rem; }
.legende-rampe i { flex: 0 1 8rem; height: 8px; border-radius: var(--rayon-plein); background: linear-gradient(to right, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--accent)); }
.hors-carte { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.hors-carte button { font: 600 0.72rem var(--sans); padding: 0.1rem 0.55rem; border-radius: var(--rayon-plein); border: 1px solid var(--trait); background: var(--surface); color: var(--encre); cursor: pointer; }
.hors-carte button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* Le panneau « Ajouter une tuile » : on part de la question, l'atelier propose le dessin. */
/* Les plans : la grille (1 à 3), l'en-tête collée (15), la liste des jeux (30), le voile et le
   panneau d'ajout (40, 41), les messages (50). L'en-tête ne doit jamais couvrir le panneau. */
.voile { position: fixed; inset: 0; background: rgb(12 10 8 / 0.35); z-index: 40; }
.panneau-ajout {
  position: fixed; inset: 0 0 0 auto; width: min(34rem, 100%); z-index: 41; background: var(--fond);
  box-shadow: var(--ombre-levee); padding: 1.2rem 1.3rem 2rem; overflow-y: auto; display: grid; gap: 1rem; align-content: start;
}
.panneau-ajout h2 { margin: 0; font: 800 1.2rem var(--sans); }
.panneau-ajout h3 { margin: 0 0 0.4rem; font: 700 0.95rem var(--sans); }
.questions { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.5rem; }
.question {
  display: grid; gap: 0.25rem; justify-items: start; text-align: left; padding: 0.6rem 0.7rem; border-radius: var(--rayon-petit);
  background: var(--surface); border: 1.5px solid transparent; box-shadow: var(--ombre); color: var(--encre); font: 600 0.85rem var(--sans); cursor: pointer;
}
.question span { color: var(--accent); }
.question[aria-pressed="true"] { border-color: var(--accent); }
.dessins { display: grid; gap: 0.6rem; }
.dessin { display: grid; gap: 0.4rem; padding: 0.7rem; border-radius: var(--rayon); background: var(--surface); border: 1.5px solid var(--trait); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.dessin[aria-pressed="true"] { border-color: var(--accent); box-shadow: var(--ombre); }
.dessin__tete { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 0.9rem; }
.conseil { font: 700 0.7rem var(--sans); color: var(--accent); background: var(--accent-doux); border-radius: var(--rayon-plein); padding: 0.05rem 0.5rem; }
.dessin__apercu { pointer-events: none; }

.gabarits { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.8rem; width: 100%; max-width: 50rem; }
.gabarit { display: grid; gap: 0.4rem; text-align: left; padding: 0.9rem; border-radius: var(--rayon); background: var(--surface); box-shadow: var(--ombre); border: 1.5px solid transparent; font: inherit; color: var(--encre); cursor: pointer; }
.gabarit:hover { border-color: var(--accent); }
.gabarit strong { font-size: 0.95rem; }
.gabarit span { font-size: 0.8rem; color: var(--encre-doux); }
.toast-zone { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 50; }
.aide-clavier { font-size: 0.8rem; color: var(--encre-doux); }
.aide-clavier kbd { font: 700 0.72rem var(--mono); border: 1px solid var(--trait-controle); border-bottom-width: 2px; border-radius: 5px; padding: 0 0.3rem; background: var(--surface); }
.a-venir { display: grid; gap: 0.6rem; justify-items: start; padding: 1.5rem; border-radius: var(--rayon); background: var(--surface); box-shadow: var(--ombre); max-width: 44rem; }
.a-venir h2 { margin: 0; font: 800 1.15rem var(--sans); }
.a-venir p { margin: 0; }

/* ---- La bibliothèque de graphiques (07-graphiques.js) ---- */
.colonnes { display: flex; align-items: stretch; gap: 0.35rem; height: 13rem; }
.colonnes--courtes { height: 8rem; }
.colonne { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; border: 0; background: none; color: inherit; font: inherit; padding: 0.1rem 0; border-radius: 8px; cursor: pointer; }
.colonne:hover { background: var(--surface-creux); }
.colonne__zone { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.colonne__barre { display: block; width: min(70%, 3rem); background: var(--accent); border-radius: 8px 8px 3px 3px; min-height: 2px; transition: height var(--transition), background var(--transition); }
.colonne__valeur { font: 700 0.72rem var(--sans); font-variant-numeric: tabular-nums; color: var(--encre); white-space: nowrap; }
/* Un libellé passe sur deux lignes plutôt que d'être coupé : « 2026 (9 mois) » tronqué en « 2026… »
   perdait justement ce qui dit que l'année est incomplète (vu le 2026-10-16). */
.colonne__libelle { font: 600 0.72rem/1.2 var(--sans); color: var(--encre-doux); max-width: 100%; text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Une valeur plus large que sa colonne (mesuré par graphiques.ts) : à la verticale, plutôt que de chevaucher la voisine. */
.colonnes--serrees .colonne__valeur { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.68rem; }
/* Nombreuses colonnes dans une tuile étroite (dix périodes sur un téléphone) : valeurs et
   libellés passent à la verticale plutôt que de se chevaucher ou de tomber à « 19… ». */
.grille2 .tuile__corps, .a4 .tuile__corps { container-type: inline-size; }
@container (max-width: 40rem) {
  .colonnes--nombreuses .colonne__valeur, .colonnes--nombreuses .colonne__libelle {
    writing-mode: vertical-rl; transform: rotate(180deg); max-width: none; max-height: 5.5rem; font-size: 0.68rem;
  }
}
.colonne--attenuee .colonne__barre { background: var(--trait-controle); }
.colonne[aria-pressed="true"] .colonne__libelle { color: var(--encre); font-weight: 800; }
.jauge { display: block; width: 100%; max-width: 15rem; height: auto; aspect-ratio: 200 / 116; margin: 0 auto; flex: none; }
.jauge__valeur { font: 800 26px var(--sans); fill: var(--encre); }
.anneau-bloc { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.anneau { width: 8.5rem; height: 8.5rem; flex: none; }
.part--attenuee { opacity: 0.3; }
.legende--colonne { flex-direction: column; flex-wrap: nowrap; gap: 0.25rem; }
.barre__piste--libre { background: none; }
.pile--barre { height: 12px; display: flex; gap: 1px; }
.raison { font-size: 0.78rem; color: var(--encre-doux); margin: 0; }
/* Une relève refusée : un état, sur son fond (contraste mesuré par contraste-atelier.py). */
.raison--attention { color: var(--attention); background: var(--attention-doux); padding: 0.35rem 0.55rem; border-radius: var(--rayon-petit); margin-top: 0.3rem; }
.ligne-reglages { display: flex; align-items: center; gap: 0.5rem; }
.palettes { display: inline-flex; gap: 0.35rem; }
.pastille-couleur { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--trait); cursor: pointer; }
.pastille-couleur[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--encre); }
.grand-chiffre--accent { color: var(--accent); }
.tuile__corps { min-width: 0; }
.plat { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.plat th, .plat td { text-align: left; padding: 0.3rem 0.6rem; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.plat th { color: var(--encre-doux); }
.plat .n { text-align: right; font-variant-numeric: tabular-nums; }
.fiche { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 0.5rem 1.2rem; margin: 0; font-size: 0.9rem; }
.fiche dt { font-weight: 700; } .fiche dd { margin: 0; } .fiche ul { margin: 0; padding-left: 1.1rem; }
.ligne-composants { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0; }
.ligne-composants select { font: inherit; font-size: 0.85rem; padding: 0.25rem 0.4rem; border-radius: var(--rayon-petit); border: 1px solid var(--trait-controle); background: var(--surface); color: var(--encre); }
.bouton:disabled { opacity: 0.5; cursor: default; transform: none; }
.question:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; background: var(--surface-creux); }
.dessin:disabled { cursor: not-allowed; background: var(--surface-creux); }
.dessin__apercu.tuile { box-shadow: none; padding: 0.5rem 0.6rem; }
.dessin__apercu.tuile--chiffre { min-height: 6rem; }
a.carte-jeu { text-decoration: none; }

/* ---- La grille réglable (07-grille.js) ----
   Les tuiles occupent des cases ; la grille s'affiche en dessous en mode édition. */
.grille2 {
  position: relative; display: grid; gap: var(--ecart);
  grid-template-columns: repeat(var(--colonnes), minmax(0, 1fr)); grid-auto-rows: var(--case);
  min-height: calc(var(--lignes) * (var(--case) + var(--ecart)));
}
.grille2__fond { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--transition); border-radius: var(--rayon-petit);
  /* Une case = une intersection de deux bandes : c'est le masque qui dessine les carrés, écarts compris. */
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  -webkit-mask-image: repeating-linear-gradient(to right, #000 0 var(--case-l), transparent var(--case-l) calc(var(--case-l) + var(--ecart))), repeating-linear-gradient(to bottom, #000 0 var(--case), transparent var(--case) calc(var(--case) + var(--ecart)));
  -webkit-mask-composite: source-in;
  mask-image: repeating-linear-gradient(to right, #000 0 var(--case-l), transparent var(--case-l) calc(var(--case-l) + var(--ecart))), repeating-linear-gradient(to bottom, #000 0 var(--case), transparent var(--case) calc(var(--case) + var(--ecart)));
  mask-composite: intersect;
}
.grille2--visible .grille2__fond, .grille2--glisse .grille2__fond { opacity: 1; }
/* En édition, les tuiles laissent deviner la grille sous elles. */
.grille2--visible > .tuile { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent), var(--ombre); }
.grille2__empreinte--echange { background: color-mix(in srgb, var(--accent) 30%, transparent); outline-style: solid; }
.grille2 > .tuile { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.grille2 .tuile__corps { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; scrollbar-width: thin; }
/* Dans une tuile, la jauge prend la hauteur qui reste et s'y inscrit : à sa taille propre, elle débordait d'une tuile de deux rangées. */
.grille2 .jauge { flex: 1 1 0; min-height: 4rem; aspect-ratio: auto; }
/* Même raison pour l'anneau : sous lui, sa légende sortait de la tuile ; à côté, il cède la place. */
.grille2 .anneau-bloc { flex-wrap: nowrap; }
.grille2 .anneau { width: min(8.5rem, 42%); height: auto; aspect-ratio: 1; flex: none; }
.grille2 .colonnes { flex: 1; height: auto; min-height: 5rem; }
.grille2 .carte-svg { flex: 1; min-height: 0; height: 100%; }
.grille2--edition > .tuile { cursor: default; }
/* Sous 40 rem, la grille s'empile (grille.ts) : une tuile par rangée, haute en proportion de sa taille. */
.grille2--pile { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; min-height: 0; gap: 0.75rem; }
.grille2--pile > .tuile { height: auto; min-height: max(calc(var(--h, 2) * 5.5rem), 9rem); }
/* En pile, la tuile s'allonge plutôt que de couper sa dernière ligne : on défile la page, pas la tuile. */
.grille2--pile .tuile__corps { overflow: visible; }
.grille2__note { margin: 0; font-size: 0.85rem; color: var(--encre-doux); }
.grille2--edition .tuile__tete { cursor: grab; touch-action: none; }
.grille2__empreinte { border-radius: var(--rayon); background: color-mix(in srgb, var(--accent) 18%, transparent); outline: 2px dashed var(--accent); outline-offset: -2px; z-index: 1; pointer-events: none; }
.tuile--levee { z-index: 3; box-shadow: var(--ombre-levee); opacity: 0.92; }
.tuile--redim { outline: 2px solid var(--accent) !important; }
.tuile__coin { position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; cursor: nwse-resize; touch-action: none; z-index: 2;
  background: linear-gradient(135deg, transparent 50%, var(--trait-controle) 50% 58%, transparent 58% 70%, var(--trait-controle) 70% 78%, transparent 78%); }
.tuile--chiffre .tuile__coin { background: linear-gradient(135deg, transparent 50%, #fff 50% 58%, transparent 58% 70%, #fff 70% 78%, transparent 78%); }
/* Mesurer la hauteur naturelle d'une tuile : elle se détend le temps d'une lecture. */
.grille2 > .tuile.mesure { align-self: start; height: auto; }
.mesure .tuile__corps { flex: none; overflow: visible; }
.mesure .colonnes { flex: none; height: 12rem; }
.mesure .carte-svg { flex: none; height: auto; }

.reglages-grille { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; padding: 0.5rem 0.8rem; border-radius: var(--rayon); background: var(--surface); box-shadow: var(--ombre); font-size: 0.85rem; }
.reglages-grille strong { display: inline-flex; align-items: center; gap: 0.35rem; }
.reglages-grille label { display: inline-flex; align-items: center; gap: 0.35rem; }
.reglages-grille select { font: inherit; padding: 0.15rem 0.3rem; border-radius: 8px; border: 1px solid var(--trait-controle); background: var(--surface); color: var(--encre); }
.reglages-grille input[type="checkbox"] { accent-color: var(--accent); }
.perso { display: inline-flex; align-items: center; }
.perso input { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.signature { margin: 0; font-size: 0.85rem; color: var(--encre-doux); }
.signature a { color: var(--accent); font-weight: 700; }

/* ---- Le rapport : une page A4, dans la charte ---- */
.a4 { width: min(100%, 52rem); margin: 0.8rem auto 0; background: var(--surface); border-radius: 6px; box-shadow: var(--ombre-levee); padding: 2.2rem 2.6rem 2.6rem; }
.a4__entete { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.78rem; color: var(--encre-doux); border-bottom: 2px solid var(--accent); padding-bottom: 0.5rem; margin-bottom: 1.2rem; }
.a4__marque { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 800; color: var(--accent); }
.a4__blocs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; }
.bloc-a4 { position: relative; min-width: 0; }
.bloc-a4--pleine { grid-column: 1 / -1; }
.bloc-a4--chiffre .tuile--chiffre { border-radius: var(--rayon); padding: 0.9rem 1rem; }
.a4__titre { margin: 0; font: 800 1.9rem/1.15 var(--sans); }
.a4__soustitre { margin: 0 0 0.4rem; font: 800 0.95rem var(--sans); color: var(--accent); }
.a4__texte { margin: 0; line-height: 1.6; }
.bloc-a4 [contenteditable] { border-radius: 6px; outline: 1.5px dashed transparent; outline-offset: 3px; }
.bloc-a4 [contenteditable]:hover, .bloc-a4 [contenteditable]:focus { outline-color: var(--trait-controle); }
.bloc-a4 [contenteditable]:empty::before { content: attr(data-vide); color: var(--encre-doux); font-style: italic; }
.a4__sources { border-top: 1px solid var(--trait); padding-top: 0.6rem; font-size: 0.78rem; color: var(--encre-doux); }
.a4__sources p { margin: 0.15rem 0; }
.bloc-a4__outils { position: absolute; top: -0.9rem; right: -0.4rem; display: flex; align-items: center; gap: 0.1rem; padding: 0.1rem; border-radius: var(--rayon-plein); background: var(--surface); box-shadow: var(--ombre); opacity: 0; transition: opacity var(--transition); }
.bloc-a4:hover .bloc-a4__outils, .bloc-a4:focus-within .bloc-a4__outils { opacity: 1; }
.a4 .colonnes { height: 11rem; }
.a4 .carte-svg { max-height: 26rem; }

/* ---- Le studio vidéo, dans la charte ---- */
.studio { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(17rem, 1fr); gap: 1.2rem 2rem; align-items: start; margin-top: 0.6rem; }
@media (max-width: 60rem) { .studio { grid-template-columns: 1fr; } }
.studio__apercu { position: sticky; top: 1rem; display: grid; gap: 0.7rem; }
.studio__ecran { display: flex; justify-content: center; padding: 0.9rem; border-radius: var(--rayon); background: var(--surface-creux); }
.studio__ecran canvas { display: block; max-width: 100%; max-height: 68vh; height: auto; border-radius: 10px; box-shadow: var(--ombre-levee); }
.studio__lecture { display: flex; align-items: center; gap: 0.8rem; }
.studio__lecture input { flex: 1; accent-color: var(--accent); }
.studio__temps { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--encre-doux); font-size: 0.85rem; }
.studio__reglages { display: grid; gap: 0.9rem; background: var(--surface); padding: 1rem 1.1rem; border-radius: var(--rayon); box-shadow: var(--ombre); }
.choix-pilules { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pilule { font: 700 0.8rem var(--sans); color: var(--encre); background: var(--surface-creux); border: 1.5px solid transparent; border-radius: var(--rayon-plein); padding: 0.2rem 0.75rem; cursor: pointer; }
.pilule[aria-pressed="true"] { background: var(--accent-doux); color: var(--accent); border-color: var(--accent); }
.champ { display: grid; gap: 0.3rem; font-size: 0.88rem; }
.champ > span:first-child { font-weight: 800; }
.champ input[type="text"], .champ textarea { font: inherit; color: var(--encre); background: var(--fond); border: 1px solid var(--trait-controle); border-radius: var(--rayon-petit); padding: 0.4rem 0.6rem; }
.champ textarea { min-height: 3.6rem; resize: vertical; }
.storyboard { list-style: none; margin: 0; padding: 0; }
.storyboard li { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem; align-items: center; padding: 0.3rem 0.4rem; border-radius: 8px; font-size: 0.86rem; }
.storyboard li.partie { display: block; padding-top: 0.7rem; font: 800 0.72rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.storyboard li.courante { background: var(--accent-doux); }
.storyboard input { accent-color: var(--accent); }
.diapo__nom { background: none; border: 0; font: inherit; color: var(--encre); text-align: left; cursor: pointer; padding: 0; }
.diapo__nom:hover { color: var(--accent); }
.diapo__duree, .verrou { font-size: 0.75rem; color: var(--encre-doux); }
.studio__titre-planche { margin: 1.8rem 0 0.6rem; font: 800 1.05rem var(--sans); }
.planche-diapos { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.9rem; }
.planche-diapos figure { margin: 0; }
.planche-diapos canvas { display: block; width: 100%; height: auto; border-radius: 8px; box-shadow: var(--ombre); }
.planche-diapos figcaption { font-size: 0.78rem; color: var(--encre-doux); margin-top: 0.3rem; }

/* L'impression ne garde que la page A4. */
@media print {
  body * { visibility: hidden; }
  .a4, .a4 * { visibility: visible; }
  .a4 { position: absolute; left: 0; top: 0; width: 100%; box-shadow: none; padding: 0; }
  .bloc-a4__outils, [contenteditable]:empty { display: none !important; }
  /* 🚨 Les navigateurs n'impriment pas les fonds par défaut : les barres, les colonnes et les
     aplats des chiffres disparaissaient du PDF, et le blanc sur aplat devenait illisible
     (signalé le 2026-10-16). Le rapport demande ses couleurs : ce sont des données. */
  .a4, .a4 * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* Un bloc ne se coupe pas entre deux pages, et son titre ne reste pas seul en bas. */
  .bloc-a4 { break-inside: avoid; }
  .a4__soustitre { break-after: avoid; }
}
@page { size: A4; margin: 14mm 12mm; }
.groupe { border: 0; padding: 0; margin: 0; min-width: 0; }
.groupe legend { padding: 0; margin-bottom: 0.35rem; font-weight: 800; font-size: 0.88rem; }

/* Le rapport : sauts de page et glisser-déposer. */
.bloc-a4--saut { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.6rem; color: var(--accent); font: 800 0.75rem var(--sans); text-transform: uppercase; letter-spacing: 0.06em; }
.bloc-a4--saut::before, .bloc-a4--saut::after { content: ""; flex: 1; border-top: 2px dashed var(--accent); }
.bloc-a4__poignee { display: inline-grid; place-items: center; width: 28px; height: 28px; cursor: grab; color: var(--encre-doux); }
.bloc-a4--leve { opacity: 0.45; }
.depot-avant { box-shadow: 0 -3px 0 0 var(--accent); }
.depot-apres { box-shadow: 0 3px 0 0 var(--accent); }
@media print {
  .bloc-a4--saut { break-after: page; visibility: hidden !important; height: 0; overflow: hidden; }
  .bloc-a4--saut * { visibility: hidden !important; }
}

/* ---- « Sources et méthode » (lot B) : une page de texte dans l'écran, à largeur de lecture ---- */
.methode { max-width: 52rem; display: grid; gap: 0.2rem; }
.methode__phrase { margin: 0.4rem 0 0.6rem; font-weight: 700; font-size: 1.05rem; }
.methode__bloc h3 { margin: 1rem 0 0.35rem; font: 800 1rem var(--sans); }
.methode__bloc p, .methode__bloc li { max-width: 68ch; }
.methode__bloc p { margin: 0 0 0.5rem; }
.methode__bloc ul { margin: 0 0 0.4rem; padding-left: 1.2rem; }
.plat-cadre { overflow-x: auto; }

/* ---- Votre fichier (lot F) : déposer, puis dire le rôle de chaque colonne ---- */
.depot { display: grid; justify-items: center; gap: 0.5rem; padding: 1.6rem 1.2rem; text-align: center; border: 2px dashed var(--trait-controle); border-radius: var(--rayon); background: var(--surface); color: var(--encre-doux); }
.depot strong { color: var(--encre); font-size: 1.05rem; }
.depot .picto { color: var(--accent); }
.depot--survol { border-color: var(--accent); background: var(--accent-doux); }
.import { margin-top: 1.2rem; padding: 1.2rem 1.4rem; border-radius: var(--rayon); background: var(--surface); box-shadow: var(--ombre); display: grid; gap: 0.6rem; justify-items: start; overflow-x: auto; }
.import h2 { margin: 0; font: 800 1.15rem var(--sans); }
.import p { margin: 0; }
.roles { border-collapse: collapse; font-size: 0.9rem; }
.roles th, .roles td { text-align: left; padding: 0.4rem 0.7rem; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.roles th { font-size: 0.8rem; color: var(--encre-doux); }
.roles .n { text-align: right; font-variant-numeric: tabular-nums; }
.roles select { font: inherit; padding: 0.25rem 0.4rem; border-radius: var(--rayon-petit); border: 1px solid var(--trait-controle); background: var(--surface); color: var(--encre); }
.a-preciser { margin-left: 0.4rem; font-weight: 700; color: var(--attention); background: var(--attention-doux); padding: 0.1rem 0.45rem; border-radius: var(--rayon-plein); font-size: 0.8rem; }

/* Le rapport sur un téléphone : une colonne, et moins de marge. Deux demi-pages côte à côte y
   coupaient les grands chiffres (« 15 2… », vu le 2026-10-16) ; l'impression reste en A4. */
@media screen and (max-width: 40rem) {
  .a4 { padding: 1.2rem 1rem 1.4rem; }
  .a4__blocs > .bloc-a4 { grid-column: 1 / -1; }
}

/* ---- La courbe (lot H) : un SVG à sa taille, des traits nets, la fiabilité dite ---- */
.courbe { flex: 1 1 auto; min-height: 9rem; height: 13.75rem; position: relative; }
.grille2 .courbe { height: auto; }
.courbe__svg { display: block; }
.courbe__ligne { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.courbe__grille { stroke: var(--trait); stroke-width: 1; }
.courbe__axe { font: 600 11px var(--sans); fill: var(--encre-doux); }
.courbe__bande { fill: var(--surface-creux); }
.courbe__note { font: 700 10px var(--sans); fill: var(--encre-doux); }
.courbe__zone { fill: transparent; }
.courbe__zone:hover { fill: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ---- Comparer à date (lot I) : deux valeurs, leur écart en nombre et en %, ses réserves ---- */
.comparaison { display: grid; gap: 0.15rem; }
.comparaison__rangee { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.comparaison__periode { font: 700 0.9rem var(--sans); color: var(--encre-doux); }
.comparaison__valeur { font: 800 2rem/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.comparaison__rangee--ref .comparaison__valeur { font-size: 1.4rem; color: var(--encre-doux); }
.comparaison__ecart { margin: 0.4rem 0 0.2rem; padding-top: 0.5rem; border-top: 1px solid var(--trait); display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.comparaison__ecart strong { font: 800 1.35rem var(--sans); font-variant-numeric: tabular-nums; color: var(--accent); }
.comparaison .raison + .raison { margin-top: 0.2rem; }
@container (max-width: 20rem) { .comparaison__valeur { font-size: 1.6rem; } }

/* ---- Le cumul : la courbe, une ligne par année, étiquetée en bout ---- */
.cumul__ligne { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.courbe__etiquette { font: 800 11px var(--sans); }

/* ---- Le Tableau (lot J) : chiffres alignés à droite, en-tête et total figés, total séparé ---- */
.tableau-bloc { display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; }
.grille2 .tableau-bloc { flex: 1; }
.tableau { overflow: auto; border-radius: var(--rayon-petit); }
.grille2 .tableau { flex: 1; min-height: 0; }
.tableau table { width: auto; min-width: min(100%, 28rem); border-collapse: separate; border-spacing: 0; font-size: 0.85rem; }
.tableau th, .tableau td { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--trait); text-align: left; white-space: nowrap; }
.tableau thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); white-space: normal; min-width: 5.5rem; max-width: 11rem; vertical-align: bottom; font-size: 0.8rem; color: var(--encre-doux); }
.tableau thead th:first-child { min-width: 0; }
.tableau thead th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
.tableau thead th[aria-sort] button { color: var(--encre); font-weight: 800; }
.tableau .n { text-align: right; font-variant-numeric: tabular-nums; }
.tableau tbody th { font-weight: 600; }
.tableau__filtre { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.tableau__filtre:hover { color: var(--accent); text-decoration: underline; }
.tableau tr.choisie th, .tableau tr.choisie td { background: var(--accent-doux); }
.tableau .groupe th, .tableau .groupe td { font-weight: 800; background: var(--surface-creux); }
.tableau .groupe button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; text-align: left; }
.tableau .enfant th { padding-left: 1.6rem; font-weight: 500; }
.tableau tfoot th, .tableau tfoot td { background: var(--surface); }
.tableau .total th, .tableau .total td { position: sticky; bottom: 0; font-weight: 800; border-top: 2px solid var(--trait-controle); }
.tableau .stat th, .tableau .stat td { color: var(--encre-doux); font-style: italic; }
.tableau .part { display: block; color: var(--encre-doux); font-size: 0.75rem; font-weight: 600; }
.tableau__pied { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; }
/* La première colonne reste visible quand le tableau défile en largeur (téléphone, beaucoup de colonnes). */
.tableau tbody th, .tableau tfoot th, .tableau thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.tableau thead th:first-child { z-index: 2; }
.tableau .groupe th { background: var(--surface-creux); }
.tableau tr.choisie th { background: var(--accent-doux); }
@media print { .tableau tbody th, .tableau tfoot th, .tableau thead th:first-child { position: static; } }
@media print { .tableau .total th, .tableau .total td, .tableau thead th { position: static; } }

/* ---- L'en-tête du catalogue : la structure de celle du site (nom à gauche, action à droite,
   collée en haut, la page défile dessous), dans la charte de l'Atelier. Partagée par
   toutes les pages du catalogue, l'écran de l'Atelier compris (2026-10-16). ---- */
.evitement { position: absolute; left: -9999px; top: 0; z-index: 20; padding: 0.6rem 1rem; background: var(--accent-plein); color: #fff; }
.evitement:focus { left: 0; }
.tete {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  /* Alignée sur la colonne de la page : 92 rem pour l'Atelier, 46 pour le texte (.tete--texte). */
  padding: 0.7rem max(1.25rem, calc((100% - 92rem) / 2 + 1.25rem));
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--trait);
}
.tete__marque { font: 800 1.15rem/1.2 var(--sans); letter-spacing: -0.02em; color: var(--encre-doux); text-decoration: none; white-space: nowrap; }
.tete__accent { color: var(--encre); }
.tete__marque:hover .tete__accent { color: var(--accent); }
.tete__domaine { font-family: var(--mono); font-size: 0.8em; font-weight: 500; letter-spacing: 0; color: var(--accent); margin-left: 0.05em; }
.tete__rubrique { margin-left: 0.55rem; padding-left: 0.55rem; border-left: 1px solid var(--trait-controle); font-size: 0.85em; font-weight: 700; letter-spacing: 0; color: var(--encre-doux); }
.tete__retour { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; text-decoration: none; }
.tete__court { display: none; }
@media (max-width: 30rem) {
  .tete__long { display: none; }
  .tete__court { display: inline; }
}

/* ---- Le fil d'Ariane : où l'on est dans le catalogue (motif « breadcrumb » de l'ARIA APG) ---- */
.ariane ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.45rem; margin: 0; padding: 0; list-style: none; font-size: 0.85rem; color: var(--encre-doux); }
.ariane li { display: inline-flex; align-items: center; gap: 0.45rem; }
/* Le séparateur est dessiné, pas écrit : un lecteur d'écran ne le lit pas. */
.ariane li + li::before { content: ""; width: 0.4rem; height: 0.4rem; border-top: 1.5px solid var(--trait-controle); border-right: 1.5px solid var(--trait-controle); transform: rotate(45deg); }
.ariane a { color: var(--accent); font-weight: 700; }
.ariane [aria-current="page"] { color: var(--encre); font-weight: 700; }
@media print { .tete, .ariane, .evitement { display: none; } }
