/* ==========================================================================
   Groupe AGAU : composants du site
   Charge après tokens.css. Toutes les couleurs, tailles, espacements, rayon et
   durées viennent des variables de tokens.css (les variables ne marchent pas
   dans @media : 768px et 1024px sont recopiés).
   Règles : aucune ombre, un seul rayon, graisses 400/500/600, pas de capitales,
   cibles 44 px minimum, focus visible partout.
   ========================================================================== */

/* ---------- Base : mode clair forcé ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: only light;
  background: var(--color-paper) !important;
  color: var(--color-ink) !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-paper) !important;
  color: var(--color-ink) !important;
  font: var(--weight-regular) var(--text-body)/var(--leading-body) var(--font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page {
  background: var(--color-paper) !important;
  color: var(--color-ink) !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page > * { min-width: 0; }
main { display: block; flex: 1; }

/* Le système est sombre : on rétablit le clair (les jetons le font déjà ; on le répète sur les conteneurs). */
@media (prefers-color-scheme: dark) {
  html, body, .page {
    color-scheme: only light;
    background: var(--color-paper) !important;
    color: var(--color-ink) !important;
  }
}

img { max-width: 100%; height: auto; display: block; }
p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
b, strong { font-weight: var(--weight-semibold); }
button, input, select, textarea { font: inherit; color: inherit; }
main:focus { outline: none; }
[id] { scroll-margin-top: calc(var(--space-16) + var(--space-4)); }
/* Le focus clavier ne doit jamais passer sous l'en-tête collant (65 px) ni sous le sommaire de Formations. */
html { scroll-padding-top: 72px; }
html:has(.toc) { scroll-padding-top: 120px; }

/* ---------- Typographie ---------- */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  color: var(--color-ink);
  text-wrap: balance;
}
h1 { font-size: var(--text-h1); line-height: var(--leading-display); letter-spacing: var(--tracking-h1); }
h2 { font-size: var(--text-h2); line-height: var(--leading-heading); letter-spacing: var(--tracking-h2); }
h3 { font-size: var(--text-h3); line-height: var(--leading-heading); }
h4 { font-size: var(--text-h4); line-height: var(--leading-heading); }
h1 em, h2 em { font-style: normal; color: inherit; }
p, li, dd { text-wrap: pretty; }

a { color: var(--color-viride); text-underline-offset: 3px; }
@media (hover: hover) {
  a:hover { color: var(--color-viride-deep); }
}

:focus-visible {
  outline: var(--focus-ring-width) solid var(--color-focus);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius);
}

.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;
}

.skip {
  position: absolute; left: var(--space-2); top: -100px; z-index: 40;
  min-height: var(--touch-target); display: inline-flex; align-items: center;
  padding: 0 var(--space-4); background: var(--color-ink); color: var(--color-surface);
  border-radius: var(--radius); font-weight: var(--weight-medium);
}
.skip:focus { top: var(--space-2); color: var(--color-surface); }

/* ---------- Mise en page ---------- */
.in {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--page-margin);
}
.section { padding-block: var(--section-padding); }
.section + .section { border-top: var(--rule-width) solid var(--color-rule); }

.kick {
  font: var(--weight-medium) var(--text-secondary)/var(--leading-meta) var(--font-text);
  color: var(--color-viride);
  margin-bottom: var(--space-2);
}
.section-head h2 { margin-bottom: var(--space-4); max-width: 22em; }
.lead { font-size: var(--text-h5); line-height: var(--leading-body); max-width: var(--prose-max); }
.meta { font-size: var(--text-secondary); line-height: var(--leading-body); color: var(--color-slate); }
.note { font-size: var(--text-secondary); color: var(--color-slate); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--space-12); padding: 0 var(--space-6);
  border: 1px solid var(--color-viride); border-radius: var(--radius);
  background: transparent; color: var(--color-viride);
  font: var(--weight-medium) var(--text-body)/1.2 var(--font-text);
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-instant) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-viride); color: var(--color-on-viride); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--color-viride-deep); border-color: var(--color-viride-deep); color: var(--color-on-viride); }
  .btn-outline:hover { background: var(--color-viride-tint); color: var(--color-viride-deep); }
}
.btns { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- En-tête collant et menu ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: var(--color-paper);
  border-bottom: var(--rule-width) solid var(--color-rule);
}
html:not(.js) .site-head { position: static; }
.site-head .in {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0 var(--space-4); min-height: var(--space-16);
}
.logo {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch-target);
  font: var(--weight-semibold) var(--text-h5)/1 var(--font-display);
  color: var(--color-ink); text-decoration: none;
}
@media (hover: hover) {
  .logo:hover { color: var(--color-viride-deep); }
}

