/* style.css : apparence de l'application.
   Les couleurs sont définies une seule fois ici, pour le mode clair et le mode sombre.
   --c désigne la couleur de la catégorie en cours ; elle est donnée par app.js. */

/* Caractère de titre : Newsreader (Production Type, licence SIL OFL 1.1, voir polices/OFL.txt), hébergé ici,
   sous-ensemble latin. Le même dessin sur tous les appareils ; le texte courant reste en police système. */
@font-face {
  font-family: "Newsreader";
  src: url("polices/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  src: url("polices/newsreader-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --fond: #f6f4ef;
  --carte: #fffefb;
  --texte: #1c1b19;
  --discret: #6b6862;
  --trait: #dcd7cc;
  --trait-doux: #ebe7df;
  --accent: #1d4f91;
  --accent-doux: #e8edf5;
  --sur-accent: #ffffff;
  --encadre: #f1eee7;
  --vert: #2d6a3e;
  --vert-doux: #e5efe6;
  --rouge: #a5281b;
  --rouge-doux: #f6e4e1;
  --orange: #c7782a;
  --rayon: 4px;
  /* Version 2 (DESIGN.md) : cartes à jouer, élévation, mouvement, largeurs */
  --rayon-bouton: 10px;
  --rayon-carte: 12px;
  --carte-haute: #ffffff;
  --ombre-1: 0 1px 1px rgba(48, 36, 18, 0.05), 0 2px 6px rgba(48, 36, 18, 0.05);
  --ombre-2: 0 2px 4px rgba(48, 36, 18, 0.07), 0 10px 24px rgba(48, 36, 18, 0.10);
  --duree-courte: 160ms;
  --duree: 280ms;
  --duree-longue: 560ms;
  --courbe: cubic-bezier(0.2, 0.7, 0.2, 1);
  --largeur-lecture: 680px;
  --largeur-page: 1120px;
  --titre: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --police: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, Menlo, monospace;
  --hauteur-nav: 62px;
}

/* Mode sombre « papier de nuit » : fond et texte dans les mêmes tons chauds que le mode clair.
   Texte ivoire plutôt que blanc pur (contraste 12,9:1, confortable sans éblouir),
   surfaces de plus en plus claires pour marquer la profondeur, couleurs d'accent adoucies (≥ 7,5:1). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #16130f;
    --carte: #1f1b16;
    --texte: #e7dfd1;
    --discret: #aba191;
    --trait: #3b342b;
    --trait-doux: #2a251f;
    --accent: #93b4e0;
    --accent-doux: #222a35;
    --sur-accent: #16130f;
    --encadre: #28231d;
    --vert: #8fc79a;
    --vert-doux: #1f2b20;
    --rouge: #ee9582;
    --rouge-doux: #3a221c;
    --orange: #e2a867;
    --carte-haute: #29241d;
    --ombre-1: 0 0 0 1px rgba(0, 0, 0, 0.12);
    --ombre-2: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.28);
  }
}
/* Mode sombre choisi à la main (bouton du pied de page) */
:root[data-theme="dark"] {
    --fond: #16130f;
    --carte: #1f1b16;
    --texte: #e7dfd1;
    --discret: #aba191;
    --trait: #3b342b;
    --trait-doux: #2a251f;
    --accent: #93b4e0;
    --accent-doux: #222a35;
    --sur-accent: #16130f;
    --encadre: #28231d;
    --vert: #8fc79a;
    --vert-doux: #1f2b20;
    --rouge: #ee9582;
    --rouge-doux: #3a221c;
    --orange: #e2a867;
      --carte-haute: #29241d;
    --ombre-1: 0 0 0 1px rgba(0, 0, 0, 0.12);
    --ombre-2: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.55;
  background: var(--fond);
  color: var(--texte);
}

/* Les contrôles de formulaire prennent la police et la couleur du texte : sans cela, en thème sombre, la saisie
   d'une zone de texte resterait noire sur fond sombre */
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.conteneur {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px calc(var(--hauteur-nav) + 40px + env(safe-area-inset-bottom));
}

[hidden] { display: none !important; }

/* Titres : la hiérarchie vient de la taille et de la couleur, pas de la graisse (600 au plus ; 500 pour les grands) */
h1, h2, h3, h4 { font-weight: 600; }

/* Lien d'évitement : premier arrêt du clavier, visible seulement quand il a le focus */
.lien-evitement { position: absolute; left: 16px; top: -200px; z-index: 100; padding: 12px 16px; min-height: 44px;
  background: var(--carte); color: var(--texte); border: 2px solid var(--accent); border-radius: var(--rayon-bouton); font-weight: 600; }
.lien-evitement:focus { top: calc(env(safe-area-inset-top) + 8px); }
main:focus { outline: none; }

/* Échelle de texte : pas deux tailles à moins de 1 px l'une de l'autre (13 px au plus petit, « small » compris) */
small { font-size: 13px; }

/* Texte réservé aux lecteurs d'écran */
.invisible {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ===================== En-tête et navigation ===================== */

.entete {
  padding: calc(env(safe-area-inset-top) + 16px) 0 0;
  margin-bottom: 20px;
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--titre);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--texte);
  text-decoration: none;
}

/* Emblème : illusion de Müller-Lyer. Les deux traits ont la même longueur. */
.embleme { width: 34px; height: 24px; flex: none; fill: none; stroke-linecap: round; overflow: visible; }
.embleme-trait { stroke: var(--texte); stroke-width: 2.4; }
.embleme-ailette { stroke: var(--accent); stroke-width: 2; transition: opacity 0.5s ease; }
.embleme-guide { stroke: var(--vert); stroke-width: 1.2; stroke-dasharray: 2 2.5; opacity: 0; transition: opacity 0.5s ease; }
.embleme.revele .embleme-ailette { opacity: 0.12; }
.embleme.revele .embleme-guide { opacity: 1; }

/* Bouton de langue : propose l'autre langue (EN / FR). Même trait fin et mêmes coins que les autres boutons,
   capitales du caractère de titre comme les étiquettes ; pas de drapeau (un drapeau désigne un pays, pas une langue).
   Toujours en haut à droite, face à la marque (l'en-tête est le repère de position). */
.entete { position: relative; }
.langue-entete {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 16px);
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  font-family: var(--titre);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--discret);
  text-decoration: none;
}
.langue-entete svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.langue-entete:hover, .langue-entete:focus-visible { color: var(--texte); border-color: var(--texte); }

/* Téléphone : barre d'onglets fixée en bas de l'écran, comme une application */
.navigation {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0 4px env(safe-area-inset-bottom);
  /* Fond opaque et couche graphique propre : sur iPhone, quand la barre d'adresse de Safari
     s'agrandit ou se réduit pendant le défilement, un fond flouté (backdrop-filter) est recalculé
     à chaque image et la barre tremble. */
  background: var(--fond);
  transform: translateZ(0);
  border-top: 1px solid var(--trait);
}

.onglet {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--hauteur-nav);
  font-size: 11px;
  font-weight: 600;
  color: var(--discret);
  text-decoration: none;
}

.onglet svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.onglet.actif { color: var(--texte); }
.onglet.actif svg { stroke: var(--c, var(--texte)); stroke-width: 2.1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .onglet.actif svg { stroke: color-mix(in srgb, var(--c, var(--texte)) 55%, white); }
}
/* Mode sombre choisi à la main (bouton du pied de page) */
:root[data-theme="dark"] .onglet.actif svg { stroke: color-mix(in srgb, var(--c, var(--texte)) 55%, white); }

/* Ordinateur : navigation en haut, à côté du titre */
@media (min-width: 760px) {
  .conteneur { padding-bottom: 56px; }
  .entete {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    background: var(--fond);
    padding-top: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--trait);
    margin: 0 -16px 24px;
    padding-left: 16px; padding-right: 16px;
  }
  .navigation {
    position: static;
    display: flex;
    gap: 24px;
    padding: 0;
    background: none;
    transform: none;
    border: 0;
  }
  .onglet {
    flex-direction: row;
    gap: 8px;
    height: auto;
    padding: 8px 0;
    font-size: 15px;
    border-bottom: 3px solid transparent;
  }
  .onglet svg { width: 18px; height: 18px; }
  .onglet.actif { border-bottom-color: var(--c, var(--texte)); }
  /* Deux lignes au plus : marque, recherche, profil et langue sur la première (dans le flux, sans chevauchement),
     la navigation dessous */
  .entete { column-gap: 12px; --ecart-entete: 12px; }
  .langue-entete, .etat-synchro { position: static; flex: none; }
  .entete .bouton-profil { position: relative; flex: none; }   /* repère du blason */
  .etat-synchro { order: 3; }
  .entete .bouton-profil { order: 4; }
  .langue-entete { order: 5; }
  .navigation { order: 6; flex-basis: 100%; margin-top: 8px; }
}
/* Fenêtre basse (téléphone en paysage) : l'en-tête défile avec la page, pour laisser la place au contenu */
@media (min-width: 760px) and (max-height: 499px) { .entete { position: relative; } }

/* Recherche dans tout le site (en-tête). Téléphone : sous la marque ; ordinateur : à droite de la marque, à gauche du bouton de langue */
.recherche-globale { position: relative; order: 2; margin: 16px 0 0; }
.recherche-champ {
  width: 100%;
  height: 44px;   /* même hauteur que les boutons de l'en-tête */
  padding: 8px 12px;
  font-size: 16px; /* 16px minimum : évite le zoom automatique de Safari */
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--carte);
  color: var(--texte);
  -webkit-appearance: none;
  appearance: none;
}
.recherche-champ:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.resultats-globaux {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  z-index: 40;
  max-height: min(64vh, 440px);
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--carte);
}
.resultats-globaux[hidden] { display: none; }
.resultat + .resultat { border-top: 1px solid var(--trait-doux); }
.resultat { border-radius: var(--rayon); }
.resultat.actif, .resultat:hover { background: var(--encadre); }
.resultat-lien { display: block; padding: 8px 8px 8px; color: var(--texte); text-decoration: none; }
.resultat-genre {
  display: block;
  font-family: var(--titre);
  font-size: 14px;
  font-weight: 600;
  color: var(--discret);
}
.resultat-titre { display: block; font-family: var(--titre); font-size: 18px; line-height: 1.25; font-weight: 600; }
.resultat-extrait { display: block; margin-top: 2px; font-size: 14px; line-height: 1.4; color: var(--discret); }
.resultat-vide { padding: 12px 8px; font-size: 14px; color: var(--discret); }
@media (min-width: 760px) {
  .recherche-globale { order: 2; flex: 1 1 200px; margin: 0; }
}

/* Avant les scripts, les vues sont vides : la hauteur réservée garde le pied de page sous l'écran, sans saut à
   l'arrivée du contenu (100svh plutôt que 100vh, qui déborde sous la barre d'adresse de Safari sur iPhone) */
main { min-height: 100svh; }

/* ===================== Titres de page ===================== */

