/* =========================================================
   TATEA — hero « tout au même endroit » + chiffres au modèle de l'accueil (2026-11-30)
   v3, après le retour du même jour : piste A retenue (le texte à gauche, la carte à droite), et moins
   d'informations dans le bloc de gauche. Il ne reste que : le grand titre (c'est le h1, son second mot
   défile), une phrase, deux boutons, une ligne de dates. Le logo TATEA est dans la barre ; la phrase
   « Diriger l'Afrique se construit… » n'est plus affichée (elle est le <title> de la page).
   Se charge APRÈS tatea-hero-3.css / -effets.css / tatea-alternance.css (partagées avec les pages
   académie, qu'on ne touche pas) : tout est rangé sous html[data-hl] pour passer devant.
   Sous 900 px : le texte puis la carte.
   Versions précédentes : bak/tatea-hero-v2.css.pre-flow (3 pistes A / B / C + sélecteur).
   ========================================================= */

html[data-hl] { --hgap: clamp(20px, 3vw, 56px); }

/* ---------- 1. Hero : le cadre (≥ 900 px, deux colonnes) ---------- */
html[data-hl] .hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  column-gap: var(--hgap);
  padding: calc(var(--sn-h, 80px) + clamp(4px, 1.6vh, 20px)) var(--edge) 0;   /* la barre du site passe au-dessus */
  min-height: 0;
}