.nav-toggle {
  display: none; min-height: var(--touch-target); min-width: var(--touch-target);
  padding: 0 var(--space-4); border: 1px solid var(--color-viride); border-radius: var(--radius);
  background: transparent; color: var(--color-viride); cursor: pointer;
  font: var(--weight-medium) var(--text-secondary)/1 var(--font-text);
  transition: transform var(--duration-instant) var(--ease-out);
}
.nav-toggle:active { transform: scale(0.97); }
.nav-toggle[aria-expanded="true"] { background: var(--color-viride-tint); color: var(--color-viride-deep); }
.js .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

.nav { width: 100%; padding-bottom: var(--space-2); }
.nav ul { display: flex; flex-direction: column; list-style: none; margin: 0; }
.nav a {
  display: flex; align-items: center; min-height: var(--touch-target);
  padding: 0 var(--space-3); border: 1px solid transparent; border-radius: var(--radius);
  color: var(--color-ink); text-decoration: none;
  font: var(--weight-medium) var(--text-secondary)/1.2 var(--font-text);
}
@media (hover: hover) {
  .nav a:hover { background: var(--color-viride-tint); color: var(--color-viride-deep); }
}
.nav a[aria-current="page"] {
  color: var(--color-viride); text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 8px;
}
/* Onglet Avant-Poste : pastille à bord orange, étoile qui scintille, reflet qui passe (le gomme n'est ici qu'un bord et une étoile, jamais du texte). */
.nav a.nav-featured {
  width: fit-content; padding-inline: var(--space-4); border: 1.5px solid var(--color-gomme); border-radius: 999px;
  color: var(--color-viride-deep); font-weight: var(--weight-semibold);
  background: linear-gradient(110deg, transparent 35%, rgba(236, 141, 51, 0.38) 50%, transparent 65%) 200% 0 / 250% 100% no-repeat, #FFF6E9;
  animation: nav-shine 3.4s ease-in-out infinite;
}
.nav a.nav-featured::before {
  content: "\2726"; color: var(--color-gomme); margin-right: var(--space-2); display: inline-block;
  animation: nav-twinkle 2.4s ease-in-out infinite;
}
.nav a.nav-featured[aria-current="page"] { text-decoration: none; box-shadow: inset 0 0 0 1px var(--color-gomme); }
@media (hover: hover) {
  .nav a.nav-featured:hover { color: var(--color-viride); }
}
@keyframes nav-shine { 0%, 55% { background-position: 200% 0, 0 0; } 100% { background-position: -100% 0, 0 0; } }
@keyframes nav-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.35) rotate(18deg); opacity: 0.65; } }
@media (prefers-reduced-motion: reduce) {
  .nav a.nav-featured, .nav a.nav-featured::before { animation: none; }
}

/* Menu replié en mobile, seulement quand le JavaScript est là */
.js .nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  padding: var(--space-2) var(--page-margin) var(--space-4);
  background: var(--color-paper); border-bottom: var(--rule-width) solid var(--color-rule);
}
.js .nav.is-open { display: block; animation: nav-in var(--duration-base) var(--ease-out); }
@keyframes nav-in { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 768px) {
  .nav-toggle, .js .nav-toggle { display: none; }
  .nav, .js .nav { display: block; position: static; width: auto; padding: 0; background: none; border: 0; }
  .nav ul, .js .nav ul { flex-direction: row; gap: var(--space-1); }
  .nav a { padding: 0 var(--space-3); }
}