.vue { animation: entree 0.18s ease-out; }
/* Avec les transitions de vue (app.js, transitionDeVue), le navigateur fait déjà le fondu : pas de second mouvement */
@supports (view-transition-name: none) { :root:not([data-animations="reduites"]) .vue { animation: none; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--duree); animation-timing-function: var(--courbe); }
::view-transition-group(titre-fiche) { animation-duration: var(--duree); animation-timing-function: var(--courbe); }
@keyframes entree { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-titre {
  font-family: var(--titre);
  font-size: clamp(40px, 2.4vw + 30px, 56px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.page-intro { color: var(--discret); font-size: 15px; margin: 0 0 20px; }

.surtitre {
  font-size: 14px;
  font-weight: 600;
  color: var(--discret);
  margin: 0 0 8px;
}

/* Étiquettes en casse normale : certaines viennent de textes en minuscules (« biais · Social ») */
:is(.etiquette, .resultat-genre, .surtitre, .tirage-libelle, .programme-etat, .etape-etat, .pdj-etiquette, .pdj-rubrique, .pdj-intertitre)::first-letter { text-transform: uppercase; }

h3.titre-bloc {
  font-family: var(--titre);
  font-size: 21px;
  margin: 28px 0 12px;
}

/* ===================== Boutons, puces, segments ===================== */

.bouton {
  display: inline-block;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  /* Une seule couleur d'action sur tout le site : la couleur de catégorie reste à la barre, à l'étiquette et aux liens */
  color: var(--sur-accent);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--rayon-bouton);
  text-decoration: none;
  text-align: center;
}
/* Lien stylé en bouton : un <a> ne centre pas son texte en hauteur comme un <button> ; sans flex, le texte restait en
   haut des 44 px (visible sous Safari). .bouton.large, plus précis, garde son display: flex. label[for].bouton : plus précis
   que la règle générale label[for] (display: block), qui l'emportait */
a.bouton, label.bouton, label[for].bouton { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.bouton { min-height: 44px; transition: background-color 0.15s, border-color 0.15s, opacity 0.15s, transform 0.1s; }
.bouton:active { opacity: 0.85; transform: scale(0.985); }
.bouton-danger { color: var(--rouge); border-color: var(--rouge); margin-top: 12px; }
.bouton:disabled { opacity: 0.4; cursor: default; }
.bouton.secondaire { background: transparent; color: var(--accent); border-color: var(--accent); }
.bouton.large { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 8px 12px; font-size: 16px; }   /* 48 px sur une ligne */

.lien {
  border: 0;
  background: none;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-texte, var(--accent));
  text-decoration: none;
}

.retour { display: inline-block; margin-bottom: 16px; font-size: 15px; }

.puces {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.puces::-webkit-scrollbar { display: none; }
/* Rangée qui défile (téléphone) : un fondu au bord droit signale la suite ; la marge laisse sortir la dernière puce
   du fondu en fin de défilement. Dès 760 px, les puces passent à la ligne : tout est visible. */
.puces { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 28px; }
.carte-bienvenue .puces, .puces-personnage { flex-wrap: wrap; overflow: visible; }
.puces-personnage .puce { white-space: normal; text-align: left; }
:is(#filtres-quiz, .puces-theme, .choix-niveau .puces-niveau, .controles-tisane .puces, .carnet-formulaire .modeles, .carte-bienvenue .puces, .puces-personnage) { -webkit-mask-image: none; mask-image: none; padding-right: 0; }
@media (min-width: 760px) { .puces { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; padding-right: 0; } }

.puce {
  flex: none;
  min-width: 44px;   /* « All » (anglais) ne faisait que 42 px de large */
  justify-content: center;
  padding: 4px 12px;
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: transparent;
}
.puce.active, .puce[aria-pressed="true"] { background: var(--c, var(--texte)); border-color: var(--c, var(--texte)); color: var(--sur-c, var(--fond)); }
/* Dans une carte, la couleur assombrie (clair) ou éclaircie (sombre), seule assez contrastée avec --sur-c */
.carte .puce.active, .carte .puce[aria-pressed="true"] { background: var(--c-fort); border-color: var(--c-fort); }

.pastille { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 8px; vertical-align: 1px; }
.puce.active .pastille { background: var(--sur-c); }

.segment {
  display: flex;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  overflow: hidden;
  margin-bottom: 12px;
}
.segment a {
  flex: 1;
  padding: 8px 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--discret);
  text-decoration: none;
}
.segment a + a { border-left: 1px solid var(--trait); }
.segment a.actif { background: var(--texte); color: var(--fond); }
.segment small { font-weight: 400; }   /* sans transparence : 4,5:1 sur l'onglet inactif */

.recherche {
  width: 100%;
  padding: 12px 12px;
  font-size: 16px; /* 16px minimum : évite le zoom automatique de Safari */
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--carte);
  margin-bottom: 12px;
  -webkit-appearance: none;
  appearance: none;
}
.recherche:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.barre-outils {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--discret);
}
.progression { flex: 1; }

.jauge { height: 4px; margin-top: 8px; background: var(--trait); overflow: hidden; }
.jauge > div { height: 100%; width: 0; background: var(--c-fort, var(--vert)); transition: width 0.3s; }

.vide { text-align: center; color: var(--discret); font-size: 15px; margin: 40px 0; }

/* ===================== Cartes ===================== */

.carte {
  /* Couleurs dérivées de --c (couleur de la catégorie). Assombries en mode clair pour rester lisibles. */
  --c-fort: color-mix(in srgb, var(--c, #1d4f91) 86%, black);
  --c-texte: color-mix(in srgb, var(--c, #1d4f91) 80%, black);
  --c-clair: color-mix(in srgb, var(--c, #1d4f91) 10%, var(--carte));
  --sur-c: #ffffff;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-left: 4px solid var(--c, var(--trait));
  border-radius: var(--rayon-carte);
  box-shadow: var(--ombre-1);
  padding: 20px 20px 16px;
  margin-bottom: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .carte {
    --c-fort: color-mix(in srgb, var(--c, #1d4f91) 72%, white);
    --c-texte: color-mix(in srgb, var(--c, #1d4f91) 55%, white);
    --c-clair: color-mix(in srgb, var(--c, #1d4f91) 22%, var(--carte));
    --sur-c: #16130f;
  }
}
/* Mode sombre choisi à la main (bouton du pied de page) */
:root[data-theme="dark"] .carte {
    --c-fort: color-mix(in srgb, var(--c, #1d4f91) 72%, white);
    --c-texte: color-mix(in srgb, var(--c, #1d4f91) 55%, white);
    --c-clair: color-mix(in srgb, var(--c, #1d4f91) 22%, var(--carte));
    --sur-c: #16130f;
  }

.carte h2 { font-family: var(--titre); font-size: 21px; line-height: 1.2; margin: 0 0 4px; }
.carte p { margin: 0 0 12px; }
.carte > :last-child { margin-bottom: 0; }

.etiquette {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-texte, var(--accent));
}

.entete-carte { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.badge { font-size: 13px; font-weight: 600; color: var(--vert); white-space: nowrap; }

.encadre { background: var(--encadre); padding: 12px 12px; border-left: 3px solid var(--trait); }

/* ===================== Liste des fiches, groupée par catégorie ===================== */

.groupe { margin-bottom: 24px; --c-texte: color-mix(in srgb, var(--c) 80%, black); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .groupe { --c-texte: color-mix(in srgb, var(--c) 55%, white); }
}
/* Mode sombre choisi à la main (bouton du pied de page) */
:root[data-theme="dark"] .groupe { --c-texte: color-mix(in srgb, var(--c) 55%, white); }

.groupe-entete { margin: 0 0 8px; }
.groupe-nom {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-texte);
}
.groupe-nom .nombre { color: var(--discret); font-weight: 600; margin-left: 4px; }
.groupe-description { font-size: 14px; color: var(--discret); margin: 1px 0 0; }

.groupe-liste {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-left: 4px solid var(--c);
  border-radius: var(--rayon);
  overflow: hidden;
}

.ligne-fiche {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
}
.ligne-fiche + .ligne-fiche { border-top: 1px solid var(--trait-doux); }
.ligne-fiche:active { background: var(--encadre); }
@media (hover: hover) { .ligne-fiche:hover { background: var(--encadre); } }

.lf-corps { flex: 1; min-width: 0; }
.lf-nom { display: block; font-family: var(--titre); font-size: 18px; font-weight: 600; line-height: 1.25; }
.lf-def {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
  font-size: 14px;
  color: var(--discret);
}
.lf-etat { flex: none; width: 18px; margin-top: 4px; color: var(--vert); font-weight: 600; text-align: right; }

/* ===================== Page d'une fiche ===================== */

.fiche-titre { font-family: var(--titre); font-weight: 500; font-size: clamp(36px, 2vw + 28px, 50px); line-height: 1.08; letter-spacing: -0.01em; margin: 4px 0 8px; }
.autres-noms { font-size: 14px; font-style: italic; color: var(--discret); margin: 0 0 12px; }
/* La définition est le chapô de la fiche : seul texte courant en serif (DESIGN.md) */
.fiche-definition { font-family: var(--titre); font-optical-sizing: auto; font-size: 21px; line-height: 1.42; font-weight: 400; margin: 8px 0 0; }
@media (min-width: 760px) { .fiche-definition { font-size: 24px; } }
/* L'en-tête de la fiche (étiquette, numéro, titre, autres noms, définition) se ferme par le trait */
.entete-fiche::after { margin: 16px 0 0; }

.section { border-top: 1px solid var(--trait); margin-top: 16px; padding-top: 12px; }
.section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--discret);
  margin: 0 0 8px;
}
.section p { margin: 0; font-size: 16px; }
.section p + p { margin-top: 8px; }

.forme { font-family: var(--mono); font-size: 13px; background: var(--encadre); padding: 12px 12px; }
.celebre { background: var(--c-clair, var(--accent-doux)); padding: 12px 12px; border-left: 3px solid var(--c-fort, var(--accent)); }
.distinction { border: 1px dashed var(--trait); padding: 12px 12px; }
.distinction a { font-weight: 600; color: var(--c-texte, var(--accent)); }
.source { font-size: 14px; color: var(--discret); }

.voir-aussi { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 15px; }
.voir-aussi a, .carte .lien-texte { color: var(--c-texte, var(--accent)); text-decoration: none; border-bottom: 1px solid var(--c-clair, var(--accent-doux)); }

.schema { margin: 0; }
.schema svg { display: block; width: 100%; height: auto; max-width: 440px; margin: 2px auto 8px; overflow: visible; }
.schema figcaption { font-size: 13px; color: var(--discret); }
/* Téléphone : le schéma (320 unités de large) gagne 10 px de chaque côté sur la marge de la carte, pour ne pas être
   réduit (ses plus petits textes restent à 11 px) */
@media (max-width: 759px) { .carte .schema svg { width: calc(100% + 20px); max-width: none; margin-left: -12px; margin-right: -12px; } }

.pied-fiche {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 20px;
}
.bouton-acquis {
  /* Même gabarit que .bouton, à côté duquel il se trouve (« Partager cette carte ») */
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-bouton);
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--discret);
}
.bouton-acquis.oui { background: var(--vert-doux); border-color: var(--vert); color: var(--vert); }
.memoire-fiche { font-size: 13px; color: var(--discret); }

.niveau { display: inline-flex; gap: 4px; vertical-align: -1px; margin-left: 4px; }
.niveau i { width: 7px; height: 7px; border-radius: 50%; background: var(--trait); }
.niveau i.plein { background: var(--vert); }

.suivantes { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-top: 4px; }
.suivantes a { text-decoration: none; max-width: 48%; }
.suivantes a:last-child { text-align: right; margin-left: auto; }

/* ===================== Schémas (SVG) ===================== */

.sch-fond { fill: var(--encadre); }
.sch-carte { fill: var(--carte); }
.sch-trait { stroke: var(--discret); stroke-width: 1.4; fill: none; }
.sch-trait-fin { stroke: var(--trait); stroke-width: 1; fill: none; }
.sch-pointille { stroke: var(--discret); stroke-width: 1.3; stroke-dasharray: 4 4; fill: none; }
.sch-c { fill: var(--c-fort, var(--accent)); }
.sch-c-trait { stroke: var(--c-fort, var(--accent)); stroke-width: 2; fill: none; }
.sch-clair { fill: var(--c-clair, var(--accent-doux)); }
.sch-discret { fill: var(--discret); }
.sch-gris { fill: var(--trait); }
/* En sombre, le gris des traits disparaît sur le fond : points et carrés neutres plus clairs (3,4:1 sur le fond) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sch-gris { fill: #73685a; }
}
/* Mode sombre choisi à la main (bouton du pied de page) */
:root[data-theme="dark"] .sch-gris { fill: #73685a; }
/* Liseré couleur de carte autour d'un texte posé sur un tracé */
.sch-halo { paint-order: stroke; stroke: var(--carte); stroke-width: 3.5px; stroke-linejoin: round; }
.sch-rouge { fill: var(--rouge); }
.sch-rouge-trait { stroke: var(--rouge); stroke-width: 2.4; fill: none; }
.sch-orange-trait { stroke: var(--orange); stroke-width: 2; fill: none; }
.sch-vert-trait { stroke: var(--vert); stroke-width: 2; fill: none; }
.sch-contour { stroke: var(--discret); stroke-width: 1; }
.sch-vert { fill: var(--vert); }
.sch-orange { fill: var(--orange); }
.sch-texte { fill: var(--texte); font-family: var(--police); font-size: 12px; }
.sch-petit { fill: var(--discret); font-family: var(--police); font-size: 11px; }
.sch-gras { font-weight: 600; }
.sch-sur-c { fill: var(--sur-c, #ffffff); font-family: var(--police); font-size: 11.5px; font-weight: 600; }
.sch-titre { fill: var(--texte); font-family: var(--titre); font-size: 15px; font-weight: 600; }

/* ===================== Accueil ===================== */

.date-du-jour { font-size: 13px; color: var(--discret); margin: 0 0 2px; }

.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 16px; }
.tuile { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 12px 8px; background: var(--fond); }
.tuile-nombre { display: block; font-family: var(--titre); font-size: 24px; white-space: nowrap; font-weight: 500; line-height: 1.1; }
.tuile-libelle { display: block; font-size: 13px; color: var(--discret); line-height: 1.3; margin-top: 2px; }

.cartes-grille { display: grid; gap: 12px; }
@media (min-width: 560px) { .cartes-grille { grid-template-columns: 1fr 1fr; } .cartes-grille .carte { margin: 0; } }

.entree { display: block; color: inherit; text-decoration: none;
  transition: border-color var(--duree-courte), box-shadow var(--duree-courte) var(--courbe), transform var(--duree-courte) var(--courbe), background-color var(--duree-courte); }
.entree:active { transform: translateY(1px); box-shadow: var(--ombre-1); }
/* Carte à jouer levée au survol : ombre plus marquée en clair, surface plus claire en sombre */
@media (hover: hover) { .entree:hover { box-shadow: var(--ombre-2); transform: translateY(-2px); background: var(--carte-haute); } }
.entree h2 { color: var(--texte); }
.entree p { margin: 4px 0 0; color: var(--discret); font-size: 15px; }
@media (hover: hover) { .entree:hover { border-color: var(--c-fort); } }

/* ===================== Quiz ===================== */

.quiz-entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--discret);
}

.consigne {
  font-size: 14px;
  font-weight: 600;
  color: var(--discret);
  margin: 0 0 8px;
}

.cas { font-family: var(--titre); font-size: 19px; line-height: 1.45; margin: 0 0 20px; }

.choix {
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  display: flex;
  gap: 12px;
  align-items: baseline;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  margin-bottom: 8px;
  font-size: 16px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-bouton);
  background: var(--carte);
}
.choix kbd { font-family: var(--police); font-size: 13px; color: var(--discret); min-width: 14px; }
@media (hover: none) { .choix kbd { display: none; } }
@media (hover: hover) { .choix:not(:disabled):hover { border-color: var(--discret); } }
.choix:disabled { cursor: default; }
.choix.juste { background: var(--vert-doux); border-color: var(--vert); color: var(--vert); font-weight: 600; }
.choix.faux { background: var(--rouge-doux); border-color: var(--rouge); color: var(--rouge); }

.retour-quiz { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--trait); animation: apparition 0.28s ease-out; }
@keyframes apparition { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.verdict { font-weight: 600; margin: 0 0 8px; }
.verdict.juste, .juste-texte { color: var(--vert); }
.verdict.faux, .faux-texte { color: var(--rouge); }

.actions { display: flex; gap: 8px; margin-top: 16px; }
.actions .bouton { flex: 1; }

.grand-score { font-family: var(--titre); font-size: clamp(64px, 2vw + 56px, 80px); line-height: 1; margin: 8px 0 8px; animation: score 0.45s var(--courbe) both; }
@keyframes score { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }

.liste-simple { margin: 8px 0 0; padding-left: 20px; }
.liste-simple li { margin-bottom: 4px; }

/* ===================== Ateliers (jeux et expériences) ===================== */

.question-test { margin-bottom: 20px; }
.question-test p { margin: 0 0 8px; }

.champ {
  width: 7em;
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--carte);
}

.ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Libellé d'un champ (label for=…) : au-dessus du champ, ou à côté dans une ligne ; lignes de champs espacées */
label[for] { display: block; margin: 0 0 8px; }
.ligne > label[for] { margin: 0; }
.ligne + .ligne, .ligne + .source { margin-top: 8px; }
/* Texte libre : toute la largeur ; date : place pour « 19/11/2026 » et l'icône du calendrier */
.champ-texte { width: 100%; }
.champ[type="date"] { width: 12em; max-width: 100%; }

.consigne-tache { font-style: italic; }
.cartes-wason { display: flex; gap: 12px; margin: 16px 0; }
.carte-wason {
  flex: 1;
  max-width: 90px;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-family: var(--titre);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.1;
  text-align: center;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--carte);
}
.carte-wason.choisie { border: 2px solid var(--c-fort, var(--accent)); background: var(--c-clair, var(--accent-doux)); }
.carte-wason.attendue { outline: 2px solid var(--vert); outline-offset: 2px; }
.cartes-wason.petites .carte-wason { font-size: 16px; }

.journal { font-family: var(--mono); font-size: 14px; margin: 12px 0; padding: 0; list-style: none; }
.journal li { padding: 4px 0; border-bottom: 1px solid var(--trait); }

.portes { display: flex; gap: 12px; margin: 16px 0; }
.porte {
  flex: 1;
  height: 110px;
  font-family: var(--titre);
  font-size: 18px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  background: var(--encadre);
}
.porte.choisie { border: 2px solid var(--c-fort, var(--accent)); }
.porte.ouverte { background: var(--carte); color: var(--discret); }
.porte.voiture { background: var(--vert-doux); color: var(--vert); font-weight: 600; }

.tableau { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.tableau td, .tableau th { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau td:last-child, .tableau th:last-child { text-align: right; }

.grille-points { display: grid; grid-template-columns: repeat(40, 1fr); gap: 1px; margin: 12px 0 8px; }
.grille-points span { aspect-ratio: 1; background: var(--trait); }
.grille-points .malade { background: var(--rouge); }
.grille-points .faux-positif { background: var(--orange); }

.legende { font-size: 13px; color: var(--discret); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.legende i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }

.barre-ligne { margin: 12px 0; }
.barre-nom { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.barre-fond { position: relative; height: 14px; background: var(--encadre); }
.barre { height: 100%; background: var(--discret); }
.barre.forte, .barre-fond.centre .barre { background: var(--c-fort, var(--accent)); }
.barre-fond.centre::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--texte); }
.barre-source { font-size: 13px; color: var(--discret); margin-top: 4px; }

.intervalle { position: relative; height: 18px; background: var(--encadre); }
.intervalle-plage { position: absolute; top: 5px; height: 8px; background: var(--c-fort, var(--accent)); }
.intervalle-point { position: absolute; top: 2px; width: 14px; height: 14px; margin-left: -8px; border-radius: 50%; border: 2px solid var(--carte); }
.intervalle-point.dedans { background: var(--vert); }
.intervalle-point.dehors { background: var(--rouge); }

.cadre-nuage { min-height: 320px; }
.nuage { display: block; width: 100%; max-width: 340px; margin: 8px auto 12px; background: var(--encadre); }
.nuage circle { fill: var(--texte); }

.graphe { display: block; width: 100%; max-width: 360px; margin: 12px auto 4px; }
.graphe-fond { fill: var(--encadre); }
.graphe-grille { stroke: var(--trait); stroke-width: 1; }
.graphe-texte { font-size: 10px; fill: var(--discret); }
.graphe-diagonale { stroke: var(--discret); stroke-width: 1.5; stroke-dasharray: 5 4; }
.graphe-point { fill: var(--c-fort, var(--accent)); stroke: var(--carte); stroke-width: 1.5; }

/* ===================== Page des ateliers ===================== */

.bilan-ateliers .tuiles { margin-bottom: 12px; }
.conseil { font-size: 15px; margin: 0; }
.lien-texte { font-weight: 600; }

.section-ateliers { margin-top: 28px; }
.titre-section { font-family: var(--titre); font-size: 21px; line-height: 1.2; margin: 0 0 2px; }
.intro-section { font-size: 14px; color: var(--discret); margin: 0 0 12px; }

/* Sections d'ateliers pliables : un bouton par section, fermé par défaut sauf si on l'a ouvert */
.pliant {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 8px 2px 8px;
  border: 0;
  border-bottom: 1px solid var(--trait);
  background: none;
  color: var(--texte);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pliant:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pliant-titre { flex: 1 1 auto; font-family: var(--titre); font-size: 21px; line-height: 1.2; font-weight: 500; }
.pliant-compte { font-size: 13px; color: var(--discret); white-space: nowrap; }
.pliant-fleche { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.pliant[aria-expanded="true"] .pliant-fleche { transform: rotate(180deg); }
.section-ateliers .titre-section { margin: 0; }
.corps-section { padding-top: 12px; }
.corps-section[hidden] { display: none; }
.section-ateliers .intro-section { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .pliant-fleche { transition: none; } }

/* Question au hasard (melange.js) */
.melange-jeu { margin: 0 0 16px; font-size: 15px; }
.melange-etiquette {
  font-family: var(--titre);
  font-size: 14px;
  font-weight: 600;
  color: var(--discret);
}

.atelier { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.atelier .atelier-corps { min-width: 0; }
.atelier h2 { font-size: 19px; }
.atelier p { font-size: 14px; }

.picto-cadre {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--rayon);
  background: var(--c-clair, var(--accent-doux));
}
.picto { width: 40px; height: 40px; fill: none; stroke: var(--c-texte, var(--accent)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.picto .plein { fill: var(--c-fort, var(--accent)); stroke: none; }
.picto .fond { fill: var(--carte); stroke: none; }
.picto .pointille { stroke-dasharray: 3 3; }
.picto .ailette-picto { stroke: var(--c-fort, var(--accent)); }
@media (hover: hover) {
  .atelier .picto { transition: transform 0.25s ease; }
  .atelier:hover .picto { transform: scale(1.07); }
}

.nav-atelier { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
/* Le titre de l'atelier suivant passe à la ligne plutôt que d'être tronqué */
.atelier-suivant { text-align: right; color: var(--discret); max-width: 60%; }
.tete-atelier { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.tete-atelier .fiche-titre { margin: 0; font-size: 28px; }

/* Historique des parties */
.historique { margin: 12px 0 4px; }
.historique-titre { display: block; font-size: 13px; color: var(--discret); margin-bottom: 4px; }
.historique-barres { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.historique-barres span { flex: 1; max-width: 22px; background: var(--trait); transform-origin: bottom; animation: monte 0.5s ease-out both; }
.historique-barres span.actuelle { background: var(--c-fort, var(--accent)); }
@keyframes monte { from { transform: scaleY(0); } }

/* ===================== Éléments communs des jeux ===================== */

.choix.choisi:not(.juste):not(.faux) { background: var(--c-clair, var(--accent-doux)); border-color: var(--c-fort, var(--accent)); font-weight: 600; }

/* Certitude au quiz : demandée entre le choix et la correction */
.certitude { margin-top: 12px; animation: apparition 0.2s ease-out; }
.certitude .consigne { margin-bottom: 8px; }
.certitude-boutons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.certitude-boutons .bouton { display: flex; align-items: center; justify-content: center; gap: 8px; padding-left: 8px; padding-right: 8px; }
.certitude-boutons kbd { font-size: 11px; color: var(--discret); }
@media (hover: none) { .certitude-boutons kbd { display: none; } }
/* Cinq modes : la rangée passe à la ligne plutôt que de cacher le dernier */
#filtres-quiz { flex-wrap: wrap; overflow: visible; }
.option-certitude { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--discret); margin: 0 0 12px; }
.option-certitude input { width: 16px; height: 16px; accent-color: var(--accent); }
.source.bloc { display: block; margin-top: 4px; }

.curseur {
  display: block;
  width: 100%;
  height: 34px;
  margin: 8px 0 2px;
  accent-color: var(--c-fort, var(--accent));
  cursor: pointer;
}
.curseur:disabled { opacity: 0.6; cursor: default; }
.curseur-ligne { display: flex; align-items: center; gap: 8px; }
.curseur-ligne .curseur { flex: 1; min-width: 0; margin: 0; }
.bouton-pas {
  flex: none;
  width: 40px; height: 40px;
  font-size: 21px; line-height: 1;
  border: 1px solid var(--trait);
  border-radius: 50%;
  background: var(--carte);
  color: var(--c-texte, var(--accent));
  transition: background-color 0.15s, transform 0.1s;
}
.bouton-pas:active { transform: scale(0.92); background: var(--c-clair, var(--accent-doux)); }
.curseur-ligne:has(.curseur:disabled) .bouton-pas { opacity: 0.35; }
.sommaire-ateliers { margin: -4px 0 16px; }
.puces-theme { margin: 0 0 12px; flex-wrap: wrap; overflow: visible; }
.puces-theme .puce.active { background: var(--c-fort, var(--texte)); border-color: var(--c-fort, var(--texte)); color: var(--sur-c, var(--fond)); }
.valeur-forte { font-weight: 600; }
.section-ateliers { scroll-margin-top: 12px; }
@media (min-width: 760px) { .section-ateliers { scroll-margin-top: 90px; } }
.valeur-curseur { font-family: var(--titre); font-size: 19px; font-weight: 600; margin: 4px 0 0; min-height: 1.5em; }
.reperes-curseur { display: flex; justify-content: space-between; font-size: 13px; color: var(--discret); margin: 0 48px 12px; }

/* Échelle logarithmique */
.echelle-log { position: relative; height: 34px; margin: 0 59px 16px; border-top: 1px solid var(--trait); }
.graduation { position: absolute; top: -1px; width: 1px; height: 7px; background: var(--discret); }
.graduation.etiquetee { height: 10px; }
.graduation.etiquetee::after {
  content: attr(data-texte);
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; color: var(--discret); white-space: nowrap;
}
@media (max-width: 359px) { .graduation.secondaire::after { content: none; } }
.repere-vrai {
  position: absolute; top: -9px;
  width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%;
  background: var(--vert); border: 2px solid var(--carte);
  animation: apparition 0.3s ease-out;
}

/* Repère de la moyenne mondiale dans les barres */
.repere { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--texte); opacity: 0.7; }
.barre-fond .barre { transform-origin: left; animation: pousse 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes pousse { from { transform: scaleX(0); } }

/* Nombre tiré au hasard (jeu de l'ancre) */
.tirage {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; margin-bottom: 16px;
  background: var(--c-clair, var(--accent-doux));
  border-left: 3px solid var(--c-fort, var(--accent));
}
.tirage-libelle { font-size: 14px; font-weight: 600; color: var(--c-texte, var(--accent)); }
.tirage-nombre { font-family: var(--titre); font-size: 28px; font-weight: 500; animation: score 0.45s var(--courbe) both; }

/* Frise chronologique */
.frise { margin: 8px 0 8px; }
.frise-svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.frise-liste { margin: 4px 0 0; padding-left: 20px; font-size: 14px; }
.frise-liste li { margin-bottom: 2px; }
.sch-clair-fort { fill: var(--orange); }

/* Vrai ou faux : degré de confiance */
.bloc-confiance { margin-top: 16px; animation: apparition 0.25s ease-out; }
.rangee-confiance { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rangee-confiance .choix { margin: 0; justify-content: center; }
@media (min-width: 560px) { .rangee-confiance { grid-template-columns: repeat(4, 1fr); } }
.graphe-point-partie { fill: var(--orange); stroke: var(--carte); stroke-width: 1.5; }
.graphe-point-ligne { stroke: var(--c-fort, var(--accent)); stroke-width: 2; fill: none; }
.graphe-point-partie-ligne { stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 3; fill: none; }

/* Planisphère (le nord est où ?) */
.planisphere { display: block; width: 100%; max-width: 440px; height: auto; margin: 4px auto 8px; }
.equateur { stroke: var(--discret); stroke-width: 1; }
.terre { fill: color-mix(in srgb, var(--texte) 13%, var(--carte)); stroke: color-mix(in srgb, var(--texte) 30%, var(--carte)); stroke-width: 0.5; stroke-linejoin: round; }
.repere-a { stroke: var(--c-fort, var(--accent)); stroke-width: 1.2; stroke-dasharray: 4 3; }
.repere-b { stroke: var(--orange); stroke-width: 1.2; stroke-dasharray: 4 3; }
.ville-a { fill: var(--c-fort, var(--accent)); stroke: var(--carte); stroke-width: 1.5; }
.ville-b { fill: var(--orange); stroke: var(--carte); stroke-width: 1.5; }
.carres-surfaces { display: block; width: 100%; max-width: 440px; height: auto; margin: 8px auto 4px; }
.carre-surface { fill: color-mix(in srgb, var(--texte) 12%, var(--carte)); stroke: var(--discret); stroke-width: 1; }
.carre-surface.fort { fill: color-mix(in srgb, var(--c-fort, var(--accent)) 30%, var(--carte)); stroke: var(--c-fort, var(--accent)); }

/* ===================== Perception ===================== */

/* Illusions d'optique */
.illusion { display: block; width: 100%; max-width: 400px; height: auto; margin: 0 auto 4px; background: var(--encadre); }
.illusion-trait { stroke: var(--texte); stroke-width: 3; stroke-linecap: round; }
.illusion .ailette { transition: opacity 0.6s ease; }
.illusion.revelee .ailette { opacity: 0.13; }
.illusion-disque { fill: var(--c-fort, var(--accent)); }
.illusion-entourage { fill: var(--discret); opacity: 0.55; }
.illusion-guide { stroke: var(--vert); stroke-width: 2; stroke-dasharray: 5 4; animation: apparition 0.5s ease-out; }
.illusion-guide-cercle { fill: none; stroke: var(--vert); stroke-width: 2; stroke-dasharray: 4 3; }

/* Deux nuages ou deux suites côte à côte */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.duo-suites { display: grid; gap: 12px; margin-bottom: 16px; }
.panneau { margin: 0; padding: 8px; border: 2px solid transparent; border-radius: var(--rayon); transition: border-color 0.3s; }
.panneau figcaption { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.panneau.vrai-hasard { border-color: var(--vert); }
.nuage-petit { display: block; width: 100%; height: auto; }
.point-nuage { fill: var(--texte); }
.case-vide { fill: var(--rouge-doux); }
.case-grappe { fill: var(--c-clair, var(--accent-doux)); }
.grille-nuage { stroke: var(--discret); stroke-width: 0.6; stroke-dasharray: 2 2; }

/* Suites pile ou face */
/* minmax(0, 1fr) et min-width: 0 : sans eux, Safari déduit une largeur minimale des cases
   de leur hauteur (aspect-ratio), et la grille déborde de la carte */
.suite-cases { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); gap: 2px; margin: 4px 0 8px; }
.suite-cases span {
  aspect-ratio: 1;
  min-width: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  border-radius: var(--rayon);
}
.suite-cases .pile { background: var(--c-fort, var(--accent)); color: var(--sur-c, #fff); }
.suite-cases .face { background: var(--encadre); color: var(--discret); }
.suite-cases .serie { box-shadow: 0 0 0 2px var(--orange); position: relative; z-index: 1; }
.suite-cases.saisie { min-height: 24px; }
.suite-cases.saisie span { animation: apparition 0.15s ease-out; }
@media (min-width: 560px) { .suite-cases span { font-size: 11px; } }
.rangee-pieces { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.rangee-pieces .choix { margin: 0; justify-content: center; font-size: 18px; font-weight: 600; min-height: 56px; }

/* Corrélation */
.droite-regression { stroke: var(--orange); stroke-width: 2.5; animation: apparition 0.4s ease-out; }

/* Graphiques trompeurs */
.figure-piege { margin: 0 0 12px; }
.figure-piege figcaption { font-size: 13px; color: var(--discret); }
.figure-piege.honnete { margin-top: 12px; padding-top: 8px; border-top: 1px dashed var(--trait); }
.barre-svg { fill: var(--discret); }
.barre-svg.forte { fill: var(--c-fort, var(--accent)); }
.courbe { stroke: var(--c-fort, var(--accent)); stroke-width: 2.5; fill: none; stroke-linejoin: round; }
.courbe-b { stroke: var(--orange); stroke-width: 2.5; stroke-dasharray: 6 4; fill: none; }
.courbe-fenetre { stroke: var(--rouge); stroke-width: 4; fill: none; opacity: 0.8; }
.graphe-texte-b { fill: var(--orange); font-size: 10px; }
.bidon path, .bidon rect { fill: var(--c-clair, var(--accent-doux)); stroke: var(--c-fort, var(--accent)); stroke-width: 2; }
.risque-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.risque-duo .source { grid-column: 1 / -1; margin: 0; }
.grille-10000 { display: block; width: 100%; height: auto; }
.grille-fond { fill: var(--trait); }
.grille-cas { fill: var(--rouge); }

/* ===================== Raisonner ===================== */

.etape-wason + .etape-wason { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--trait); }
.second-enonce { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--trait); animation: apparition 0.28s ease-out; }
.segment-petit { max-width: 260px; }
.segment-petit a { padding: 8px 8px; font-size: 14px; }
.portes.nombreuses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.portes.nombreuses .porte { height: 68px; font-size: 14px; }
.porte { transition: background-color 0.35s, color 0.35s, border-color 0.2s; }

/* Arbre de fréquences */
.arbre { display: block; width: 100%; max-width: 420px; height: auto; margin: 8px auto 4px; }
.arbre-boite { fill: var(--carte); stroke: var(--trait); stroke-width: 1.2; }
.arbre-boite.arbre-vrai { stroke: var(--rouge); stroke-width: 2.2; }
.arbre-boite.arbre-faux { stroke: var(--orange); stroke-width: 2.2; }
.barre-positifs { display: flex; height: 14px; margin: 8px 0 8px; background: var(--orange); overflow: hidden; }
.barre-positifs .vrais { background: var(--rouge); transform-origin: left; animation: pousse 0.6s ease-out both; }

/* Anniversaires */
.simulation { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--trait); }
.simulation .ligne { margin-bottom: 8px; }
.simulation .curseur { flex: 1; min-width: 160px; }
.annee-anniversaires { display: grid; grid-template-columns: repeat(73, 1fr); gap: 1px; margin: 12px 0 8px; }
.annee-anniversaires span { aspect-ratio: 1; background: var(--trait-doux); }
.annee-anniversaires .simple { background: var(--c-fort, var(--accent)); }
.annee-anniversaires .double { background: var(--rouge); box-shadow: 0 0 0 1px var(--rouge); }

/* Expériences de pensée */
.auteur-pensee { font-size: 13px; font-style: italic; color: var(--discret); margin: -4px 0 12px; }
.question-pensee { font-weight: 600; margin: 0 0 12px; }

/* ===================== Fiches : ateliers liés ; portrait ===================== */

.ateliers-fiche { display: grid; gap: 8px; }
.atelier-lie {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  color: var(--texte);
  text-decoration: none;
  font-weight: 600;
  transition: border-color 0.15s, transform 0.1s;
  --c-texte: color-mix(in srgb, var(--c) 80%, black);
  --c-fort: color-mix(in srgb, var(--c) 86%, black);
  --c-clair: color-mix(in srgb, var(--c) 12%, var(--carte));
}
.atelier-lie:active { transform: scale(0.99); }
@media (hover: hover) { .atelier-lie:hover { border-color: var(--c); } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .atelier-lie { --c-texte: color-mix(in srgb, var(--c) 55%, white); --c-fort: color-mix(in srgb, var(--c) 72%, white); --c-clair: color-mix(in srgb, var(--c) 22%, var(--carte)); }
}
/* Mode sombre choisi à la main (bouton du pied de page) */
:root[data-theme="dark"] .atelier-lie { --c-texte: color-mix(in srgb, var(--c) 55%, white); --c-fort: color-mix(in srgb, var(--c) 72%, white); --c-clair: color-mix(in srgb, var(--c) 22%, var(--carte)); }
.picto-cadre.petit { width: 38px; height: 38px; flex: none; }
.picto-cadre.petit .picto { width: 28px; height: 28px; }

.a-mesurer h2 { color: var(--discret); }
.a-mesurer .bouton { margin-top: 2px; }

/* Citations */
.citation { font-family: var(--titre); font-size: 21px; line-height: 1.4; margin: 4px 0 8px; padding-left: 16px; border-left: 3px solid var(--c-fort, var(--accent)); }
.auteur-citation { font-style: italic; color: var(--discret); margin: 0 0 16px; }

/* Question du jour (accueil) */
.vf-jour .choix { margin-bottom: 8px; }

/* ===================== Guide et données ===================== */

.figure-guide { margin: 8px 0 12px; }
.figure-guide svg { max-width: 320px; }
.actions-donnees { flex-wrap: wrap; margin: 4px 0 0; }
.actions-donnees .bouton { flex: 1 1 200px; }

/* Message temporaire */
.annonce {
  position: fixed;
  left: 50%;
  bottom: calc(var(--hauteur-nav) + 14px + env(safe-area-inset-bottom));
  z-index: 30;
  width: max-content;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fond);
  background: var(--texte);
  border-radius: var(--rayon);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.annonce.visible { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) { .annonce { bottom: 28px; } }

/* ===================== Guide ===================== */

#vue-guide article.carte:nth-of-type(7n+1) { --c: #2f6db5; }
#vue-guide article.carte:nth-of-type(7n+2) { --c: #8a3f8f; }
#vue-guide article.carte:nth-of-type(7n+3) { --c: #1f8a70; }
#vue-guide article.carte:nth-of-type(7n+4) { --c: #44546a; }
#vue-guide article.carte:nth-of-type(7n+5) { --c: #a77a12; }
#vue-guide article.carte:nth-of-type(7n+6) { --c: #c2412d; }
#vue-guide article.carte:nth-of-type(7n+7) { --c: #c0601b; }
#vue-guide article { scroll-margin-top: 16px; }
@media (min-width: 760px) { #vue-guide article { scroll-margin-top: 110px; } }

.sommaire { columns: 2; column-gap: 20px; padding: 0; margin: 0; list-style: none; font-size: 15px; }
.sommaire li { margin-bottom: 8px; break-inside: avoid; }
.sommaire a { text-decoration: none; }

.guide h2 { font-family: var(--titre); font-size: 21px; margin: 0 0 8px; }
.guide p { margin: 0 0 12px; }
.guide ol, .guide ul { margin: 0 0 12px; padding-left: 20px; }
.guide li { margin-bottom: 8px; }
.guide a { color: var(--c-texte, var(--accent)); }

.verif { list-style: none; padding: 0 !important; }
.verif label { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.verif input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--c-fort, var(--accent)); }
.verif small { color: var(--discret); }

.lexique dt { font-weight: 600; margin-top: 12px; }
.lexique dd { margin: 2px 0 0; color: var(--texte); }

.pied { text-align: center; color: var(--discret); font-size: 13px; margin-top: 32px; }
.pied p { margin: 0 0 8px; }
.pied a, .pied .lien { color: var(--discret); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* Réglage « Animations : réduites » du pied de page (app.js, clé reglages) */
:root[data-animations="reduites"] *, :root[data-animations="reduites"] *::before, :root[data-animations="reduites"] *::after {
  animation: none !important; transition: none !important;
}

/* ===================== Débattre ===================== */
.replique { border-left: 3px solid var(--c-fort, var(--accent)); padding: 2px 0 2px 12px; margin: 12px 0 12px; }
.replique-qui { display: block; font-size: 13px; font-weight: 600; color: var(--c-texte, var(--accent)); letter-spacing: 0.01em; }
.replique .cas { margin: 2px 0 0; }
.replique.precedente { border-left-color: var(--trait); margin: 8px 0; }
.replique.precedente .replique-qui { color: var(--discret); }
.replique.precedente p { font-size: 14px; color: var(--discret); margin: 1px 0 0; }
.replique.replique-fiche p, .replique-fiche-texte { font-family: var(--titre); font-size: 18px; line-height: 1.45; margin: 4px 0 12px; }
.titre-etape { margin: 8px 0 2px; font-family: var(--titre); font-size: 21px; }
.minuteur { font-family: var(--titre); font-size: 40px; font-weight: 500; text-align: center; margin: 12px 0 8px; font-variant-numeric: tabular-nums; }
.minuteur.fini { color: var(--rouge); }
.exercice + .exercice { border-top: 1px solid var(--trait-doux); padding-top: 16px; margin-top: 16px; }

/* ===================== Raisonner (lot 4) ===================== */
.syllogisme { border-left: 3px solid var(--c-fort, var(--accent)); padding: 2px 0 2px 12px; margin: 8px 0 8px; font-family: var(--titre); font-size: 18px; line-height: 1.45; }
.syllogisme p { margin: 2px 0; }
.conclusion-syllogisme { font-weight: 600; border-top: 1px solid var(--trait); padding-top: 4px; margin-top: 8px !important; }
.erreur-liste { color: var(--rouge); }
.note-vol { font-family: var(--titre); font-size: 40px; font-weight: 500; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.echelle-sept-boutons { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.echelle-sept-boutons .choix { justify-content: center; padding: 12px 0; margin: 0; font-weight: 600; min-height: 46px; }
.echelle-sept-bornes { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--discret); margin: 8px 0 4px; }
.carnet-formulaire .champ-texte { width: 100%; resize: vertical; font: inherit; }
.carnet-formulaire .modeles { flex-wrap: wrap; overflow: visible; margin: 8px 0; }
.carnet-formulaire .modeles .puce { font-size: 13px; white-space: normal; text-align: left; max-width: 100%; }   /* modèle long : retour à la ligne dans la puce */
.titre-carnet { font-family: var(--titre); font-size: 21px; margin: 24px 0 8px; }
.prevision { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 12px 12px; margin: 0 0 12px; }
.prevision .cas { margin: 0 0 2px; }
.grille-joueurs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grille-joueurs .champ { width: 100%; margin: 0; }
.trait-felicite { stroke: var(--vert); stroke-width: 1.6; }
.trait-reprimande { stroke: var(--rouge); stroke-width: 1.6; }
.trait-neutre { stroke: var(--discret); stroke-width: 1.2; }
.trait-felicite-point { fill: var(--vert); }
.trait-reprimande-point { fill: var(--rouge); }
.trait-neutre-point { fill: var(--discret); }

/* ===================== Niveaux ===================== */
.choix-niveau { margin: 0 0 12px; }
.choix-niveau .puces-niveau { flex-wrap: wrap; overflow: visible; margin: 0; }
.choix-niveau .puces-niveau .puce { min-width: 44px; justify-content: center; }
.choix-niveau .source { margin: 8px 0 0; }
.bilan-niveaux p { margin: 4px 0; }
.tableau-niveaux { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tableau-niveaux th, .tableau-niveaux td { border-bottom: 1px solid var(--trait-doux); padding: 8px 4px; text-align: right; vertical-align: top; }
.tableau-niveaux th { font-size: 13px; color: var(--discret); font-weight: 600; }
.tableau-niveaux th:first-child, .tableau-niveaux td:first-child { text-align: left; }
.tableau-niveaux .bloc { display: block; font-size: 13px; }

/* Le calcul, en détail : bloc repliable des bilans */
.calcul-detail { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 8px 12px; margin: 12px 0; background: var(--carte); }
.calcul-detail summary { cursor: pointer; font-weight: 600; color: var(--c-texte, var(--accent)); }
.calcul-detail[open] summary { margin-bottom: 8px; }
.calcul-detail p { margin: 8px 0; }
.calcul-detail .formule { font-variant-numeric: tabular-nums; padding: 8px 12px; background: var(--encadre); border-radius: var(--rayon); overflow-wrap: anywhere; }

/* Quiz : réponse libre, avec suggestions */
.reponse-libre { position: relative; margin: 8px 0 4px; }
.reponse-libre .ligne { display: flex; gap: 8px; }
.reponse-libre .champ { flex: 1; min-width: 0; }
.suggestions { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--carte); }
.suggestions li { padding: 8px 12px; cursor: pointer; border-top: 1px solid var(--trait-doux); }
.suggestions li:first-child { border-top: 0; }
.suggestions li.active, .suggestions li:hover { background: var(--accent-doux); }

/* Classements de niveau 3 */
.classement { list-style: none; margin: 8px 0 12px; padding: 0; }
.classement li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 8px; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--carte); }
.classement-rang { min-width: 18px; color: var(--discret); font-variant-numeric: tabular-nums; }
.classement-nom { flex: 1; min-width: 0; }
.classement .bouton-pas { flex: none; }
.etiquette-fourchette { min-width: 3.4em; }
.ligne-fermi { align-items: center; margin: 8px 0; }
.facteur-fermi { flex: 1; min-width: 0; font-size: 15px; }
.ligne-fermi .champ { width: 8em; flex: none; }

/* Mode chrono */
.chrono-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.chrono-temps, .chrono-points { font-family: var(--titre); font-size: 21px; font-weight: 500; margin: 4px 0; font-variant-numeric: tabular-nums; }
.chrono-jauge { margin: 4px 0 8px; }
.chrono-jauge > div { transition: width 1s linear; }
.chrono-verdict { min-height: 1.5em; margin: 4px 0; font-weight: 600; }

/* Débat à deux : carte contrainte */
.carte-contrainte { border: 1px dashed var(--c-fort, var(--accent)); border-radius: var(--rayon); padding: 8px 12px; margin: 8px 0; font-weight: 600; }
/* Bouton présenté comme un lien (mode chrono) */
.lien-bouton { background: none; border: 0; padding: 4px 0; margin: 0 0 8px; color: var(--c-texte, var(--accent)); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Choix du thème : clair, sombre ou automatique (pied de page). color-scheme règle aussi les contrôles natifs. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
.choix-theme { display: inline-flex; gap: 4px; align-items: center; }
/* Réglages du pied : contrôles segmentés discrets ; le choix actif se lit à la surface, à la graisse et au filet, pas à
   la couleur seule */
.choix-theme button { background: none; border: 1px solid transparent; border-radius: var(--rayon); padding: 0 8px; font-size: 13px; color: var(--discret); cursor: pointer; }
.choix-theme button[aria-pressed="true"] { color: var(--texte); background: var(--encadre); border-color: var(--trait); font-weight: 600; }
/* Choix de la langue (pied de page) : même allure que le choix du thème */
.choix-langue { display: inline-flex; gap: 4px; align-items: center; margin-left: 16px; }
.choix-langue a { border: 1px solid transparent; border-radius: var(--rayon); padding: 0 8px; font-size: 13px; font-weight: 400; color: var(--discret); text-decoration: none; }
.choix-langue a[aria-current="true"] { color: var(--texte); background: var(--encadre); border-color: var(--trait); font-weight: 600; }
/* Journal des repérages, sous chaque fiche */
.reperage { border-top: 1px solid var(--trait-doux); margin-top: 16px; padding-top: 12px; }
.reperage .ligne { display: flex; gap: 8px; }
.reperage .champ { flex: 1; min-width: 0; }

/* Lot 5 : ateliers pratiques */
.echelle-neuf .echelle-sept-boutons { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.controles-tisane .puces { flex-wrap: wrap; overflow: visible; margin: 0 0 8px; }
.controles-tisane .bouton { margin: 8px 0 4px; }
.p-valeur { font-variant-numeric: tabular-nums; }
.p-valeur.significatif { color: var(--rouge); }
.consigne-longue { color: var(--discret); }
/* Bingo des sophismes */
.bingo-grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.bingo-case { min-height: 74px; padding: 8px; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--carte); font: inherit; font-size: 13px; line-height: 1.25; color: var(--texte); cursor: pointer; overflow-wrap: anywhere; hyphens: auto; }
.bingo-case.cochee { background: var(--c-clair, var(--accent-doux)); border-color: var(--c-fort, var(--accent)); font-weight: 600; }
.bingo-adresse { overflow-wrap: anywhere; }
@media print {
  .entete, .navigation, .pied, .nav-atelier, .tete-atelier .picto-cadre, .actions, .calcul-detail, .annonce { display: none !important; }
  body { background: #fff; color: #000; }
  .carte { border: 0; box-shadow: none; }
  .bingo-case { min-height: 90px; border: 1px solid #000; color: #000; background: #fff; }
}
/* Démonter un argument, lecture latérale, trouver l'indice */
.texte-argument { line-height: 1.6; }
.texte-argument mark, mark.indice { background: var(--accent-doux); color: inherit; padding: 1px 2px; border-radius: var(--rayon); box-shadow: inset 0 -2px 0 var(--accent); }
.arbre-argument ul { list-style: none; margin: 0; padding-left: 16px; border-left: 2px solid var(--trait); }
.arbre-argument > ul { padding-left: 0; border-left: 0; }
.arbre-argument li { margin: 12px 0 0; }
.arbre-role { font-weight: 600; color: var(--discret); }
.arbre-argument .role-0 > .arbre-role { color: var(--accent); }
.arbre-argument .role-2 > .arbre-role { color: var(--rouge); }
.encadre-lecture { margin: 12px 0; padding: 12px 12px; background: var(--encadre); border-radius: var(--rayon); }
.encadre-lecture .consigne { margin-top: 0; }
.passage { display: inline; margin: 0; padding: 0; border: 0; border-bottom: 1px dashed var(--discret); background: none; font: inherit; line-height: inherit; color: inherit; text-align: left; cursor: pointer; }
.passage:hover, .passage:focus-visible { background: var(--accent-doux); }
.actions-lecture { margin-bottom: 16px; }
.sans-script { max-width: 640px; margin: 24px auto; padding: 12px 16px; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--carte); }
/* Couleur de chaque onglet du menu */
.onglet[data-onglet="accueil"] { --c: #1d4f91; }
.onglet[data-onglet="fiches"] { --c: #2f6db5; }
.onglet[data-onglet="quiz"] { --c: #2a8a5c; }
.onglet[data-onglet="ateliers"] { --c: #c0601b; }
.onglet[data-onglet="guide"] { --c: #44546a; }
/* Pages fixes : mentions légales, confidentialité, conditions d'utilisation, page 404 */
.page-fixe .entete { margin-bottom: 20px; }
.texte-fixe { line-height: 1.6; }
.texte-fixe h1 { font-family: var(--titre); font-size: 28px; line-height: 1.2; margin: 0 0 8px; }
.texte-fixe h2 { font-family: var(--titre); font-size: 21px; margin: 24px 0 8px; }
.texte-fixe p, .texte-fixe li { margin: 0 0 12px; }
.texte-fixe ul { padding-left: 20px; margin: 0 0 12px; }
.texte-fixe a, .liens-404 a { color: var(--accent); }
.retour-site { text-align: center; margin: 20px 0 0; }
.conteneur.page-fixe { padding-bottom: 40px; }
/* Appel à l'action de l'accueil */
.appel-action { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 20px; }
/* Newsreader : taille optique automatique pour les titres, chiffres elzéviriens pour les scores */
.page-titre, .fiche-titre, .carte h2, .lf-nom, .marque span { font-optical-sizing: auto; }
.grand-score, .tuile-nombre { font-variant-numeric: oldstyle-nums proportional-nums; }
/* Étiquettes en petites capitales du caractère de titre. Newsreader (sous-ensemble latin) n'a pas de glyphes de
   petites capitales : all-small-caps serait fabriqué par chaque navigateur à sa façon. On compose donc des
   capitales réduites, d'une graisse un peu plus forte pour compenser, identiques partout. */
.surtitre, .etiquette, .groupe-nom, .section h3, .consigne, .tirage-libelle {
  font-family: var(--titre);
  font-size: 14px;
  font-weight: 600;
}
/* Trait de Müller-Lyer (le trait du haut de l'emblème, ailettes ouvertes) : un seul masque, partagé par tous les
   séparateurs. Réservé aux séparateurs : ni cartes ni listes. Décoratif. */
:root {
  --masque-trait-ml:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10'%3E%3Cpath d='M6 5 1 0.8M6 5 1 9.2M6 5H12' stroke='black' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") left center / 12px 10px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10'%3E%3Cpath d='M6 5 11 0.8M6 5 11 9.2M0 5H6' stroke='black' stroke-width='1.4' fill='none'/%3E%3C/svg%3E") right center / 12px 10px no-repeat,
    linear-gradient(black, black) center / calc(100% - 22px) 1.2px no-repeat;
}
/* Profil : le trait sépare les blocs d'un onglet (pas le premier, ni le graphique qui suit le titre de son bloc) */
.panneau-profil > :is(.graphique, .forces, h3.titre-bloc):not(h2 + *, h3 + p + .graphique)::before,
.section::before, .entete-fiche::after, .groupe-fiche::before {
  content: "";
  display: block;
  height: 10px;
  background: var(--discret);
  opacity: 0.55;
  -webkit-mask: var(--masque-trait-ml);
  mask: var(--masque-trait-ml);
}
/* Séparateur de sections (explications des ateliers, fiches) */
.section { border-top: 0; padding-top: 0; }
.section::before { margin: 0 0 12px; }
.panneau-profil > :is(.graphique, .forces, h3.titre-bloc)::before { margin: 0 0 24px; }
/* Le crayon du correcteur : la réponse fausse est barrée en rouge (le texte « Réponse attendue » reste l'information),
   le verdict est une annotation en italique du caractère de titre ; au-delà d'une ligne, il redescend à 17 px */
.choix.faux > span, .choix.faux:not(:has(> span)) {
  text-decoration: line-through;
  text-decoration-color: var(--rouge);
  text-decoration-thickness: 2px;
}
.verdict { font-family: var(--titre); font-style: italic; font-size: 19px; font-weight: 500; line-height: 1.35; }
.verdict.verdict-long { font-size: 18px; }
/* Numéro de catalogue des fiches (B 10, S 7) */
.etiquette-numero { display: inline-flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.numero-fiche { font-family: var(--titre); font-variant-numeric: oldstyle-nums; font-size: 15px; color: var(--discret); }
.lf-num { font-family: var(--titre); font-variant-numeric: oldstyle-nums; color: var(--discret); font-weight: 400; margin-right: 8px; }
/* Ouverture de l'accueil (nouveau visiteur) : l'emblème en grand, à toucher */
.ouverture { display: flex; gap: 16px; align-items: center; margin: 0 0 16px; padding: 12px 16px; background: var(--encadre); border-radius: var(--rayon-carte); }
.ouverture-dessin { flex: none; padding: 4px; margin: 0; border: 0; background: none; border-radius: var(--rayon); }
.ouverture .embleme { width: 76px; height: 54px; display: block; }
.ouverture p { margin: 0; font-family: var(--titre); font-size: 18px; line-height: 1.35; }
.ouverture small { display: block; font-family: var(--police); font-size: 13px; color: var(--discret); margin-top: 4px; }
/* Page d'une fiche, en quatre temps : le trait sépare l'en-tête et les groupes, pas les sections d'un groupe */
.groupe-fiche { margin-top: 28px; }
.groupe-fiche::before { margin: 0 0 12px; }
.groupe-fiche > h2 { font-family: var(--titre); font-size: 19px; font-weight: 600; line-height: 1.2; margin: 0 0 2px; }
.groupe-fiche .section::before, .tete-fiche .section::before { display: none; }
.groupe-fiche .section, .tete-fiche .section { margin-top: 20px; }
.tete-fiche .section:first-child { margin-top: 16px; }
.carte-fiche .section p { font-size: 16px; line-height: 1.55; }
/* .section p (0,1,1) l'emportait sur .consigne et .source (0,1,0) : consignes et source retrouvent leur taille */
.carte-fiche .section p.consigne { font-size: 13px; margin: 0 0 8px; }
.carte-fiche .section p.source { font-size: 14px; }
/* Le pied de fiche (acquise, mémorisation, repérages) est du suivi personnel : un simple filet, sans trait */
.carte-fiche .pied-fiche { border-top: 1px solid var(--trait); margin-top: 28px; padding-top: 16px; }
/* Une seule boîte sur la fiche, réservée à l'exemple (un objet concret à lire) ; la couleur de catégorie reste à la
   barre de la carte, à l'étiquette et aux liens : le cas célèbre et la distinction sont du texte simple */
.carte-fiche .encadre { background: var(--encadre); border-left: 0; border-radius: var(--rayon); padding: 12px 16px; }
.carte-fiche .celebre { background: none; border-left: 0; padding: 0; }
.carte-fiche .distinction { border: 0; padding: 0; }
.carte-fiche .distinction p.contre { font-family: var(--titre); font-size: 18px; font-weight: 600; line-height: 1.3; margin: 0 0 2px; }
/* Schéma de l'argument, composé comme en logique : prémisses, trait, conclusion ; variables en italique */
.carte-fiche .forme { font-family: var(--titre); font-size: 18px; line-height: 1.45; background: none; padding: 0 0 0 12px; border-left: 2px solid var(--trait); }
.carte-fiche .forme p { margin: 0; font-size: inherit; line-height: inherit; }
.carte-fiche .forme p.conclusion { border-top: 1.2px solid var(--texte); padding-top: 4px; margin-top: 4px; min-width: 60%; width: fit-content; }
.carte-fiche .forme var { font-style: italic; }

/* ===================== Le Grand test (non publié tant que GRAND_TEST_VISIBLE vaut false) ===================== */
.gt-modes { display: grid; gap: 12px; margin: 16px 0; }
@media (min-width: 760px) { .gt-modes { grid-template-columns: 1fr 1fr; } }
.gt-mode { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px; background: var(--carte); }
.gt-mode .titre-section { margin-top: 0; }
.gt-groupe { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.gt-groupe legend { padding: 0; margin-bottom: 8px; }
.gt-certitude { display: flex; flex-wrap: wrap; gap: 8px; }
.gt-certitude legend { width: 100%; }
.gt-progression { margin-bottom: 16px; }
.gt-progression .source { margin-top: 8px; }
.gt-numero { font-size: 15px; margin: 0 0 8px; color: var(--discret); }
.gt-liste-mots { columns: 2; padding-left: 20px; margin: 12px 0 16px; }
.gt-axe { border-top: 1px solid var(--trait); padding-top: 12px; margin-top: 12px; }
.gt-axe h3 { margin: 0 0 4px; }
.gt-limites ul { margin-top: 8px; }
.gt-item .cas { overflow-wrap: anywhere; }
.gt-item .ligne label { min-width: 6em; }
.gt-tableau-cadre { overflow-x: auto; margin: 12px 0; }
.gt-tableau { border-collapse: collapse; font-size: 13px; width: 100%; }
.gt-tableau caption { text-align: left; font-weight: 600; margin-bottom: 4px; }
.gt-tableau th, .gt-tableau td { border-bottom: 1px solid var(--trait); padding: 4px 8px; text-align: left; }
.gt-entite { display: flex; gap: 12px; align-items: flex-start; border-top: 1px solid var(--trait); padding-top: 12px; margin-top: 12px; }
.gt-entite .picto { flex: none; width: 48px; height: 48px; }
.gt-carte, .gt-rappel { border-left: 3px solid var(--c, var(--accent)); padding: 4px 0 4px 12px; margin: 16px 0; }
/* Le Grand test mis en avant : la carte d'atelier habituelle, en pleine largeur, avec un appel à l'action */
.gt-vedette { margin: 16px 0; }
.gt-vedette .bouton { display: inline-block; margin-top: 8px; }

/* ===================== Version 2 : cabinet d'illusions (DESIGN.md) ===================== */

/* Filet du spectre : 14 segments aux couleurs des catégories, chacun de largeur proportionnelle au nombre de fiches
   (--part, posé par app.js). Un graphique de la composition du catalogue, pas un dégradé. */
.spectre { display: flex; height: 3px; margin: 0 0 20px; border-radius: var(--rayon); overflow: hidden; gap: 1px; background: var(--fond); }
.spectre span { flex: var(--part) 1 0; background: var(--c); }
@media (min-width: 760px) { .spectre { margin: -24px -16px 28px; border-radius: 0; } }

/* Indice de la carte en coin (« B 10 »), comme sur une carte à jouer */
.indice-coin { position: absolute; top: 12px; right: 14px; font-family: var(--titre); font-size: 13px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--c-texte, var(--discret)); font-variant-numeric: oldstyle-nums; }
.carte.a-indice { position: relative; }

/* Ordinateur large : page de 1 120 px, deux colonnes sur l'accueil ; la lecture reste à 680 px */
@media (min-width: 1040px) {
  .conteneur { max-width: var(--largeur-page); padding-left: 32px; padding-right: 32px; }
  .entete { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
  .spectre { margin-left: -32px; margin-right: -32px; }
  .vue { max-width: var(--largeur-lecture); margin-left: auto; margin-right: auto; }
  .vue.large { max-width: none; }
  .deux-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 40px; align-items: start; }
  .colonne-laterale { position: sticky; top: 120px; }
  .pied { max-width: var(--largeur-lecture); margin-left: auto; margin-right: auto; }
}


/* Accueil : ouverture, programme du jour */
.accueil-tete { margin-bottom: 28px; }
.accueil-tete .page-intro { max-width: 62ch; }
/* Salutation de l'accueil et bilans : le personnage du joueur à gauche du titre */
.avec-personnage { display: flex; align-items: center; gap: 12px; }
.avec-personnage-textes { min-width: 0; }
.avec-personnage-textes > * { margin-top: 0; margin-bottom: 0; }
.accueil-tete .page-titre.salut { font-size: clamp(34px, 6vw, 56px); }
/* Accueil : une grille. L'avatar occupe les lignes de la date et de la salutation, centré sur elles ; la phrase vient
   dessous, alignée sur le titre (ordinateur) ou sur toute la largeur (téléphone). Le bloc des textes s'efface
   (display: contents) pour que ses trois lignes se placent dans la grille */
.salut-accueil { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-items: center; }
.salut-textes { display: contents; }
.lien-avatar { grid-column: 1; grid-row: 1 / 3; }
.salut-textes > * { grid-column: 2; min-width: 0; }
.salut-textes .date-du-jour { grid-row: 1; align-self: end; }
.salut-textes .page-titre { grid-row: 2; align-self: start; }
.salut-textes .salut-phrase { grid-row: 3; grid-column: 1 / -1; }   /* à la marge, sous l'avatar */
.salut-textes .date-du-jour { margin-bottom: 12px; }   /* la pastille de série ne touche pas le grand titre */
.salut-textes .page-titre { margin: 2px 0 0; }
.salut-textes .salut-phrase { margin-bottom: 0; }
.lien-avatar { display: block; justify-self: start; border-radius: 50%; }
.lien-avatar .portrait { display: block; width: 88px; height: 88px; transition: transform var(--duree-courte) var(--courbe); }
.lien-avatar:hover .portrait { transform: scale(1.04); }
/* Téléphone : avatar plus petit */
@media (max-width: 759px) {
  .salut-accueil { column-gap: 12px; }
  .lien-avatar .portrait { width: 56px; height: 56px; }
}
.salut-accueil + .page-intro { margin-top: 16px; }
.avec-personnage .portrait { flex: none; }
.page-titre.salut { overflow-wrap: anywhere; }
.salut-phrase { font-family: var(--titre); font-style: italic; font-size: 19px; margin: 8px 0 12px; max-width: 62ch; }
.reaction { font-family: var(--titre); font-style: italic; color: var(--discret); }
.serie-jours { display: inline-block; margin-left: 12px; padding: 1px 8px; border: 1px solid var(--trait); border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--texte); background: var(--carte); }
.programme { margin: 0 0 24px; }
.programme-cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.programme-case { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 64px; padding: 12px 12px;
  text-align: left; background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon-bouton);
  box-shadow: var(--ombre-1); transition: box-shadow var(--duree-courte) var(--courbe), transform var(--duree-courte) var(--courbe); }
.programme-titre { font-family: var(--titre); font-size: 15px; font-weight: 600; line-height: 1.2; }
.programme-etat { font-size: 14px; font-weight: 600; color: var(--discret); }
/* Fait : coche dessinée en plus du mot (la couleur ne porte jamais seule l'information) */
.programme-case.fait { border-color: color-mix(in srgb, var(--vert) 45%, var(--trait)); }
.programme-case.fait .programme-etat { color: var(--vert); }
.programme-case.fait .programme-etat::before { content: "✓ "; }
@media (hover: hover) { .programme-case:hover { box-shadow: var(--ombre-2); transform: translateY(-1px); } }
.programme-case:active { transform: translateY(1px); }
@media (min-width: 1040px) {
  .accueil-tete .page-titre { font-size: 64px; }
  .colonne-principale > .carte:first-child { margin-top: 0; }
}

/* En-tête sur ordinateur large : marque, navigation, recherche et langue sur une seule ligne */
@media (min-width: 1040px) {
  /* Onglets sans icône et écarts resserrés : la recherche garde 260 px dès 1 040 px de large */
  .entete { flex-wrap: nowrap; gap: 16px; --ecart-entete: 16px; padding-top: 12px; padding-bottom: 12px; }
  .marque { flex: none; white-space: nowrap; }
  .navigation { order: 1; flex-basis: auto; margin-top: 0; gap: 8px; }
  .onglet svg { display: none; }
  .recherche-globale { order: 2; flex: 0 1 340px; margin: 0 0 0 auto; }
}

/* L'illusion du jour (illusions.js) : leurres et repères ; « revele » joue la révélation par l'opacité seule */
.illusion-question { font-family: var(--titre); font-size: 19px; line-height: 1.35; margin: 0 0 8px; }
.illusion-dessin { display: block; width: 100%; max-width: 420px; height: auto; margin: 4px auto 12px; }
.illusion-explication { margin: 0 0 4px; }
.ill-encre { stroke: var(--texte); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.ill-fin { stroke: var(--texte); stroke-width: 1.4; }
.ill-fort { stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; }
.ill-plein, .ill-carreau { fill: var(--texte); }
.ill-joint { stroke: var(--discret); stroke-width: 2; }
.ill-cache { fill: var(--carte); }
.ill-forme { fill: color-mix(in srgb, var(--accent) 30%, var(--carte)); stroke: var(--texte); stroke-width: 1.5; }
.ill-fond-sombre { fill: #2b2620; }
.ill-fond-clair { fill: #ece6da; }
.ill-gris { fill: #8a8378; }
.illusion-dessin .leurre { transition: opacity var(--duree-longue) var(--courbe); }
.repere, .repere-forme, .repere-plein { opacity: 0; transition: opacity var(--duree-longue) var(--courbe) 180ms; }
.repere, .repere-forme { fill: none; stroke: var(--vert); stroke-width: 2.5; stroke-dasharray: 6 5; }
.illusion-dessin.revele .leurre { opacity: 0.12; }
.illusion-dessin.revele .repere, .illusion-dessin.revele .repere-forme, .illusion-dessin.revele .repere-plein { opacity: 1; }
.lien-discret { display: block; width: fit-content; margin-top: 12px; font-size: 14px; }

/* Page d'une fiche : indice en coin, rail sur ordinateur large, barre d'actions collante sur téléphone */
.carte-fiche .entete-carte { padding-right: 48px; }
.carte-fiche .indice-coin { top: 16px; right: 18px; font-size: 16px; }
.rail-fiche { display: none; }
.barre-fiche { position: sticky; bottom: calc(var(--hauteur-nav) + env(safe-area-inset-bottom) + 8px); z-index: 5; display: flex; gap: 8px;
  margin: 12px -4px 0; padding: 8px; background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon-carte); box-shadow: var(--ombre-2); }
.barre-fiche > * { flex: 1 1 0; min-width: 0; padding-left: 8px; padding-right: 8px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* L'espace entre la barre et les onglets est couvert du fond de page : aucun texte n'y défile ; la notification
   (« +2 points ») passe au-dessus de la barre au lieu de la recouvrir (--au-dessus, posée par annoncer()) */
.barre-fiche { box-shadow: var(--ombre-2), 0 12px 0 4px var(--fond); }
@media (max-width: 759px) { .annonce { bottom: max(calc(var(--hauteur-nav) + 14px + env(safe-area-inset-bottom)), var(--au-dessus, 0px)); } }
@media (min-width: 760px) { .barre-fiche { display: none; } }
@media (min-width: 1040px) {
  .fiche-mise-en-page { display: grid; grid-template-columns: minmax(0, var(--largeur-lecture)) 260px; gap: 40px; justify-content: center; align-items: start; }
  .rail-fiche { display: block; position: sticky; top: 110px; }
  .rail-fiche .bouton { margin-top: 12px; font-size: 14px; }
  .sommaire-fiche { list-style: none; margin: 0 0 16px; padding: 0 0 0 12px; border-left: 2px solid var(--trait); }
  .sommaire-fiche li { margin: 0 0 8px; }
  .rail-fiche .surtitre { margin-bottom: 8px; }
  .sommaire-fiche .lien { font-size: 14px; text-align: left; }
  #vue-fiches.large .lien.retour { display: inline-flex; margin-left: calc((100% - var(--largeur-lecture) - 300px) / 2); }
}

/* Glyphes de catégorie (app.js, GLYPHES_CATEGORIE) */
.glyphe { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--c-fort, currentColor); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; margin-right: 8px; }
.glyphe .pointille { stroke-dasharray: 2 2.5; }
.glyphe .epais { stroke-width: 3; }

/* Ateliers sur ordinateur large : page de 1 120 px, cartes sur deux colonnes, textes d'introduction à 68 caractères */
@media (min-width: 1040px) {
  #vue-ateliers > .page-intro { max-width: 68ch; }
  #vue-ateliers .corps-section { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
  #vue-ateliers .corps-section > :not(.atelier) { grid-column: 1 / -1; }
  /* « Par où commencer » et le Grand test côte à côte ; le reste sur toute la largeur */
  #vue-ateliers:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; align-items: stretch; }
  #vue-ateliers > * { grid-column: 1 / -1; }
  #vue-ateliers > .bilan-ateliers, #vue-ateliers > .gt-vedette { grid-column: auto; margin-top: 0; }
}

/* États vides dessinés (app.js, dessinVide) */
.dessin-vide { display: block; width: 120px; height: 48px; margin: 4px 0 12px; fill: none; stroke: var(--discret); stroke-width: 2; stroke-linecap: round; }
.dessin-vide .pointille { stroke-dasharray: 4 5; }
.dessin-vide .ailettes { opacity: 0.45; }
.dessin-vide circle { fill: var(--c-fort, var(--accent)); stroke: none; }
@media (min-width: 1040px) { #vue-accueil > .cartes-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

/* Relancer le hasard (tirage.js) */
.bandeau-tirage { margin: 0 0 16px; padding: 12px 16px; border: 1px dashed var(--trait); border-radius: var(--rayon-carte); background: var(--encadre); }
.bandeau-tirage-titre { margin: 0 0 8px; font-family: var(--titre); font-size: 16px; font-weight: 600; }
.bandeau-tirage-reglages { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 12px; font-size: 14px; }
.champ-perimetre { flex: 1 1 240px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--carte); max-width: 100%; }
.case-tirage { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.bandeau-tirage .bouton kbd, .melange-passer kbd { margin-left: 8px; font-family: var(--police); font-size: 11px; opacity: 0.7; }
@media (hover: none) { .bandeau-tirage .bouton kbd { display: none; } }
.carte-recto-verso { min-height: 240px; }
.carte .carte-verso-nom { font-family: var(--titre); font-size: 28px; line-height: 1.1; margin: 4px 0 8px; }
.actions-cartes { margin-bottom: 20px; }
.melange-passer { margin-top: 12px; }
.atelier-hasard { margin-top: 12px; }
.atelier-hasard-resultat .carte { margin: 12px 0 0; }
.carte-hasard h2 { padding-right: 48px; }

/* Planche de Galton : bilan, un anneau par catégorie (melange.js) */
.anneaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; margin: 16px 0 8px; }
.anneau { margin: 0; text-align: center; }
.anneau svg { display: block; width: 100%; max-width: 140px; margin: 0 auto 8px; }
.anneau figcaption { font-family: var(--titre); font-size: 15px; font-weight: 600; line-height: 1.25; }
.anneau-fond { fill: none; stroke: var(--trait); stroke-width: 12; }
.anneau-valeur { fill: none; stroke: var(--c); stroke-width: 12; stroke-linecap: round; animation: anneau-remplit var(--duree-longue) var(--courbe) both; }
@keyframes anneau-remplit { from { stroke-dasharray: 0 100; } }
.anneau-score { font-family: var(--titre); font-size: 22px; font-weight: 500; fill: var(--texte); }
.anneau-part { font-size: 14px; fill: var(--discret); }

/* ===================== Lot 4 : maîtrise, grades, points, graphiques (profil.js, graphiques.js) ===================== */
.bouton-profil { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; border: 1px solid var(--trait);
  border-radius: 999px; background: var(--carte); color: var(--texte); text-decoration: none; position: relative; }
/* Portrait de 26 px centré dans l'anneau de 34 : (44 − 2 de bordure − 26) / 2 = 8 (à 9, il tombait d'un pixel) */
.bouton-profil .blason { position: absolute; left: 12px; top: 8px; }
.bouton-profil .anneau-profil { margin-right: 2px; }
/* Ni le bouton ni ses dessins ne rétrécissent dans l'en-tête serré : Safari ramène sinon un SVG à presque rien
   (bouton quasi invisible et impossible à viser), là où Chrome garde sa largeur */
.bouton-profil, .bouton-profil > svg { flex: none; }
.bouton-profil-maitrise { font-family: var(--titre); font-weight: 600; font-size: 15px; font-variant-numeric: oldstyle-nums; }
/* Même haut que la marque et le bouton de langue (16 px) : à 12 px, le bouton de profil était 4 px plus haut qu'eux */
@media (max-width: 759px) { .entete .bouton-profil { position: absolute; top: calc(env(safe-area-inset-top) + 16px); right: 74px; } }
.anneau-mini .anneau-fond { fill: none; stroke: var(--trait); stroke-width: 4; }
.anneau-mini .anneau-valeur { fill: none; stroke: var(--vert); stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray var(--duree) var(--courbe); }
/* Part nulle : le tiret de longueur nulle, à bouts ronds, laisserait une pastille (graphiques.js, melange.js) */
.anneau-valeur.anneau-vide { visibility: hidden; }
.insigne { flex: none; }
.insigne-trait { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: opacity var(--duree-longue); }
.insigne-plein { fill: var(--accent); }
.insigne.revele .insigne-trait { animation: revelation-insigne var(--duree-longue) var(--courbe); }
@keyframes revelation-insigne { from { opacity: 0; } }
/* Personnage en figure noire sur médaillon de terre cuite (profil.js) : mêmes couleurs dans les deux thèmes, comme une
   image (TERRE_PERSONNAGE et FIGURE_PERSONNAGE) ; contraste figure / argile 4,9:1 */
.portrait { --terre: #c8693a; --figure: #1b120c; --motif: #a4532b; --motif-clair: #f2c39a; flex: none; overflow: visible; }
/* Fonds du médaillon : bordures noires, motifs du champ en argile plus cuite (MOTIF_PERSONNAGE) */
.motif-noir, .motif-sombre { fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.motif-noir { stroke: var(--figure); }
.motif-sombre { stroke: var(--motif); }
.motif-noir.motif-plein { fill: var(--figure); stroke: none; }
.motif-sombre.motif-plein { fill: var(--motif); stroke: none; }
.motif-clair.motif-plein { fill: var(--motif-clair); stroke: none; }
.apercu-personnage { margin: 4px 0 8px; }
.puce:disabled { border-style: dashed; cursor: not-allowed; }
.medaillon-fond { fill: var(--terre); }
.medaillon-bord { fill: none; stroke: var(--figure); stroke-width: 1.5; }
.medaillon-filet { fill: none; stroke: var(--figure); stroke-width: 0.6; }
.figure-plein { fill: var(--figure); }
.figure-epais, .figure-incise { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.figure-epais { stroke: var(--figure); }
.figure-incise { stroke: var(--terre); }
.medaillon-objet { fill: var(--figure); }
.medaillon-objet-bord { fill: var(--c); }
.medaillon-objet-trait { fill: none; stroke: var(--terre); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.portrait-piste, .portrait-arc { fill: none; stroke-width: 5; stroke-linecap: round; }
.portrait-piste { stroke: var(--trait-doux); }
.portrait-arc { stroke: var(--c); }

.pastille-points { position: fixed; left: var(--x); top: var(--y); z-index: 60; transform: translateX(-50%); pointer-events: none;
  padding: 2px 8px; border-radius: 999px; background: var(--vert); color: var(--fond); font-weight: 600; font-size: 13px; opacity: 0; }
:root[data-animations="reduites"] .pastille-points { display: none; }
@media (prefers-reduced-motion: reduce) { .pastille-points { display: none; } }
.moment { position: fixed; z-index: 55; left: 50%; bottom: calc(var(--hauteur-nav) + 24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(420px, calc(100% - 32px)); padding: 16px 16px; border-radius: var(--rayon-carte); background: var(--carte-haute);
  border: 1px solid var(--trait); box-shadow: var(--ombre-2); }
@media (min-width: 760px) { .moment { bottom: 28px; } }
.moment-titre { margin: 0 0 4px; font-family: var(--titre); font-size: 18px; font-weight: 600; }
.moment-grade { display: grid; grid-template-columns: auto 1fr; gap: 0 12px; align-items: center; }
.moment-grade .source, .moment-grade .moment-fermer { grid-column: 2; }
.moment-fermer { font-size: 13px; }

.graphique { margin: 20px 0; }
.graphique-titre { font-family: var(--titre); font-size: 16px; font-weight: 600; margin: 0 0 8px; }
/* Message d'un graphique (graphiques.js, messageGraphique) : la conclusion à en tirer, lue avant le dessin */
.graphique-message { font-weight: 600; margin: 0 0 8px; }
.graphique svg { display: block; width: 100%; height: auto; max-width: 560px; }
.graphique-donnees { font-size: 13px; margin-top: 4px; }
.tableau-donnees { border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.tableau-donnees th, .tableau-donnees td { border-bottom: 1px solid var(--trait); padding: 4px 12px 4px 0; text-align: left; }
.libelle-graphique { font-size: 11px; fill: var(--texte); }
.valeur-graphique { font-size: 11px; font-weight: 600; fill: var(--texte); font-variant-numeric: tabular-nums; }
.graduation-graphique { font-size: 10px; fill: var(--discret); }
.repere-graphique { stroke: var(--trait); stroke-width: 1; stroke-dasharray: 3 3; }
.axe-graphique { stroke: var(--discret); stroke-width: 1; }
.barre-graphique { fill: var(--c, var(--accent)); }
.barre-vide { fill: none; stroke: var(--trait); stroke-dasharray: 3 2; }
.ligne-graphique { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.point-graphique { fill: var(--accent); }
.grille-toile { fill: none; stroke: var(--trait); }
.toile-ancienne { fill: none; stroke: var(--discret); stroke-width: 1.5; stroke-dasharray: 4 3; }
.toile-actuelle { fill: color-mix(in srgb, var(--accent) 18%, transparent); stroke: var(--accent); stroke-width: 2; }
.toile-svg { max-width: 360px !important; }
/* Textes du profil : 12 px rendus à 375 px dans chaque graphique, malgré des zones de dessin de largeurs différentes
   (courbe 320 unités agrandie à 1,07 ; barres 360, réduites à 0,95 ; toile 440, réduite à 0,78) */
.courbe-svg text { font-size: 11.25px; }
.barres-svg text { font-size: 12.6px; }
.toile-svg text { font-size: 15.4px; }
.codex .graduation-graphique { font-size: 12px; }
.case-calendrier { fill: var(--trait-doux); }
.case-calendrier.active { fill: color-mix(in srgb, var(--vert) calc(var(--intensite) * 100%), var(--trait-doux)); }
.bille { fill: var(--discret);   /* 3:1 au moins sur la carte, dans les deux thèmes */
  transform-box: fill-box; transform-origin: bottom; animation: chute var(--duree-longue) var(--courbe) both; animation-delay: var(--retard); }
.bille.score-joueur { fill: var(--accent); }
.score-joueur-texte { font-weight: 600; fill: var(--texte); }
@keyframes chute { from { transform: translateY(-60px); opacity: 0; } }
.jauge-grade { margin: 12px 0; }
.jauge-grade-titre { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.jauge > .jauge-remplie { height: 100%; width: calc(var(--part) * 100%); background: var(--accent); border-radius: inherit; }
.barre-maitrise { height: 6px; margin: 8px 0 2px; border-radius: var(--rayon); background: var(--trait-doux); overflow: hidden; }
.barre-maitrise > div { height: 100%; width: calc(var(--part) * 100%); background: var(--c-fort, var(--accent)); }

.profil-tete { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.profil-identite { display: flex; gap: 16px; align-items: center; min-width: 0; }
.profil-noms { min-width: 0; }
.profil-noms .page-titre { overflow-wrap: anywhere; }
.profil-noms .page-titre.titre-long { font-size: clamp(26px, 5vw, 40px); }
.profil-grade { display: flex; gap: 8px; align-items: center; margin: 0; font-family: var(--titre); font-size: 18px; font-weight: 600; }
.profil-maitrise { text-align: right; }
/* Sur mobile, le bloc passe sous le portrait et n'est pas plus large que sa légende : aligné à droite, le chiffre
   flottait au milieu. Il se met en ligne, chiffre puis légende, sur la même ligne de base */
@media (max-width: 759px) {
  .profil-maitrise { display: flex; align-items: baseline; gap: 12px; text-align: left; }
  .profil-maitrise .grand-nombre { font-size: 56px; }
}
.grand-nombre { display: block; font-family: var(--titre); font-size: clamp(64px, 2vw + 56px, 80px); font-weight: 500; line-height: 1; font-variant-numeric: oldstyle-nums; }
.grand-nombre.petit { font-size: 34px; margin-left: auto; display: inline; }
.avertissement-maitrise { color: var(--discret); }
.onglets-profil { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; border-bottom: 1px solid var(--trait); }
.onglet-profil { min-height: 44px; padding: 8px 12px; border: 0; border-top: 3px solid transparent; border-bottom: 3px solid transparent; background: none; color: var(--discret); font-weight: 600; }
.onglet-profil[aria-selected="true"] { color: var(--texte); border-bottom-color: var(--accent); }
/* Sur téléphone, les six onglets passaient sur deux lignes, et la seconde ne se lisait plus comme des onglets. Ils
   restent sur une ligne qui défile au doigt : le bord droit s'estompe et l'onglet suivant est coupé, signe qu'il y a
   une suite ; l'onglet ouvert est ramené dans la vue (profil.js) */
@media (max-width: 759px) {
  .onglets-profil { flex-wrap: nowrap; gap: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
  .onglets-profil::-webkit-scrollbar { display: none; }
  .onglet-profil { flex: none; white-space: nowrap; padding: 8px 16px; }
  /* Arrivé au bout de la ligne, plus rien à estomper */
  .onglets-profil.au-bout { -webkit-mask-image: none; mask-image: none; }
}
.codex-cadre { display: flex; justify-content: center; }
.codex { max-width: 100%; height: auto; }
.codex-point { fill: var(--c); opacity: 0.25; }
.codex-cible { fill: transparent; }
.codex-point.etat-1 { opacity: 0.45; }
.codex-point.etat-2 { opacity: 0.65; }
.codex-point.etat-3 { opacity: 0.85; }
.codex-point.etat-4 { opacity: 1; }
.codex-point.etat-0 { fill: none; stroke: var(--c); stroke-width: 1.2; opacity: 0.7; }
.codex-nombre { font-family: var(--titre); font-size: 40px; font-weight: 500; fill: var(--texte); }
.codex-mini { display: block; width: 120px; margin: 8px auto; }
.distinctions { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.distinction-carte { padding: 12px 12px; border: 1px dashed var(--trait); border-radius: var(--rayon-bouton); }
.distinction-carte.obtenue { border-style: solid; border-color: var(--vert); background: var(--carte); }
.distinction-carte.secrete { color: var(--discret); }
.distinction-nom { margin: 0 0 4px; font-family: var(--titre); font-weight: 600; }
.objectif-jour { display: flex; gap: 12px; align-items: center; }
.objectif-jour p { margin: 0; }
.maitrise-jeu { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--trait); }
.face-au-hasard { margin: 12px 0; }

/* Téléphone et tablette : le bouton de profil ne montre que l'anneau de l'objectif et l'insigne du grade */
@media (max-width: 1039px) {
  .bouton-profil { padding: 0; width: 44px; justify-content: center; }
  .bouton-profil .blason, .bouton-profil-maitrise { display: none; }
  /* L'anneau est seul : sans sa marge droite, il reste au centre du bouton (décalé d'un pixel sinon) */
  .bouton-profil .anneau-profil { margin-right: 0; }
  .bouton-profil .insigne { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
}
.bouton-profil.sobre { flex: none; width: 44px; padding: 0; justify-content: center; }
.bouton-profil.sobre .blason { display: block; position: static; }

/* Parcours (parcours.js) */
.chemin-parcours { list-style: none; margin: 20px 0; padding: 0 0 0 20px; border-left: 2px solid var(--trait); }
.chemin-parcours .etape { position: relative; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 0 0 16px; }
.chemin-parcours .etape::before { content: ""; position: absolute; left: -25px; top: 6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--trait); background: var(--fond); }
.chemin-parcours .etape.faite::before { background: var(--vert); border-color: var(--vert); }
.chemin-parcours .etape.suivante::before { border-color: var(--accent); background: var(--accent); }
.etape-etat { flex-basis: 100%; font-size: 14px; font-weight: 600; color: var(--discret); }
.etape.faite .etape-etat { color: var(--vert); }
.etape.faite .etape-etat::before { content: "✓ "; }
.conclusion-parcours { text-align: left; }
.sceau { flex: none; }
.sceau-cercle { fill: none; stroke: var(--c); stroke-width: 1.8; }
.sceau-cercle.fin { stroke-width: 0.8; }
.sceau-trait { fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; }
.carte-parcours .barre-maitrise > div { background: var(--vert); }
/* Bloc « Parcours guidés » de la page Ateliers : une ligne par parcours, le nom à gauche, l'avancement ou la durée à droite */
.liste-parcours { list-style: none; margin: 12px 0 16px; padding: 0; }
.liste-parcours li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--trait-doux); }
.liste-parcours li .lien-texte { min-height: 44px; display: inline-flex; align-items: center; }

/* Synchronisation (coffre.js) */
/* La pastille d'état de la synchronisation se pose en badge sur le bord bas-gauche du rond du profil (à 45°, sur le cercle
   de 44 px) : seule à côté du bouton, elle flottait sans rapport visible avec lui. Liseré de la couleur du bouton.
   Téléphone : bouton à 12 px du haut et 74 px de la droite, centre (−96, 34) ; centre de la pastille (−111,6 ; 49,6) */
@media (max-width: 759px) { .etat-synchro { position: absolute; top: calc(env(safe-area-inset-top) + 49px); right: 107px; z-index: 2; } }
.etat-synchro { width: 10px; height: 10px; border-radius: 50%; background: var(--discret); box-shadow: 0 0 0 2px var(--carte); }
/* Posée sur le bouton de profil : un toucher la traverse et ouvre le profil (l'état reste lu par son texte invisible) */
.etat-synchro { pointer-events: none; }
.etat-synchro[data-statut="a-jour"] { background: var(--vert); }
.etat-synchro[data-statut="erreur"] { background: var(--rouge); }
.etat-synchro[data-statut="en-cours"], .etat-synchro[data-statut="en-attente"] { background: var(--orange); }
/* En-tête dans le flux : la pastille ne prend aucune place (marge négative de sa largeur et de l'écart de l'en-tête), le
   bouton commence donc à son bord gauche ; décalée de (1 px, 16 px), son centre tombe sur le cercle, à 45° en bas à gauche */
@media (min-width: 760px) { .etat-synchro { margin-right: calc(-10px - var(--ecart-entete, 12px)); position: relative; left: 1px; top: 16px; z-index: 1; } }
.bloc-synchro, .hors-ligne { margin-top: 24px; }
.actions-synchro { flex-wrap: wrap; }
.code-synchro { margin-top: 16px; padding: 12px 16px; border: 1px dashed var(--trait); border-radius: var(--rayon-carte); }
.code-synchro-valeur { font-family: var(--mono); font-size: 21px; letter-spacing: 0.08em; margin: 4px 0 8px; }
@media print { body * { visibility: hidden; } .code-synchro, .code-synchro * { visibility: visible; } .code-synchro { position: absolute; top: 0; left: 0; } }

/* Se protéger en ligne (enligne.js) */
.message-fictif { margin: 8px 0 16px; padding: 12px 16px; border: 1px solid var(--trait); border-radius: var(--rayon-carte); background: var(--encadre); }
.message-canal { margin: 0 0 8px; font-size: 13px; color: var(--discret); overflow-wrap: anywhere; }
.message-morceau { margin: 0 0 4px; overflow-wrap: anywhere; }
.message-morceau.indice-revele { background: color-mix(in srgb, var(--orange) 22%, transparent); border-radius: var(--rayon); }
.indices-message { display: grid; gap: 8px; margin: 8px 0 12px; }
.segment-indice { text-align: left; min-height: 44px; padding: 8px 12px; border: 1px dashed var(--trait); border-radius: var(--rayon-bouton); background: var(--carte); overflow-wrap: anywhere; }
.segment-indice.juste { border-style: solid; border-color: var(--vert); }
.segment-indice.faux { border-style: solid; border-color: var(--rouge); text-decoration: line-through; text-decoration-color: var(--rouge); }
.choix.mot-de-passe { font-family: var(--mono); overflow-wrap: anywhere; }

/* Noms des seuils de grade sur la courbe : liseré de la couleur de la carte, au-dessus du tracé */
.graphique { --fond-graphique: var(--fond); }
.carte .graphique { --fond-graphique: var(--carte); }
.nom-seuil { paint-order: stroke; stroke: var(--fond-graphique); stroke-width: 4px; stroke-linejoin: round; }
.valeur-graphique { paint-order: stroke; stroke: var(--fond-graphique); stroke-width: 3px; stroke-linejoin: round; }

/* Aide des raccourcis clavier (touche « ? ») */
.aide-raccourcis { max-width: min(440px, calc(100% - 32px)); padding: 20px 20px; border: 1px solid var(--trait); border-radius: var(--rayon-carte); background: var(--carte-haute); color: var(--texte); box-shadow: var(--ombre-2); }
.aide-raccourcis::backdrop { background: rgba(0, 0, 0, 0.35); }
.aide-raccourcis h2 { font-family: var(--titre); margin: 0 0 12px; }
.liste-raccourcis { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 16px; }
.liste-raccourcis dt { font-family: var(--mono); font-weight: 600; }
.liste-raccourcis dd { margin: 0; }

.bouton-partage { margin: 12px 0 0; display: block; }

/* Portrait du profil : bouton qui ouvre la fiche à partager */
.bouton-portrait { flex: none; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; line-height: 0; }
.bouton-portrait .portrait { transition: transform var(--duree-courte) var(--courbe); }
.bouton-portrait:hover .portrait { transform: scale(1.03); }

/* Fiche à partager : boîte de dialogue native, sans marge intérieure (un clic sur la boîte elle-même est un clic sur le
   fond) ; un voile sans flou : la charte proscrit le verre dépoli */
.fiche-personnage { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--trait);
  border-radius: var(--rayon-carte); background: var(--carte-haute); color: var(--texte); box-shadow: var(--ombre-2); }
.fiche-personnage::backdrop { background: rgba(20, 14, 8, 0.45); }
.fiche-contenu { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 20px 20px; text-align: center; }
.fiche-contenu:focus { outline: none; }
.fiche-contenu:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.frise-grecque { display: block; width: 100%; height: auto; max-height: 16px; }
.frise-trait { fill: none; stroke: var(--texte); stroke-width: 1.1; }
/* Titre de la fiche du personnage (« fiche-titre » est le titre des fiches de notions) */
.fiche-perso-titre { margin: 4px 0 0; font-family: var(--titre); font-size: 24px; overflow-wrap: anywhere; }
.fiche-contenu > .portrait { width: min(240px, 70vw); height: auto; }
.fiche-grade { justify-content: center; }
.fiche-chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.fiche-chiffres > div { display: flex; flex-direction: column; align-items: center; }
.fiche-nombre { font-family: var(--titre); font-size: 40px; font-weight: 500; line-height: 1.05; font-variant-numeric: oldstyle-nums; }
.fiche-compte { font-family: var(--police); font-size: 14px; font-weight: 600; color: var(--discret); font-variant-numeric: tabular-nums; }
.fiche-option { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.fiche-option input { width: 20px; height: 20px; margin: 0; }
.fiche-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.fiche-actions .bouton { min-height: 44px; }
.fiche-section { margin: 12px 0 0; font-family: var(--titre); font-size: 18px; }
/* Graphiques de la fiche : terre cuite et noir des vases, couleurs des domaines ; décoratifs, doublés d'un texte */
.fiche-contenu { --terre: #c8693a; --figure: #1b120c; }
.fiche-echelle { display: block; width: min(300px, 100%); height: auto; margin-bottom: 8px; }
.fiche-echelle-trait { stroke: var(--trait); stroke-width: 2; }
.fiche-grade-atteint, .fiche-grade-actuel { fill: var(--terre); }
.fiche-grade-actuel { stroke: var(--texte); stroke-width: 2.5; }
.fiche-grade-futur { fill: var(--carte); stroke: var(--trait); stroke-width: 1.5; }
.fiche-chiffres { align-items: start; }
.fiche-jours { display: block; width: auto; max-width: 100%; height: 50px; margin-top: 8px; }
.fiche-jour { fill: var(--terre); }
.fiche-jour-actuel { fill: var(--texte); }
.fiche-jours-base { stroke: var(--trait); stroke-width: 1; }
.fiche-jours-objectif { stroke: var(--discret); stroke-width: 1; stroke-dasharray: 3 2; }
.fiche-legende { font-size: 12px; line-height: 1.35; margin-top: 4px; }
/* Le trait dominant, sous le vase : même ligne que la légende des jours, un peu plus marqué */
.fiche-trait { margin-top: 4px; font-family: var(--titre); font-size: 14px; font-weight: 600; line-height: 1.2; }
/* Vase et graphique des jours à la même hauteur : les deux colonnes de la fiche restent alignées ligne à ligne */
.fiche-vase { display: block; height: 50px; width: auto; margin: 8px auto 0; overflow: visible; }
.vase-fond, .vase-argile { fill: var(--terre); }
.vase-noir { fill: var(--figure); }
.vase-frise { fill: none; stroke: var(--terre); stroke-width: 1.3; }
.vase-contour, .vase-anse { fill: none; stroke: var(--texte); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.vase-anse { stroke-width: 2.4; }
.fiche-nom { width: 100%; text-align: left; }
.fiche-nom-ligne { display: flex; gap: 8px; }
.fiche-nom-ligne .champ { flex: 1; min-width: 0; min-height: 44px; }
.fiche-nom-ligne .bouton { min-height: 44px; }
.fiche-perso-titre:focus { outline: none; }
.fiche-domaines { display: grid; gap: 8px; width: 100%; margin: 0; padding: 0; list-style: none; text-align: left; }
.fiche-domaine { display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto 6px; column-gap: 8px; align-items: center; }
.fiche-domaine .embleme-domaine { grid-row: 1 / 3; }
.fiche-domaine-nom { font-size: 14px; }
.fiche-domaine-valeur { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fiche-barre { grid-column: 2 / 4; height: 6px; border-radius: var(--rayon); background: var(--trait-doux); overflow: hidden; }
.fiche-barre > span { display: block; height: 100%; width: calc(var(--part) * 100%); background: var(--c); }
.fiche-medailles { display: block; width: 100%; max-width: 336px; height: auto; }
.medaille-obtenue { fill: var(--figure); }
.medaille-filet { fill: none; stroke: var(--terre); stroke-width: 0.6; }
/* Le glyphe est réduit à 0,78 : 1,4 donne un trait d'environ 1,1, comme les objets des domaines */
.medaille-motif { fill: none; stroke: var(--terre); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
/* Médaille à gagner : le glyphe en pâle dans le cercle tireté ; obtenue ou non se lit aussi à la pièce pleine */
.medaille-motif-a-gagner { fill: none; stroke: var(--discret); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; opacity: 0.7; }
/* Couleurs du vase portées par la médaille : elle s'affiche aussi hors de la fiche (onglet « Distinctions ») */
.medaille-distinction { --terre: #c8693a; --figure: #1b120c; display: block; margin: 0 0 8px; }
.medaille-a-gagner { fill: none; stroke: var(--discret); stroke-width: 1; stroke-dasharray: 2.5 2; }
@media (prefers-color-scheme: dark) {
  /* Sur le fond sombre, la médaille noire garde un liseré d'argile pour rester visible */
  :root:not([data-theme="light"]) .medaille-obtenue { stroke: var(--terre); stroke-width: 1; }
}
:root[data-theme="dark"] .medaille-obtenue { stroke: var(--terre); stroke-width: 1; }

/* Accueil du nouveau visiteur (profil.js) */
.carte-bienvenue { border-left-color: var(--accent); }
/* Tant que la carte d'accueil est là, elle porte seule « Commencer : Premiers pas » (pas de doublon dessous) */
.accueil-tete:has(.carte-bienvenue) .appel-action { display: none; }
.carte-bienvenue h2:focus { outline: none; }
.bienvenue-nav { margin-top: 16px; align-items: center; }
.bienvenue-nav .lien { font-size: 14px; }

/* Écart commun entre un contrôle (bouton, champ, curseur, groupe de puces) et le bloc qui le suit ou le précède :
   12 px à la verticale ; en fin de feuille pour l'emporter sur les marges nulles des paragraphes de carte. Jamais dans
   une rangée d'éléments côte à côte (actions, ligne de champs…) : la marge y décalerait un élément vers le bas */
:not(.actions, .barre-outils, .ligne, .barre-fiche, .certitude-boutons, .gt-modes, .grille-joueurs, .appel-action, .curseur-ligne) > :is(.bouton, .champ, .curseur-ligne, .puces, .lien-bouton, button.lien, .lien-discret, .grille-joueurs, .echelle-sept-boutons, .certitude-boutons, .actions)
  + :is(p, ul, ol, div, .bouton, .champ, .curseur-ligne, .ligne, .retour-quiz, button.lien, .lien-bouton, .lien-discret) { margin-top: 12px; }
:not(.actions, .barre-outils, .ligne, .barre-fiche, .certitude-boutons, .gt-modes, .grille-joueurs, .appel-action, .curseur-ligne) > :is(p, ul, ol) + :is(.bouton, .champ, .curseur-ligne, .ligne, .puces, .programme-cases, .grille-joueurs, button.lien, .lien-bouton, .choix) { margin-top: 12px; }
/* Même écart après un bloc qui se termine par un contrôle (rangée d'actions, formulaire…) */
:not(.actions, .barre-outils, .ligne, .barre-fiche, .certitude-boutons, .gt-modes, .grille-joueurs, .appel-action, .curseur-ligne) > :has(> :is(.bouton, .champ, .curseur-ligne, .puces, .choix):last-child) + :is(p, ul, ol, div, button.lien) { margin-top: 12px; }
:not(.actions, .barre-outils, .ligne, .barre-fiche, .certitude-boutons, .gt-modes, .grille-joueurs, .appel-action, .curseur-ligne) > :has(> :is(p, ul, ol):last-child) + :is(.bouton, .champ, .lien-bouton, button.lien) { margin-top: 12px; }

/* Cibles tactiles : 44 × 44 px au moins, en agrandissant la zone (hauteur minimale, marge intérieure) sans changer
   le dessin ; les liens placés dans une phrase n'en ont pas besoin */
.puce, .langue-entete, .marque, .segment a, .bouton-acquis, .lien-bouton, .champ, .lien.retour, button.lien, .lien-discret,
  .voir-aussi a, .sommaire a, .pied a, .pied button, .option-certitude, .suivantes a, p.contre a, .guide p > a:only-child,
  .verif label { min-height: 44px; }
.puce, .lien.retour, button.lien, .lien-bouton, .voir-aussi a, .sommaire a, .pied a, .pied button, .suivantes a, p.contre a,
  .guide p > a:only-child { display: inline-flex; align-items: center; }
.segment a { display: flex; align-items: center; justify-content: center; gap: 0.3em; }   /* gap : l'espace avant le compteur, que flex supprime */
.lien-discret { display: flex; align-items: center; min-width: 44px; }
.pied button, .choix-theme button { min-width: 44px; justify-content: center; }
.bouton-pas { width: 44px; height: 44px; }
.curseur { height: 44px; }
@media (min-width: 760px) { .onglet { min-height: 44px; min-width: 44px; justify-content: center; } }
/* Échelles à 7 et 9 points sur téléphone : deux rangées (4 + 3, 5 + 4), pour des boutons de 44 px de large */
@media (max-width: 759px) {
  .echelle-sept-boutons { grid-template-columns: repeat(4, minmax(44px, 1fr)); }
  .echelle-neuf .echelle-sept-boutons { grid-template-columns: repeat(5, minmax(44px, 1fr)); }
}

/* ===================== La pièce du jour (piece-interface.js, DESIGN.md « La pièce du jour ») ===================== */
/* Une feuille posée sur la page ; une seule couleur de catégorie (--c, celle du monde). Les zones ne se signalent
   qu'au survol et au focus : pas de cadre permanent qui ferait de la pièce un formulaire. */
.pdj-mise {
  --c-fort: color-mix(in srgb, var(--c) 86%, black);
  --c-texte: color-mix(in srgb, var(--c) 80%, black);
  --c-clair: color-mix(in srgb, var(--c) 10%, var(--carte));
  --sur-c: #ffffff;
  display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pdj-mise { --c-fort: color-mix(in srgb, var(--c) 72%, white); --c-texte: color-mix(in srgb, var(--c) 55%, white); --c-clair: color-mix(in srgb, var(--c) 22%, var(--carte)); --sur-c: #16130f; }
}
:root[data-theme="dark"] .pdj-mise { --c-fort: color-mix(in srgb, var(--c) 72%, white); --c-texte: color-mix(in srgb, var(--c) 55%, white); --c-clair: color-mix(in srgb, var(--c) 22%, var(--carte)); --sur-c: #16130f; }
.pdj-barre { position: sticky; top: 0; z-index: 4; background: var(--fond); padding: 8px 0; margin: -8px 0; }
.pdj-etapes { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--discret); }
.pdj-etapes li { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--trait); border-radius: 999px; }
.pdj-etape-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--encadre); font-weight: 600; font-size: 13px; }
.pdj-etapes [aria-current="step"] { color: var(--texte); border-color: var(--c-texte); font-weight: 600; }
.pdj-etapes [aria-current="step"] .pdj-etape-num { background: var(--c-fort); color: var(--sur-c); }
/* Téléphone : le nom des étapes autres que la courante est lu, pas affiché (quatre étapes tiendraient mal sur 390 px) */
@media (max-width: 520px) {
  .pdj-etapes li:not([aria-current]) { padding-right: 4px; }
  .pdj-etapes li:not([aria-current]) .pdj-etape-nom { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

.pdj-feuille {
  background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon-carte); box-shadow: var(--ombre-2);
  padding: 20px 20px 20px; max-width: var(--largeur-lecture); transform-origin: center;
}
.pdj-etiquette { font-family: var(--titre); font-size: 14px; font-weight: 600; color: var(--c-texte); margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--trait); }
.pdj-rubrique, .pdj-intertitre { font-family: var(--titre); font-size: 14px; font-weight: 600; color: var(--discret); margin: 0 0 8px; }
.pdj-signature { font-style: italic; color: var(--discret); font-size: 14px; margin: 12px 0 0; }

/* Zones : de vrais boutons, rendus comme le texte qu'ils portent */
.pdj-zone {
  position: relative; display: block; width: 100%; min-height: 44px; margin: 0 0 8px; padding: 8px 12px;
  font: inherit; color: inherit; text-align: left; line-height: 1.45; background: transparent;
  border: 1px solid transparent; border-radius: var(--rayon); cursor: pointer;
  transition: background-color var(--duree-courte) var(--courbe), border-color var(--duree-courte) var(--courbe);
}
@media (hover: hover) { .pdj-zone:not([aria-disabled="true"]):hover { background: var(--c-clair); } }
.pdj-zone:focus-visible { background: var(--c-clair); outline: 2px solid var(--c-texte); outline-offset: 1px; }
.pdj-zone[aria-disabled="true"] { cursor: default; }
/* La marque : un trait d'encre sous le texte et une pastille numérotée (le numéro porte l'information) */
.pdj-zone[aria-pressed="true"] .pdj-texte { text-decoration: underline; text-decoration-color: var(--c-texte); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.pdj-zone[aria-pressed="true"] { border-color: var(--c-texte); }
.pdj-pastille { position: absolute; top: -9px; right: -6px; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: var(--rayon-carte); background: var(--c-fort); color: var(--sur-c); font-size: 13px; font-weight: 600; line-height: 1; }

/* Rôles : la hiérarchie typographique de chaque habillage */
.pdj-r-titre { font-family: var(--titre); font-size: 28px; line-height: 1.15; font-weight: 500; }
.pdj-r-chapo { font-family: var(--titre); font-size: 21px; line-height: 1.4; }
.pdj-r-source, .pdj-r-date, .pdj-r-partages, .pdj-r-fiche-dates, .pdj-r-fiche-recueil, .pdj-r-fiche-effectif { font-size: 14px; color: var(--discret); }
.pdj-r-source { border-top: 1px solid var(--trait-doux); border-radius: 0; margin-top: 8px; }

/* Figure de la brève : axe et tracé côte à côte, légende dessous */
.pdj-figure { margin: 8px 0 12px; }
.pdj-figure-rang { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; margin-bottom: 8px; }
.pdj-figure .pdj-zone, .pdj-decor { margin: 0; padding: 4px; }
.pdj-figure svg { display: block; width: 100%; height: auto; }
.pdj-f-legende { font-size: 14px; color: var(--discret); text-align: center; }
.pdj-graduation { font: 12px var(--police); fill: var(--discret); }
.pdj-trait { stroke: var(--texte); stroke-width: 1.2; }
.pdj-grille { stroke: var(--trait-doux); stroke-width: 1; }
.pdj-barre { fill: var(--c-fort); }
.pdj-courbe { fill: none; stroke: var(--c-fort); stroke-width: 2.5; stroke-linejoin: round; }
.pdj-point { fill: var(--c-fort); }

/* Publicité : aplat de la couleur, chiffre-clé en grand */
.pdj-aplat { background: var(--c-clair); border-radius: var(--rayon-bouton); padding: 12px; margin: 0 0 12px; }
.pdj-r-slogan { font-family: var(--titre); font-size: 28px; line-height: 1.15; font-weight: 500; }
.pdj-r-chiffre-cle { font-family: var(--titre); font-size: 34px; line-height: 1.1; font-variant-numeric: oldstyle-nums; color: var(--c-texte); }
.pdj-r-prix { font-family: var(--titre); font-size: 24px; font-weight: 500; }
.pdj-r-temoignage, .pdj-r-citation, .pdj-r-phrase-citation { font-family: var(--titre); font-style: italic; font-size: 19px; }
.pdj-r-petites-lignes { font-size: 13px; color: var(--discret); line-height: 1.4; }

/* Communiqué d'étude et sondage : encadré « Méthode » ou fiche technique, exergue */
.pdj-methode { background: var(--encadre); border-radius: var(--rayon); padding: 12px 8px 8px; margin: 8px 0 12px; }
.pdj-methode .pdj-intertitre { padding: 0 12px; }
.pdj-methode .pdj-zone { font-size: 15px; }
.pdj-exergue { border-left: 3px solid var(--c-fort); padding-left: 8px; margin: 8px 0 12px; }
.pdj-r-conclusion, .pdj-r-question { font-family: var(--titre); font-size: 21px; line-height: 1.3; }
.pdj-r-tableau { font-variant-numeric: tabular-nums; border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait); border-radius: 0; }
.pdj-r-barres { font-variant-numeric: tabular-nums; }

/* Réseau fictif : carte, avatar géométrique, image chiffrée */
.pdj-reseau .pdj-compte { display: flex; align-items: center; gap: 8px; }
.pdj-reseau .pdj-compte .pdj-zone { width: auto; flex: 1; font-weight: 600; }
.pdj-avatar, .pdj-blason { flex: none; width: 40px; height: 40px; }
.pdj-avatar-fond { fill: var(--c-clair); stroke: var(--c-texte); stroke-width: 1.5; }
.pdj-avatar-trait { fill: none; stroke: var(--c-texte); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pdj-image { border: 1px solid var(--trait); border-radius: var(--rayon-bouton); padding: 8px; margin: 4px 0 8px; }
.pdj-r-image-chiffre { font-family: var(--titre); font-size: 28px; line-height: 1.2; text-align: center; font-variant-numeric: oldstyle-nums; color: var(--c-texte); background: var(--c-clair); }
.pdj-r-image-legende { font-size: 14px; color: var(--discret); }
.pdj-reponses { border-left: 2px solid var(--trait); margin: 8px 0 8px 12px; padding-left: 8px; }
.pdj-reponses .pdj-zone { font-size: 15px; }

/* Bulletin municipal : bandeau et blason, deux colonnes avant / après */
.pdj-bandeau { display: flex; align-items: center; gap: 12px; border-bottom: 3px double var(--c-texte); margin: 0 0 12px; padding-bottom: 8px; }
.pdj-bandeau .pdj-zone, .pdj-bandeau-texte { font-family: var(--titre); font-size: 21px; font-weight: 500; margin: 0; flex: 1; }
.pdj-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.pdj-colonnes .pdj-zone { border-top: 3px solid var(--c-clair); border-radius: 0; margin: 0; }
@media (max-width: 420px) { .pdj-colonnes { grid-template-columns: 1fr; } }

/* Rail d'expertise */
.pdj-rail { max-width: var(--largeur-lecture); }
.pdj-titre-etape { font-family: var(--titre); font-size: 24px; margin: 0 0 8px; }
.pdj-titre-etape:focus { outline: none; }
.pdj-compteur { font-weight: 600; }
.pdj-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.pdj-actions .bouton { flex: 1 1 160px; }
.pdj-nommer { border: 0; padding: 0; margin: 0 0 16px; }
.pdj-nommer legend { font-weight: 600; margin-bottom: 12px; padding: 0; }
.pdj-nommer .choix[aria-pressed="true"], .pdj-options .choix[aria-pressed="true"] { border-color: var(--c-texte); background: var(--c-clair); font-weight: 600; }
.pdj-question { font-family: var(--titre); font-size: 19px; line-height: 1.4; }
.pdj-saisie { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pdj-saisie label { flex: 1 0 100%; font-weight: 600; }
.pdj-saisie input { flex: 1; min-height: 44px; font-size: 18px; padding: 8px 12px; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--carte); color: var(--texte); }
.pdj-erreur { flex: 1 0 100%; color: var(--rouge); margin: 0; }
.pdj-erreur:empty { display: none; }

/* Contre-expertise : quatre états, chacun avec glyphe, mot et couleur (jamais la couleur seule) */
.pdj-etat-trouve { border-color: var(--vert); }
.pdj-etat-manque { border-color: var(--rouge); border-style: dashed; }
.pdj-etat-fausse .pdj-texte { text-decoration: line-through; text-decoration-color: var(--rouge); text-decoration-thickness: 2px; }
.pdj-etat-fausse { border-color: var(--rouge); }
.pdj-etat-evite { border-color: var(--trait); border-style: dotted; }
.pdj-notes { margin: 0 0 12px; }
.pdj-note { border-left: 3px solid var(--trait); padding: 4px 0 4px 12px; margin: 0 0 8px 8px; font-size: 15px; }
.pdj-note p { margin: 0 0 4px; }
.pdj-note-etat { display: flex; align-items: center; gap: 8px; font-family: var(--titre); font-size: 14px; font-weight: 600; }
.pdj-glyphe { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pdj-note-trouve { border-color: var(--vert); } .pdj-note-trouve .pdj-note-etat { color: var(--vert); }
.pdj-note-manque, .pdj-note-fausse { border-color: var(--rouge); } .pdj-note-manque .pdj-note-etat, .pdj-note-fausse .pdj-note-etat { color: var(--rouge); }
.pdj-note-evite .pdj-note-etat, .pdj-note-tolere .pdj-note-etat { color: var(--discret); }
.pdj-note-nom { font-family: var(--titre); font-style: italic; font-size: 19px; line-height: 1.3; }
.pdj-honnete del, .pdj-nomme del, .pdj-correction-etape del { color: var(--rouge); text-decoration-thickness: 2px; }
.pdj-honnete ins { text-decoration: none; background: var(--vert-doux); color: var(--texte); }
.pdj-fleche { color: var(--discret); }
.pdj-separe { color: var(--discret); }
.pdj-preuve .lien { font-size: 15px; text-align: left; min-height: 44px; }
.pdj-fiche { margin-top: 4px; }

/* Rapport : la note, le détail par part */
.pdj-note-finale { margin-top: 0; }
.pdj-parts { margin: 0 0 12px; }
.pdj-part { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; align-items: center; margin-bottom: 8px; }
.pdj-part dt { font-weight: 600; }
.pdj-part dd { margin: 0; display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pdj-part-barre { flex: 1; height: 10px; border-radius: var(--rayon); background: linear-gradient(to right, var(--c-fort) calc(var(--part) * 100%), var(--trait-doux) 0); }
.pdj-etalonnage { font-family: var(--titre); font-style: italic; font-size: 19px; }
.pdj-correction-etape { border-top: 1px solid var(--trait); padding-top: 12px; margin-top: 12px; }
.pdj-attendu { font-weight: 600; }

@media (min-width: 1040px) {
  .pdj-mise { grid-template-columns: minmax(0, 680px) minmax(0, 1fr); grid-template-areas: "feuille barre" "feuille rail"; grid-template-rows: auto 1fr; gap: 16px 40px; align-items: start; }
  .pdj-feuille { grid-area: feuille; padding: 28px 32px 28px; }
  .pdj-barre { grid-area: barre; position: static; margin: 0; padding: 0; }
  .pdj-rail { grid-area: rail; position: sticky; top: 16px; }
  .pdj-r-titre { font-size: 28px; }
}

/* Sondage : barres horizontales, valeurs écrites, axe écrit (un axe tronqué se lit donc sur la pièce) */
.pdj-sondage { display: grid; gap: 8px; }
.pdj-sondage-ligne { display: grid; grid-template-columns: 76px minmax(0, 1fr) 48px; gap: 8px; align-items: center; }
.pdj-sondage-barre { height: 18px; border-radius: var(--rayon); background: linear-gradient(to right, var(--c-fort) calc(var(--part) * 100%), var(--trait-doux) 0); }
.pdj-sondage-valeur { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.pdj-sondage-axe { font-size: 13px; color: var(--discret); }

/* Carte de l'accueil, atelier */
.pdj-carte .pdj-etiquette { border-bottom: 0; padding-bottom: 0; margin-bottom: 8px; }
.pdj-signes { font-family: var(--titre); font-size: 28px; letter-spacing: 0.12em; margin: 0 0 8px; }
.pdj-records { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 12px; }
.pdj-records dt { font-weight: 600; }
.pdj-records dd { margin: 0; color: var(--discret); }
.pdj-archives { columns: 2; padding-left: 20px; margin: 0 0 12px; }
.pdj-archives li { margin-bottom: 4px; }

/* Défi sur mesure (tirage.js) : raccourcis qui passent à la ligne, cases en grille (une colonne sur téléphone) */
.raccourcis-fiches { display: flex; flex-wrap: wrap; gap: 8px; }
.choix-fiches { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.choix-fiches legend { padding: 0; }
.cases-fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 0 16px; }
.cases-fiches .case-tirage input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

/* Formes des pays (chiffres.js, formesSurfaces) : le trait garde son épaisseur malgré la mise à l'échelle */
.forme-pays { vector-effect: non-scaling-stroke; stroke-linejoin: round; }

/* ===================== Mode sobre (concentration) =====================
   Accueil réduit à une action, autres activités repliées, séance bornée, fiche sur une colonne */
.accueil-sobre { max-width: var(--largeur-lecture); margin-left: auto; margin-right: auto; }
.accueil-sobre .page-titre { margin-bottom: 12px; }
.autres-activites { max-width: var(--largeur-lecture); margin: 16px auto 0; }
.autres-activites summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
.autres-activites a { display: inline-flex; align-items: center; min-height: 44px; }
.arret-seance { min-height: 44px; font-size: 14px; }
.pause-douce { margin: 0 0 10px; }
@media (min-width: 1040px) {
  .fiche-mise-en-page.sans-rail { grid-template-columns: minmax(0, var(--largeur-lecture)); }
  html.sobre #vue-fiches.large .lien.retour { margin-left: calc((100% - var(--largeur-lecture)) / 2); }
}
.quiz-entete { flex-wrap: wrap; gap: 4px 12px; }

/* Bouton du mode sobre (en-tête) : même trait fin que le bouton de langue ; enfoncé, il prend la couleur du texte.
   Téléphone : au bout de la ligne de recherche (la première ligne est pleine) ; ordinateur : avant le profil. */
.bouton-sobre { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--carte); color: var(--discret); cursor: pointer; }
.bouton-sobre svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.bouton-sobre:hover, .bouton-sobre:focus-visible { color: var(--texte); border-color: var(--texte); }
.bouton-sobre[aria-pressed="true"] { background: var(--texte); border-color: var(--texte); color: var(--fond); }
.bouton-sobre[aria-pressed="true"] circle { fill: currentColor; }
@media (max-width: 759px) {
  .bouton-sobre { position: absolute; right: 0; bottom: 0; }
  .recherche-globale { margin-right: 52px; }
}
@media (min-width: 760px) { .bouton-sobre { order: 3; } }
/* Mode sobre : moins à regarder autour de la tâche ; le filet coloré du catalogue est un ornement */
html.sobre .spectre { display: none; }
/* Très petit téléphone (320 px) : la marque passait sous le bouton de profil. Bouton de langue réduit à « EN »
   (44 px, le globe retiré) et marque un peu plus petite ; profil et pastille de synchronisation suivent (− 22 px). */
@media (max-width: 359px) {
  .marque { font-size: 21px; }
  .langue-entete { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .langue-entete svg { display: none; }
  .entete .bouton-profil { right: 52px; }
  .etat-synchro { right: 85px; }
}
/* Grand écran : la place existe pour l'écart habituel des onglets (8 px ne suffit qu'entre 1 040 et 1 239 px, où la
   ligne unique de l'en-tête est serrée) */
@media (min-width: 1240px) { .navigation { gap: 20px; } }
/* Parcours guidés : le filet de lien tombait au bas de la cible de 44 px, loin du texte, comme un trait parasite ; la
   ligne de séparation suffit. Titre et durée restent sur une ligne, le titre se coupe au besoin. */
.liste-parcours li { flex-wrap: nowrap; align-items: center; }
.liste-parcours li .lien-texte { border-bottom: 0; }
.liste-parcours li .lien-texte:hover { text-decoration: underline; }
.liste-parcours li .source { flex: none; }
/* Bouton de profil étroit (≤ 1 039 px), premier grade sans insigne : l'avatar au centre de l'anneau, pas un cercle vide */
@media (max-width: 1039px) { .bouton-profil:not(:has(.insigne)) .blason { display: block; left: 8px; top: 8px; } }
/* Sommaire du guide : « .guide ul » (retrait des listes du texte) l'emportait sur « .sommaire », décalant les liens de
   20 px par rapport au texte de la carte */
.guide .sommaire { padding-left: 0; margin: 0; }
