/* SPDX-FileCopyrightText: 2026 Open Business Foundation */
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* ==========================================================================
   EC1 — interface : coque, barre, accueil, page de module, pages annexes,
   recherche, réglages. Les composants des ateliers sont dans composants.css.
   ========================================================================== */

.coque {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.coque > * { min-width: 0; }
.principal { min-width: 0; outline: none; }
.page {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: var(--gouttiere);
  padding-block: var(--e-6) var(--e-8);
}
.page-etroite { max-width: 50rem; }

/* ---------------------------------------------------------------------------
   Barre du haut
   --------------------------------------------------------------------------- */
.barre {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--e-4);
  min-height: calc(var(--barre-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gouttiere) 0;
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duree) var(--courbe);
}
.barre.est-defilee { border-bottom-color: var(--trait); }
.marque {
  display: inline-flex;
  align-items: center;
  gap: var(--e-3);
  color: var(--encre);
  text-decoration: none;
  margin-right: auto;
  min-width: 0;
}
.marque::after { display: none; }
/* Le logo de l’Open Business Foundation, éditrice d’EC1, puis un filet, puis la marque d’EC1 */
.marque-obf {
  display: inline-flex;
  align-items: center;
  flex: none;
  align-self: stretch;
  padding-right: var(--e-4);
  border-right: 1px solid var(--trait);
  margin-block: 0.9rem;
}
.marque-obf img { display: block; height: 2.1rem; width: auto; }
/* Le pictogramme d’EC1 (EC.marqueEc1) */
.marque-embleme { width: 3rem; height: 1.6rem; flex: none; }
.marque-ec1 { display: block; width: 100%; height: 100%; overflow: visible; }
.marque-ec1-boucle { stroke-width: 3.4; stroke-linejoin: round; }
.marque-ec1-contribution { stroke: var(--contribution); fill: var(--contribution-doux); }
.marque-ec1-marche { stroke: var(--marche); fill: var(--marche-doux); }
.marque-ec1-point {
  fill: var(--pollen);
  stroke: var(--papier);
  stroke-width: 1.6;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform var(--duree) var(--courbe);
}
.marque:hover .marque-ec1-point, .marque:focus-visible .marque-ec1-point { transform: scale(1.3); }
.marque-texte { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.marque-sigle {
  font-family: var(--police-titre);
  font-weight: 850;
  font-stretch: 125%;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.marque-nom {
  font-size: var(--t-xs);
  color: var(--encre-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-principale ul { display: flex; gap: var(--e-1); list-style: none; margin: 0; padding: 0; }
.nav-principale li + li { margin-top: 0; }
.nav-principale a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 var(--e-3);
  border-radius: var(--r-2);
  color: var(--encre-2);
  font-weight: 620;
  font-size: var(--t-s);
  text-decoration: none;
  position: relative;
}
.nav-principale a:hover { color: var(--encre); background: var(--surface-2); }
.nav-principale a[aria-current="page"] { color: var(--encre); }
.nav-principale a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: var(--e-3);
  right: var(--e-3);
  bottom: 0.3rem;
  height: 2px;
  border-radius: 2px;
  background: var(--contribution);
}
.barre-outils { display: flex; align-items: center; gap: var(--e-1); }
.bouton-icone {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  background: transparent;
  color: var(--encre-2);
}
.bouton-icone svg { width: 1.3rem; height: 1.3rem; }
.bouton-icone:hover { background: var(--surface-2); color: var(--encre); }
.bouton-menu { display: none; }

@media (max-width: 860px) {
  .nav-principale { display: none; }
  .bouton-menu { display: inline-grid; }
}
@media (max-width: 420px) {
  .marque-nom { display: none; }
  .barre { gap: var(--e-3); }
  .marque-obf { padding-right: var(--e-3); }
  .marque-obf img { height: 1.75rem; }
  .marque { gap: var(--e-2); }
  .marque-embleme { width: 2.6rem; height: 1.4rem; }
}
/* Très petit écran : les réglages d’affichage restent dans le menu */
@media (max-width: 359px) {
  #bouton-reglages { display: none; }
}

/* Choix de la langue (seulement quand plusieurs langues sont fabriquées) :
   le code de la langue dans la barre, et sous lui la liste des langues,
   chacune nommée dans sa langue. Le menu (tiroir) la reprend : sur un écran
   étroit, c’est là qu’on la trouve. */
.choix-langue { position: relative; }
.bouton-langue {
  font-family: var(--police-code);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.bouton-langue[aria-expanded="true"] { background: var(--surface-2); color: var(--encre); }
.langues-liste { list-style: none; margin: 0; padding: 0; }
.langues-liste li + li { margin-top: 0; }
.barre-langues .langues-liste {
  position: absolute;
  top: calc(100% + var(--e-1));
  right: 0;
  z-index: 40;
  min-width: 11rem;
  padding: var(--e-1);
  border: 1px solid var(--trait-fort);
  border-radius: var(--r-2);
  background: var(--surface);
  box-shadow: var(--ombre-3);
}
.langues-liste a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-3);
  min-height: 2.75rem;
  padding: 0 var(--e-3);
  border-radius: var(--r-1);
  color: var(--encre);
  font-weight: 620;
  text-decoration: none;
}
.langues-liste a:hover { background: var(--surface-2); }
.langues-liste a[aria-current="true"] { color: var(--contribution); }
.langues-liste .icone { width: 1.1rem; height: 1.1rem; flex: none; }
.tiroir-langues .langues-liste { display: grid; gap: var(--e-1); margin-top: var(--e-2); }
.tiroir-langues .langues-liste a { min-height: 3rem; }
@media (max-width: 420px) {
  .barre-langues { display: none; }
}

/* Une traduction le dit, en une ligne qui mène à sa note (D29) */
.ligne-traduction {
  display: flex;
  align-items: flex-start;
  gap: var(--e-2);
  color: var(--encre-2);
  font-size: var(--t-s);
}
.ligne-traduction .icone { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.2em; color: var(--service); }
.heros-traduction { margin-top: var(--e-3); }
.pied-traduction { max-width: 76rem; margin: 0 auto var(--e-5); padding-bottom: var(--e-4); border-bottom: 1px solid var(--trait); }
.note-traduction {
  padding: var(--e-5);
  border: 1px solid var(--trait);
  border-left: 4px solid var(--service);
  border-radius: var(--r-2);
  background: var(--surface);
}
.note-traduction > .texte > :last-child { margin-bottom: 0; }

/* Tiroir (menu sur petit écran) */
.tiroir {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr minmax(0, 22rem);
  background: var(--voile);
}
.tiroir-panneau {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: var(--e-5);
  height: 100%;
  overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + var(--e-4)) var(--e-5) calc(env(safe-area-inset-bottom, 0px) + var(--e-6));
  background: var(--papier);
  box-shadow: var(--ombre-3);
}
.tiroir-tete { display: flex; align-items: center; justify-content: space-between; }
.tiroir nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--e-1); }
.tiroir nav li + li { margin-top: 0; }
.tiroir nav a {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  min-height: 3rem;
  padding: 0 var(--e-3);
  border-radius: var(--r-2);
  color: var(--encre);
  font-weight: 650;
  text-decoration: none;
}
.tiroir nav a:hover, .tiroir nav a[aria-current="page"] { background: var(--surface-2); }