/* ---------- Pied de page : sombre, dans la continuité du bandeau final ----------
   Logo en blanc, contact, liens rangés en trois colonnes titrées, sans soulignement (souligné au survol). */
.site-foot {
  background: var(--color-ink); color: #C9D6D0;
  padding-block: var(--space-16) var(--space-8); font-size: var(--text-secondary);
}
.site-foot a { color: var(--color-surface); }
.site-foot :focus-visible { outline-color: var(--color-surface); outline-offset: 2px; }
.f-top { display: grid; gap: var(--space-8); }
.f-logo { display: block; width: 9.5rem; height: auto; filter: brightness(0) invert(1); }
.f-tag { max-width: 36ch; margin-top: var(--space-4); line-height: var(--leading-body); }
.f-contact { font-style: normal; display: grid; align-content: start; }
.f-contact span { padding-block: var(--space-2); }
.f-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--gutter); }
/* Titres de colonne : le gomme en texte sur l'encre (6,6:1), seul endroit où il l'est. */
.f-h { margin: 0 0 var(--space-1); font: var(--weight-semibold) var(--text-meta)/1.2 var(--font-text); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-gomme); }
.f-nav ul { list-style: none; margin: 0; padding: 0; }
.f-nav a, .f-contact a { display: flex; align-items: center; min-height: var(--touch-target); text-decoration: none; }
.f-contact a { white-space: nowrap; }
@media (hover: hover) { .f-nav a:hover, .f-contact a:hover { text-decoration: underline; text-underline-offset: 4px; } }
.f-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-6);
  margin-top: var(--space-12); padding-top: var(--space-6); border-top: var(--rule-width) solid rgba(255, 255, 255, 0.14);
  font-size: var(--text-meta); color: #9FB2A9;
}
.f-bottom p { margin: 0; }
@media (min-width: 1024px) {
  .f-top { grid-template-columns: minmax(0, 4fr) minmax(0, 3.6fr) minmax(0, 7fr); gap: var(--space-8); }
  .f-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Accueil : hero et boussole ---------- */
.hero { padding-block: var(--space-12) var(--section-padding); }
.hero .in { display: grid; gap: var(--space-12); }
.hero h1 { margin-bottom: var(--space-6); max-width: 18em; }
.hero .lead { margin-bottom: var(--space-8); }

.compass { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; justify-self: center; }
/* Boussole : l'image du logo s'affiche d'abord ; la 3D la remplace en fondu quand elle est prête. */
.compass-stage { position: absolute; inset: 2%; }
.compass-stage picture { display: contents; }   /* l'image de secours, servie en WebP ou en PNG, se place comme sans <picture> */
.compass-fallback, .compass-3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.compass-fallback { object-fit: contain; transition: opacity var(--duration-slow) var(--ease-out); }
.compass-3d { opacity: 0; pointer-events: none; touch-action: pan-y; transition: opacity var(--duration-slow) var(--ease-out); }
.compass.is-3d .compass-3d { opacity: 1; pointer-events: auto; }
.compass.is-3d .compass-fallback { opacity: 0; }

@media (min-width: 1024px) {
  .hero { padding-top: var(--space-24); }
  .hero .in { grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: center; }
  .hero-text { grid-column: 1 / 8; }
  .compass { grid-column: 8 / 13; }
}

/* ---------- Le vis-à-vis : recherche à gauche, terrain à droite ---------- */
.faces { margin-top: var(--space-8); border-top: 2px solid var(--color-ink); }
.face + .face { border-top: var(--rule-width) solid var(--color-rule); }
.face {
  display: grid; grid-template-columns: var(--rule-accent-width) minmax(0, 1fr);
  column-gap: var(--space-4); row-gap: var(--space-6);
  padding-block: var(--space-8);
}
.face-title { grid-column: 1 / -1; color: var(--c); }
.face-line {
  grid-column: 1; grid-row: 2; display: block; width: var(--rule-accent-width);
  background: var(--color-viride); transform-origin: 50% 0%;
}
.face-research {
  grid-column: 2; grid-row: 2; font-style: italic; color: var(--color-slate);
}
.face-who { display: block; margin-bottom: var(--space-3); }
.face-who strong { display: block; font-style: normal; font-weight: var(--weight-medium); color: var(--color-ink); }
.face-research p + p { margin-top: var(--space-3); }
.face-field { grid-column: 1 / -1; grid-row: 3; min-width: 0; }

/* Mouvement : état initial posé par le JavaScript seulement (amélioration progressive) */
.motion .face-line { transform: scaleY(0); }

.format-list { list-style: none; margin: 0; }
.format-list li { padding-block: var(--space-3); border-top: var(--rule-width) solid var(--color-rule); }
.format-list li:first-child { border-top: 0; padding-top: 0; }
.format-name { font-weight: var(--weight-medium); }
.format-meta { font-size: var(--text-secondary); color: var(--color-slate); }
.format-meta span { display: block; }

.go {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch-target);
  margin-top: var(--space-2); font-weight: var(--weight-medium);
}

