/* =====================================================================
   30 — SECTIONS ET MISES EN PAGE
   Une section = <section class="section section--THEME"> + un « motif de mise en page ».
   Les motifs sont volontairement différents pour que deux sections voisines ne se ressemblent pas :
     .split            image + texte, côte à côte (image à gauche ou à droite)
     .card-grid        grille de cartes
     .stacked-rows     liste de lignes (étiquette + texte)
     .tag-list         nuage de pastilles
     .quote-band       citation centrée
     .timeline         étapes verticales
     .flow-pair        deux blocs reliés par une flèche
     .cta-band         bandeau d'appel à l'action
   Les couleurs viennent des variables --section-* définies par le thème de la section.
===================================================================== */

/* ---- Thèmes de section : chacun définit les variables --section-* ---- */
.section {
  --section-bg: var(--color-ivory);
  --section-text: var(--color-ink);
  --section-muted: var(--text-muted-on-light);
  --section-line: var(--line-on-light);
  --section-accent: var(--color-orange-text);   /* petits titres, détails */
  --section-surface: var(--color-white);         /* fond des cartes */
  background: var(--section-bg); color: var(--section-text);
  padding: var(--section-space) 0;
}
.section--light { --section-bg: var(--color-ivory); }     /* thème par défaut, nommé pour la lisibilité du HTML */
.section--peach { --section-bg: #fde6c8; }
.section--brand { --section-bg: var(--color-orange); --section-muted: var(--text-muted-on-brand); --section-line: var(--line-on-brand); --section-accent: var(--color-ink); --section-surface: rgba(255,246,234,.3); }
.section--brand-deep { --section-bg: var(--color-orange-deep); --section-muted: var(--text-muted-on-brand); --section-line: var(--line-on-brand); --section-accent: var(--color-ink); --section-surface: rgba(255,246,234,.26); }
.section--brown { --section-bg: var(--color-brown); --section-text: var(--color-white); --section-muted: var(--text-muted-on-dark); --section-line: var(--line-on-dark); --section-accent: #f4a955; --section-surface: rgba(255,255,255,.08); }
/* Thèmes des pôles (couleurs imposées) */
.section--lab, .section--tech { --section-muted: var(--text-muted-on-brand); --section-line: var(--line-on-brand); --section-accent: var(--color-ink); --section-surface: rgba(255,255,255,.24); }
.section--academy, .section--impact { --section-text: var(--color-white); --section-muted: var(--text-muted-on-dark); --section-line: var(--line-on-dark); --section-accent: rgba(255,255,255,.82); --section-surface: rgba(255,255,255,.12); }
.section--lab { --section-bg: var(--color-lab); }
.section--tech { --section-bg: var(--color-tech); }
.section--academy { --section-bg: var(--color-academy); }
.section--impact { --section-bg: var(--color-impact); }

/* ---- Titres de section ---- */
.section-heading { max-width: 760px; }
.section-heading--centered { margin: 0 auto; text-align: center; }
.section-heading--centered .section__lead { margin-left: auto; margin-right: auto; }
.section__eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--section-accent); margin-bottom: 16px; }
.section__title { font-size: clamp(28px, 4vw, 48px); line-height: 1.08; }
.section__title--large { font-size: clamp(32px, 5vw, 68px); line-height: 1.04; }
.section__lead { font-size: 17px; line-height: 1.75; color: var(--section-muted); max-width: 56ch; margin-top: 20px; }
.section__paragraph { font-size: 16px; line-height: 1.75; color: var(--section-muted); max-width: 56ch; margin-top: 18px; }
.section-heading + * { margin-top: 56px; }

/* ---- Motif « split » : image + texte ---------------------------------
   <div class="split split--media-left | split--media-right">
     <figure class="split__media"><img …></figure>
     <div class="split__body"> eyebrow, titre, texte, éléments, .split__actions </div>
   </div>                                                                    */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--split-gap); align-items: center; }
.split--media-left { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }     /* image à gauche (valeur par défaut) */
.split--media-right { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }  /* image à droite */
.split--media-right .split__media { order: 2; }
.split__media { position: relative; margin: 0; aspect-ratio: 4 / 5; max-height: 72vh; border-radius: var(--radius-media); overflow: hidden; box-shadow: var(--shadow-media); }
.split__media--wide { aspect-ratio: 16 / 11; }
.split__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.split__body > * + * { margin-top: 22px; }
.split__body .section__lead, .split__body .section__paragraph { margin-top: 20px; }
.split__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 30px; }
@media (max-width: 860px) {
  .split, .split--media-right { grid-template-columns: 1fr; }
  .split--media-right .split__media { order: 0; }
  .split__media { aspect-ratio: 16 / 11; max-height: none; }
}

