/* ==========================================================================
   Bastide Royale de Réalmont — maquette HTML
   Jetons issus du design system « Bastide Royale de Réalmont » (Claude Design)
   ========================================================================== */

:root {
  /* Couleurs */
  --creme: #fbefe3;
  --sable: #f4e0cf;
  --papier: #fffaf5;
  --mauve: #b47d86;
  --mauve-encre: #8a5560;
  --turquoise: #a8d4d3;
  --bleu: #325971;
  --bleu-fonce: #1f3a4b;
  --sur-bleu: #ffffff;
  --encre: #1f1a1a;
  --encre-douce: #5b4f4f;
  --rouge-gorge: #e08a1e;
  --trait: #e3cdbd;
  --bleu-pale: #d6e4ec;

  /* Familles */
  --f-titre: "Libre Caslon Text", "Adobe Kis", Georgia, serif;
  --f-texte: "Jost", "Brandon Grotesque", "Futura", system-ui, sans-serif;
  --f-main: "Caveat", "Grandma", "Segoe Print", cursive;

  /* Espacements */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 80px;

  /* Rayons */
  --r-sm: 6px; --r-md: 16px; --r-lg: 32px; --r-pill: 999px;

  --ombre-feuillet: 0 1px 2px rgba(80, 50, 40, .10), 0 8px 24px rgba(80, 50, 40, .10);

  --gutter: 16px;
  --largeur: 1240px;
}