@media (min-width: 1024px) {
  .face { grid-template-columns: repeat(12, 1fr); column-gap: 0; row-gap: var(--space-4); padding-block: var(--space-12); }
  .face-research { grid-column: 1 / 5; }
  .face-line { grid-column: 5 / 6; justify-self: center; }
  .face-field { grid-column: 6 / 13; grid-row: 2; }
}

/* ---------- Preuves ---------- */
.label {
  margin: 0 0 var(--space-6); font: var(--weight-medium) var(--text-secondary)/var(--leading-meta) var(--font-text);
  letter-spacing: 0; color: var(--color-viride);
}
/* ---------- Bandeau clients : le même que sur Avant-Poste (mêmes logos, même rendu) ----------
   Le défilement n'existe qu'avec JavaScript et sans mouvement réduit ; sinon, une rangée fixe qui passe à la ligne.
   Il s'arrête au survol et au focus clavier, sans bouton. */
.clients-run { padding-block: var(--space-8) var(--space-12); border-bottom: var(--rule-width) solid var(--color-rule); }
.clients-run .label { margin-bottom: var(--space-4); }
.bande { overflow: hidden; }
.bande-piste { display: flex; width: max-content; max-width: 100%; }
.bande ul { display: flex; flex-wrap: wrap; align-items: center; list-style: none; margin: 0; padding: 0; }
.logo-c {
  flex: none; display: flex; align-items: center; gap: 10px; height: 96px; padding: 0 34px;
  border-right: var(--rule-width) solid var(--color-rule); position: relative;
}
.logo-c img {
  height: var(--h, 52px); width: auto; filter: var(--f, grayscale(1) contrast(1.1)); opacity: 0.85;
  transition: filter var(--duration-slow) var(--ease-out), opacity var(--duration-slow) var(--ease-out);
}
.logo-c b { font: var(--weight-semibold) 13px/1.15 var(--font-text); color: var(--color-slate); }
.logo-c .det {
  font: var(--weight-medium) var(--text-meta)/1.2 var(--font-text); letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--color-slate); white-space: nowrap;
}
/* Sans défilement : la précision est affichée sous le logo. */
.bande:not(.anime) .logo-c { flex-wrap: wrap; height: auto; min-height: 96px; padding: 14px 20px; }
.bande:not(.anime) .logo-c .det { flex-basis: 100%; }
.bande.anime { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.bande.anime .bande-piste { max-width: none; animation: defile 48s linear infinite; }
.bande.anime ul { flex-wrap: nowrap; }
.bande.anime .logo-c .det {
  position: absolute; left: 50%; bottom: -2px; transform: translate(-50%, 6px); opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.bande.anime:hover .bande-piste, .bande.anime:focus-within .bande-piste { animation-play-state: paused; }
.logo-c:hover img, .logo-c:focus-visible img { filter: none; opacity: 1; }
.bande.anime .logo-c:hover .det, .bande.anime .logo-c:focus-visible .det { opacity: 1; transform: translate(-50%, 0); }
@keyframes defile { to { transform: translateX(-50%); } }

/* ---------- Équipe : rangées à filet ---------- */
.team { margin-top: var(--space-8); border-top: 2px solid var(--color-ink); }
.person { display: grid; gap: var(--space-4); padding-block: var(--space-6); border-bottom: var(--rule-width) solid var(--color-rule); }
.person-id { display: flex; align-items: center; gap: var(--space-4); }
.person h3 { font-size: var(--text-h5); line-height: var(--leading-heading); }
.role { font-size: var(--text-secondary); color: var(--color-slate); }
/* Chaque chercheur porte la couleur de sa thématique. */
.person[style*="--c"] { border-top: 3px solid var(--c); }
.person-theme { margin-top: var(--space-1); font: var(--weight-medium) var(--text-secondary)/var(--leading-meta) var(--font-text); color: var(--c); }
.person-bio { max-width: var(--prose-max); }
.avatar {
  outline: var(--rule-width) solid var(--color-rule); outline-offset: calc(-1 * var(--rule-width));
  position: relative; flex: none; width: var(--space-24); height: var(--space-24);
  display: grid; place-items: center; overflow: hidden;
  border-radius: var(--radius); background: var(--color-viride-tint); color: var(--color-viride-deep);
  font: var(--weight-semibold) var(--text-h5)/1 var(--font-display);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
@media (min-width: 768px) {
  .person { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--gutter); align-items: center; }
}
@media (min-width: 1024px) {
  .person { grid-template-columns: repeat(12, 1fr); column-gap: 0; padding-block: var(--space-8); }
  .person-id { grid-column: 1 / 5; }
  .person-bio { grid-column: 6 / 13; }
}

/* ---------- Bandeau final : fond vert profond, boussole du logo en filigrane ----------
   Le gomme n'y est qu'en aplat de bouton (CTA final), jamais en texte. Contrastes : blanc 8,2:1, texte clair 6,1:1. */
.band {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--color-viride-deep); color: var(--color-surface); border-top: 0 !important;
  padding-block: var(--space-16);
}
/* La boussole du logo, entière, en blanc très léger, à droite du bandeau. Elle tourne très lentement. */
.band::before {
  content: ""; position: absolute; z-index: -1; width: 12rem; aspect-ratio: 1;
  right: max(var(--page-margin), calc(50% - var(--content-max) / 2 + var(--page-margin))); top: 50%; transform: translateY(-50%);
  background: url(../img/boussole-agau.svg) center / contain no-repeat;
  filter: brightness(0) invert(1); opacity: 0.1; pointer-events: none;
  animation: boussole-tourne 150s linear infinite;
}
/* Un tour en deux minutes et demie : on le devine plus qu'on ne le voit. La propriété rotate laisse le transform de placement tranquille. */
@keyframes boussole-tourne { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .band::before { animation: none; } }
@media (max-width: 767px) { .band::before { width: 8rem; top: var(--space-8); transform: none; } }
.band h2 { color: var(--color-surface); margin-bottom: var(--space-4); font-size: var(--text-h1); line-height: var(--leading-display); max-width: 16em; }
.band > .in > p, .band-cta > p { color: #D6E6DF; font-size: var(--text-h5); line-height: var(--leading-body); margin-bottom: var(--space-8); max-width: var(--prose-max); }
.band :focus-visible { outline-color: var(--color-surface); }
.band a { color: var(--color-surface); }
.band a.btn-gomme { background: var(--color-gomme); border-color: var(--color-gomme); color: var(--color-on-gomme); }
.band a.btn-onink { border-color: var(--color-surface); color: var(--color-surface); }
@media (hover: hover) {
  .band a.btn-gomme:hover { background: var(--color-gomme); border-color: var(--color-gomme); color: var(--color-on-gomme); text-decoration: underline; text-underline-offset: 4px; }
  .band a.btn-onink:hover { text-decoration: underline; text-underline-offset: 4px; }
}
/* Accueil : le bandeau porte à droite la carte « Résultats et certification Qualiopi ». */
.band-grid { display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 900px) { .band-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: var(--space-12); } }
/* Accueil, écran large : la boussole a sa place à droite des cartes Qualiopi, sans passer dessous. */
@media (min-width: 1180px) { .band-split .band-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem) 12rem; } }
@media (min-width: 900px) and (max-width: 1179px) { .band-split::before { width: 8rem; right: calc(var(--page-margin) + 22rem + var(--space-12)); } }
.band .preuves .label { color: var(--color-surface); margin: 0 0 var(--space-3); font-weight: var(--weight-semibold); }
.band .q-card { color: var(--color-ink); border-color: transparent; }
.band .q-card p { color: var(--color-ink); max-width: none; margin-bottom: 0; font-size: var(--text-body); line-height: var(--leading-body); }
.band .q-card .meta { color: var(--color-slate); font-size: var(--text-secondary); }
.band .q-card a { color: var(--color-viride); }
.band .q-card :focus-visible { outline-color: var(--color-focus); }
.band .q-card .q-fig { font-size: 1.45rem; line-height: 1; }
.band .q-grid { gap: var(--space-3); }
.band .q-card { padding: var(--space-4) var(--space-6); }
.band .q-gauge { gap: var(--space-4); }
.band .q-dial { width: 5rem; }
.band .q-card h4 { font-size: var(--text-h5); }
.band .q-seal { width: 40px; height: 40px; }
.band .q-cert { gap: var(--space-3); }
.band .q-card .q-gauge-text p:first-child { font-size: var(--text-secondary); line-height: 1.4; }