/* ---------------------------------------------------------------------------
   Pied de page
   --------------------------------------------------------------------------- */
.pied {
  border-top: 1px solid var(--trait);
  padding: var(--e-6) var(--gouttiere) calc(var(--e-6) + env(safe-area-inset-bottom, 0px));
  color: var(--encre-2);
  font-size: var(--t-s);
}
.pied-grille {
  max-width: 76rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--e-5) var(--e-6);
}
.pied h2 {
  font-family: var(--police-code);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre-3);
  font-stretch: 100%;
  margin-bottom: var(--e-2);
}
.pied ul { list-style: none; padding: 0; }
.pied li + li { margin-top: var(--e-1); }
.pied-licence { display: flex; gap: var(--e-2); flex-wrap: wrap; margin-top: var(--e-2); }

/* ---------------------------------------------------------------------------
   Accueil
   --------------------------------------------------------------------------- */
.heros {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--e-6);
  align-items: center;
  padding-block: var(--e-7) var(--e-6);
}
.heros::before {
  content: "";
  position: absolute;
  inset: 0 calc(var(--gouttiere) * -1);
  z-index: -1;
  background-image:
    linear-gradient(var(--grille) 1px, transparent 1px),
    linear-gradient(90deg, var(--grille) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 85% at 70% 45%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 85% at 70% 45%, #000 30%, transparent 78%);
}
.heros-sur-titre { display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-3); align-items: center; margin-bottom: var(--e-4); }
.heros-titre {
  font-size: var(--t-3xl);
  font-weight: 860;
  font-stretch: 122%;
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.heros-titre .heros-titre-suite {
  display: block;
  margin-top: 0.18em;
  font-size: 0.42em;
  font-weight: 640;
  font-stretch: 112%;
  letter-spacing: -0.005em;
  color: var(--encre-2);
}
.heros-question {
  margin-top: var(--e-5);
  max-width: 34rem;
  font-size: var(--t-l);
  line-height: 1.45;
  color: var(--encre);
}
.heros-question em { font-style: normal; color: var(--contribution); font-weight: 680; }
.heros-question-source { display: block; margin-top: var(--e-2); }
.heros-actions { display: flex; flex-wrap: wrap; gap: var(--e-3); margin-top: var(--e-5); }
.heros-reprise { margin-top: var(--e-3); color: var(--encre-2); font-size: var(--t-s); }
.heros-visuel { position: relative; min-width: 0; }

@media (max-width: 900px) {
  .heros { grid-template-columns: minmax(0, 1fr); padding-block: var(--e-5) var(--e-4); }
  .heros-visuel { max-width: 24rem; margin-inline: auto; width: 100%; }
}

.section-accueil { padding-block: var(--e-7) 0; }
.section-entete {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--e-3) var(--e-6);
  margin-bottom: var(--e-5);
}
.section-entete p { max-width: 40rem; color: var(--encre-2); }
.section-entete h2 { margin-bottom: var(--e-2); }

/* ---------------------------------------------------------------------------
   Les six mouvements (accueil) : une rangée de six cartes reliées en cycle,
   puis le panneau du mouvement choisi ; en accordéon sous 720 px.
   --------------------------------------------------------------------------- */
.mouvements { --mv-pas: calc((100% - 5 * var(--e-3)) / 6); }
.mv-cycle {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--e-3);
  padding-bottom: var(--e-5);
}
/* Le fil qui relie les six nœuds, puis la boucle qui ramène de Récolter à Comprendre */
.mv-cycle::before {
  content: "";
  position: absolute;
  top: calc(var(--e-4) + 1rem - 1px);
  left: 2rem;
  right: calc(var(--mv-pas) - 2rem);
  height: 2px;
  background: var(--trait-fort);
  opacity: 0.55;
}
.mv-cycle::after {
  content: "";
  position: absolute;
  left: 2rem;
  right: calc(var(--mv-pas) - 2rem);
  bottom: 0.35rem;
  height: calc(var(--e-5) - 0.35rem);
  border: 2px dashed var(--trait-fort);
  border-top: 0;
  border-radius: 0 0 1rem 1rem;
  opacity: 0.55;
}
.mv-carte {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--e-2);
  min-width: 0;
  padding: var(--e-4);
  border: 1px solid var(--trait);
  border-radius: var(--r-3);
  background: var(--surface);
  color: var(--encre);
  text-align: left;
  box-shadow: inset 0 3px 0 var(--mv);
  transition: border-color var(--duree) var(--courbe), background var(--duree) var(--courbe), box-shadow var(--duree) var(--courbe), transform var(--duree) var(--courbe);
}
.mv-carte:hover { border-color: var(--mv-trait); box-shadow: inset 0 3px 0 var(--mv), var(--ombre-2); transform: translateY(-2px); }
.mv-carte[aria-selected="true"] { border-color: var(--mv); background: var(--mv-doux); box-shadow: inset 0 0 0 1px var(--mv), inset 0 5px 0 var(--mv); transform: none; }
.mv-carte-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--e-2); width: 100%; }
.mv-noeud {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  padding-inline: 0.4rem;
  border: 2px solid var(--mv);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--mv);
  font-family: var(--police-code);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background var(--duree) var(--courbe), color var(--duree) var(--courbe);
}
.mv-carte[aria-selected="true"] .mv-noeud,
.mv-carte[aria-expanded="true"] .mv-noeud { background: var(--mv); color: var(--sur-mv); }
.mv-icone { display: inline-grid; place-items: center; color: var(--mv); }
.mv-icone svg { width: 1.45rem; height: 1.45rem; }
.mv-verbe {
  max-width: 100%;
  font-family: var(--police-titre);
  font-weight: 840;
  font-stretch: 106%;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.15;
}
.mv-sous-titre { flex: 1; font-size: 0.875rem; line-height: 1.35; color: var(--encre-2); }
.mv-meta { display: flex; flex-wrap: wrap; column-gap: 0.5em; font-family: var(--police-code); font-size: var(--t-xs); color: var(--encre-3); }
.mv-meta > span { white-space: nowrap; }
@media (min-width: 1100px) { .mv-meta > [aria-hidden] { display: none; } }
.mv-carte .jauge-ligne { width: 100%; }
[data-mv] .jauge > span { background: var(--mv); }