/* ---------- 2. Le bloc de texte, d'un seul tenant ---------- */
html[data-hl] .hero__left {
  grid-column: 1; grid-row: 1; align-self: center; justify-self: start;
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; max-width: 720px; padding: 0 0 clamp(12px, 2.6vh, 30px);
}
/* le grand titre (le second mot défile), sur une ligne */
html[data-hl] .hero__title {
  position: static; right: auto; top: auto; grid-row: auto; width: auto; margin: 0;
  font-size: clamp(46px, min(6.7vw, 11.8vh), 124px); line-height: .9; white-space: nowrap;
}
/* sur le bleu nuit, le mot arrive en blanc puis se remplit de jaune (il était noir sur noir avant de se remplir) */
html[data-hl][data-e~="2"] .hero__title .w + .w > span { background-image: linear-gradient(to top, var(--gold) 50%, #fff 50%); }
html[data-hl] .hero__sub { margin: clamp(14px, 2.6vh, 28px) 0 0; max-width: 44ch; font-size: clamp(16.5px, min(1.42vw, 2.5vh), 21px); line-height: 1.45; color: rgb(255 255 255 / .78); text-wrap: pretty; }
/* les deux boutons, côte à côte, juste sous le texte */
html[data-hl] .hero__cta { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-top: clamp(18px, 3.4vh, 36px); }
html[data-hl] .hero__left .btn { grid-column: auto; grid-row: auto; margin: 0; }
.btn--soft { background: rgb(255 255 255 / .1); color: #fff; }
.btn--soft:hover { background: rgb(255 255 255 / .17); }
.btn--soft .btn__icon { background: rgb(255 255 255 / .12); }
.btn--soft:hover .btn__icon { background: rgb(255 255 255 / .2); transform: rotate(-10deg); }
/* les deux dates, sur une ligne */
html[data-hl] .hero__dates { margin: clamp(14px, 2.6vh, 26px) 0 0; font-size: clamp(13.5px, 1.05vw, 15.5px); line-height: 1.45; color: rgb(255 255 255 / .62); }
html[data-hl] .hero__dates b { font-weight: 600; color: #fff; }
html[data-hl] .hero__dsep { margin: 0 .45em; color: rgb(255 255 255 / .4); }

/* ---------- 3. La carte et la dirigeante, en face ---------- */
html[data-hl] .hero__stage { grid-column: 2; grid-row: 1; align-self: stretch; height: auto; min-height: 0; margin: 0; pointer-events: none; }
/* la carte ne déborde pas sur le texte : sa hauteur suit aussi la largeur de la colonne */
html[data-hl] .hero__map {
  --mw: calc((100vw - 2 * var(--edge) - var(--hgap)) / 2.1 + 48px);
  left: 50%; top: 50%; bottom: auto; translate: -50% -46%;
  height: min(106%, calc(var(--mw) / 1.069));
}
html[data-hl] .hero__person { left: 50%; height: 90%; }
/* les trois villes : la légende des pays en bleu, dans le coin libre de la carte */
html[data-hl] .hero__place {
  position: static; grid-column: 2; grid-row: 1; align-self: start; justify-self: end; z-index: 3;
  display: flex; align-items: center; gap: 8px; margin: 2px 0 0;
  font-size: 13px; font-weight: 500; letter-spacing: .03em; color: rgb(255 255 255 / .78);
}
html[data-hl] .hero__place::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sky); }

/* ---------- 4. Entrée (une fois) : le bloc monte ligne après ligne ---------- */
html.js[data-hl] .hero__left > .hero__title { transition-delay: .2s; }
html.js[data-hl] .hero__left > .hero__sub { transition-delay: .75s; }
html.js[data-hl] .hero__left > .hero__cta { transition-delay: .9s; }
html.js[data-hl] .hero__left > .hero__dates { transition-delay: 1.05s; }

/* ---------- 5. Les chiffres, au modèle de l'accueil ----------
   Grands chiffres fins, unité jaune, colonnes séparées par un filet, libellé discret dessous.
   Le bandeau est bleu nuit comme la hero : il ferme la première page. */
html[data-hl] .stats { display: block; padding: clamp(16px, 3vh, 30px) var(--edge) clamp(18px, 3.2vh, 32px); background: var(--night); }
html[data-hl] .stats__list { --sg: clamp(12px, 2.4vw, 40px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sg); max-width: 1340px; margin: 0 auto; padding: 0; list-style: none; }
html[data-hl] .stat { position: relative; flex: none; min-width: 0; text-align: center; }
html[data-hl] .stat + .stat::before { content: ""; position: absolute; top: 8%; bottom: 8%; left: calc(var(--sg) / -2); width: 1px; background: rgb(255 255 255 / .14); }
html[data-hl] .stat__n { margin: 0; color: #fff; font-weight: 300; font-size: clamp(34px, min(4.6vw, 7.6vh), 72px); line-height: 1; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* le « fantôme » garde la largeur du chiffre final : le compte ne fait pas bouger la colonne */
html[data-hl] .stat__v { display: inline-grid; }
html[data-hl] .stat__v > * { grid-area: 1 / 1; text-align: right; }
html[data-hl] .stat__ghost { visibility: hidden; }
html[data-hl] .stat__u { margin-left: .06em; font-weight: 400; color: var(--gold); }
html[data-hl] .stat__l { max-width: 23ch; margin: clamp(8px, 1.4vh, 14px) auto 0; font-size: clamp(12.5px, 1vw, 14.5px); line-height: 1.4; color: rgb(255 255 255 / .66); text-wrap: balance; }
html[data-hl] .stat__s { display: none; }
/* entrée : les chiffres sortent de l'ombre l'un après l'autre */
html.js[data-hl] .stat__n { color: #4f5f85; transition: color .9s ease; }
html.js[data-hl] .is-in .stat__n { color: #fff; }
html.js[data-hl] .stat:nth-of-type(4) { transition-delay: 1.4s; } html.js[data-hl] .stat:nth-of-type(5) { transition-delay: 1.5s; }
html.js[data-hl] .stat:nth-of-type(1) .stat__n { transition-delay: 1.2s; } html.js[data-hl] .stat:nth-of-type(2) .stat__n { transition-delay: 1.32s; }
html.js[data-hl] .stat:nth-of-type(3) .stat__n { transition-delay: 1.44s; } html.js[data-hl] .stat:nth-of-type(4) .stat__n { transition-delay: 1.56s; }
html.js[data-hl] .stat:nth-of-type(5) .stat__n { transition-delay: 1.68s; }

/* ---------- 6. Colonne étroite ---------- */
/* colonne de texte étroite : le second bouton dit « Passer le test », les deux tiennent sur une ligne */
@media (min-width: 900px) and (max-width: 1180px) {
  .hero__ctax { display: none; }
}

/* ---------- 7. Tablette et mobile (< 900 px) : le texte, puis la carte ---------- */
@media (max-width: 899px) {
  html[data-hl] .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); padding-top: calc(var(--sn-h, 76px) + 4px); }
  html[data-hl] .hero__left { grid-column: 1; grid-row: 1; align-self: start; max-width: none; padding: 0 0 12px; }
  html[data-hl] .hero__stage { grid-column: 1; grid-row: 2; }
  html[data-hl] .hero__place { display: none; }
  html[data-hl] .hero__title { font-size: clamp(40px, min(13.4vw, 9.4svh), 96px); }
  html[data-hl] .hero__sub { margin-top: 12px; max-width: 40ch; font-size: clamp(15.5px, 2.3vw, 18px); line-height: 1.45; }
  html[data-hl] .hero__cta { gap: 8px; margin-top: 16px; }
  html[data-hl] .hero__dates { margin-top: 14px; font-size: 13.5px; }
  /* la carte et la dirigeante partent du haut de leur case ; si la place manque, le filet les coupe net */
  html[data-hl] .hero__map { top: 0; translate: -50% 0; height: max(104%, min(78vw, 520px)); }
  html[data-hl] .hero__person { top: 3%; bottom: auto; height: max(97%, min(66vw, 440px)); }
  /* les chiffres : cinq colonnes serrées, libellés courts */
  html[data-hl] .stats { padding: 14px var(--edge) 16px; }
  html[data-hl] .stats__list { --sg: clamp(6px, 2vw, 20px); }
  html[data-hl] .stat__n { font-size: clamp(24px, min(7.4vw, 6svh), 48px); }
  html[data-hl] .stat__l { margin-top: 5px; font-size: clamp(10.5px, 2.2vw, 13.5px); line-height: 1.25; text-wrap: wrap; }
  html[data-hl] .stat__x { display: none; }
  html[data-hl] .stat__s { display: inline; }
}
@media (max-width: 599px) {
  .hero__ctax { display: none; }
  html[data-hl] .hero__left .btn { min-height: 44px; gap: 8px; padding-right: 15px; font-size: 14px; }
  html[data-hl] .hero__left .btn .btn__icon { width: 30px; height: 30px; }
  html[data-hl] .hero__left .btn--soft .btn__icon, html[data-hl] .hero__left .btn .btn__arrow { display: none; }
  html[data-hl] .hero__left .btn--soft { padding-left: 16px; }
}
/* téléphone : les deux dates l'une sous l'autre */
@media (max-width: 479px) {
  html[data-hl] .hero__dsep { display: none; }
  html[data-hl] .hero__d2 { display: block; }
}