/* ---------- Pages internes : en-tête ---------- */
.page-head { padding-block: var(--space-12) var(--space-12); }
.page-head h1 { margin-bottom: var(--space-6); max-width: 18em; }
.page-head .lead + .lead, .page-head .lead + p { margin-top: var(--space-4); }
.page-head .lead-strong { font-weight: var(--weight-medium); }
@media (min-width: 1024px) { .page-head { padding-top: var(--space-24); padding-bottom: var(--space-16); } }

.facts { display: grid; margin-top: var(--space-8); border-top: 2px solid var(--color-ink); }
.facts > div { padding-block: var(--space-4); border-bottom: var(--rule-width) solid var(--color-rule); }
.facts dt { font-weight: var(--weight-semibold); font-family: var(--font-display); }
.facts dd { color: var(--color-slate); font-size: var(--text-secondary); }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(2, 1fr); column-gap: var(--gutter); } }
@media (min-width: 1024px) { .facts { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Formations : sommaire collant ---------- */
.toc {
  position: sticky; top: var(--space-16); z-index: 20;
  background: var(--color-paper);
  border-top: var(--rule-width) solid var(--color-rule);
  border-bottom: var(--rule-width) solid var(--color-rule);
}
html:not(.js) .toc { top: 0; }
.toc ul {
  display: flex; gap: var(--space-1); list-style: none; margin: 0;
  overflow-x: auto; scrollbar-width: thin;
}
.toc a {
  display: flex; align-items: center; min-height: var(--touch-target); white-space: nowrap;
  padding: 0 var(--space-3); color: var(--color-slate); text-decoration: none;
  font: var(--weight-medium) var(--text-secondary)/1.2 var(--font-text);
  border-bottom: 2px solid transparent; border-radius: 0;
}
@media (hover: hover) {
  .toc a:hover { color: var(--color-viride-deep); background: var(--color-viride-tint); }
}
.toc a[aria-current="true"] { color: var(--color-viride); background: var(--color-viride-tint); border-bottom-color: var(--color-viride); }

.theme, #recherche { scroll-margin-top: calc(var(--space-16) + var(--touch-target) + var(--space-4)); }
.theme { padding-block: var(--space-12); }
.theme .face { padding-block: 0; }
@media (min-width: 1024px) { .theme { padding-block: var(--space-16); } }

/* ---------- Formations : un format ---------- */
.plaquette { margin-bottom: var(--space-4); }
.format { padding-block: var(--space-6); border-top: var(--rule-width) solid var(--color-rule); }
.format:first-of-type { border-top: 0; padding-top: 0; }
.format-kind { font-size: var(--text-secondary); font-style: italic; color: var(--color-slate); margin-bottom: var(--space-1); }
.format-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); }
.format h3, .format h4 { font-size: var(--text-h5); line-height: var(--leading-heading); max-width: 24em; }
.format h3 small, .format h4 small { display: block; margin-top: var(--space-1); font: var(--weight-regular) var(--text-secondary)/var(--leading-body) var(--font-text); color: var(--color-slate); }
.price { font: var(--weight-semibold) var(--text-h5)/1.2 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { display: block; font: var(--weight-regular) var(--text-meta)/var(--leading-meta) var(--font-text); color: var(--color-slate); }
.format dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-1) var(--space-4); margin-block: var(--space-3); font-size: var(--text-secondary); }
.format dt { color: var(--color-slate); }
.format dd { margin: 0; }
.goals { list-style: none; margin: 0 0 var(--space-3); }
.goals li { position: relative; padding-left: var(--space-4); margin-bottom: var(--space-1); }
.goals li::before { content: "\2013"; position: absolute; left: 0; color: var(--color-slate); }
.format-note { font-size: var(--text-secondary); color: var(--color-slate); }
.format-sat { font-size: var(--text-secondary); margin-top: var(--space-1); }
.format .btn { margin-top: var(--space-4); }
.format-status { margin-top: var(--space-4); color: var(--color-slate); font-weight: var(--weight-medium); }
.context-line { padding-top: var(--space-4); border-top: var(--rule-width) solid var(--color-rule); }
.context-line a { display: inline-block; padding-block: var(--space-3); margin-block: calc(-1 * var(--space-3)); font-weight: var(--weight-medium); }