.mv-panneau {
  display: grid;
  grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
  gap: var(--e-5) var(--e-7);
  padding: var(--e-5) var(--e-6) var(--e-6);
  border: 1px solid var(--trait);
  border-top: 4px solid var(--mv);
  border-radius: var(--r-3);
  background: var(--surface);
  animation: apparition 200ms var(--courbe);
}
.mv-panneau-tete { display: flex; flex-direction: column; gap: var(--e-2); }
.mv-etiquette { color: var(--mv); display: inline-flex; align-items: center; gap: var(--e-2); }
.mv-panneau-titre { font-size: var(--t-xl); font-stretch: 118%; text-transform: uppercase; letter-spacing: 0.01em; }
.mv-panneau-sous-titre { font-size: var(--t-m); font-weight: 600; line-height: 1.35; }
.mv-panneau-intro { color: var(--encre-2); font-size: var(--t-s); }
.mv-panneau-intro > * + * { margin-top: 0.6em; }
.mv-panneau-actions { display: flex; flex-wrap: wrap; gap: var(--e-2); margin-top: var(--e-3); }
.mv-liste { align-self: start; }

@media (max-width: 1099.98px) {
  .mv-cycle { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: var(--e-3); }
  .mv-cycle::before, .mv-cycle::after { display: none; }
  .mv-panneau { grid-template-columns: minmax(0, 1fr); padding: var(--e-5); }
}

/* Accordéon (moins de 720 px) */
.mouvements[data-mode="accordeon"] { display: grid; gap: var(--e-3); }
.mv-item {
  border: 1px solid var(--trait);
  border-radius: var(--r-3);
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--mv);
  overflow: hidden;
}
.mv-item-titre { font-size: inherit; font-weight: inherit; font-stretch: 100%; letter-spacing: 0; line-height: inherit; }
.mv-item .mv-carte {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) 1.5rem;
  grid-template-areas: "noeud verbe chevron" "noeud sous chevron" "noeud meta chevron" "noeud jauge chevron";
  gap: 0.15rem var(--e-3);
  align-items: start;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: var(--e-4) var(--e-4) var(--e-4) calc(var(--e-4) + 4px);
  transform: none;
}
.mv-item .mv-carte:hover { background: var(--mv-doux); box-shadow: none; transform: none; }
.mv-item .mv-carte-tete { display: contents; }
.mv-item .mv-noeud { grid-area: noeud; }
.mv-item .mv-icone { display: none; }
.mv-item .mv-verbe { grid-area: verbe; }
.mv-item .mv-sous-titre { grid-area: sous; }
.mv-item .mv-meta { grid-area: meta; margin-top: var(--e-1); }
.mv-item .jauge-ligne { grid-area: jauge; margin-top: var(--e-1); }
.mv-chevron { grid-area: chevron; align-self: center; color: var(--encre-3); transition: transform var(--duree) var(--courbe); }
.mv-chevron svg { width: 1.3rem; height: 1.3rem; }
.mv-item .mv-carte[aria-expanded="true"] .mv-chevron { transform: rotate(180deg); color: var(--mv); }
.mv-region { padding: 0 var(--e-4) var(--e-4) calc(var(--e-4) + 4px); }
.mv-region .mv-etiquette, .mv-region .mv-panneau-titre, .mv-region .mv-panneau-sous-titre { display: none; }
.mv-region .mv-panneau-tete { padding-bottom: var(--e-3); }

/* ---------------------------------------------------------------------------
   Listes de chapitres pleine largeur (accueil, sommaire, mouvement, parcours)
   --------------------------------------------------------------------------- */
.liste-chapitres { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--trait); }
.liste-chapitres li { margin: 0; border-bottom: 1px solid var(--trait); }
.liste-chapitres li + li { margin-top: 0; }
.ligne-chapitre {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr) auto 5.75rem;
  align-items: center;
  gap: var(--e-2) var(--e-4);
  min-height: 3.1rem;
  padding: var(--e-2) var(--e-3) var(--e-2) var(--e-2);
  color: var(--encre);
  text-decoration: none;
  border-radius: var(--r-2);
  transition: background var(--duree) var(--courbe);
}
.ligne-chapitre:hover { background: var(--mv-doux, var(--surface-2)); }
.ligne-chapitre[aria-current="page"] { background: var(--mv-doux, var(--surface-2)); }
.ligne-numero { font-family: var(--police-code); font-size: var(--t-s); font-weight: 700; color: var(--mv); font-variant-numeric: tabular-nums; text-align: right; }
.ligne-corps { min-width: 0; }
.ligne-titre { display: block; font-weight: 650; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ligne-chapitre:hover .ligne-titre { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--mv-trait, var(--trait-fort)); }
.ligne-idee { display: block; margin-top: 0.15rem; color: var(--encre-2); font-size: var(--t-s); line-height: 1.4; }
.ligne-duree { font-family: var(--police-code); font-size: var(--t-xs); color: var(--encre-3); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.ligne-etat { display: inline-flex; align-items: center; justify-content: flex-end; gap: 0.35rem; font-size: var(--t-xs); color: var(--encre-3); white-space: nowrap; }
.ligne-etat svg { width: 1rem; height: 1rem; }
.ligne-etat[data-etat="lu"] { color: var(--seve); font-weight: 680; }
.ligne-pastille { width: 0.6rem; height: 0.6rem; border-radius: 50%; border: 1.5px solid var(--trait-fort); flex: none; }
.ligne-etat[data-etat="vu"] .ligne-pastille { border-color: var(--mv, var(--contribution)); background: color-mix(in srgb, var(--mv, var(--contribution)) 35%, transparent); }
@media (max-width: 719.98px) {
  .ligne-chapitre { grid-template-columns: 2rem minmax(0, 1fr) auto auto; gap: var(--e-1) var(--e-3); padding-inline: var(--e-1) var(--e-2); }
  .ligne-titre { white-space: normal; }
  .ligne-etat > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Jauges en ligne */
.jauge-ligne { display: inline-flex; align-items: center; gap: var(--e-2); min-width: 7rem; }

/* Le fil des chapitres d'un mouvement : un historique de contributions */
.fil-modules { list-style: none; padding: 0; margin: 0; position: relative; }
.fil-modules li { margin: 0; position: relative; }
.fil-modules li + li { margin-top: 0; }
.fil-modules li::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--trait);
  transform: translateX(-1px);
}
.fil-modules li:first-child::before { top: 50%; }
.fil-modules li:last-child::before { bottom: 50%; }
.fil-modules li:only-child::before { display: none; }
.fil-lien {
  position: relative;
  display: grid;
  grid-template-columns: 1.2rem 1fr;
  gap: var(--e-2);
  align-items: center;
  min-height: 2.6rem;
  padding: var(--e-1) var(--e-2) var(--e-1) 0;
  border-radius: var(--r-2);
  color: var(--encre);
  text-decoration: none;
  font-size: var(--t-s);
  line-height: 1.25;
}
.fil-lien:hover { background: var(--surface-2); }
.fil-noeud {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 2px solid var(--trait-fort);
  background: var(--surface);
}
.fil-lien[data-etat="vu"] .fil-noeud { border-color: var(--contribution); }
.fil-lien[data-etat="fait"] .fil-noeud { border-color: var(--contribution); background: var(--contribution); }
.fil-lien[aria-current="page"] { background: var(--contribution-doux); }
.fil-lien[aria-current="page"] .fil-noeud { box-shadow: 0 0 0 4px var(--contribution-doux), 0 0 0 6px var(--contribution); }
.fil-numero { font-family: var(--police-code); font-size: var(--t-xs); color: var(--encre-3); margin-right: 0.35em; }

