/* =========================================================
   Accueil — hero « mur de photos 3D » + « Le parcours »
   ========================================================= */

/* ---------- HERO ---------- */
.stage { clip-path: inset(0); }
.stage { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: var(--abyss); color: var(--paper); isolation: isolate; }

.wall { position: absolute; inset: 0 0 6px; z-index: -3; perspective: 1400px; perspective-origin: 50% 40%; overflow: hidden; clip-path: inset(0); }
.wall__plane {
  position: absolute; left: 50%; top: 50%; width: 170vw; height: 230vh;
  display: grid; grid-template-columns: repeat(var(--cols, 8), 1fr); gap: clamp(10px, 1.2vw, 20px);
  transform-style: preserve-3d; will-change: transform;
}
.wall__col { position: relative; overflow: visible; }
.wall__track { display: flex; flex-direction: column; gap: clamp(10px, 1.2vw, 20px); animation: wall-up var(--dur, 60s) linear infinite; will-change: transform; }
.wall__col:nth-child(even) .wall__track { animation-name: wall-down; }
.wall__track img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: clamp(10px, 1vw, 18px);
  background: var(--teal-deep);
}
@keyframes wall-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes wall-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }

/* voile : sombre partout, sauf sous le faisceau qui suit la souris */
.stage__veil {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(circle var(--spot, 260px) at var(--mx, 50%) var(--my, 45%), rgba(2,38,44,0) 0%, rgba(2,38,44,.35) 55%, rgba(2,38,44,.82) 100%),
    linear-gradient(180deg, rgba(2,38,44,.55) 0%, rgba(2,38,44,0) 30%, rgba(2,38,44,0) 60%, rgba(2,38,44,.95) 100%);
}
.stage__tint { position: absolute; inset: 0; z-index: -2; pointer-events: none; background: linear-gradient(120deg, rgba(4,116,135,.32), rgba(2,38,44,.05) 50%, rgba(242,208,100,.08)); }
.stage__fade { position: absolute; inset: 0; z-index: -1; background: var(--abyss); opacity: 0; pointer-events: none; }
/* fondu vers la section suivante (masque aussi le bord du mur) */
.stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 45%; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(2,38,44,0), var(--abyss) 92%); }

/* HUD : repères discrets façon écran de contrôle */
.hud { position: absolute; inset: 96px var(--gutter) 26px; z-index: 1; pointer-events: none; font: 700 11px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: rgba(248,246,244,.55); }
.hud span { position: absolute; display: flex; align-items: center; gap: 10px; }
.hud .tl { top: 0; left: 0; } .hud .tr { top: 0; right: 0; }
.hud .tl::before, .hud .tr::after { content: ""; width: 18px; height: 18px; border: 1.5px solid rgba(248,246,244,.4); }
.hud .tl::before { border-right: 0; border-bottom: 0; }
.hud .tr::after { border-left: 0; border-bottom: 0; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 0 rgba(242,208,100,.7); animation: live 1.8s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(242,208,100,0); } 100% { box-shadow: 0 0 0 0 rgba(242,208,100,0); } }

.stage__content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 110px var(--gutter) 150px; }
.stage__pill { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; background: rgba(2,38,44,.6); box-shadow: inset 0 0 0 1px rgba(248,246,244,.18); font: 700 12px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; }
.stage__title { margin: 28px 0 0; font: 800 clamp(64px, 13.5vw, 250px)/.82 var(--display); letter-spacing: -.06em; text-shadow: 0 10px 60px rgba(2,38,44,.5); }
.stage__title .row { display: block; overflow: hidden; padding: .02em .06em .08em; }
.stage__title .sun { color: var(--sun); }
.stage__sub { margin: 26px 0 0; font: 300 italic clamp(20px, 2.2vw, 34px)/1.2 var(--body); letter-spacing: -.01em; color: rgba(248,246,244,.9); }
.stage__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 38px; }
.stage .btn--ghost { color: var(--paper); }