/* ---------- Au-delà des formations ---------- */
.beyond { margin-top: var(--space-8); border-top: 2px solid var(--color-ink); }
.beyond-row { display: grid; gap: var(--space-3); padding-block: var(--space-6); border-bottom: var(--rule-width) solid var(--color-rule); }
.beyond-row p { max-width: var(--prose-max); }
@media (min-width: 1024px) {
  .beyond-row { grid-template-columns: repeat(12, 1fr); column-gap: 0; padding-block: var(--space-8); }
  .beyond-row > div { grid-column: 1 / 5; }
  .beyond-row > .beyond-body { grid-column: 6 / 13; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--space-12); }
.contact-form h2, .contact-aside h2 { font-size: var(--text-h4); margin-bottom: var(--space-3); }
.contact-form .note { margin-bottom: var(--space-6); }
.demande { display: grid; gap: var(--space-1); margin-bottom: var(--space-6); padding: var(--space-3) var(--space-4); background: var(--color-viride-tint); border-left: var(--rule-accent-width) solid var(--color-viride); border-radius: var(--radius); }
.demande[hidden] { display: none; }
.demande-label { font-size: var(--text-secondary); color: var(--color-slate); }
.demande-nom { font: var(--weight-semibold) var(--text-h5)/var(--leading-heading) var(--font-display); }
.demande-theme { font-size: var(--text-secondary); }
.form-grid { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-1); min-width: 0; }
.field label { font-weight: var(--weight-medium); }
.field input, .field select, .field textarea {
  width: 100%; min-height: var(--space-12); padding: var(--space-3);
  background: var(--color-surface); color: var(--color-ink);
  border: 1px solid var(--color-slate); border-radius: var(--radius);
  font: var(--weight-regular) var(--text-body)/1.4 var(--font-text);
}
.field textarea { min-height: 10rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--color-slate); opacity: 1; }
.field [aria-invalid="true"] { border-color: var(--color-error); border-width: 2px; }
.field-error { color: var(--color-error); font-size: var(--text-secondary); font-weight: var(--weight-medium); }
.field-error:empty { display: none; }
.form-actions { display: grid; gap: var(--space-4); justify-items: start; }
.form-status {
  padding: var(--space-3) var(--space-4); max-width: var(--prose-max);
  background: var(--color-viride-tint); color: var(--color-ink);
  border-left: var(--rule-accent-width) solid var(--color-viride); border-radius: var(--radius);
}
.form-status:empty { display: none; }
.form-status.is-error { border-left-color: var(--color-error); }
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--space-12); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .full { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: 0; justify-content: space-between; }
  .contact-grid > .contact-form { padding-right: calc(var(--space-12) + var(--space-8)); }
}