/* Choix d'un parcours */
.parcours-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: var(--e-4);
}
.carte-parcours {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  padding: var(--e-5);
  border: 1px solid var(--trait);
  border-radius: var(--r-3);
  background: var(--surface);
  color: var(--encre);
  text-decoration: none;
  transition: border-color var(--duree) var(--courbe), transform var(--duree) var(--courbe), box-shadow var(--duree) var(--courbe);
}
.carte-parcours:hover { border-color: var(--contribution); box-shadow: var(--ombre-2); transform: translateY(-2px); }
.carte-parcours h3 { font-size: var(--t-l); }
.carte-parcours p { color: var(--encre-2); font-size: var(--t-s); }
.carte-parcours-pied { margin-top: auto; padding-top: var(--e-3); display: flex; justify-content: space-between; gap: var(--e-3); align-items: center; }
.carte-parcours[aria-current="true"] { border-color: var(--contribution); box-shadow: inset 0 0 0 1px var(--contribution); }

/* Méthode d'apprentissage */
.methode {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--e-4);
  counter-reset: methode;
}
@media (max-width: 1000px) { .methode { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .methode { grid-template-columns: minmax(0, 1fr); } }
.methode li { list-style: none; margin: 0; padding: var(--e-4) 0 0; border-top: 2px solid var(--encre); }
.methode h3 { font-size: var(--t-m); font-stretch: 112%; margin-bottom: var(--e-2); }
.methode p { color: var(--encre-2); font-size: var(--t-s); }

/* ---------------------------------------------------------------------------
   Page d'un module
   --------------------------------------------------------------------------- */
.page-module {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 46rem) 15.5rem;
  justify-content: center;
  gap: var(--e-6);
  padding: var(--e-6) var(--gouttiere) var(--e-8);
  max-width: 88rem;
  margin-inline: auto;
}
.module-fil, .module-marge {
  position: sticky;
  top: calc(var(--barre-h) + env(safe-area-inset-top, 0px) + var(--e-4));
  align-self: start;
  max-height: calc(100vh - var(--barre-h) - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-bottom: var(--e-4);
}
.module-fil-tete { margin-bottom: var(--e-3); }
.module-fil-tete a { color: var(--encre); text-decoration: none; }
.module-fil-tete .mouvement-verbe { display: block; }
.module-corps { min-width: 0; }
.module-marge { display: flex; flex-direction: column; gap: var(--e-5); font-size: var(--t-s); }
.marge-bloc h2 {
  font-family: var(--police-code);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre-3);
  font-stretch: 100%;
  margin-bottom: var(--e-2);
}
.sommaire-module { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--trait); }
.sommaire-module li { margin: 0; }
.sommaire-module a {
  display: block;
  padding: 0.3rem 0 0.3rem var(--e-3);
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--encre-2);
  text-decoration: none;
  line-height: 1.3;
}
.sommaire-module a:hover { color: var(--encre); }
.sommaire-module a[aria-current="true"] { color: var(--encre); border-left-color: var(--contribution); font-weight: 650; }
.marge-termes { display: flex; flex-wrap: wrap; gap: var(--e-2); }

@media (max-width: 1240px) {
  .page-module { grid-template-columns: minmax(0, 46rem) 14.5rem; }
  .module-fil { display: none; }
}
@media (max-width: 900px) {
  .page-module { grid-template-columns: minmax(0, 1fr); padding-top: var(--e-4); }
  .module-marge { position: static; max-height: none; overflow: visible; order: 2; }
  .module-marge .marge-sommaire { display: none; }
}

.module-entete { display: flex; flex-direction: column; gap: var(--e-3); padding-bottom: var(--e-5); }
.module-reperes { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-2) var(--e-3); }
.module-titre { font-size: var(--t-2xl); }
.module-idee {
  font-size: var(--t-l);
  line-height: 1.48;
  color: var(--encre);
  font-weight: 450;
}
.module-plan-mobile { display: none; }
@media (max-width: 1240px) { .module-plan-mobile { display: block; } }

.bloc { margin-top: var(--e-7); }
.bloc:first-child { margin-top: var(--e-5); }
.bloc > h2 { margin-bottom: var(--e-4); scroll-margin-top: calc(var(--barre-h) + 1.5rem); }
.bloc > h2 .numero-section { font-family: var(--police-code); font-size: 0.5em; font-weight: 600; color: var(--encre-3); vertical-align: 0.35em; margin-right: 0.5em; letter-spacing: 0.04em; }
.texte { max-width: var(--mesure); }
.texte > * + * { margin-top: 0.85em; }
.texte > h3 { margin-top: 1.6em; }
.texte ul, .texte ol { padding-left: 1.3em; }
.texte li { padding-left: 0.2em; }
.texte .source-ligne { color: var(--encre-3); font-size: var(--t-s); }

.module-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--e-3);
  margin-top: var(--e-8);
  padding-top: var(--e-5);
  border-top: 1px solid var(--trait);
}
.module-nav a {
  display: flex;
  flex-direction: column;
  gap: var(--e-1);
  padding: var(--e-4);
  border: 1px solid var(--trait);
  border-radius: var(--r-2);
  color: var(--encre);
  text-decoration: none;
  min-width: 0;
}
.module-nav a:hover { border-color: var(--contribution); background: var(--surface); }
.module-nav .suivant { text-align: right; grid-column: 2; }
.module-nav strong { font-family: var(--police-titre); font-stretch: 108%; font-size: var(--t-m); line-height: 1.25; }

/* ---------------------------------------------------------------------------
   Pages annexes : en-tête commun
   --------------------------------------------------------------------------- */
.page-entete { display: flex; flex-direction: column; gap: var(--e-3); margin-bottom: var(--e-6); max-width: 52rem; }
.page-entete p { color: var(--encre-2); font-size: var(--t-l); line-height: 1.45; }

