/* GKDC Animation d'accueil — couple 3D piloté par le défilement.
   Styles limités à .section-heros-couple : aucun effet sur le reste du site. */
.section-heros-couple {
  --noir: #050505;
  --rose: #d22d7d;
  --lumiere: #ff6aa8;
  --argent: #c9ccd6;
  --craie: #f3f3f3;
  --pad: clamp(16px, 2.4vw, 40px);
  --espace-2: 1rem;
  --espace-3: 1.5rem;
  --espace-4: 3rem;
  --t-m: clamp(1.1rem, 1.6vw, 1.5rem);
  --t-petit: 0.875rem;
  --t-nom: clamp(1.6rem, 3vw, 2.6rem);
  --entete-h: var(--gkdc-entete-h, 0px);
  position: relative;
  box-sizing: border-box;
  display: flex;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: calc(100svh - var(--entete-h));
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem var(--pad) 6rem;
  background: var(--noir);
  color: #fff;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.section-heros-couple *, .section-heros-couple *::before, .section-heros-couple *::after { box-sizing: border-box; }

.heros-scene { position: absolute; inset: 0; z-index: -1; background: #121834; }
.heros-scene::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.7) 70%, var(--noir));
}
.heros-repli { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: opacity .9s ease; }
.heros-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .9s ease; }
.heros-3d-pret .heros-canvas { opacity: 1; }
.heros-3d-pret .heros-repli { opacity: 0; }