/* ---- Motif « card-grid » ---- */
.card-grid { display: grid; gap: 16px; }
.card-grid--columns-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--columns-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--columns-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .card-grid--columns-3, .card-grid--columns-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid--columns-2, .card-grid--columns-3, .card-grid--columns-4 { grid-template-columns: 1fr; } }
.card { background: var(--section-surface); border: 1px solid var(--section-line); border-radius: var(--radius-card); padding: 28px 26px; }
.card__dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-bottom: 16px; }
.card__title { font-size: 20px; margin-bottom: 10px; }
.card__text { font-size: 14.5px; line-height: 1.65; color: var(--section-muted); }

/* ---- Motif « stacked-rows » : lignes séparées par des filets ---- */
.stacked-rows { list-style: none; margin: 0; padding: 0; }
.stacked-rows__item { display: grid; grid-template-columns: minmax(0, .6fr) minmax(0, 1fr); gap: 30px; padding: 24px 0; border-top: 1px solid var(--section-line); align-items: baseline; }
.stacked-rows__item:last-child { border-bottom: 1px solid var(--section-line); }
.stacked-rows__label { font-family: var(--font-heading); font-size: clamp(20px, 2.6vw, 30px); }
.stacked-rows__text { font-size: 15.5px; line-height: 1.65; color: var(--section-muted); }
.stacked-rows--compact .stacked-rows__item { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
.stacked-rows--compact .stacked-rows__label { font-size: 18px; }
.stacked-rows--numbered { counter-reset: row; }
.stacked-rows--numbered .stacked-rows__label::before { counter-increment: row; content: counter(row, decimal-leading-zero); display: inline-block; margin-right: 14px; font-size: .6em; color: var(--section-accent); vertical-align: middle; }
@media (max-width: 700px) { .stacked-rows__item { grid-template-columns: 1fr; gap: 6px; } }

/* ---- Motif « tag-list » : nuage de pastilles ---- */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.tag-list--centered { justify-content: center; }
.tag { font-size: 13.5px; padding: 10px 18px; border: 1px solid var(--section-line); border-radius: var(--radius-pill); background: var(--section-surface); }

/* ---- Motif « quote-band » : citation centrée ---- */
.quote-band { text-align: center; }
.quote-band__text { font-family: var(--font-heading); font-style: italic; font-size: clamp(22px, 3.4vw, 40px); line-height: 1.4; max-width: 28ch; margin: 0 auto; }
.quote-band__source { display: block; margin-top: 22px; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--section-muted); }

/* ---- Motif « timeline » : étapes verticales ---- */
.timeline { position: relative; max-width: 760px; padding-left: 52px; }
.timeline::before, .timeline__progress { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 1px; background: var(--section-line); }
.timeline__progress { background: var(--color-orange); transform: scaleY(0); transform-origin: top; }   /* rempli au scroll */
.timeline__step { position: relative; padding-bottom: 46px; }
.timeline__step:last-child { padding-bottom: 0; }
.timeline__step::before { content: ""; position: absolute; left: -46px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--section-bg); border: 1px solid var(--color-orange); }
.timeline__title { font-size: clamp(24px, 3vw, 36px); }
.timeline__text { margin-top: 8px; font-size: 16px; line-height: 1.65; color: var(--section-muted); max-width: 52ch; }

/* ---- Motif « flow-pair » : deux blocs reliés ---- */
.flow-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: stretch; }
.flow-pair__connector { align-self: center; font-size: 28px; text-align: center; color: var(--section-accent); }
@media (max-width: 780px) { .flow-pair { grid-template-columns: 1fr; } .flow-pair__connector { transform: rotate(90deg); } }

/* ---- Motif « cta-band » : bandeau d'appel à l'action ---- */
.cta-band { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 28px; }
.cta-band__title { font-size: clamp(28px, 4.2vw, 52px); max-width: 18ch; line-height: 1.05; }

/* ---- Grand texte centré (affirmation) ---- */
.statement { max-width: 22ch; margin: 0 auto; text-align: center; font-family: var(--font-heading); font-size: clamp(28px, 4.6vw, 60px); line-height: 1.15; }
.statement + .section__paragraph { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- Compléments de mise en page ---- */
.split-stack > .split + .split { margin-top: calc(var(--split-gap) + 24px); }      /* plusieurs blocs image/texte à la suite */
.stacked-rows--two-columns { columns: 2; column-gap: 60px; }                        /* liste répartie sur deux colonnes */
.stacked-rows--two-columns .stacked-rows__item { break-inside: avoid; grid-template-columns: 1fr; gap: 4px; padding: 18px 0; }
.stacked-rows--two-columns .stacked-rows__label { font-size: 19px; }
@media (max-width: 760px) { .stacked-rows--two-columns { columns: 1; } }
.page-hero--compact { min-height: 46vh; }
.statement-wide { max-width: 26ch; }