/* Lexique */
.lexique-outils {
  position: sticky;
  top: calc(var(--barre-h) + env(safe-area-inset-top, 0px));
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-3);
  align-items: center;
  padding-block: var(--e-3);
  background: var(--papier);
  border-bottom: 1px solid var(--trait);
}
.lexique-alphabet { display: flex; flex-wrap: wrap; gap: 2px; }
.lexique-alphabet a {
  display: inline-grid;
  place-items: center;
  min-width: 1.9rem;
  height: 1.9rem;
  border-radius: var(--r-1);
  font-family: var(--police-code);
  font-size: var(--t-s);
  text-decoration: none;
  color: var(--encre-2);
}
.lexique-alphabet a:hover { background: var(--surface-2); color: var(--encre); }
.lexique-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--e-4); margin-top: var(--e-5); }
.lexique-lettre { grid-column: 1 / -1; font-family: var(--police-titre); font-stretch: 125%; font-size: var(--t-xl); font-weight: 850; color: var(--encre-3); margin-top: var(--e-4); scroll-margin-top: 9rem; }
.definition {
  padding: var(--e-4);
  border: 1px solid var(--trait);
  border-radius: var(--r-2);
  background: var(--surface);
  scroll-margin-top: 9rem;
}
.definition:target { border-color: var(--contribution); box-shadow: inset 0 0 0 1px var(--contribution); }
.definition h3 { font-size: var(--t-m); font-stretch: 108%; margin-bottom: var(--e-2); }
.definition p { color: var(--encre-2); font-size: var(--t-s); }
.definition-liens { display: flex; flex-wrap: wrap; gap: var(--e-2); margin-top: var(--e-3); }

/* Carnet, révisions, projet */
.tableau-bord { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: var(--e-4); }
.panneau {
  padding: var(--e-5);
  border: 1px solid var(--trait);
  border-radius: var(--r-3);
  background: var(--surface);
}
.panneau > h2, .panneau > h3 { margin-bottom: var(--e-3); }
.panneau > p + * { margin-top: var(--e-3); }
.section-page { margin-top: var(--e-7); }
.section-page > h2 { margin-bottom: var(--e-4); }

/* ---------------------------------------------------------------------------
   Dialogues : recherche et réglages
   --------------------------------------------------------------------------- */
.dialogue-fond {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: calc(env(safe-area-inset-top, 0px) + 8vh) var(--e-4) var(--e-4);
  background: var(--voile);
  animation: apparition 160ms var(--courbe);
}
.dialogue {
  width: min(100%, 40rem);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--trait);
  border-radius: var(--r-3);
  background: var(--papier);
  box-shadow: var(--ombre-3);
  overflow: hidden;
}
.dialogue-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--e-3); padding: var(--e-4) var(--e-5); border-bottom: 1px solid var(--trait); }
.dialogue-tete h2 { font-size: var(--t-l); }
.dialogue-corps { padding: var(--e-5); overflow-y: auto; }
.dialogue-pied { padding: var(--e-3) var(--e-5); border-top: 1px solid var(--trait); color: var(--encre-3); font-size: var(--t-xs); display: flex; gap: var(--e-4); flex-wrap: wrap; }
@keyframes apparition { from { opacity: 0; } to { opacity: 1; } }

.recherche-champ {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  padding: var(--e-3) var(--e-5);
  border-bottom: 1px solid var(--trait);
}
.recherche-champ svg { width: 1.3rem; height: 1.3rem; color: var(--encre-3); flex: none; }
.recherche-champ input {
  flex: 1;
  min-width: 0;
  padding: var(--e-2) 0;
  border: 0;
  background: transparent;
  font-size: var(--t-l);
}
.recherche-champ input:focus-visible { outline: none; }
.recherche-resultats { list-style: none; margin: 0; padding: var(--e-2); overflow-y: auto; }
.recherche-resultats li { margin: 0; }
.recherche-resultat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 var(--e-3);
  padding: var(--e-3);
  border-radius: var(--r-2);
  color: var(--encre);
  text-decoration: none;
}
.recherche-resultat[aria-selected="true"], .recherche-resultat:hover { background: var(--surface-2); }
.recherche-resultat .etiquette { grid-row: span 2; align-self: start; padding-top: 0.2em; min-width: 4.2rem; }
.recherche-resultat strong { font-weight: 680; line-height: 1.3; }
.recherche-resultat span.extrait { color: var(--encre-2); font-size: var(--t-s); line-height: 1.35; }
.recherche-resultat mark { background: var(--pollen-doux); color: inherit; border-radius: 2px; padding: 0 1px; }
.recherche-vide { padding: var(--e-5); color: var(--encre-2); }

.reglages-groupe + .reglages-groupe { margin-top: var(--e-5); }
.reglages-groupe > h3 { font-size: var(--t-s); font-family: var(--police-code); letter-spacing: 0.06em; text-transform: uppercase; color: var(--encre-3); font-stretch: 100%; margin-bottom: var(--e-2); }

/* Toasts */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--e-5));
  z-index: 80;
  transform: translateX(-50%);
  display: grid;
  gap: var(--e-2);
  width: min(calc(100% - 2rem), 28rem);
  pointer-events: none;
}
.toast {
  padding: var(--e-3) var(--e-4);
  border-radius: var(--r-2);
  background: var(--encre);
  color: var(--papier);
  box-shadow: var(--ombre-3);
  font-size: var(--t-s);
  animation: toast 260ms var(--courbe);
}
@keyframes toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Mode focus : la colonne de lecture seule */
:root[data-focus="oui"] .module-fil,
:root[data-focus="oui"] .module-marge { opacity: 0.18; transition: opacity var(--duree) var(--courbe); }
:root[data-focus="oui"] .module-fil:hover,
:root[data-focus="oui"] .module-marge:hover,
:root[data-focus="oui"] .module-fil:focus-within,
:root[data-focus="oui"] .module-marge:focus-within { opacity: 1; }
:root[data-focus="oui"] .pied { display: none; }

/* ---------------------------------------------------------------------------
   Lecteur de chapitre
   --------------------------------------------------------------------------- */
.module-fil-tete .mouvement-verbe {
  display: block;
  font-family: var(--police-titre);
  font-weight: 840;
  font-stretch: 118%;
  font-size: var(--t-m);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--mv);
}
.module-fil-tete .mouvement-titre { display: block; font-size: var(--t-xs); color: var(--encre-2); line-height: 1.3; margin-top: 0.15rem; }
.page-chapitre .fil-lien[data-etat="vu"] .fil-noeud { border-color: var(--mv); }
.page-chapitre .fil-lien[data-etat="lu"] .fil-noeud { border-color: var(--mv); background: var(--mv); }
.page-chapitre .fil-lien[aria-current="page"] { background: var(--mv-doux); }
.page-chapitre .fil-lien[aria-current="page"] .fil-noeud { box-shadow: 0 0 0 4px var(--mv-doux), 0 0 0 6px var(--mv); }
.page-chapitre .sommaire-module a[aria-current="true"] { border-left-color: var(--mv); }