/* Contact simple : le formulaire sur une carte, à côté les coordonnées directes et les trois interlocuteurs
   aux couleurs de leur thématique (comme les fiches de l'équipe sur l'accueil). */
.contact-section { border-top: var(--rule-width) solid var(--color-rule); }
.contact-card { padding: var(--space-6) var(--space-4); background: var(--color-surface); border: var(--rule-width) solid var(--color-rule); border-top: 3px solid var(--color-viride); border-radius: var(--radius); }
@media (min-width: 768px) { .contact-card { padding: var(--space-8); } }
@media (min-width: 1024px) { .contact-grid > .contact-form.contact-card { padding-right: var(--space-8); } .contact-grid { column-gap: var(--space-16); } }
.direct { display: grid; margin-bottom: var(--space-3); }
.direct a {
  display: flex; align-items: center; min-height: var(--touch-target); overflow-wrap: anywhere;
  font: var(--weight-semibold) var(--text-h5)/1.25 var(--font-display); color: var(--color-ink);
}
.contacts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--color-ink); }
.contacts li { display: flex; gap: var(--space-4); align-items: center; padding-block: var(--space-4); border-bottom: var(--rule-width) solid var(--color-rule); }
.contacts li > div:last-child { display: grid; min-width: 0; }
.contacts .person-theme { margin-top: 0; }
.contacts a { display: flex; align-items: center; min-height: var(--touch-target); overflow-wrap: anywhere; font-size: var(--text-secondary); }
.avatar-sm { width: var(--space-16); height: var(--space-16); font-size: var(--text-body); border-bottom: 3px solid var(--c); }
.contact-aside { display: grid; gap: var(--space-12); align-content: start; }
.rows { list-style: none; margin: 0; border-top: var(--rule-width) solid var(--color-rule); }
.rows li { display: grid; padding-block: var(--space-2); border-bottom: var(--rule-width) solid var(--color-rule); }
.rows .note { margin-top: var(--space-2); }
.rows a, .rows .row-link {
  display: flex; align-items: center; min-height: var(--touch-target); overflow-wrap: anywhere;
}
.rows strong { margin-top: var(--space-2); }
address { font-style: normal; margin-bottom: var(--space-1); }