@media (min-width: 960px) {
  :root { --gutter: 32px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
@media (min-width: 960px) { body { font-size: 17px; } }
img { max-width: 100%; display: block; }
a { color: var(--bleu); }
a:hover { color: var(--bleu-fonce); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
sup { line-height: 0; }
q { quotes: none; } /* les guillemets « » sont déjà dans le texte */
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--bleu); color: #fff; border-radius: var(--r-pill); }
.skip:focus { top: 12px; }

.wrap { max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--large { max-width: 1320px; }

/* ---------- Typo ---------- */
.etiquette {
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--bleu);
}
@media (min-width: 960px) { .etiquette--l { font-size: 13px; } }
.etiquette--mauve { color: var(--mauve-encre); }
.etiquette--douce { color: var(--encre-douce); }
.sous-titre { font-style: italic; font-weight: 300; color: var(--mauve-encre); }
.titre { font-family: var(--f-titre); font-weight: 400; }
.main { font-family: var(--f-main); }
.texte p + p { margin-top: var(--s4); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer;
}
.btn svg { flex: 0 0 auto; }
.btn--plein { background: var(--bleu); color: var(--sur-bleu); }
.btn--plein:hover { background: var(--bleu-fonce); color: var(--sur-bleu); }
.btn--contour { border: 2px solid var(--bleu); color: var(--bleu); background: transparent; }
.btn--contour:hover { background: var(--bleu); color: var(--sur-bleu); }
.btn--encre { background: var(--encre); color: var(--creme); min-height: 48px; }
.btn--encre:hover { background: #000; color: var(--creme); }
.btn--creme { background: var(--creme); color: var(--bleu); min-height: 48px; }
.btn--turquoise { background: var(--turquoise); color: var(--encre); min-height: 48px; }
@media (min-width: 960px) { .btn--xl { min-height: 54px; padding: 0 26px; } }

.rond {
  width: 44px; height: 44px; border-radius: var(--r-pill); border: 0; padding: 0;
  display: grid; place-items: center; background: var(--sable); color: var(--encre); cursor: pointer; flex: 0 0 auto;
}
.rond--bleu { background: var(--bleu); color: var(--sur-bleu); }
.rond--creme { background: var(--creme); color: var(--bleu); }

/* ---------- En-tête ---------- */
.entete {
  position: relative; z-index: 20;
  background: var(--creme); border-bottom: 1px solid var(--trait);
}
@media (min-width: 960px) { .entete { position: sticky; top: 0; } }
.entete__in {
  max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gutter);
  min-height: 64px; display: flex; align-items: center; gap: 12px 32px;
}
.wrap--large .entete__in, .entete--large .entete__in { max-width: 1320px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); margin-right: auto; }
.logo:hover { color: var(--encre); }
.logo__disque { width: 30px; height: 30px; border-radius: var(--r-pill); background: var(--turquoise); flex: 0 0 auto; }
.logo__nom { font-family: var(--f-titre); font-size: 18px; line-height: 1.1; }
.logo__lieu { display: block; font-family: var(--f-texte); font-style: italic; font-weight: 300; font-size: 13px; color: var(--mauve-encre); }
.nav { display: none; }
.nav a, .nav button {
  color: var(--encre); text-decoration: none; font-weight: 600; font-size: 16px;
  background: none; border: 0; padding: 8px 0; cursor: pointer;
}
.nav a:hover, .nav button:hover { color: var(--bleu); }
.nav [aria-current="page"], .nav .is-actif { color: var(--bleu); text-decoration: underline; text-underline-offset: 6px; }
.entete__actions { display: flex; align-items: center; gap: 8px; }
.pastille-jeu {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 4px;
  border-radius: var(--r-pill); background: var(--sable); color: var(--encre);
  text-decoration: none; font-weight: 600; font-size: 14px;
}
.pastille-jeu img { width: 36px; height: 36px; }
.pastille-jeu:hover { color: var(--bleu); }
.entete__cta { display: none; }

@media (min-width: 960px) {
  .entete__in { min-height: 80px; }
  .logo { gap: 12px; margin-right: 0; }
  .logo__disque { width: 36px; height: 36px; }
  .logo__nom { font-size: 21px; }
  .logo__lieu { font-size: 14px; }
  .nav { display: flex; flex: 1 1 auto; flex-wrap: wrap; gap: 4px 28px; }
  .pastille-jeu { font-size: 15px; padding-right: 14px; }
  .entete__cta { display: inline-flex; min-height: 48px; padding: 0 22px; }
  .entete__menu { display: none; }
}
/* Entre 960 et 1200 px, le bouton ferait passer la navigation sur deux lignes */
@media (min-width: 960px) and (max-width: 1199px) {
  .entete__cta { display: none; }
}

/* Barre d'étape (mobile) */
.barre-etape { display: flex; flex-direction: column; gap: 10px; padding: 10px var(--gutter) 12px; border-top: 1px solid var(--trait); }
.barre-etape__ligne { display: flex; align-items: center; gap: 12px; }
.barre-etape__ligne .etiquette { flex: 1 1 auto; font-size: 13px; }
.progression { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.progression span { height: 5px; border-radius: var(--r-pill); background: var(--trait); }
.progression .is-trouve { background: var(--rouge-gorge); }
.progression .is-courant { background: var(--bleu); }
@media (min-width: 960px) { .barre-etape { display: none; } }

/* ---------- Menu du parcours (panneau) ---------- */
.menu {
  position: fixed; inset: 0; z-index: 40; background: var(--bleu); color: var(--sur-bleu);
  display: flex; flex-direction: column; overflow: hidden;
  visibility: hidden; opacity: 0; transform: translateY(-12px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.menu.is-ouvert { visibility: visible; opacity: 1; transform: none; transition: opacity .25s ease, transform .25s ease; }
.menu__ilots { position: absolute; right: -60px; bottom: -40px; opacity: .35; transform: rotate(-18deg); pointer-events: none; }
.menu__haut { flex: 0 0 auto; height: 64px; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; max-width: 760px; width: 100%; margin: 0 auto; }
.menu__haut .titre { font-size: 18px; }
.menu__liste { position: relative; flex: 1 1 auto; overflow-y: auto; padding: 8px var(--gutter); max-width: 760px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 2px; }
.menu__liste .etiquette { color: var(--turquoise); padding-bottom: 6px; }
.menu__item {
  display: flex; align-items: center; gap: 14px; min-height: 52px;
  color: var(--sur-bleu); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.menu__item:hover { color: var(--sur-bleu); background: rgba(255, 255, 255, .06); }
.menu__item .titre { flex: 1 1 auto; font-size: 19px; line-height: 1.25; padding: 8px 0; }
.menu__item .main { font-size: 20px; color: var(--turquoise); text-align: right; }
.menu__num {
  flex: 0 0 30px; height: 30px; border-radius: var(--r-pill); display: grid; place-items: center;
  font-size: 14px; font-weight: 600; background: var(--creme); color: var(--bleu);
}
.is-trouve > .menu__num { background: var(--rouge-gorge); color: var(--encre); }
.menu__bas { position: relative; padding: 16px var(--gutter) 28px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 760px; width: 100%; margin: 0 auto; }
.menu__bas .btn--creme:hover { color: var(--bleu-fonce); }
body.menu-ouvert { overflow: hidden; }

/* ---------- Pied de page ---------- */
/* Même pied de page à toutes les tailles : centré, fond bleu-bastide */
.pied { background: var(--bleu); color: var(--sur-bleu); font-size: 14px; line-height: 20px; }
.pied__in {
  max-width: var(--largeur); margin: 0 auto; padding: 36px var(--gutter) 28px;
  display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
}
.pied .titre { font-size: 22px; }
.pied__liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
/* Logos partenaires : sur carte claire, leurs fonds blancs ou orange restent lisibles sur le pied foncé */
.logo-partenaire {
  display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; padding: 8px;
  border-radius: 14px; background: #fff; transition: transform .15s ease;
}
/* Le logo tient dans la carte sans déborder, quel que soit son format (le Centre Tarn est plus haut que large) */
.logo-partenaire img { width: auto; height: auto; max-width: 100%; max-height: 100%; }
.logo-partenaire:hover { transform: translateY(-2px); }
.pied .logo-partenaire:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 3px; }
.pied a { color: var(--sur-bleu); }
.pied a:hover { color: var(--turquoise); }
.pied__credit {
  align-self: stretch; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .18); color: var(--bleu-pale);
}
.pied__credit a { color: var(--bleu-pale); }
@media (min-width: 960px) {
  .pied { font-size: 15px; line-height: 22px; }
  .pied__in { padding: 48px var(--gutter) 32px; gap: 24px; }
  .pied .titre { font-size: 24px; }
}

/* ---------- Motifs décoratifs ---------- */
.ilots { position: absolute; pointer-events: none; transform: rotate(-18deg); }
.vague { position: absolute; background: var(--sable); pointer-events: none; }
.disque-titre { position: relative; padding: 14px 0 0 18px; }
.disque-titre::before {
  content: ""; position: absolute; left: 0; top: 0; width: 86px; height: 86px;
  border-radius: var(--r-pill); background: var(--turquoise);
}
.disque-titre > * { position: relative; }
@media (min-width: 960px) {
  .disque-titre { padding: 20px 0 0 26px; }
  .disque-titre::before { width: 132px; height: 132px; }
}

/* ==========================================================================
   ACCUEIL
   ========================================================================== */
.hero { position: relative; overflow: hidden; }
.hero .ilots { right: -40px; top: -18px; width: 220px; height: 200px; }
.hero .vague { left: -60px; top: 150px; width: 520px; height: 420px; border-radius: 48% 52% 40% 60% / 30% 34% 66% 70%; }
.hero__in { position: relative; max-width: var(--largeur); margin: 0 auto; padding: 40px var(--gutter) 56px; display: flex; flex-wrap: wrap; gap: 32px 56px; align-items: center; }
.hero__texte { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.hero h1 { font-family: var(--f-titre); font-weight: 400; font-size: 52px; line-height: 1; letter-spacing: -.01em; }
.hero .sous-titre { margin-top: 6px; font-size: 24px; line-height: 1.2; }
.hero__intro { margin-top: 10px; font-size: 17px; line-height: 27px; max-width: 52ch; }
.hero__ctas { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.chiffres div { display: flex; flex-direction: column; }
.chiffres .main { font-weight: 700; font-size: 34px; line-height: 1; color: var(--bleu); }
.chiffres span + span { font-size: 13px; line-height: 18px; color: var(--encre-douce); }

.carte-plan {
  position: relative; flex: 1 1 520px; min-width: 0; height: 420px; border-radius: var(--r-lg);
  background: var(--creme); box-shadow: var(--ombre-feuillet); overflow: hidden; /* crème = fond de l'image du plan */
}
/* Carte calée sur la hauteur (fixe) de l'encadré, pas sur sa largeur : les dix
   points tiennent entre le haut et l'encart d'étape, quelle que soit la largeur. */
.carte-plan__fond {
  position: absolute; left: 50%; top: -58px; height: 96%; width: auto; aspect-ratio: 2000 / 1181;
  transform: translateX(-47%);
}
.carte-plan__fond > img { width: 100%; height: 100%; object-fit: contain; }
/* Les dix fiches sont empilées dans la même cellule : l'encart garde la taille
   de la plus grande, seule celle du point choisi est visible. */
.carte-plan__fiches {
  position: absolute; left: 16px; right: 16px; bottom: 16px; max-width: 360px;
  display: grid; border-radius: 20px; background: var(--creme); box-shadow: var(--ombre-feuillet);
}
.carte-plan__fiche { grid-area: 1 / 1; display: flex; gap: 14px; align-items: center; padding: 12px; }
.carte-plan__fiche[hidden] { display: flex; visibility: hidden; }

/* Pins de carte (accueil + plan) */
.pin {
  position: absolute; width: 44px; height: 44px; margin: -44px 0 0 -22px;
  display: grid; place-items: center; padding: 0; border: 0; background: transparent;
  text-decoration: none; cursor: pointer;
}
.pin__goutte {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--bleu); box-shadow: 0 2px 6px rgba(31, 26, 26, .25);
  transition: transform .15s ease;
}
.pin__goutte span { transform: rotate(45deg); font-size: 15px; font-weight: 600; color: var(--sur-bleu); }
.pin:hover .pin__goutte { transform: rotate(-45deg) scale(1.12); }
.pin.is-actif .pin__goutte, .pin[aria-pressed="true"] .pin__goutte { background: var(--rouge-gorge); }
.pin.is-actif .pin__goutte span, .pin[aria-pressed="true"] .pin__goutte span { color: var(--encre); }

.vignette { flex: 0 0 76px; height: 76px; border-radius: 12px; overflow: hidden; background: #fff; }
.vignette img, .carte-etape__img img, .item-etape__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.fiche__txt { display: flex; flex-direction: column; min-width: 0; }
.fiche__txt .titre { font-size: 20px; line-height: 25px; }
.fiche__txt a { font-size: 15px; }

/* Pierrot */
.pierrot-bulle { display: flex; align-items: flex-end; gap: 4px; }
.pierrot-bulle > img { width: 112px; height: auto; flex: 0 0 auto; }
.bulle {
  position: relative; padding: 14px 18px; background: var(--papier); border-radius: 28px;
  box-shadow: var(--ombre-feuillet); font-family: var(--f-main); font-weight: 500;
  font-size: 23px; line-height: 26px; color: var(--bleu);
}
.pierrot-bulle .bulle { margin-bottom: 58px; }

.jeu { padding: 8px 0 40px; }
.jeu__in { display: flex; flex-direction: column; gap: 16px; }
.jeu__bande {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 22px 20px; border-radius: 28px; background: var(--turquoise);
}
.jeu__pierrot { display: none; }
.jeu__parole { display: none; }
.jeu__bande h2 { font-family: var(--f-titre); font-weight: 400; font-size: 24px; line-height: 30px; }
.jeu__bande p { font-size: 16px; line-height: 25px; max-width: 56ch; }
.jeu__lettres { display: flex; flex-direction: column; gap: 12px; }
.jeu__lettres .btn { align-self: flex-start; }
.lettres { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.lettre {
  height: 40px; border-radius: var(--r-sm); border: 2px dashed var(--bleu); background: var(--papier);
  display: grid; place-items: center; font-family: var(--f-main); font-weight: 700; font-size: 24px; color: var(--encre);
}
.lettre.is-trouve { background: var(--rouge-gorge); border: 0; }

@media (min-width: 960px) {
  .jeu { padding: 0 0 96px; }
  .jeu__in > .pierrot-bulle { display: none; }
  .jeu__bande { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 32px 48px; padding: 40px 48px; border-radius: 40px; }
  .jeu__pierrot { display: block; width: 190px; height: auto; flex: 0 0 auto; margin: -70px 0 -40px; }
  .jeu__txt { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
  .jeu__parole { display: block; font-family: var(--f-main); font-weight: 500; font-size: 28px; line-height: 30px; color: var(--bleu-fonce); }
  .jeu__bande h2 { font-size: 34px; line-height: 40px; }
  .jeu__bande p { font-size: 17px; line-height: 27px; }
  .jeu__lettres { flex: 0 1 380px; min-width: 0; }
  .lettre { height: 46px; font-size: 26px; }
}

/* Parcours */
.parcours { padding: 16px 0 40px; }
.parcours__in { display: flex; flex-direction: column; gap: 14px; }
.parcours__tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.parcours__tete h2 { font-family: var(--f-titre); font-weight: 400; font-size: 30px; line-height: 36px; }
.parcours__tete .sous-titre { display: none; }
.parcours__tete a { font-size: 15px; color: var(--mauve-encre); }
.parcours__grille { display: flex; flex-direction: column; gap: 14px; list-style: none; padding: 0; }

.carte-etape {
  position: relative; display: flex; gap: 14px; align-items: center; padding: 10px; height: 100%;
  background: var(--papier); border-radius: var(--r-md); text-decoration: none; color: var(--encre);
  transition: transform .2s ease, box-shadow .2s ease;
}
.carte-etape:hover { color: var(--encre); transform: translateY(-2px); box-shadow: var(--ombre-feuillet); }
.carte-etape__img { position: relative; flex: 0 0 92px; height: 92px; border-radius: 12px; overflow: hidden; background: #fff; }
/* Mobile : dans le coin haut-gauche de la vignette (10 px de padding de carte + 6 px) */
.carte-etape__num {
  position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: var(--r-pill);
  background: var(--bleu); color: var(--sur-bleu); display: grid; place-items: center; font-size: 14px; font-weight: 600;
}
.is-trouve .carte-etape__num { background: var(--rouge-gorge); color: var(--encre); }
.carte-etape__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.carte-etape__txt .titre { font-size: 19px; line-height: 24px; }
.carte-etape__txt .sous-titre { font-size: 15px; line-height: 20px; }
.carte-etape__txt .etiquette { font-size: 11px; color: var(--encre-douce); }
.carte-etape .etat-trouve { display: none; }
.carte-etape.is-trouve .etat-trouve { display: inline; }
.carte-etape.is-trouve .etat-num { display: none; }

@media (min-width: 960px) {
  .parcours { padding: 0 0 96px; }
  .parcours__in { gap: 32px; }
  .parcours__tete h2 { font-size: 44px; line-height: 50px; }
  .parcours__tete .sous-titre { display: block; margin-top: 4px; font-size: 22px; }
  .parcours__tete > a { display: none; }
  .parcours__grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 24px; }
  .carte-etape { flex-direction: column; align-items: stretch; gap: 0; padding: 0; border-radius: 20px; overflow: hidden; }
  .carte-etape__img { flex: 0 0 auto; height: auto; aspect-ratio: 4 / 3; border-radius: 0; position: static; }
  .carte-etape__num {
    left: auto; right: 18px; top: -24px; width: 46px; height: 46px; font-size: 17px;
  }
  /* Desktop : à cheval sur le haut du bloc texte, à droite */
  .carte-etape__txt { position: relative; padding: 18px 20px 20px; }
  .carte-etape__txt .titre { font-size: 22px; line-height: 28px; }
  .carte-etape__txt .sous-titre { font-size: 17px; line-height: 24px; }
  .carte-etape__txt .etiquette { margin-top: 8px; font-size: 12px; }
}

/* Frise */
.frise { padding: 8px 0 40px; }
.frise__tete { padding: 0 var(--gutter); max-width: var(--largeur); margin: 0 auto; display: flex; flex-direction: column; gap: 4px; }
.frise__occitan { display: none; }
.frise h2 { font-family: var(--f-titre); font-weight: 400; font-size: 26px; line-height: 32px; }
.frise__corps { max-width: 960px; margin: 0 auto; padding: 12px var(--gutter) 0; }
.date {
  align-self: flex-start; padding: 0 6px; border-radius: var(--r-pill);
  background: linear-gradient(transparent 55%, var(--turquoise) 55%);
  font-family: var(--f-main); font-weight: 700; font-size: 34px; line-height: 36px; color: var(--bleu);
}
@media (min-width: 960px) {
  .frise { position: relative; padding: 72px 0 80px; background: var(--sable); }
  .frise__tete { gap: 0; }
  .frise__occitan { display: flex; align-items: center; gap: 12px; font-style: italic; font-weight: 300; font-size: 26px; color: var(--mauve-encre); }
  .frise__occitan img { width: 30px; height: 30px; }
  .frise h2 { margin-top: 14px; font-size: 40px; line-height: 46px; }
  /* Titre centré au-dessus de la ligne de temps centrée */
  .frise__tete { align-items: center; text-align: center; }
  .frise__corps { padding-top: 28px; }
  .frise .quinconce li::before { background: var(--sable); }
  .frise .quinconce li:last-child::before { background: var(--bleu); }
  .date { padding: 0 8px; }
}

/* Infos */
.infos { padding: 0 0 40px; }
.infos__grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.encart { padding: 22px 20px; border-radius: 28px; background: var(--sable); display: flex; flex-direction: column; gap: 10px; }
.encart h2 { font-family: var(--f-titre); font-weight: 400; font-size: 24px; line-height: 30px; }
.encart .discret { color: var(--encre-douce); font-size: 15px; }
.encart--bleu { background: var(--bleu); color: var(--sur-bleu); }
.encart--bleu .etiquette { color: var(--turquoise); }
@media (max-width: 959px) { .encart--bleu { display: none; } }
@media (min-width: 960px) {
  .infos { padding: 88px 0; }
  .encart { padding: 32px; background: var(--papier); }
  .encart--bleu { background: var(--bleu); }
  .encart h2 { font-size: 28px; line-height: 34px; }
  .encart .discret { font-size: 17px; }
}

@media (min-width: 960px) {
  .hero__in { padding: 72px var(--gutter) 96px; }
  .hero .ilots { right: -80px; top: -60px; width: 420px; height: 360px; }
  .hero .vague { left: -120px; top: 220px; width: 900px; height: 520px; border-radius: 48% 52% 40% 60% / 34% 40% 60% 66%; }
  .hero__texte { gap: 18px; }
  .hero h1 { font-size: 88px; line-height: .95; letter-spacing: -.015em; }
  .hero .sous-titre { margin-top: 10px; font-size: 32px; }
  .hero__intro { margin-top: 6px; font-size: 19px; line-height: 30px; }
  .hero__ctas { flex-direction: row; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
  .chiffres { display: none; }
  .carte-plan { height: 520px; }
  .carte-plan__fiches { left: 20px; bottom: 20px; }
}
@media (max-width: 959px) {
  .hero__ctas .btn { width: 100%; }
  .carte-plan { display: none; }
}

/* ==========================================================================
   ÉTAPE
   ========================================================================== */
.etape-page { max-width: 1320px; margin: 0 auto; padding: 0 0 40px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.sommaire { display: none; }
.etape { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }

/* overflow-x: clip coupe le motif d'îlots qui dépasse à droite sans créer de défilement horizontal */
.etape-hero { position: relative; display: flex; flex-direction: column; overflow-x: clip; }
.etape-hero .ilots { right: -36px; top: -24px; width: 180px; height: 170px; }
.etape-hero__txt { position: relative; padding: 32px var(--gutter) 8px; display: flex; flex-direction: column; gap: 18px; }
.ariane { display: none; font-size: 14px; color: var(--encre-douce); }
.ariane a { color: var(--encre-douce); }
.etape-hero h1 { font-family: var(--f-titre); font-weight: 400; font-size: 40px; line-height: 44px; }
.etape-hero .sous-titre { margin-top: 4px; font-size: 22px; line-height: 28px; }
.etape-hero .disque-titre::before { width: 84px; height: 84px; }
.etape-hero .chapo { display: none; }
.badge-lieu {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px;
  border-radius: var(--r-pill); background: var(--bleu); color: var(--sur-bleu); font-size: 13px; font-weight: 600; line-height: 1.3;
}
/* Illustration, légende et pastille « n / 10 » : la pastille est hors de la figure (HTML valide) */
.etape-hero__media { position: relative; margin-top: 12px; padding: 0 8px; }
.etape-hero figure { position: relative; margin: 0; }
.etape-hero figure img { width: 100%; height: auto; mix-blend-mode: multiply; }
/* Voile crème sous l'annotation : contraste garanti quel que soit le fond de l'aquarelle */
.annotation {
  position: absolute; right: 10px; bottom: 18px; max-width: 170px; text-align: right;
  font-family: var(--f-main); font-size: 20px; line-height: 22px; color: var(--encre-douce);
  padding: 4px 8px; border-radius: 10px; background: rgba(251, 239, 227, .88);
}
.numero-etape { display: none; }

.etape-corps { padding: 0 var(--gutter); }
.etape-corps .colonnes { display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 27px; }
.etape-corps .colonnes .chapo-mobile { display: block; }

/* Bandeau occitan */
.occitan {
  position: relative; padding: 30px var(--gutter) 34px; background: var(--sable);
  border-radius: 40% 60% 46% 54% / 4% 3% 5% 4%; display: flex; flex-direction: column; gap: 14px;
}
.occitan__nom { display: flex; align-items: center; gap: 10px; font-style: italic; font-weight: 300; font-size: 26px; line-height: 30px; color: var(--mauve-encre); }
.occitan__nom img { width: 28px; height: 28px; flex: 0 0 auto; }
.occitan__corps { display: flex; flex-direction: column; gap: 14px; font-size: 16px; line-height: 25px; min-width: 0; }
.occitan__corps p + p { margin: 0; }
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.note { background: var(--papier); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.note .main { font-size: 21px; line-height: 23px; }

/* Feuillets illustrés (blocs « fiche ») */
.fiches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.fiche { background: var(--papier); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.fiche__img { background: #fff; aspect-ratio: 4 / 3; overflow: hidden; }
.fiche__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.fiche__img--contain img { object-fit: contain; }
.fiche__corps { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 25px; }
.fiche__corps h3 { font-family: var(--f-titre); font-weight: 400; font-size: 20px; line-height: 26px; }
.fiche__corps .etiquette { color: var(--bleu); }

/* Section générique d'étape */
.bloc { padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 14px; }
.bloc h2 { font-family: var(--f-titre); font-weight: 400; font-size: 26px; line-height: 32px; }
.bloc > p, .bloc .texte { font-size: 17px; line-height: 27px; }
.bloc .intro-douce { color: var(--encre-douce); font-size: 16px; line-height: 25px; }
.illu { background: #fff; border-radius: 20px; overflow: hidden; }
.illu img { width: 100%; height: auto; mix-blend-mode: multiply; }
.illu--libre { background: transparent; border-radius: 0; }
.legende { font-size: 14px; line-height: 20px; color: var(--encre-douce); margin-top: 8px; }
.duo { display: flex; flex-direction: column; gap: 24px; }
.duo__media { min-width: 0; }
.duo__txt { min-width: 0; display: flex; flex-direction: column; gap: 14px; font-size: 17px; line-height: 27px; }

/* Grand chiffre (coudée) */
.mesure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.mesure .date { font-size: 56px; line-height: 58px; }
.mesure .main { font-size: 23px; line-height: 26px; color: var(--encre-douce); }

/* Citation / poème */
.citation { font-family: var(--f-titre); font-size: 22px; line-height: 32px; color: var(--encre); }
.feuillet { background: var(--papier); border-radius: var(--r-lg); box-shadow: var(--ombre-feuillet); padding: 26px 22px; display: flex; flex-direction: column; gap: 12px; }
.feuillet h2, .feuillet h3 { font-family: var(--f-titre); font-weight: 400; font-size: 22px; line-height: 28px; }
.poeme { font-family: var(--f-main); font-size: 24px; line-height: 30px; color: var(--bleu); }
.portraits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.portraits figure { background: #fff; border-radius: 20px; overflow: hidden; aspect-ratio: 1; padding: 12px; }
.portraits img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* Contenus repris des panneaux ------------------------------------------- */
.chapo .source, .chapo-mobile .source {
  display: block; margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--encre-douce); font-style: normal;
}
.legende--hero { padding: 0 8px; }
.note { gap: 6px; }
.note > span:last-child:not(.main) { font-size: 14px; line-height: 20px; color: var(--encre-douce); }
.fiche__accroche { font-size: 21px; line-height: 24px; color: var(--mauve-encre); }

/* « Le sais-tu ? » : tache sable aux bords organiques, écriture manuscrite */
.saistu {
  margin: 0 var(--gutter); padding: 24px 26px; background: var(--sable);
  border-radius: 46% 54% 40% 60% / 22% 26% 74% 78%;
}
.saistu p { font-family: var(--f-main); font-size: 21px; line-height: 25px; }
.saistu .saistu__titre { font-size: 26px; line-height: 28px; color: var(--mauve-encre); margin-bottom: 6px; }

/* Citation posée sur un feuillet */
.citation-feuillet { margin: 0 var(--gutter); }
.citation-feuillet blockquote { margin: 0; }
.citation-feuillet blockquote p { font-family: var(--f-main); font-size: 23px; line-height: 28px; color: var(--bleu); }
.citation-feuillet blockquote p::before { content: "« "; }
.citation-feuillet blockquote p::after { content: " »"; }

/* Page de carnet : croquis + note manuscrite */
.carnet {
  margin: 0 var(--gutter); background: var(--papier); border-radius: 20px; box-shadow: var(--ombre-feuillet);
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
  background-image: radial-gradient(circle at 12px 12px, var(--trait) 5px, transparent 6px);
  background-size: 34px 24px; background-repeat: repeat-x; padding-top: 34px;
}
.carnet img { width: 100%; max-width: 360px; height: auto; align-self: center; mix-blend-mode: multiply; }
.carnet figcaption { font-size: 21px; line-height: 25px; color: var(--encre-douce); }

/* Les deux éléments d'une bastide */
.elements { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.elements li { display: flex; gap: 14px; align-items: flex-start; background: var(--papier); border-radius: var(--r-md); padding: 16px; font-size: 16px; line-height: 25px; }
.elements__n {
  flex: 0 0 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
  background: var(--bleu); color: var(--sur-bleu); font-family: var(--f-titre); font-size: 18px;
}


/* Ligne de temps en quinconce ---------------------------------------------
   Mobile : ligne à gauche, dates à droite.
   ≥ 640 px : ligne au centre, dates alternées et décalées d'un demi-cran
   (chaque date occupe deux rangées de grille, la suivante démarre au milieu). */
.quinconce {
  --pas: 36px; /* largeur de la colonne de la ligne */
  position: relative; list-style: none; margin: 8px 0 0; padding: 0;
  display: grid; grid-template-columns: var(--pas) 1fr; row-gap: 30px;
}
.quinconce::before {
  content: ""; position: absolute; top: 10px; bottom: 10px; left: calc(var(--pas) / 2 - 2px); width: 4px;
  background: radial-gradient(circle, var(--mauve) 1.5px, transparent 2px) center top / 4px 10px repeat-y;
}
.quinconce li { position: relative; grid-column: 2; display: flex; flex-direction: column; gap: 4px; }
.quinconce li::before {
  content: ""; position: absolute; top: 12px; left: calc(-1 * var(--pas) / 2 - 7px);
  width: 9px; height: 9px; border-radius: 50%; background: var(--creme); border: 2.5px solid var(--bleu);
}
.quinconce li:last-child::before { background: var(--bleu); }
.quinconce .date { font-size: 32px; line-height: 34px; }
.quinconce .main { font-size: 20px; line-height: 24px; color: var(--encre-douce); }

@media (min-width: 640px) {
  .quinconce { grid-template-columns: 1fr var(--pas) 1fr; row-gap: 0; column-gap: 0; }
  .quinconce::before { left: calc(50% - 2px); }
  .quinconce li { padding-bottom: 30px; }
  .quinconce li:nth-child(odd) { grid-column: 1; align-items: flex-end; text-align: right; }
  .quinconce li:nth-child(odd) .date { align-self: flex-end; }
  .quinconce li:nth-child(even) { grid-column: 3; }
  .quinconce li:nth-child(odd)::before { left: auto; right: calc(-1 * var(--pas) / 2 - 7px); }
  .quinconce li:nth-child(1) { grid-row: 1 / span 2; }
  .quinconce li:nth-child(2) { grid-row: 2 / span 2; }
  .quinconce li:nth-child(3) { grid-row: 3 / span 2; }
  .quinconce li:nth-child(4) { grid-row: 4 / span 2; }
  .quinconce li:nth-child(5) { grid-row: 5 / span 2; }
  .quinconce li:nth-child(6) { grid-row: 6 / span 2; }
  .quinconce li:nth-child(7) { grid-row: 7 / span 2; }
  .quinconce li:nth-child(8) { grid-row: 8 / span 2; }
  .quinconce li:nth-child(9) { grid-row: 9 / span 2; }
  .quinconce li:nth-child(10) { grid-row: 10 / span 2; }
  .quinconce li:nth-child(11) { grid-row: 11 / span 2; }
  .quinconce li:nth-child(12) { grid-row: 12 / span 2; }
  .quinconce .main { max-width: 34ch; }
}
@media (min-width: 960px) {
  .quinconce { --pas: 56px; }
  .quinconce .date { font-size: 36px; line-height: 38px; }
  .quinconce .main { font-size: 21px; line-height: 25px; }
}

/* Feuillets : poème occitan, frères Guérin de Bouscal */
.poeme-oc, .bouscal { margin: 0 var(--gutter); }
.poeme-oc h2, .bouscal h2 { font-family: var(--f-titre); font-weight: 400; font-size: 24px; line-height: 30px; }
.bouscal__grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px 32px; }
.bouscal__grille p { font-size: 16px; line-height: 25px; }
.bouscal__nom { font-size: 24px !important; line-height: 28px !important; color: var(--bleu); margin-bottom: 4px; }
.bouscal__nom span { font-size: 19px; color: var(--encre-douce); }

/* Introduction du jeu (étape 1, sans question) */
.quiz--intro .quiz__corps p { font-size: 16px; line-height: 25px; }
.quiz--intro .btn { align-self: flex-start; margin-top: 4px; min-height: 48px; }

@media (min-width: 960px) {
  .saistu, .citation-feuillet, .carnet, .poeme-oc, .bouscal { margin: 0; }
  .saistu { padding: 32px 44px; max-width: 640px; }
  .saistu p { font-size: 23px; line-height: 27px; }
  .saistu .saistu__titre { font-size: 28px; }
  .feuillet { transform: rotate(-1deg); }
  .citation-feuillet { max-width: 620px; }
  .citation-feuillet blockquote p { font-size: 26px; line-height: 32px; }
  .carnet { flex-direction: row; align-items: center; gap: 32px; padding: 40px 32px 28px; transform: rotate(1deg); }
  .carnet img { flex: 0 0 300px; }
  .carnet figcaption { font-size: 24px; line-height: 29px; }
  .elements li { font-size: 17px; line-height: 27px; }
  .bouscal__grille p { font-size: 17px; line-height: 27px; }
  .quiz--intro .quiz__corps p { font-size: 17px; line-height: 27px; }
  .note-panneau { display: flex; padding: 20px 0 0; }
}

/* Onglets d'époque */
.onglets {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 4px;
  border-radius: var(--r-pill); background: var(--sable);
}
.onglet {
  min-height: 44px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--encre);
  font-family: var(--f-texte); font-size: 14px; font-weight: 600; cursor: pointer; padding: 0 6px; line-height: 1.15;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.onglet .court { display: inline; }
.onglet .long, .onglet .fleche { display: none; }
.onglet[aria-selected="true"] { background: var(--bleu); color: var(--sur-bleu); }
.panneaux-epoque { display: flex; flex-direction: column; gap: 12px; }
.epoque[hidden] { display: none; }
.epoque { display: flex; flex-direction: column; gap: 12px; }
.epoque__plan { background: var(--papier); border-radius: var(--r-md); padding: 16px; }
.epoque__plan img { width: 100%; height: auto; mix-blend-mode: multiply; }
.epoque .main { font-size: 22px; line-height: 25px; color: var(--encre-douce); }

/* Carte à points (religion) */
.carte-points { position: relative; background: #fff; border-radius: 20px; overflow: hidden; }
.carte-points img { width: 100%; height: auto; mix-blend-mode: multiply; }
.carte-points .pin { margin: -22px 0 0 -22px; }
.carte-points .pin__goutte { width: 30px; height: 30px; border-radius: var(--r-pill); transform: none; background: var(--rouge-gorge); }
.carte-points .pin__goutte span { transform: none; color: var(--encre); font-size: 14px; }
.carte-points .pin:hover .pin__goutte { transform: scale(1.12); }
.legende-points { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px 16px; }
.legende-points li { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 20px; }
.legende-points b {
  flex: 0 0 26px; height: 26px; border-radius: var(--r-pill); background: var(--rouge-gorge);
  display: grid; place-items: center; font-size: 13px;
}

/* Question de Pierrot */
.quiz { margin: 0 var(--gutter); display: flex; flex-direction: column; }
.quiz__pierrot { display: flex; align-items: flex-end; }
.quiz__pierrot img { width: 96px; height: auto; flex: 0 0 auto; margin-bottom: -14px; position: relative; z-index: 1; }
.quiz__pierrot .bulle { margin: 0 0 30px; padding: 12px 16px; border-radius: 24px; font-size: 22px; line-height: 25px; }
.quiz__corps { background: var(--sable); border-radius: 28px; padding: 26px 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.quiz__corps h2 { margin-bottom: 4px; font-family: var(--f-texte); font-size: 17px; line-height: 25px; font-weight: 600; }
.reponses { display: flex; flex-direction: column; gap: 10px; }
.reponse {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px 14px 6px 6px;
  border: 2px solid transparent; border-radius: var(--r-pill); background: var(--papier); color: var(--encre);
  font-family: var(--f-texte); font-size: 16px; line-height: 20px; text-align: left; cursor: pointer;
}
.reponse:hover { border-color: var(--trait); }
.reponse__lettre {
  flex: 0 0 44px; height: 44px; border-radius: var(--r-pill); background: var(--mauve);
  display: grid; place-items: center; font-weight: 600; font-size: 15px; color: var(--encre);
}
.reponse.is-juste { border-color: var(--bleu); }
.reponse.is-juste .reponse__lettre { background: var(--rouge-gorge); }
.reponse.is-faux { opacity: .55; text-decoration: line-through; }
.quiz__retour { min-height: 30px; }
.quiz__retour [hidden] { display: none !important; }
.quiz__bravo { display: flex; align-items: center; gap: 12px; padding-top: 6px; }
.quiz__bravo .lettre-gagnee {
  flex: 0 0 auto; width: 40px; height: 48px; border-radius: var(--r-sm); background: var(--rouge-gorge);
  display: grid; place-items: center; font-family: var(--f-main); font-weight: 700; font-size: 30px; color: var(--encre);
}
.quiz__bravo .main, .quiz__rate { font-family: var(--f-main); font-weight: 500; font-size: 22px; line-height: 25px; color: var(--bleu); }
.quiz__rate { color: var(--mauve-encre); }

/* Étapes voisines */
.voisines { padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.voisine {
  display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: var(--r-md);
  background: var(--papier); color: var(--encre); text-decoration: none;
}
.voisine:hover { color: var(--encre); box-shadow: var(--ombre-feuillet); }
.voisine--suiv { background: var(--bleu); color: var(--sur-bleu); justify-content: flex-end; text-align: right; }
.voisine--suiv:hover { color: var(--sur-bleu); background: var(--bleu-fonce); }
.voisine__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.voisine .etiquette { color: var(--encre-douce); }
.voisine--suiv .etiquette { color: var(--bleu-pale); }
.voisine .titre { font-size: 17px; line-height: 22px; }
.voisine__img { display: none; flex: 0 0 84px; height: 84px; border-radius: 12px; overflow: hidden; background: #fff; }
.voisine__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.voisine--seule { grid-column: 2; }

.note-panneau { padding: 20px var(--gutter) 0; border-top: 1px solid var(--trait); display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 20px; color: var(--encre-douce); }

@media (min-width: 960px) {
  .etape-page { padding: 40px var(--gutter) 80px; }
  .sommaire { position: sticky; top: 104px; flex: 1 1 250px; max-width: 300px; display: flex; flex-direction: column; gap: 6px; }
  .sommaire > .etiquette { color: var(--encre-douce); padding-bottom: 8px; }
  .sommaire__item {
    display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px 0 6px;
    border-radius: var(--r-pill); color: var(--encre); text-decoration: none; font-size: 16px; line-height: 20px;
  }
  .sommaire__item:hover { color: var(--bleu); background: rgba(244, 224, 207, .6); }
  .sommaire__item[aria-current="page"] { background: var(--sable); }
  .sommaire__num {
    flex: 0 0 30px; height: 30px; border-radius: var(--r-pill); display: grid; place-items: center;
    font-size: 14px; font-weight: 600; background: var(--papier); color: var(--encre);
  }
  .sommaire__item.is-trouve .sommaire__num { background: var(--rouge-gorge); }
  .sommaire__item[aria-current="page"] .sommaire__num { background: var(--bleu); color: var(--sur-bleu); }
  .sommaire__carte { margin-top: 14px; border-radius: 20px; overflow: hidden; background: #fff; }
  .sommaire__carte img { width: 100%; height: auto; }
  .sommaire .btn { margin-top: 10px; min-height: 46px; font-size: 16px; }

  .etape { gap: 56px; font-size: 18px; }
  /* Pas de motif d'îlots ici : on laisse dépasser la pastille « n / 10 » comme dans le design */
  .etape-hero { flex-direction: row; flex-wrap: wrap; gap: 32px 48px; align-items: center; overflow-x: visible; }
  .etape-hero .ilots { display: none; }
  .etape-hero__txt { flex: 1 1 380px; min-width: 0; padding: 0; }
  .ariane { display: block; }
  .etape-hero .disque-titre { padding: 20px 0 0 24px; }
  .etape-hero .disque-titre::before { width: 116px; height: 116px; }
  .etape-hero h1 { font-size: 64px; line-height: 1; letter-spacing: -.01em; }
  .etape-hero .sous-titre { margin-top: 8px; font-size: 28px; line-height: 1.2; }
  .etape-hero .chapo { display: block; margin-top: 6px; max-width: 56ch; font-size: 18px; line-height: 1.6; }
  .badge-lieu { padding: 7px 14px 7px 10px; font-size: 14px; }
  .etape-hero__media { flex: 1 1 420px; min-width: 0; margin: 0; padding: 0; }
  .annotation { right: 0; bottom: 24px; max-width: 210px; font-size: 22px; line-height: 24px; }
  .numero-etape {
    position: absolute; right: -10px; top: 6px; width: 96px; height: 82px; display: grid; place-items: center;
    grid-auto-flow: column; align-content: center; justify-content: center;
    background: var(--bleu); color: var(--sur-bleu); border-radius: 58% 42% 46% 54% / 52% 60% 40% 48%;
    font-family: var(--f-titre); font-size: 30px;
  }
  .numero-etape small { font-size: 17px; opacity: .85; }

  .etape-corps { padding: 0; }
  .etape-corps .colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px 48px; font-size: 18px; line-height: 1.6; }
  .etape-corps .colonnes .chapo-mobile { display: none; }

  .occitan { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 24px 40px; padding: 36px 40px; border-radius: 46% 54% 40% 60% / 18% 22% 78% 82%; }
  .occitan--long { border-radius: 40px; align-items: flex-start; }
  .occitan__nom { flex: 1 1 220px; font-size: 32px; line-height: 36px; }
  .occitan__nom img { width: 34px; height: 34px; }
  .occitan__corps { flex: 2 1 420px; font-size: 17px; line-height: 27px; }
  /* Bandeaux longs : nom occitan en tête, puis fiches en bandes horizontales
     (image d'un côté, texte de l'autre, en alternance). Évite les cartes
     étirées et les orphelines d'une grille à deux colonnes. */
  .occitan--long .occitan__nom { flex-basis: 100%; }
  .occitan--long .occitan__corps { flex-basis: 100%; }
  .occitan--long .fiches { display: flex; flex-direction: column; gap: 16px; }
  .occitan--long .fiche { flex-direction: row; align-items: stretch; }
  .occitan--long .fiche:nth-child(even) { flex-direction: row-reverse; }
  .occitan--long .fiche__img { position: relative; flex: 0 0 40%; aspect-ratio: auto; min-height: 240px; background: transparent; }
  .occitan--long .fiche__img img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
  .occitan--long .fiche__corps { flex: 1 1 auto; justify-content: center; padding: 24px 28px; }
  .occitan--long .fiche__corps p { max-width: 62ch; }
  .notes { gap: 16px; }
  .note { padding: 16px 18px; }
  .note .main { font-size: 24px; line-height: 26px; }
  .fiches { gap: 20px; }
  .fiche__corps { font-size: 17px; line-height: 27px; }

  .bloc { padding: 0; gap: 16px; }
  .bloc h2 { font-size: 34px; line-height: 40px; }
  .bloc > p, .bloc .texte { font-size: 18px; line-height: 1.6; }
  .duo { flex-direction: row; flex-wrap: wrap; gap: 32px 48px; align-items: center; }
  .duo__media { flex: 1 1 360px; }
  .duo__txt { flex: 1 1 380px; font-size: 18px; line-height: 1.6; }
  .duo--inverse { flex-direction: row-reverse; }

  .citation { font-size: 28px; line-height: 40px; }
  .feuillet { padding: 36px 40px; }
  .poeme { font-size: 28px; line-height: 34px; }

  .bloc--epoques { display: flex; flex-direction: row; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; }
  .bloc--epoques .epoques__tete { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
  .bloc--epoques .panneaux-epoque { flex: 2 1 420px; min-width: 0; }
  .onglets { display: flex; flex-direction: column; gap: 6px; padding: 0; background: none; border-radius: 0; }
  .onglet { justify-content: space-between; min-height: 50px; padding: 0 18px; font-size: 16px; background: var(--sable); text-align: left; }
  .onglet .court { display: none; }
  .onglet .long, .onglet .fleche { display: inline; }
  .epoque__plan { border-radius: 20px; padding: 24px; }
  .epoque .main { font-size: 25px; line-height: 28px; }

  .quiz { margin: 0; flex-direction: row; flex-wrap: wrap; gap: 24px 40px; align-items: flex-end; padding: 40px; border-radius: 40px; background: var(--sable); }
  .quiz__pierrot { flex: 0 0 auto; flex-direction: column-reverse; align-items: flex-start; gap: 8px; max-width: 220px; }
  .quiz__pierrot img { width: 170px; margin: 0; }
  .quiz__pierrot .bulle { margin: 0; font-size: 24px; line-height: 27px; }
  .quiz__corps { flex: 1 1 420px; min-width: 0; padding: 0; background: none; border-radius: 0; gap: 12px; }
  .quiz__corps h2 { font-size: 20px; line-height: 29px; margin-bottom: 6px; }
  .reponses { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
  .reponse { min-height: 64px; padding: 8px 16px 8px 8px; }
  .reponse__lettre { flex-basis: 46px; height: 46px; }
  .quiz__retour { min-height: 52px; }
  .quiz__bravo .lettre-gagnee { width: 44px; height: 52px; font-size: 32px; }
  .quiz__bravo .main, .quiz__rate { font-size: 26px; line-height: 28px; }

  .voisines { padding: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
  .voisine { border-radius: 20px; }
  .voisine .titre { font-size: 22px; line-height: 28px; }
  .voisine__img { display: block; }
}

/* ==========================================================================
   PLAN
   ========================================================================== */
.plan-page { position: relative; height: calc(100vh - 65px); height: calc(100dvh - 65px); min-height: 560px; overflow: hidden; background: var(--creme); }
.plan-page__carte { position: absolute; inset: 0; overflow: auto; }
/* Largeur recalculée par app.js selon la place visible au-dessus de la fiche d'étape */
.plan-page__fond { position: relative; width: max(100%, 1000px); aspect-ratio: 2000 / 1181; margin: 0 auto; }
.plan-page__fond > img { width: 100%; height: 100%; }
.plan-page__outils { position: absolute; left: 16px; right: 16px; top: 16px; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px; pointer-events: none; }
.plan-page__outils > * { pointer-events: auto; }
.plan-page__outils h1 { font-family: var(--f-titre); font-weight: 400; font-size: 22px; padding: 8px 16px; background: var(--creme); border-radius: var(--r-pill); box-shadow: var(--ombre-feuillet); }
.bascule { display: flex; padding: 4px; border-radius: var(--r-pill); background: var(--sable); font-size: 14px; font-weight: 600; box-shadow: var(--ombre-feuillet); }
.bascule a, .bascule span { padding: 8px 14px; border-radius: var(--r-pill); color: var(--encre); text-decoration: none; }
.bascule .is-actif { background: var(--bleu); color: var(--sur-bleu); }
.plan-fiches {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; background: var(--papier);
  border-radius: 28px 28px 0 0; box-shadow: 0 -8px 24px rgba(80, 50, 40, .14); padding: 10px 16px 24px;
}
.plan-fiches__poignee { display: block; margin: 0 auto 12px; width: 40px; height: 4px; border-radius: var(--r-pill); background: var(--trait); }
/* Les dix fiches sont empilées dans la même cellule : le bloc garde la hauteur
   de la plus grande, la carte au-dessus ne change donc pas de taille au clic. */
.plan-fiches { display: grid; }
.plan-fiches__poignee { grid-row: 1; }
.plan-fiche { grid-row: 2; grid-column: 1; }
.plan-fiche[hidden] { display: flex; visibility: hidden; }
.plan-fiche { display: flex; flex-direction: column; gap: 12px; }
.plan-fiche__haut { display: flex; gap: 14px; align-items: center; }
.plan-fiche .vignette { flex-basis: 104px; height: 104px; border-radius: 14px; }
.plan-fiche .titre { font-size: 21px; line-height: 26px; }
.plan-fiche .sous-titre { font-size: 16px; }
.plan-fiche__actions { display: flex; gap: 10px; }
.plan-fiche__actions .btn--plein { flex: 1 1 auto; min-height: 50px; }
@media (min-width: 960px) {
  .plan-page { height: calc(100vh - 81px); }
  .plan-fiches { left: auto; right: 32px; bottom: 32px; width: 400px; border-radius: 28px; box-shadow: var(--ombre-feuillet); padding: 20px; }
  .plan-fiches__poignee { display: none; }
  .plan-page__outils { left: 32px; right: 32px; top: 24px; }
}

/* ==========================================================================
   JEU — le mot secret
   ========================================================================== */
.jeu-page { position: relative; min-height: calc(100vh - 65px); background: var(--turquoise); overflow: hidden; display: flex; flex-direction: column; }
.jeu-page__vague { position: absolute; left: -80px; right: -80px; bottom: -120px; height: 520px; background: var(--creme); border-radius: 50% 50% 0 0 / 34% 40% 0 0; }
.jeu-page__in { position: relative; flex: 1 1 auto; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px var(--gutter) 28px; display: flex; flex-direction: column; gap: 24px; }
.jeu-page h1 { font-family: var(--f-titre); font-weight: 400; font-size: 40px; line-height: 44px; }
.jeu-page__intro { font-size: 16px; line-height: 25px; max-width: 52ch; margin-top: 10px; }
.sans-coupure { white-space: nowrap; }
/* Le mot reste entier sur une ligne, quelle que soit la largeur */
.grille-mot { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 16px; list-style: none; padding: 0; }
.case {
  height: 64px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--papier); border: 2px dashed var(--bleu);
}
.case.is-trouve { background: var(--rouge-gorge); border: 2px solid var(--rouge-gorge); }
.case__l { font-family: var(--f-main); font-weight: 700; font-size: 32px; line-height: 32px; min-height: 32px; }
.case__n { font-size: 10px; font-weight: 600; color: var(--bleu-fonce); }
.jeu-page__bas { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.jeu-page__bas .pierrot-bulle > img { width: 130px; }
.jeu-page__bas .bulle { margin-bottom: 70px; }
.jeu-page__bas .btn { width: 100%; }
.jeu-page__note { font-size: 14px; line-height: 21px; color: var(--encre-douce); text-align: center; }
.jeu-page__reset { align-self: center; background: none; border: 0; color: var(--encre-douce); text-decoration: underline; cursor: pointer; font-size: 14px; min-height: 44px; }
@media (min-width: 960px) {
  .jeu-page { min-height: calc(100vh - 81px); }
  .jeu-page__in { padding-top: 56px; }
  .jeu-page h1 { font-size: 64px; line-height: 1; }
  .jeu-page__intro { font-size: 19px; line-height: 30px; }
  .grille-mot { gap: 10px; }
  .case { height: 84px; }
  .case__l { font-size: 44px; line-height: 44px; min-height: 44px; }
  .case__n { font-size: 12px; }
  .jeu-page__bas .btn { width: auto; align-self: flex-start; }
  .jeu-page__bas .pierrot-bulle > img { width: 170px; }
}

/* ==========================================================================
   MENTIONS LÉGALES
   ========================================================================== */
.legal { max-width: 820px; margin: 0 auto; padding: 40px var(--gutter) 80px; display: flex; flex-direction: column; gap: 28px; }
.legal h1 { font-family: var(--f-titre); font-weight: 400; font-size: 40px; line-height: 44px; }
.legal section { background: var(--papier); border-radius: 20px; padding: 22px 20px; display: flex; flex-direction: column; gap: 8px; }
.legal h2 { font-family: var(--f-titre); font-weight: 400; font-size: 22px; line-height: 28px; }
@media (min-width: 960px) {
  .legal { padding: 72px var(--gutter) 96px; }
  .legal h1 { font-size: 64px; line-height: 1; }
  .legal section { padding: 28px 32px; }
}

/* Visibilité responsive */
@media (max-width: 959px) { .only-desktop { display: none !important; } }
@media (min-width: 960px) { .only-mobile { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