.lecteur-entete { position: relative; padding-top: var(--e-4); }
.lecteur-entete::before { content: ""; position: absolute; top: 0; left: 0; width: 3rem; height: 4px; border-radius: 2px; background: var(--mv); }
.lecteur-etiquette { margin: 0; }
.lecteur-etiquette a {
  font-family: var(--police-code);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mv);
  text-decoration: none;
}
.lecteur-etiquette a:hover { text-decoration: underline; }
.module-reperes .puce svg { width: 0.9em; height: 0.9em; }
.module-idee {
  display: grid;
  gap: var(--e-1);
  margin-top: var(--e-2);
  padding: var(--e-3) 0 var(--e-3) var(--e-4);
  border-left: 3px solid var(--mv);
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.5;
}
.module-idee .etiquette { color: var(--mv); }

/* Le texte de référence : mesure de lecture sur les blocs de texte, pleine colonne pour le reste */
.texte-chapitre { max-width: none; }
.lecteur > .texte-chapitre { margin-top: var(--e-6); }
.lecteur > .bloc:has(> .amorce) { margin-top: var(--e-5); }
.texte-chapitre > :is(p, ul, ol, h2, h3, h4, blockquote) { max-width: var(--mesure); }
.texte-chapitre > h2 {
  position: relative;
  margin-top: 2.1em;
  font-size: var(--t-xl);
  scroll-margin-top: calc(var(--barre-h) + 1.5rem);
}
.texte-chapitre > h3 { margin-top: 1.6em; font-size: var(--t-l); }
.texte-chapitre > h2 + * { margin-top: 0.7em; }
.texte-chapitre blockquote {
  padding: var(--e-1) 0 var(--e-1) var(--e-4);
  border-left: 3px solid var(--mv, var(--contribution));
  font-size: var(--t-l);
  line-height: 1.45;
  color: var(--encre);
}
.texte-chapitre blockquote > * + * { margin-top: 0.6em; }
.texte-chapitre li > p { margin: 0; }
.texte-chapitre a.externe { overflow-wrap: anywhere; }
.ancre-lien {
  display: inline-grid;
  place-items: center;
  min-width: 1.6rem;
  min-height: 1.6rem;
  margin-left: 0.3rem;
  border-radius: var(--r-1);
  color: var(--encre-3);
  font-family: var(--police-code);
  font-size: 0.6em;
  font-weight: 600;
  text-decoration: none;
  vertical-align: 0.2em;
  opacity: 0;
  transition: opacity var(--duree) var(--courbe);
}
h2:hover > .ancre-lien, .ancre-lien:focus-visible { opacity: 1; }
.ancre-lien:hover { color: var(--mv); background: var(--surface-2); }
@media (hover: none) { .ancre-lien { opacity: 0.55; } }

/* Tableaux */
.tableau { overflow-x: auto; max-width: 100%; border: 1px solid var(--trait); border-radius: var(--r-2); background: var(--surface); }
.tableau table { width: 100%; border-collapse: collapse; font-size: var(--t-s); line-height: 1.45; }
.tableau th, .tableau td { padding: var(--e-2) var(--e-3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--trait); }
.tableau th { font-family: var(--police-titre); font-stretch: 106%; font-weight: 720; background: var(--surface-2); white-space: nowrap; }
.tableau tr:last-child td { border-bottom: 0; }

/* Figures du texte (SVG en ligne, aux couleurs du thème) */
.figure { margin: var(--e-6) 0; }
.figure-image { padding: var(--e-3); border: 1px solid var(--trait); border-radius: var(--r-3); background: var(--surface); }
.figure-image svg { width: 100%; height: auto; }
.figure figcaption { max-width: var(--mesure); margin-top: var(--e-3); font-size: var(--t-s); line-height: 1.45; color: var(--encre-2); }

/* Appels de note et sources */
sup.appel { line-height: 0; }
.appel a {
  display: inline-block;
  min-width: 1.15em;
  padding: 0.05em 0.25em;
  border-radius: var(--r-1);
  font-family: var(--police-code);
  font-size: 0.72em;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  color: var(--service);
}
.appel a:hover { background: var(--service-doux); }
.sources { max-width: var(--mesure); margin-top: var(--e-7); padding-top: var(--e-4); border-top: 1px solid var(--trait); }
.texte-chapitre > .sources { max-width: var(--mesure); }
.sources-titre {
  font-family: var(--police-code);
  font-size: var(--t-xs);
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre-3);
}
.sources-depli { margin-top: var(--e-2); }
.sources-depli > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  min-height: 2.75rem;
  cursor: pointer;
  color: var(--encre-2);
  font-size: var(--t-s);
  font-weight: 620;
  list-style: none;
}
.sources-depli > summary::-webkit-details-marker { display: none; }
.sources-depli > summary::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--duree) var(--courbe);
}
.sources-depli[open] > summary::before { transform: rotate(45deg); }
.sources-depli > summary:hover { color: var(--encre); }
.sources-liste { margin-top: var(--e-2); padding-left: 1.6em; font-size: var(--t-s); line-height: 1.5; color: var(--encre-2); }
.sources-liste li { padding-left: 0.2em; scroll-margin-top: calc(var(--barre-h) + 2rem); }
.sources-liste li + li { margin-top: 0.55em; }
.sources-liste li::marker { font-family: var(--police-code); font-size: 0.9em; }
.sources-liste p { margin: 0; display: inline; }
.retour-appel { display: inline-block; margin-left: 0.3em; padding: 0 0.3em; border-radius: var(--r-1); text-decoration: none; font-weight: 700; }
.retour-appel:hover { background: var(--service-doux); }
.cible-visee { animation: viser 1.5s var(--courbe); border-radius: var(--r-1); }
@keyframes viser { 0%, 30% { background: var(--pollen-doux); box-shadow: 0 0 0 4px var(--pollen-doux); } 100% { background: transparent; box-shadow: 0 0 0 4px transparent; } }