.stage__stats { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: end; gap: 20px; padding: 0 var(--gutter) 28px; }
.stage__stat { border-top: 1px solid rgba(248,246,244,.22); padding-top: 14px; display: flex; align-items: baseline; gap: 12px; }
.stage__stat b { font: 800 clamp(30px, 3.4vw, 54px)/.9 var(--display); letter-spacing: -.04em; color: var(--paper); }
.stage__stat b sup { color: var(--sun); font-size: .5em; }
.stage__stat small { font: 700 12px/1.3 var(--body); letter-spacing: .08em; text-transform: uppercase; color: rgba(248,246,244,.7); }
.stage .scroll-hint { color: var(--paper); }
.stage .scroll-hint i { background: rgba(248,246,244,.4); }
@media (max-width: 760px) {
  .stage__stats { grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
  .stage__stats .scroll-hint { display: none; }
  .stage__stat { flex-direction: column; gap: 6px; align-items: flex-start; }
  .stage__stat small { font-size: 10px; }
  .hud .tr { display: none; }
  .wall__plane { width: 260vw; }
  .stage__content { padding-bottom: 190px; padding-top: 90px; }
}

/* la nav passe en clair au-dessus des sections sombres */
.nav--dark .nav__logo, .nav--dark .nav__links { background: rgba(2,38,44,.9); color: var(--paper); box-shadow: inset 0 0 0 1px rgba(248,246,244,.14); }
.nav--dark .nav__logo b { color: var(--paper); }
.nav--dark .nav__logo img { filter: brightness(0) invert(1); }
.nav--dark .nav__links a:hover { background: rgba(248,246,244,.1); color: var(--paper); }
.nav--dark .nav__burger { background: var(--sun); }
.nav--dark .nav__burger span { background: var(--ink); }
.nav__logo, .nav__links { transition: background .5s, color .5s, box-shadow .5s; }

/* ---------- MANIFESTE (sombre, dans la continuité du hero) ---------- */
/* la section chevauche le hero de quelques pixels pour masquer toute jointure */
.home .manifesto { position: relative; z-index: 1; margin-top: -4px; background: var(--abyss); color: var(--paper); padding-top: clamp(60px, 9vw, 140px); }
.home .manifesto .eyebrow { color: var(--sun); }
.home .manifesto__text .hl { color: var(--sun); }
.home .manifesto .btn--ghost { color: var(--paper); }
.home .manifesto .btn--teal { --bg: var(--sun); --fg: var(--ink); }
.home .band { margin-top: -1px; }
.home .band:first-of-type { margin-top: 0; }
.bands { background: linear-gradient(180deg, var(--abyss) 50%, var(--paper) 50%); padding: 30px 0 60px; overflow: hidden; }
.bands .band { margin: 0; }
.bands .band--sun { margin-top: -26px; }

/* ---------- ENGAGEMENTS en clair ---------- */
.home .pillars { background: var(--paper); color: var(--ink); }
.home .pillars .eyebrow { color: var(--teal); }

/* ---------- LE PARCOURS ---------- */
.journey { position: relative; height: 100svh; min-height: 640px; background: var(--abyss); color: var(--paper); overflow: hidden; }
.journey__grid { height: 100%; display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(20px, 3vw, 50px); padding: 100px var(--gutter) 90px; }
.journey__map { position: relative; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.journey__map svg { flex: 1; width: 100%; min-height: 0; overflow: visible; }
.journey__head { position: relative; z-index: 2; }
.journey__head .eyebrow { color: var(--sun); }
.journey__head h2 { margin: 12px 0 0; font: 800 clamp(30px, 3.2vw, 52px)/.92 var(--display); letter-spacing: -.04em; }

.map-grid line { stroke: rgba(148,197,205,.08); stroke-width: 1; }
.map-water { fill: none; stroke: rgba(148,197,205,.28); stroke-linecap: round; }
.map-water--rhin { stroke-width: 26; stroke: rgba(4,116,135,.35); }
.map-water--ill { stroke-width: 5; }
.map-label { font: 700 13px var(--body); letter-spacing: .08em; text-transform: uppercase; fill: rgba(248,246,244,.38); transition: fill .4s; }
.map-water-label { font: italic 600 14px var(--body); fill: rgba(148,197,205,.5); letter-spacing: .2em; }
.map-node circle.core { fill: var(--abyss); stroke: rgba(248,246,244,.35); stroke-width: 2; transition: fill .4s, stroke .4s; }
.map-node circle.halo { fill: var(--sun); opacity: 0; transform-box: fill-box; transform-origin: center; }
.map-node.is-lit circle.core { fill: var(--teal); stroke: var(--sky); }
.map-node.is-lit .map-label { fill: var(--paper); }
.map-node.is-now circle.core { fill: var(--sun); stroke: var(--sun); }
.map-node.is-now .map-label { fill: var(--sun); }
.map-node .count { font: 800 12px var(--body); fill: var(--ink); text-anchor: middle; dominant-baseline: central; opacity: 0; transition: opacity .3s; }
.map-node.is-lit .count { opacity: 1; }
.map-route { fill: none; stroke: url(#routeGrad); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.map-route-glow { fill: none; stroke: rgba(242,208,100,.18); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.map-route-ghost { fill: none; stroke: rgba(148,197,205,.08); stroke-width: 1.4; stroke-dasharray: 3 7; }
.map-comet { fill: var(--sun); }
.map-comet-halo { fill: rgba(242,208,100,.28); }

.journey__panel { display: flex; flex-direction: column; justify-content: center; gap: 18px; min-height: 0; }
.journey__date { font: 800 clamp(40px, 5.4vw, 92px)/.85 var(--display); letter-spacing: -.05em; color: var(--sun); white-space: nowrap; }
.journey__index { display: flex; justify-content: space-between; align-items: center; font: 700 12px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: rgba(248,246,244,.6); }
.journey__card { position: relative; display: block; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3.4; background: var(--teal-deep); box-shadow: 0 40px 80px -40px rgba(0,0,0,.6); max-height: 46vh; }
.journey__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.journey__card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(2,38,44,.9)); }
.journey__info { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 2; }
.journey__info small { display: inline-block; padding: 7px 11px; border-radius: 999px; background: var(--paper); color: var(--ink); font: 800 11px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; }
.journey__info h3 { margin: 12px 0 4px; font: 800 clamp(24px, 2.4vw, 38px)/1 var(--display); letter-spacing: -.03em; }
.journey__info p { margin: 0; font-weight: 700; color: var(--sky); }

.journey__bar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 34px; height: 30px; }
.journey__bar .track { position: absolute; left: 0; right: 0; top: 14px; height: 2px; background: rgba(248,246,244,.12); }
.journey__bar .fill { position: absolute; left: 0; top: 14px; height: 2px; width: 0; background: linear-gradient(90deg, var(--teal), var(--sun)); }
.journey__bar .tick { position: absolute; top: 9px; width: 1px; height: 12px; background: rgba(248,246,244,.25); }
.journey__bar .tick.y { height: 20px; top: 5px; background: rgba(248,246,244,.6); }
.journey__bar .tick em { position: absolute; top: -14px; left: 6px; font: 800 11px var(--body); font-style: normal; letter-spacing: .1em; color: rgba(248,246,244,.7); }
.journey__bar .dot { position: absolute; top: 11px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: rgba(148,197,205,.35); transition: background .3s, transform .3s; }
.journey__bar .dot.is-on { background: var(--sun); transform: scale(1.3); }

@media (max-width: 900px) {
  .journey__grid { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; padding: 86px var(--gutter) 70px; gap: 10px; }
  .journey__head { position: static; }
  .journey__head h2 { font-size: 30px; }
  .journey__map { min-height: 0; }
  .journey__panel { gap: 10px; flex-direction: row; align-items: stretch; }
  .journey__panel > div:first-child { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
  .journey__date { font-size: 30px; white-space: normal; }
  .journey__card { flex: 1.2; aspect-ratio: auto; min-height: 150px; max-height: none; border-radius: 18px; }
  .journey__info { left: 12px; right: 12px; bottom: 10px; }
  .journey__info h3 { font-size: 18px; margin-top: 6px; }
  .journey__info small { display: none; }
  .journey__info p { font-size: 12px; }
  .map-label { font-size: 22px; }
  .journey__bar .tick em { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .wall__track, .live { animation: none; }
}

/* ---------- finitions mobile ---------- */
.stage__pill .short { display: none; }
@media (max-width: 600px) {
  .stage__pill .long { display: none; }
  .stage__pill .short { display: inline; }
  .stage__cta { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; }
  .stage__cta .btn { justify-content: center; }
  .hud .tl { font-size: 10px; }
  .manifesto__foot { flex-direction: column; align-items: stretch; }
  .manifesto__foot .btn { justify-content: center; text-align: center; }
  .pillar--text { height: auto; min-height: 0; gap: 18px; }
  .pillar--text .pillar__n { display: none; }
  .journey__index { flex-direction: column; align-items: flex-start; gap: 6px; letter-spacing: .14em; }
  .journey__index [data-j-cat] { color: var(--sky); }
  .join__actions { flex-direction: column; align-items: stretch; max-width: 360px; margin: 0 auto; }
  .join__actions .btn { justify-content: center; }
}
@media (max-width: 380px) {
  .stage__title { font-size: 56px; }
  .journey__date { font-size: 26px; }
}

/* ---------- sections épinglées : sticky natif (aucun saut de mise en page) ---------- */
.pin-wrap { position: relative; }
.pin-wrap > section { position: sticky; top: 0; }
.pin-wrap--stage { height: 170svh; }
@media (max-width: 800px) { .pin-wrap--pillars > section { position: relative; } }
@media (prefers-reduced-motion: reduce) {
  .pin-wrap { height: auto !important; }
  .pin-wrap > section { position: relative; }
}
.wall__plane.is-paused .wall__track { animation-play-state: paused; }
