/* ════════════════════════════════════════════════════════════════════
   FORMATIONS — liste, fiche de détail, lecteur

   Les couleurs, les polices et les boutons viennent du site
   (style.css : --navy, --gold, --ink, --muted, --line, .btn…).
   Rien n'est repris de la maquette sur ce terrain : elle fait foi pour
   la structure et les espacements, le site pour l'apparence.

   Tout est préfixé .fo- pour ne rien bousculer ailleurs.
   ════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   CE QUI EMPECHAIT LE SOMMAIRE DE RESTER A L'ECRAN

   Deux causes, toutes deux invisibles depuis la regle « position:sticky » :

   1. `overflow-x: hidden` sur html et body cree un conteneur de defilement
      et neutralise sticky dans toute la page. `clip` coupe le debordement
      sans creer ce conteneur.
   2. La couche d'animation applique un `transform` a <main>. Un ancetre
      transforme devient le bloc de reference : sticky se cale sur lui, pas
      sur la fenetre, et suit donc le defilement.

   On ne corrige que sur les pages de formation, pour ne rien bousculer
   ailleurs. Les navigateurs sans :has() retrouvent simplement l'ancien
   comportement, ils ne cassent pas.
   ════════════════════════════════════════════════════════════════ */
html:has(body[data-page="formation"]),
html:has(body[data-page="formation-lecture"]) { overflow-x: clip; }
body[data-page="formation"],
body[data-page="formation-lecture"] { overflow-x: clip; }
body[data-page="formation"] #main-content,
body[data-page="formation-lecture"] #main-content {
  transform: none !important;
  animation: none !important;
}

.fo-page,
.fo-lecture {
  --fo-gris: #f4f5f8;
  --fo-pale: #eef0f5;
  --fo-rayon: 14px;
}

.fo-page .wrap,
.fo-lecture .wrap {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.fo-etat {
  width: min(1180px, 92vw);
  margin: 60px auto;
  text-align: center;
  color: var(--muted);
}

/* ─── Éléments communs ─────────────────────────────────────────── */

.fo-oeil {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--gold);
  margin: 0 0 12px;
}

.fo-h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 2.6vw, 31px);
  color: var(--navy); line-height: 1.2; margin: 0 0 20px;
}
.fo-h3 {
  font-family: 'Cinzel', serif;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--navy); line-height: 1.25; margin: 0 0 14px;
}

/* Soulignement doré qui se trace quand la section entre à l'écran. */
.fo-souligne { position: relative; padding-bottom: 14px; }
.fo-souligne::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  height: 3px; width: 72px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s cubic-bezier(.22, .7, .3, 1) .15s;
}
.reveal.is-visible .fo-souligne::after { transform: scaleX(1); }

.fo-p { color: var(--ink); line-height: 1.75; margin: 0 0 16px; font-size: 16px; }
.fo-note { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 12px 0 0; }

.fo-tag {
  display: inline-flex; align-items: center;
  background: linear-gradient(120deg, var(--gold-2), var(--gold));
  color: #2a1f06; font-size: 11px; font-weight: 800;
  letter-spacing: .9px; text-transform: uppercase;
  padding: 6px 13px; border-radius: 30px;
}
.fo-cat {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 30px;
  padding: 6px 13px; font-size: 12.5px; color: var(--muted);
  background: #fff;
}

.fo-sect { padding: 56px 0; }
.fo-sect--gris { background: var(--fo-gris); }
.fo-sect--gris + .fo-sect { padding-top: 56px; }

/* `.section` pose un display qui l'emporte sur l'attribut hidden : sans
   cette regle, une section vide affiche quand meme son titre. */
#prog-formations[hidden],
#prog-autres[hidden],
#prog-vide[hidden] { display: none !important; }

/* Le bouton secondaire du bloc « Derniere formation ». .btn-outline du
   site est pense pour un fond sombre : sur blanc il passe gris. */