/* Ateliers dans le texte, « Se souvenir », fin de chapitre */
.texte-chapitre > .bloc-atelier { margin-block: var(--e-6); }
.bloc-atelier > .texte + .atelier { margin-top: var(--e-4); }
.bloc-souvenir > h2 { margin-bottom: var(--e-3); }
.bloc-souvenir > .texte { color: var(--encre-2); margin-bottom: var(--e-5); }
.fin-chapitre {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-3);
  margin-top: var(--e-7);
  padding: var(--e-5);
  border: 1px solid var(--trait);
  border-radius: var(--r-3);
  background: var(--surface);
}
.bouton.bouton-mouvement { background: var(--mv, var(--contribution-fond)); border-color: var(--mv, var(--contribution-fond)); color: var(--sur-mv); }
.bouton.bouton-mouvement:hover { background: color-mix(in srgb, var(--mv, var(--contribution)) 82%, var(--encre)); border-color: color-mix(in srgb, var(--mv, var(--contribution)) 82%, var(--encre)); color: var(--sur-mv); }
.bouton[aria-pressed="true"] { background: var(--seve-doux); border-color: var(--seve); color: var(--seve); }
.bouton[aria-pressed="true"]:hover { background: var(--seve-doux); color: var(--encre); }
.bouton.bouton-alerte, .bouton.bouton-alerte:hover { background: var(--alerte-doux); border-color: var(--alerte); color: var(--alerte); }
.marge-actions { display: flex; flex-direction: column; align-items: flex-start; gap: var(--e-2); }
.marge-actions > h2 { margin-bottom: 0; }
.citer-ligne { display: flex; gap: var(--e-2); align-items: flex-start; }
.citer-ligne textarea { flex: 1; min-width: 0; resize: none; font-size: var(--t-s); }
.citer-champ + .citer-champ { margin-top: var(--e-4); }

/* ---------------------------------------------------------------------------
   Sommaire, mouvement, parcours
   --------------------------------------------------------------------------- */
.page-entete-meta { font-size: var(--t-s) !important; color: var(--encre-3) !important; }
.lien-etiquette { text-decoration: none; }
.lien-etiquette:hover { color: var(--encre); text-decoration: underline; }
.lire-reperes { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--e-3); margin-top: var(--e-2); }
.lire-progression { display: inline-flex; align-items: center; gap: var(--e-2); color: var(--encre-2); font-size: var(--t-s); }
.sommaire-complet { display: grid; gap: var(--e-7); max-width: 60rem; }
.sommaire-groupe-tete {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(7rem, 11rem);
  align-items: baseline;
  gap: var(--e-1) var(--e-4);
  padding-bottom: var(--e-3);
  border-bottom: 3px solid var(--mv);
}
.sommaire-groupe-titre { display: flex; align-items: baseline; gap: var(--e-3); font-size: var(--t-xl); font-stretch: 116%; text-transform: uppercase; letter-spacing: 0.01em; }
.sommaire-groupe-titre a { color: var(--encre); text-decoration: none; }
.sommaire-groupe-titre a:hover { color: var(--mv); }
.sommaire-numero { font-family: var(--police-code); font-size: var(--t-s); font-weight: 700; color: var(--mv); }
.sommaire-groupe-tete > p { color: var(--encre-2); font-size: var(--t-s); }
.sommaire-groupe > .sommaire-groupe-titre { padding-bottom: var(--e-3); font-size: var(--t-l); }
/* Écran étroit : les verbes longs d’une traduction (« COMPREENDER ») tiennent dans la largeur */
@media (max-width: 359px) { .sommaire-groupe-tete .sommaire-groupe-titre { font-stretch: 100%; } }
.sommaire-groupe > .liste-chapitres { border-top: 0; }
@media (max-width: 719.98px) {
  .sommaire-groupe-tete { grid-template-columns: auto minmax(0, 1fr); }
  .sommaire-groupe-tete > .jauge-ligne { grid-column: 1 / -1; }
}

.page-mouvement .mouvement-entete h1 { font-stretch: 120%; text-transform: uppercase; letter-spacing: 0.005em; }
.mouvement-entete { border-top: 4px solid var(--mv); padding-top: var(--e-5); }
.mouvement-sous-titre { font-size: var(--t-l) !important; color: var(--encre) !important; font-weight: 600; }
.mouvement-intro { color: var(--encre-2); }
.mv-etiquette .mv-icone svg { width: 1.2rem; height: 1.2rem; }
.page-mouvement .liste-chapitres, .liste-parcours { margin-top: var(--e-4); }
.parcours-fin { margin-top: var(--e-5); color: var(--encre-2); }
.carte-parcours-action { display: inline-flex; align-items: center; gap: var(--e-2); font-weight: 650; font-size: var(--t-s); color: var(--service); }
.carte-parcours-pied .jauge-ligne { flex: 1; min-width: 0; max-width: 11rem; }

/* ---------------------------------------------------------------------------
   Synthèses et atlas
   --------------------------------------------------------------------------- */
.page-synthese { max-width: 62rem; }
.texte-synthese .figure { max-width: 56rem; }
.atlas > .texte { max-width: var(--mesure); }
.atlas-index { margin-block: var(--e-5); }
.atlas-index ul { display: flex; flex-wrap: wrap; gap: var(--e-2); list-style: none; padding: 0; }
.atlas-index li + li { margin-top: 0; }
.atlas-index a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--trait);
  border-radius: 999px;
  background: var(--surface);
  color: var(--encre-2);
  font-size: var(--t-xs);
  font-weight: 600;
  text-decoration: none;
}
.atlas-index a:hover { border-color: var(--contribution); color: var(--encre); }
.atlas-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.5rem), 1fr)); gap: var(--e-4); }
.atlas-famille {
  display: flex;
  flex-direction: column;
  gap: var(--e-3);
  padding: var(--e-5);
  border: 1px solid var(--trait);
  border-top: 3px solid var(--contribution);
  border-radius: var(--r-3);
  background: var(--surface);
  scroll-margin-top: calc(var(--barre-h) + 1.5rem);
}
.atlas-famille h2 { font-size: var(--t-l); }
.atlas-description { color: var(--encre-2); font-size: var(--t-s); }
.atlas-description > * + * { margin-top: 0.6em; }
.atlas-liens { list-style: none; padding: 0; margin-top: var(--e-1); display: grid; gap: var(--e-2); font-size: var(--t-s); }
.atlas-liens li + li { margin-top: 0; }
.atlas-liens a { font-weight: 620; overflow-wrap: anywhere; }
.note-lien { display: block; color: var(--encre-3); font-size: var(--t-xs); }

/* ---------------------------------------------------------------------------
   Lexique, recherche, projet, à propos
   --------------------------------------------------------------------------- */
.champ-filtre {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0 var(--e-3);
  border: 1px solid var(--trait-fort);
  border-radius: var(--r-2);
  background: var(--surface);
}
.champ-filtre:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.champ-filtre svg { width: 1.1rem; height: 1.1rem; color: var(--encre-3); }
.champ-filtre input { flex: 1; min-width: 0; min-height: 2.75rem; border: 0; background: transparent; }
.champ-filtre input:focus-visible { outline: none; }
.lexique-compte { width: 100%; color: var(--encre-3); font-size: var(--t-xs); }
.lexique-lettre[hidden], .definition[hidden] { display: none; }
.definition-liens a { font-size: var(--t-s); }
.definition p a { overflow-wrap: anywhere; }