/* ---------- Pages légales : texte long ---------- */
.legal { padding-block: var(--space-12) var(--section-padding); }
.legal h1 { margin-bottom: var(--space-3); }
.legal .meta { margin-bottom: var(--space-8); }
.prose { max-width: var(--prose-max); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { font-size: var(--text-h4); line-height: var(--leading-heading); letter-spacing: 0; margin-top: var(--space-12); }
.prose h2 + * { margin-top: var(--space-3); }
.prose ul { list-style: disc; padding-left: var(--space-6); }
.prose li + li { margin-top: var(--space-2); }
.prose dl { display: grid; gap: var(--space-1) var(--space-4); }
.prose dt { font-weight: var(--weight-medium); }
.prose dd { margin: 0 0 var(--space-3); }
.prose a { display: inline-block; padding-block: var(--space-3); margin-block: calc(-1 * var(--space-3)); }
.lines { list-style: none; padding: 0 !important; }
.toc-legal { max-width: var(--prose-max); margin-bottom: var(--space-8); border: 1px solid var(--color-rule); border-radius: var(--radius); background: var(--color-surface); }
.toc-legal summary {
  display: flex; align-items: center; min-height: var(--touch-target); padding: 0 var(--space-4);
  cursor: pointer; font-weight: var(--weight-medium);
}
.toc-legal ol { list-style: none; margin: 0; padding: 0 var(--space-4) var(--space-3); }
.toc-legal a { display: flex; align-items: center; min-height: var(--touch-target); }
@media (min-width: 768px) {
  .prose dl.defs { grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); }
  .prose dl.defs dd { margin-bottom: 0; }
}
@media (min-width: 1024px) { .legal { padding-top: var(--space-16); } }

/* ---------- Mouvement réduit : rien ne bouge ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn, .nav-toggle { transition: none; }
  .btn:active, .nav-toggle:active { transform: none; }
  .js .nav.is-open { animation: none; }
}