.heros-texte { display: flex; flex-direction: column; align-items: center; max-width: 62rem; }
.section-heros-couple .heros-h1 {
  margin: 0 0 1.25rem;
  color: #fff;
  font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(2.4rem, 6.4vw, 5.6rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.heros-appui { max-width: 40ch; margin: 0 auto 1.75rem; color: var(--craie); font-size: var(--t-m); line-height: 1.5; }

.heros-boutons { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.section-heros-couple .heros-bouton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .8rem 1.6rem;
  border: 1.5px solid var(--rose); border-radius: 999px;
  background: var(--rose); color: #fff;
  font-family: Poppins, Arial, sans-serif; font-size: 1rem; font-weight: 600;
  text-decoration: none; transition: background-color .2s, color .2s, border-color .2s;
}
.section-heros-couple .heros-bouton:hover { background: #fff; border-color: #fff; color: var(--noir); }
.section-heros-couple .heros-bouton-verre {
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.section-heros-couple a:focus-visible, .section-heros-couple button:focus-visible { outline: 3px solid var(--lumiere); outline-offset: 3px; }

.chapitres-heros { display: grid; gap: var(--espace-3); width: 100%; max-width: 62rem; margin: var(--espace-4) 0 0; padding: 0; list-style: none; }
.chapitres-heros li {
  margin: 0; padding: var(--espace-2);
  background: rgba(5,5,5,.6); border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.chapitre-titre {
  display: block; color: #fff;
  font-family: Poppins, Arial, sans-serif; font-size: var(--t-nom); font-weight: 700; line-height: 1.1;
}
.chapitre-texte { color: var(--craie); line-height: 1.5; }
.heros-defiler { margin-top: var(--espace-3); color: var(--argent); font-size: var(--t-petit); }

.credit-3d {
  position: absolute; left: var(--pad); bottom: var(--espace-2);
  max-width: min(46rem, calc(100% - 2 * var(--pad)));
  margin: 0; color: var(--argent); font-size: .75rem; line-height: 1.4; text-align: left; opacity: .8;
}
.credit-3d a { color: var(--craie); }

.passer-intro {
  position: absolute; left: var(--espace-2); top: -6rem; z-index: 200;
  padding: .75rem 1.25rem; background: #fff; color: var(--noir); font-weight: 700;
}
.passer-intro:focus { top: var(--espace-2); }

/* Bouton « Lancer l'animation » (réglage « réduire les animations ») */
.heros-lecture {
  min-height: 44px; margin: 1rem 0 0; padding: 0 22px;
  border: 1.5px solid var(--craie); border-radius: 999px;
  background: rgba(0,0,0,.6); color: var(--craie);
  font: inherit; font-size: var(--t-petit); font-weight: 600; cursor: pointer;
}
.heros-lecture:hover { border-color: var(--lumiere); color: var(--lumiere); }
.heros-lecture:disabled { opacity: .6; }
.heros-en-lecture .heros-scene::after { background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.45) 60%, var(--noir)); }

/* ---------- Mode épinglé : le défilement pilote la danse ---------- */
.section-heros-couple.heros-epingle {
  --credit-h: 3.25rem;
  --vue: calc(100svh - var(--entete-h));
  display: grid; grid-template-rows: 100%; grid-template-columns: 100%; align-items: start;
  height: 500vh; min-height: 0; padding: 0; overflow: clip;
}
.section-heros-couple.heros-epingle-mobile { height: 300vh; }
.heros-epingle > * { grid-area: 1 / 1; }
.heros-epingle .heros-scene {
  position: sticky; inset: auto; top: var(--entete-h); z-index: 0;
  height: var(--vue); background: var(--noir); overflow: hidden;
}
.heros-epingle .heros-scene::after {
  z-index: 1;
  background:
    radial-gradient(ellipse 75% 70% at 50% 48%, transparent 45%, rgba(0,0,0,.6) 100%),
    linear-gradient(transparent 72%, rgba(0,0,0,.75));
  pointer-events: none;
}
.heros-epingle .heros-scene::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(0,0,0,.5); pointer-events: none; transition: opacity .5s;
}
.heros-epingle.heros-intro-passee .heros-scene::before { opacity: 0; }
.heros-epingle .heros-texte {
  position: sticky; top: var(--entete-h); z-index: 2; justify-content: center;
  width: 100%; max-width: none; height: var(--vue);
  padding: 1rem var(--pad) calc(var(--credit-h) + 3.5rem);
  pointer-events: none;
}
.heros-epingle .heros-texte > * { max-width: 62rem; will-change: opacity, transform; }
.heros-epingle .heros-texte a, .heros-epingle .heros-texte button { pointer-events: auto; }
.heros-epingle.heros-intro-passee .heros-texte .heros-boutons a { pointer-events: none; }
.heros-epingle .heros-h1 { text-shadow: 0 2px 24px rgba(0,0,0,.6); }

.heros-epingle .chapitres-heros {
  position: sticky; top: var(--entete-h); z-index: 2; display: block;
  max-width: none; height: var(--vue); margin: 0; pointer-events: none;
}
.heros-epingle .chapitres-heros li {
  position: absolute; top: 36%; left: var(--pad); width: min(25rem, 32vw);
  padding: var(--espace-3); border: 0; border-left: 2px solid var(--rose); border-radius: 0 14px 14px 0;
  text-align: left; opacity: 0; transform-origin: 0 50%; will-change: opacity, transform;
}
.heros-epingle .chapitres-heros li.chapitre-2 {
  right: var(--pad); left: auto; border-left: 0; border-right: 2px solid var(--rose);
  border-radius: 14px 0 0 14px; text-align: right; transform-origin: 100% 50%;
}
.heros-epingle .chapitre-titre { margin-bottom: .35rem; }
.heros-epingle .heros-defiler {
  position: sticky; top: calc(100svh - var(--credit-h) - 3.25rem); z-index: 2; justify-self: center; margin: 0;
}
.heros-epingle .credit-3d {
  position: sticky; top: calc(100svh - var(--credit-h) - 1rem); bottom: auto; left: auto;
  z-index: 3; justify-self: start; margin: 0 var(--pad);
}
.heros-epingle .passer-intro {
  top: auto; right: var(--pad); bottom: calc(1rem + 2px); left: auto;
  padding: .35rem 0; background: none; color: var(--craie);
  font-size: var(--t-petit); font-weight: 600;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em;
}
.heros-epingle .passer-intro:hover { color: var(--lumiere); }
.heros-epingle .passer-intro:focus { top: auto; }
.heros-progression {
  position: sticky; top: calc(100svh - 2px); z-index: 3; width: 100%; height: 2px;
  background: rgba(243,243,243,.12); pointer-events: none;
}
.heros-progression span { display: block; height: 100%; background: var(--rose); transform: scaleX(0); transform-origin: 0 50%; }
.heros-relais {
  position: absolute; top: 55%; bottom: 0; left: 50%; z-index: 2; width: 2px; margin-left: -1px;
  background: linear-gradient(rgba(255,106,168,0), var(--rose) 40%);
  transform: scaleY(0); transform-origin: 50% 0;
}

@media (min-width: 768px) {
  .chapitres-heros { grid-template-columns: repeat(3, 1fr); text-align: left; }
}
@media (max-width: 767px), (hover: none) {
  .section-heros-couple.heros-epingle { --credit-h: 4.5rem; }
  .heros-epingle .heros-texte { justify-content: flex-start; padding-top: 2rem; }
  .heros-epingle .chapitres-heros li,
  .heros-epingle .chapitres-heros li.chapitre-2 {
    top: auto; right: var(--pad); bottom: calc(var(--credit-h) + 1.5rem); left: var(--pad); width: auto;
    border-right: 0; border-left: 2px solid var(--rose); border-radius: 0 14px 14px 0;
    text-align: left; transform-origin: 50% 100%;
  }
  .heros-epingle .passer-intro { top: .5rem; bottom: auto; }
  .heros-epingle .passer-intro:focus { top: .5rem; }
  .heros-epingle .credit-3d { font-size: .6875rem; }
}
.gkdc-apres-intro { display: block; height: 0; scroll-margin-top: var(--gkdc-entete-h, 0px); }