.fo-une-actions .btn-outline,
.fo-btn-ligne {
  background: #fff; color: var(--navy);
  border: 1.5px solid var(--navy); border-radius: var(--radius);
  padding: 12px 24px; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .18s, color .18s;
}
.fo-une-actions .btn-outline:hover,
.fo-btn-ligne:hover { background: var(--navy); color: #fff; }

/* ─── Page Programmes : filtres, une, grille ───────────────────── */

.fo-filtres {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none;
}
.fo-filtre {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 30px; padding: 10px 20px; font: inherit; font-size: 14px;
  cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.fo-filtre:hover { border-color: var(--gold); transform: translateY(-1px); }
.fo-filtre[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

.fo-une {
  display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--fo-rayon); overflow: hidden; box-shadow: var(--shadow);
}
.fo-une-img { background: var(--navy); display: grid; place-items: center; padding: 26px; }
.fo-une-img img { width: 100%; max-width: 250px; height: auto; border-radius: 6px; display: block; }
.fo-une-corps { padding: 30px 32px; }
.fo-une-tags { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.fo-une-corps h3 {
  font-family: 'Cinzel', serif; font-size: clamp(20px, 2.3vw, 27px);
  color: var(--navy); line-height: 1.22; margin: 0 0 14px;
}
.fo-une-resume { color: var(--ink); line-height: 1.7; margin: 0 0 18px; }
.fo-une-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 6px; color: var(--ink); font-size: 14.5px; }
.fo-une-meta--pale { color: var(--muted); margin-bottom: 20px; }
.fo-une-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

.fo-grille {
  display: grid; gap: 22px; padding: 0; margin: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.fo-carte { margin: 0; }
.fo-carte-lien {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--fo-rayon);
  overflow: hidden; color: inherit; text-decoration: none;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.fo-carte-lien:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(203, 160, 65, .55); }
.fo-carte-img { display: block; height: 190px; overflow: hidden; background: var(--navy); }
.fo-carte-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.fo-carte-corps { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; gap: 10px; }
.fo-carte-haut { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fo-carte-haut .fo-tag { font-size: 10px; padding: 5px 10px; }
.fo-carte-date { color: var(--muted); font-size: 13px; }
.fo-carte-corps h3 { font-family: 'Cinzel', serif; font-size: 18px; color: var(--navy); line-height: 1.3; margin: 0; }
.fo-carte-corps > span > p,
.fo-carte-corps p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0; }
.fo-carte-bas {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.fo-ouvrir { color: var(--gold); font-weight: 700; }
.fo-carte-lien:hover .fo-ouvrir span { display: inline-block; transform: translateX(3px); transition: transform .2s; }

/* ─── Fiche de détail : bandeau ────────────────────────────────── */

.fo-hero { background: linear-gradient(160deg, #04244d, var(--navy) 62%, #010f24); color: #fff; padding: 44px 0 50px; }
.fo-hero-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 40px; align-items: start; }
.fo-hero .breadcrumb { color: rgba(255, 255, 255, .62); font-size: 13.5px; margin: 0 0 18px; }
.fo-hero .breadcrumb a { color: rgba(255, 255, 255, .82); }
.fo-hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; }
.fo-hero .fo-cat { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .85); }
.fo-hero h1 {
  font-family: 'Cinzel', serif; color: #fff; line-height: 1.16; margin: 0 0 16px;
  font-size: clamp(26px, 3.4vw, 42px);
}
.fo-hero-citation { color: rgba(255, 255, 255, .8); font-size: 16px; line-height: 1.6; margin: 0 0 26px; max-width: 54ch; }
.fo-hero-faits { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; }
.fo-hero-faits > div {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px; padding: 12px 16px; min-width: 128px;
}
.fo-hero-faits dt { font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--gold-2); margin: 0 0 5px; }
.fo-hero-faits dd { margin: 0; font-size: 14.5px; font-weight: 600; color: #fff; line-height: 1.35; }
.fo-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.fo-btn-clair {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, .5); color: #fff; background: transparent;
  border-radius: var(--radius); padding: 12px 24px; font-weight: 600; text-decoration: none;
  transition: background .18s, border-color .18s, color .18s;
}
.fo-btn-clair:hover { background: #fff; color: var(--navy); border-color: #fff; }
.fo-hero-auteur { color: rgba(255, 255, 255, .55); font-size: 13px; margin: 0; }
.fo-hero-img img {
  width: 100%; height: auto; border-radius: 8px; display: block;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .42);
}

/* ─── Résumé, objectifs, programme ─────────────────────────────── */

.fo-resume-grille { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 36px; align-items: start; }
.fo-resume-chiffres { display: grid; gap: 12px; }

.fo-stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--fo-rayon);
  padding: 20px 22px; display: flex; flex-direction: column; gap: 7px;
}
.fo-stat .v { font-family: 'Cinzel', serif; font-size: clamp(26px, 3vw, 34px); color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.fo-stat .n { color: var(--ink); font-size: 14.5px; line-height: 1.55; }
.fo-stat .s { color: var(--muted); font-size: 12.5px; }
.fo-stat.est-fort { background: var(--navy); border-color: var(--navy); }
.fo-stat.est-fort .v { color: #fff; }
.fo-stat.est-fort .n, .fo-stat.est-fort .s { color: rgba(255, 255, 255, .78); }
.fo-stat.est-accent { background: #fdf7e8; border-color: rgba(203, 160, 65, .4); }
.fo-stat.est-accent .v { color: var(--gold); }

.fo-objectifs, .fo-retenir, .fo-chapitres { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.fo-objectifs { grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); }
.fo-objectif { background: #fff; border: 1px solid var(--line); border-radius: var(--fo-rayon); padding: 22px; }
.fo-objectif .n { font-family: 'Cinzel', serif; color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.fo-objectif h3 { font-family: 'Cinzel', serif; font-size: 18px; color: var(--navy); margin: 8px 0 10px; }
.fo-objectif p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }

.fo-demi-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.fo-demi { background: #fff; border: 1px solid var(--line); border-radius: var(--fo-rayon); overflow: hidden; }
.fo-demi-tete { background: var(--navy); color: #fff; padding: 16px 20px; }
.fo-demi-tete span { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold-2); }
.fo-demi-tete h3 { font-family: 'Cinzel', serif; font-size: 18px; margin: 6px 0 0; color: #fff; }
.fo-horaires { width: 100%; border-collapse: collapse; }
.fo-horaires th, .fo-horaires td { padding: 12px 20px; text-align: left; font-size: 14.5px; border-top: 1px solid var(--line); }
.fo-horaires tr:first-child th, .fo-horaires tr:first-child td { border-top: 0; }
.fo-horaires th { font-weight: 700; color: var(--navy); width: 92px; font-variant-numeric: tabular-nums; }
.fo-horaires td { color: var(--ink); }

/* ─── Chiffres clés et graphique « 100 F » ─────────────────────── */

.fo-cartes-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); gap: 16px; margin-bottom: 26px; }

.fo-repart { background: #fff; border: 1px solid var(--line); border-radius: var(--fo-rayon); padding: 26px 28px; margin: 0; }
.fo-repart-titre { font-family: 'Cinzel', serif; font-size: 19px; color: var(--navy); margin: 0 0 20px; }
.fo-barres { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.fo-barre { display: grid; grid-template-columns: minmax(130px, 220px) minmax(0, 1fr) 62px; gap: 16px; align-items: center; font-size: 14px; }
.fo-barre .lab { color: var(--ink); line-height: 1.35; }
.fo-barre.est-fort .lab, .fo-barre.est-fort .val { font-weight: 700; }
.fo-barre .piste { display: block; height: 12px; border-radius: 12px; background: var(--fo-pale); overflow: hidden; }
.fo-barre .jauge {
  display: block; height: 100%; width: var(--part); border-radius: 12px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .95s cubic-bezier(.2, .7, .3, 1);
}
.fo-barre .jauge.est-pleine { transform: scaleX(1); }
.jauge--navy { background: var(--navy); }
.jauge--or { background: linear-gradient(90deg, var(--gold), #a9802c); }
.jauge--pale { background: #8ca0c0; }
.fo-barre .val { text-align: right; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ─── Chapitres, à retenir, support, sources ───────────────────── */

.fo-lire-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 14px; }
.fo-lien-fort { color: var(--gold); font-weight: 700; text-decoration: none; font-size: 14.5px; }
.fo-lien-fort:hover { text-decoration: underline; }

.fo-chapitres { grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); }
.fo-chap-carte {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--fo-rayon);
  padding: 20px; text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.fo-chap-carte:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(203, 160, 65, .55); }
.fo-chap-sur { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.fo-chap-titre { font-family: 'Cinzel', serif; font-size: 16.5px; color: var(--navy); line-height: 1.3; }
.fo-chap-res { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

.fo-retenir { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.fo-retenir li { background: var(--navy); border-radius: var(--fo-rayon); padding: 24px; color: #fff; }
.fo-retenir h3 { font-family: 'Cinzel', serif; font-size: 18px; color: #fff; margin: 0 0 10px; }
.fo-retenir p { color: rgba(255, 255, 255, .76); margin: 0; font-size: 14.5px; line-height: 1.6; }

.fo-bas-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 24px; align-items: start; }
.fo-support { background: #fdf7e8; border: 1px solid rgba(203, 160, 65, .35); border-radius: var(--fo-rayon); padding: 26px; }
.fo-fichier {
  display: flex; align-items: center; gap: 14px; margin-top: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; text-decoration: none; color: inherit;
  transition: transform .18s, box-shadow .18s;
}
.fo-fichier:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.fo-fichier-type {
  flex: none; background: var(--gold); color: #2a1f06; font-weight: 800; font-size: 11px;
  letter-spacing: .8px; padding: 9px 11px; border-radius: 8px;
}
.fo-fichier-nom { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.fo-fichier-nom strong { color: var(--navy); font-size: 14.5px; }
.fo-fichier-nom span { color: var(--muted); font-size: 12.5px; }
.fo-fichier-btn {
  flex: none; background: var(--navy); color: #fff; border-radius: 8px;
  padding: 10px 16px; font-size: 13.5px; font-weight: 600;
}
.fo-sources { background: #fff; border: 1px solid var(--line); border-radius: var(--fo-rayon); padding: 26px; }
.fo-sources-liste { margin: 0; padding-left: 20px; color: var(--ink); }
.fo-sources-liste li { margin-bottom: 9px; line-height: 1.6; font-size: 14.5px; }
.fo-partenaires { padding-top: 0; }
.fo-partenaires .fo-p { color: var(--muted); }

/* ════════════════════════════════════════════════════════════════
   LECTEUR
   ════════════════════════════════════════════════════════════════ */

/* Le bandeau vient juste sous l'en-tete fixe du site, comme dans la
   maquette. On l'a laisse en flux normal : en « sticky », Chrome ajoutait
   un decalage de 58 px des le chargement (l'en-tete fixe et le padding du
   body se cumulent), ce qui creusait un lisere blanc sous le menu. */
.fo-lecture { padding-top: 0; margin-top: 0; }
.fo-bandeau { position: relative; z-index: 40; background: var(--navy); color: #fff; }
.fo-bandeau .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; }
.fo-retour { color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; display: inline-flex; gap: 8px; min-width: 0; }
.fo-retour span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fo-retour:hover { color: var(--gold-2); }
.fo-position { margin: 0; color: rgba(255, 255, 255, .72); font-size: 13.5px; white-space: nowrap; }
.fo-jauge { display: block; height: 3px; background: rgba(255, 255, 255, .14); }
.fo-jauge > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .5s cubic-bezier(.2, .7, .3, 1); }

.fo-lecture-grille { display: grid; grid-template-columns: minmax(0, 268px) minmax(0, 1fr); gap: 40px; align-items: start; padding: 34px 0 60px; }

/* Le sommaire ne quitte jamais l'ecran : c'est le seul moyen de changer de
   chapitre sans remonter. Il se cale sous l'en-tete fixe (58 px), prend au
   plus la hauteur restante, et defile en interne si les chapitres sont trop
   nombreux pour tenir. */
.fo-sommaire {
  /* align-self:start est INDISPENSABLE : sans lui, l'element de grille
     s'etire sur toute la hauteur de la rangee et « sticky » n'a nulle part
     ou glisser — le sommaire defilait avec la page. */
  align-self: start;
  position: sticky; top: 72px;
  max-height: calc(100vh - 88px);
  overflow-y: auto; overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-width: thin; scrollbar-color: #c9cfdb transparent;
}
.fo-sommaire::-webkit-scrollbar { width: 5px; }
.fo-sommaire::-webkit-scrollbar-thumb { background: #c9cfdb; border-radius: 5px; }
/* La couverture quittait 214 px au sommaire, qui se decrochait d'autant
   plus tot en fin de chapitre. Le titre de la formation est deja dans le
   bandeau, et la fiche est a un clic : on la retire ici. */
.fo-som-couv { display: none; }
.fo-som-couv img { width: 100%; height: auto; border-radius: 6px; display: block; box-shadow: var(--shadow); }
.fo-som-titre { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.fo-som-liste { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 7px; }
.fo-som-lien {
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px;
  background: #fff; text-decoration: none; transition: border-color .18s, transform .18s;
}
.fo-som-lien:hover { border-color: var(--gold); transform: translateX(2px); }
.fo-som-lien .sur { font-size: 9.5px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.fo-som-lien .tit { font-size: 13.5px; color: var(--navy); font-weight: 600; line-height: 1.3; }
.fo-som-lien.est-courant { background: var(--navy); border-color: var(--navy); }
.fo-som-lien.est-courant .tit { color: #fff; }
.fo-som-lien.est-courant .sur { color: var(--gold-2); }
.fo-som-support {
  display: block; text-align: center; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--navy); text-decoration: none; background: #fff;
}
.fo-som-support:hover { border-color: var(--gold); color: var(--gold); }

.fo-chapitre { min-width: 0; }
.fo-chap-h1 { font-family: 'Cinzel', serif; font-size: clamp(25px, 3vw, 36px); color: var(--navy); line-height: 1.16; margin: 0 0 8px; }
.fo-chap-h1:focus { outline: none; }
.fo-chap-h1:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 4px; }
.fo-chap-sous { color: var(--muted); font-size: 14px; margin: 0 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }

.fo-corps > * + * { margin-top: 20px; }
.fo-chapeau { font-size: clamp(17px, 1.9vw, 20px); line-height: 1.65; color: var(--navy); font-weight: 500; margin: 0; }
.fo-corps .fo-h2 { margin-top: 38px; }

.fo-liste { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--fo-rayon); overflow: hidden; }
.fo-ligne { display: grid; grid-template-columns: minmax(130px, 232px) minmax(0, 1fr); gap: 18px; padding: 15px 20px; border-top: 1px solid var(--line); }
.fo-ligne:first-child { border-top: 0; }
.fo-ligne dt { font-weight: 700; color: var(--navy); font-size: 14.5px; }
.fo-ligne dd { margin: 0; color: var(--ink); font-size: 14.5px; line-height: 1.6; }

.fo-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 14px; }
.fo-chiffre { background: var(--fo-gris); border-radius: var(--fo-rayon); padding: 18px 20px; display: flex; flex-direction: column; gap: 7px; }
.fo-chiffre .v { font-family: 'Cinzel', serif; font-size: 25px; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.fo-chiffre .n { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.fo-chiffre .s { color: var(--muted); font-size: 12px; }

/* Le seul bloc qui peut dépasser : il défile dans son cadre. */
.fo-tableau-cadre {
  overflow-x: auto; background: #fff; border: 1px solid var(--line);
  border-radius: var(--fo-rayon); -webkit-overflow-scrolling: touch;
}
.fo-tableau-cadre:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fo-tableau { width: 100%; border-collapse: collapse; min-width: 460px; }
.fo-tableau th, .fo-tableau td { padding: 13px 18px; text-align: left; font-size: 14px; line-height: 1.55; border-top: 1px solid var(--line); vertical-align: top; }
.fo-tableau thead th { border-top: 0; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.fo-tableau tbody th { color: var(--navy); font-weight: 700; }
.fo-tableau tbody td { color: var(--ink); }
.fo-tableau thead + tbody tr:first-child th,
.fo-tableau thead + tbody tr:first-child td { border-top: 1px solid var(--line); }

.fo-encadre { border-radius: var(--fo-rayon); padding: 20px 24px; }
.fo-encadre--or { background: #fdf7e8; border: 1px solid rgba(203, 160, 65, .32); }
.fo-encadre--navy { background: var(--navy); color: #fff; }
.fo-encadre--navy h3, .fo-encadre--navy p, .fo-encadre--navy li { color: #fff; }
.fo-surtitre { display: block; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); font-weight: 800; margin-bottom: 8px; }
.fo-encadre h3, .fo-exercice h3 { font-family: 'Cinzel', serif; font-size: 19px; margin: 0 0 10px; }
.fo-encadre h3 { color: var(--navy); }
.fo-encadre p, .fo-exercice p { margin: 0; line-height: 1.65; font-size: 14.5px; }
.fo-encadre ul { margin: 10px 0 0; padding-left: 20px; }
.fo-encadre li { margin-bottom: 6px; line-height: 1.6; font-size: 14.5px; }

.fo-exercice { background: var(--navy); color: #fff; border-radius: var(--fo-rayon); padding: 24px 26px; }
.fo-exercice h3 { color: #fff; }
.fo-exercice p { color: rgba(255, 255, 255, .8); }
.fo-exercice ol { margin: 14px 0 0; padding-left: 22px; }
.fo-exercice li { color: rgba(255, 255, 255, .88); margin-bottom: 9px; line-height: 1.6; font-size: 14.5px; }

.fo-citation {
  margin: 0; border: 1.5px solid var(--navy); border-radius: var(--fo-rayon);
  padding: 24px 28px; font-family: 'Cinzel', serif; font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45; color: var(--navy); background: #fff;
}

.fo-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); }
.fo-nav-lien {
  display: flex; flex-direction: column; gap: 5px; border-radius: 12px; padding: 14px 18px;
  text-decoration: none; border: 1px solid var(--line); background: #fff;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.fo-nav-lien:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(203, 160, 65, .5); }
.fo-nav-lien .lab { font-size: 11.5px; color: var(--muted); }
.fo-nav-lien .tit { font-weight: 700; color: var(--navy); font-size: 14.5px; line-height: 1.3; }
.fo-nav-suiv { text-align: right; background: var(--navy); border-color: var(--navy); }
.fo-nav-suiv .lab { color: var(--gold-2); }
.fo-nav-suiv .tit { color: #fff; }
.fo-nav-fin { text-align: right; background: linear-gradient(120deg, var(--gold-2), var(--gold)); border-color: transparent; }
.fo-nav-fin .lab { color: #5a4512; }
.fo-nav-fin .tit { color: #2a1f06; }

/* ════════════════════════════════════════════════════════════════
   EFFETS — uniquement transform et opacity
   ════════════════════════════════════════════════════════════════ */

.reveal-up { opacity: 0; transform: translateY(26px); transition: opacity .68s ease, transform .68s cubic-bezier(.2, .7, .3, 1); }
.reveal-up.is-visible { opacity: 1; transform: none; }

/* Les enfants d'un groupe en cascade : chacun reçoit son --retard,
   calculé par retardCascade() dans js/effets.js. */
.reveal-stagger > * { opacity: 0; transform: translateY(18px); }
.reveal-stagger > *.est-entre {
  opacity: 1; transform: none;
  transition: opacity .55s ease var(--retard, 0ms), transform .55s cubic-bezier(.2, .7, .3, 1) var(--retard, 0ms);
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 980px) {
  .fo-hero-grille { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .fo-hero-img { max-width: 230px; }
  .fo-resume-grille { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .fo-une { grid-template-columns: minmax(0, 1fr); }
  .fo-une-img { padding: 24px; }
  .fo-une-img img { max-width: 190px; }

  /* Le sommaire passe AU-DESSUS du contenu, comme demandé. */
  .fo-lecture-grille { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* Bande horizontale, collee sous l'en-tete : elle suit le lecteur du haut
     en bas de la page, comme sur grand ecran. */
  .fo-sommaire {
    position: sticky; top: 58px; z-index: 30;
    max-height: none; overflow: visible;
    background: var(--fo-gris); margin: 0 -4vw; padding: 10px 4vw 12px;
    box-shadow: 0 8px 18px -12px rgba(2, 27, 58, .45);
  }
  .fo-som-couv { display: none; }
  .fo-som-titre { display: none; }
  .fo-som-liste { grid-auto-flow: column; grid-auto-columns: minmax(196px, 1fr); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .fo-som-liste > li { scroll-snap-align: start; }
}

@media (max-width: 640px) {
  .fo-sect { padding: 38px 0; }
  .fo-hero { padding: 30px 0 36px; }
  .fo-hero-faits > div { min-width: 108px; padding: 10px 13px; }
  .fo-hero-actions .btn,
  .fo-hero-actions .fo-btn-clair { width: 100%; }
  .fo-ligne { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fo-barre { grid-template-columns: minmax(0, 1fr) 56px; gap: 6px 12px; }
  .fo-barre .lab { grid-column: 1 / -1; }
  .fo-nav { grid-template-columns: minmax(0, 1fr); }
  .fo-nav-suiv, .fo-nav-fin { text-align: left; }
  .fo-fichier { flex-wrap: wrap; }
  .fo-fichier-btn { width: 100%; text-align: center; }
  .fo-une-actions .btn { width: 100%; }
}

/* Personne ne doit subir une animation qu'elle n'a pas voulue. */
@media (prefers-reduced-motion: reduce) {
  .reveal-up,
  .reveal-stagger > *,
  .fo-souligne::after,
  .fo-barre .jauge,
  .fo-jauge > span,
  .fo-carte-lien,
  .fo-chap-carte,
  .fo-nav-lien,
  .fo-fichier,
  .fo-som-lien,
  .fo-filtre {
    transition: none !important;
    animation: none !important;
  }
  .reveal-up, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
  .fo-souligne::after { transform: scaleX(1) !important; }
  .fo-barre .jauge { transform: scaleX(1) !important; }
  .fo-carte-lien:hover, .fo-chap-carte:hover, .fo-nav-lien:hover, .fo-fichier:hover { transform: none !important; }
}