.recherche-page-champ {
  border: 1px solid var(--trait-fort);
  border-radius: var(--r-3);
  background: var(--surface);
}
.recherche-page-champ:focus-within { outline: 3px solid var(--focus); outline-offset: 1px; }
.recherche-etat { margin: var(--e-3) 0 var(--e-2); color: var(--encre-2); font-size: var(--t-s); }
.page-recherche .recherche-resultats { padding: 0; display: grid; gap: var(--e-1); }
.page-recherche .recherche-resultat { grid-template-columns: 6.5rem minmax(0, 1fr); }
.recherche-intertitre { font-weight: 560; color: var(--encre-2); }
.recherche-resultat strong mark, .recherche-resultat .extrait mark { background: var(--pollen-doux); color: inherit; }
@media (max-width: 560px) {
  .page-recherche .recherche-resultat { grid-template-columns: minmax(0, 1fr); }
  .page-recherche .recherche-resultat .etiquette { grid-row: auto; min-width: 0; }
}

.projet-intro { color: var(--encre-2); font-size: var(--t-m); }
.projet-intro > * + * { margin-top: 0.6em; }
.projet-pas { list-style: none; padding: 0; margin: var(--e-6) 0 0; display: grid; gap: var(--e-3); counter-reset: none; }
.projet-pas li + li { margin-top: 0; }
.projet-carte {
  padding: var(--e-4) var(--e-5);
  border: 1px solid var(--trait);
  border-left: 4px solid var(--trait-fort);
  border-radius: var(--r-3);
  background: var(--surface);
  scroll-margin-top: calc(var(--barre-h) + 1.5rem);
  transition: border-color var(--duree) var(--courbe), background var(--duree) var(--courbe);
}
.projet-carte[data-fait="true"] { border-left-color: var(--seve); background: color-mix(in srgb, var(--seve-doux) 55%, var(--surface)); }
.projet-tete { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--e-3); }
.projet-tete input {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  margin: 0;
  border: 2px solid var(--trait-fort);
  border-radius: var(--r-1);
  background: var(--surface);
  cursor: pointer;
}
.projet-tete input::after { content: ""; width: 0.45rem; height: 0.8rem; margin-top: -0.15rem; border-right: 3px solid var(--sur-mv); border-bottom: 3px solid var(--sur-mv); transform: rotate(45deg) scale(0); transition: transform 160ms var(--courbe); }
.projet-tete input:checked { border-color: var(--seve); background: var(--seve); }
.projet-tete input:checked::after { transform: rotate(45deg) scale(1); }
.projet-tete label { display: flex; align-items: baseline; gap: var(--e-3); cursor: pointer; font-family: var(--police-titre); font-stretch: 108%; font-weight: 740; font-size: var(--t-l); line-height: 1.25; }
.projet-numero { font-family: var(--police-code); font-size: var(--t-s); font-weight: 700; color: var(--encre-3); }
.projet-texte { margin-top: var(--e-3); padding-left: calc(1.6rem + var(--e-3)); color: var(--encre-2); font-size: var(--t-s); max-width: none; }
.projet-suggestion { display: flex; align-items: center; gap: var(--e-2); margin-top: var(--e-2); padding-left: calc(1.6rem + var(--e-3)); }
.projet-note { margin-top: var(--e-2); margin-left: calc(1.6rem + var(--e-3)); border-top: 0; }
.projet-note > summary { min-height: 2.5rem; font-size: var(--t-s); }
.projet-conclusion { margin-top: var(--e-6); padding: var(--e-5); border-radius: var(--r-3); background: var(--surface-2); }
.projet-compte { color: var(--encre-2); font-size: var(--t-s); white-space: nowrap; }

.page-apropos .texte-chapitre > h2 { font-size: var(--t-l); }
.titre-annexe { display: flex; flex-direction: column; gap: var(--e-1); margin-bottom: var(--e-4); }
.page-apropos .section-page.texte > h2 { margin-bottom: var(--e-3); }
.heros-question-source { text-decoration: none; }
.heros-question-source:hover { color: var(--encre); text-decoration: underline; }
.heros-legende { text-align: center; margin-top: var(--e-3); }

/* Pictogramme au début d'un lien dans le texte courant (PDF, etc.) */
:is(p, li) > a:not(.bouton):not(.ligne-chapitre):not(.fil-lien) > svg.icone:first-child { display: inline-block; width: 1em; height: 1em; margin-right: 0.3em; vertical-align: -0.15em; }
.tiroir nav li > a > svg.icone:first-child { width: 1.2em; height: 1.2em; margin-right: 0; }

/* Champs intégrés (recherche, filtre du lexique) : le cadre est porté par leur conteneur */
.recherche-champ input[type="search"], .champ-filtre input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
  width: auto;
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.recherche-champ input[type="search"]:focus-visible, .champ-filtre input[type="search"]:focus-visible { outline: none; border-color: transparent; }

/* Lexique : un glossaire en une colonne, le terme à gauche, sa définition à droite */
.page-lexique .lexique-liste { display: block; max-width: 60rem; margin-top: var(--e-4); }
.page-lexique .lexique-lettre {
  margin: var(--e-6) 0 0;
  padding-bottom: var(--e-2);
  border-bottom: 2px solid var(--encre);
  font-size: var(--t-xl);
  color: var(--encre);
}
.page-lexique .definition {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: var(--e-1) var(--e-5);
  padding: var(--e-4) var(--e-2);
  border: 0;
  border-bottom: 1px solid var(--trait);
  border-radius: 0;
  background: transparent;
}
.page-lexique .definition h3 { grid-row: span 2; margin: 0; font-size: var(--t-m); line-height: 1.3; }
.page-lexique .definition p { color: var(--encre-2); font-size: var(--t-s); }
.page-lexique .definition p + p { margin-top: 0; }
.page-lexique .definition-liens { margin-top: var(--e-1); }
.page-lexique .definition:target { background: var(--contribution-doux); box-shadow: none; border-radius: var(--r-2); }
@media (max-width: 719.98px) {
  .page-lexique .definition { grid-template-columns: minmax(0, 1fr); padding-inline: 0; }
  .page-lexique .definition h3 { grid-row: auto; }
}
.page-projet .jauge-ligne .jauge-texte { display: none; }

/* Très petits écrans : le grand titre de l'accueil tient dans la largeur, même avant le chargement des polices */
@media (max-width: 360px) {
  .heros-titre { font-size: 2.15rem; }
}
.heros-sur-titre .puce { max-width: 100%; white-space: normal; }
/* Étiquettes dans un en-tête de page : petites capitales, jamais au corps du chapeau */
.page-entete p.etiquette, .page-entete .etiquette { font-size: var(--t-xs); line-height: 1.4; color: var(--encre-3); }
.page-entete p.mv-etiquette, .page-entete .mv-etiquette { color: var(--mv); }
/* Lignes de chapitre avec leur idée : tout s'aligne sur la première ligne */
.ligne-chapitre:has(.ligne-idee) { align-items: baseline; }
.ligne-chapitre:has(.ligne-idee) .ligne-etat { align-self: baseline; }
