/* ================================================================
   HIATUS — Survol du quartier · Prilly
   Palette + typo reprises du site hiatus.framer.media
   ================================================================ */

:root {
  --navy: #0C2233;
  --navy-deep: #081824;
  --lime: #EBFC83;
  --lime-strong: #D4F050;
  --cream: #F2EFE3;
  --cream-60: rgba(242, 239, 227, 0.6);
  --cream-40: rgba(242, 239, 227, 0.4);
  --cream-12: rgba(242, 239, 227, 0.12);
  --glass: rgba(12, 34, 51, 0.66);
  --font-head: 'Switzer', 'Archivo', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', 'Menlo', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-loading { overflow: hidden; height: 100vh; }

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
}

::selection { background: var(--lime); color: var(--navy); }

/* ================================================================
   LOADER
   ================================================================ */

#loader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.9s ease, visibility 0.9s;
}
#loader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner { text-align: center; width: min(420px, 78vw); }

.loader-kicker {
  font-size: 10px; color: var(--cream-40);
  margin-bottom: 18px;
}

.loader-word {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(44px, 7vw, 72px);
  letter-spacing: 0.04em;
  color: var(--cream);
  line-height: 1;
  margin-bottom: 36px;
}
.loader-word::after { content: '.'; color: var(--lime); }

.loader-bar {
  height: 2px; width: 100%;
  background: var(--cream-12);
  border-radius: 2px; overflow: hidden;
  margin-bottom: 14px;
}
#loaderFill {
  display: block; height: 100%; width: 0%;
  background: var(--lime);
  transition: width 0.25s ease;
}

.loader-status { font-size: 10px; color: var(--cream-60); }
#loaderPct { color: var(--lime); }

.loader-foot {
  position: absolute; bottom: 28px; left: 0; right: 0;
  text-align: center; font-size: 9px; color: var(--cream-40);
}

/* ================================================================
   STAGE
   ================================================================ */

#stage { position: fixed; inset: 0; z-index: 1; }

#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(8, 24, 36, 0.55) 100%),
    linear-gradient(to bottom, rgba(8, 24, 36, 0.35), transparent 18%, transparent 78%, rgba(8, 24, 36, 0.5));
}

.grain {
  position: absolute; inset: -50%; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* cinema bars */
.bar {
  position: absolute; left: 0; right: 0; height: 9vh; z-index: 6;
  background: var(--navy-deep);
}
.bar-top { top: 0; }
.bar-bottom { bottom: 0; }

/* ================================================================
   PINS
   ================================================================ */

#pinsLayer { position: absolute; inset: 0; z-index: 6; pointer-events: none; }

.pin {
  position: absolute; top: 0; left: 0;
  opacity: 0;
  will-change: transform, opacity;
}

.pin-dot {
  position: absolute; left: -5px; top: -5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(235, 252, 131, 0.25), 0 2px 12px rgba(0, 0, 0, 0.5);
}

.pin-ring {
  position: absolute; left: -22px; top: -22px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--lime);
  animation: ping 2.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
@keyframes ping {
  0% { transform: scale(0.25); opacity: 0.9; }
  70% { transform: scale(1); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.pin-stem {
  position: absolute; left: -0.5px; bottom: 5px;
  width: 1px; height: 54px;
  background: linear-gradient(to top, var(--lime), rgba(235, 252, 131, 0.1));
}

.pin-tag {
  position: absolute; bottom: 64px; left: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 10px;
  color: var(--navy);
  background: var(--lime);
  padding: 6px 10px 5px;
  border-radius: 3px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

/* pin vedette HIATUS */
.pin--star .pin-dot {
  left: -7px; top: -7px; width: 14px; height: 14px;
  box-shadow: 0 0 0 4px rgba(235, 252, 131, 0.35), 0 0 24px rgba(235, 252, 131, 0.7), 0 2px 12px rgba(0, 0, 0, 0.5);
}
.pin--star .pin-ring {
  left: -30px; top: -30px; width: 60px; height: 60px;
  border-width: 2px;
  animation-duration: 1.8s;
}
.pin--star .pin-tag {
  font-size: 11px; font-weight: 700;
  padding: 8px 13px 7px;
  bottom: 70px;
  box-shadow: 0 0 0 1px rgba(12, 34, 51, 0.35), 0 6px 24px rgba(0, 0, 0, 0.45);
}
.pin--star .pin-stem { height: 60px; width: 2px; left: -1px; }

.card--star { border-color: rgba(235, 252, 131, 0.45); }
.card--star .card-kicker i { box-shadow: 0 0 8px rgba(235, 252, 131, 0.8); }

/* logo HIATUS a la place du titre (carte vedette) */
.card-logo {
  display: block;
  margin-bottom: 18px;
  line-height: 0;
  color: var(--cream);          /* le SVG utilise currentColor */
}
.card-logo .hiatus-logo {
  display: block;
  width: min(288px, 80%);
  height: auto;
}
/* libelle equivalent, lu par les lecteurs d'ecran uniquement */
.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 760px) {
  .card-logo .hiatus-logo { width: min(200px, 72%); }
}

/* Seul repere situe du cote des cartes : son etiquette se deplie vers la
   droite au lieu d'etre centree, pour ne jamais empieter sur la carte. */
.pin[data-pin="leb"] .pin-tag { transform: none; left: 14px; }

/* petits reperes sans carte (pano final Lausanne) */
.pin--mini .pin-dot {
  left: -4px; top: -4px; width: 8px; height: 8px;
  box-shadow: 0 0 0 2px rgba(235, 252, 131, 0.25), 0 1px 8px rgba(0, 0, 0, 0.5);
}
.pin--mini .pin-stem { height: 30px; }
.pin--mini .pin-tag {
  bottom: 38px;
  font-size: 9px;
  color: var(--cream);
  background: rgba(12, 34, 51, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(242, 239, 227, 0.18);
}

/* ================================================================
   CARDS
   ================================================================ */

#cardsLayer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }

.card {
  --cardBase: -50%;
  position: absolute;
  left: clamp(20px, 5vw, 84px);
  top: 50%;
  width: clamp(322px, 38vw, 496px);   /* retrecit sur ecran etroit pour ne pas heurter les pins */
  --padY: 34px; --padX: 36px; --padB: 32px;
  transform: translateY(calc(var(--cardBase) + 28px));
  opacity: 0;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--cream-12);
  border-radius: 10px;
  padding: var(--padY) var(--padX) var(--padB);
  will-change: transform, opacity;
}


/* ================================================================
   CARTES — style infographie
   Micro-labels mono, gros chiffres, filets fins, donnees en colonnes.
   ================================================================ */

.card-kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; color: var(--lime);
  margin-bottom: 22px;
}
.card-kicker i {
  width: 5px; height: 5px; flex: none;
  background: var(--lime);
}

.card-title {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  color: var(--cream);
  margin-bottom: 26px;
}

/* rangee de chiffres, separee par un filet vertical */
.card-stats {
  display: flex;
  gap: 28px;
  padding: 20px 0 21px;
  border-top: 1px solid var(--cream-12);
  border-bottom: 1px solid var(--cream-12);
  margin-bottom: 16px;
}
.card-stats .st { flex: 1; min-width: 0; position: relative; }
.card-stats .st + .st::before {
  content: ''; position: absolute; left: -14px; top: 2px; bottom: 2px;
  width: 1px; background: var(--cream-12);
}
.card-stats .st > span {
  display: block;
  font-size: 9px; color: var(--cream-40);
  margin-bottom: 10px;
}
.card-stats .st > b {
  display: block;
  font-family: var(--font-head);
  font-weight: 300;
  font-size: clamp(36px, 3.6vw, 48px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cream);
}
.card-stats .st > b.sm { font-size: clamp(22px, 2.2vw, 28px); }
.card-stats .st > b i {
  font-style: normal;
  font-family: var(--font-body);
  font-size: 15px; font-weight: 400;
  color: var(--cream-40);
  margin-left: 4px;
}
/* variante 4 colonnes (carte projet) */
.card-stats--4 { gap: 20px; }
.card-stats--4 .st + .st::before { left: -10px; }
.card-stats--4 .st > b { font-size: clamp(26px, 2.6vw, 34px); }

/* temps par mode de deplacement */
.card-modes {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 26px;
  font-size: 11px; color: var(--cream);
  margin-bottom: 22px;
}
.card-modes span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.card-modes .ico {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: var(--lime);
  stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round;
}

/* bandeau photo au sol, en tete de carte (deborde jusqu'aux bords arrondis) */
.card-photo {
  display: block;
  margin: calc(var(--padY) * -1) calc(var(--padX) * -1) 22px;
  height: clamp(112px, 13vh, 152px);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  position: relative;
  background: rgba(8, 24, 36, 0.5);
}
/* le bandeau est tres large et bas : --focus (pose sur la figure) choisit la bande
   verticale gardee dans le recadrage, sinon le sujet sort du cadre */
.card-photo img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  object-position: center var(--focus, 50%);
}
/* fondu vers le fond de la carte, pour que le raccord ne soit pas net */
.card-photo::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: linear-gradient(to bottom, transparent, rgba(12, 34, 51, 0.72));
  pointer-events: none;
}
/* si le fichier manque, le bandeau disparait (classe posee par app.js) */
.card-photo.is-missing { display: none; }

/* ligne mise en avant (ex. monument du parc) */
.card-feature {
  display: flex; align-items: center; gap: 9px;
  font-size: 9px; color: var(--lime);
  padding: 11px 0;
  border-top: 1px solid rgba(235, 252, 131, 0.22);
  border-bottom: 1px solid rgba(235, 252, 131, 0.22);
  margin-bottom: 16px;
}
.card-feature .ico {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: var(--lime);
  stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round;
}

/* lignes de donnees secondaires (label ....... valeur) */
.card-rows { margin-bottom: 16px; }
.card-rows > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(242, 239, 227, 0.07);
}
.card-rows > div:last-child { border-bottom: none; }
.card-rows span { font-size: 9px; color: var(--cream-40); }
.card-rows b { font-size: 13px; font-weight: 400; color: var(--cream); }

.card-note {
  font-size: 14px; line-height: 1.6; font-weight: 300;
  color: var(--cream-60);
}


/* ================================================================
   HUD
   ================================================================ */

.hud {
  position: absolute; left: 0; right: 0; z-index: 7;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px clamp(20px, 4vw, 56px);
  opacity: 0;
  transition: opacity 1s ease 0.2s;
  pointer-events: none;
}
body.is-ready .hud { opacity: 1; }

.hud-top { top: 0; }
.hud-bottom { bottom: 0; }

/* mode embed (iframe dans le site Framer) : la nav du site remplace le HUD haut */
body.is-embed .hud-top { display: none; }
body.is-embed #hero { padding-top: 110px; }

.hud-logo {
  font-family: var(--font-head);
  font-weight: 900; font-size: 19px; letter-spacing: 0.05em;
  color: var(--cream);
}
.hud-logo sup { font-size: 8px; color: var(--lime); margin-left: 2px; }

.hud-right, .hud-addr { font-size: 9px; color: var(--cream-60); }
.hud-flight { font-size: 10px; color: var(--cream); display: flex; align-items: center; gap: 8px; }
#hudPct { color: var(--lime); }

.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime);
  animation: blink 1.6s ease infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ================================================================
   COMPTEUR DE DISTANCE PARCOURUE
   Distance au sol couverte par la camera depuis le debut du vol,
   convertie en temps de marche. Base : 900 m / 12 min sur tout le scrub
   (chiffres fournis par le client). Constantes ODO_M / ODO_MIN dans app.js.
   ================================================================ */

#odo {
  position: absolute; z-index: 7;
  left: 50%; bottom: 84px;
  transform: translateX(-50%);
  width: 268px;
  padding: 13px 18px 14px;
  background: rgba(12, 34, 51, 0.62);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--cream-12);
  border-radius: 11px;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
/* n'apparait qu'une fois le vol commence */
body.is-ready.is-flying #odo { opacity: 1; }

.odo-head {
  font-size: 8px; color: var(--cream-40);
  text-align: center;
  margin-bottom: 11px;
}

.odo-vals { display: flex; align-items: baseline; justify-content: center; gap: 16px; }
.odo-sep { width: 1px; align-self: stretch; background: var(--cream-12); }

.odo-v { display: flex; align-items: baseline; gap: 5px; flex: 1; justify-content: center; }
.odo-v b {
  font-family: var(--font-head);
  font-weight: 300;
  font-size: 30px; line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.odo-v i {
  font-style: normal;
  font-size: 11px; font-weight: 400;
  color: var(--cream-40);
  white-space: nowrap;
}

.odo-bar {
  margin-top: 12px;
  height: 2px; border-radius: 2px;
  background: rgba(242, 239, 227, 0.16);
  overflow: hidden;
}
#odoFill {
  display: block; height: 100%; width: 0%;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(235, 252, 131, 0.5);
}

/* compact : le bloc rejoint la barre du bas pour ne pas heurter les cartes */
@media (max-width: 900px), (max-height: 620px) {
  #odo {
    bottom: 6px; width: auto;
    padding: 7px 14px 8px;
    background: rgba(12, 34, 51, 0.55);
    border-radius: 99px;
  }
  .odo-head, .odo-bar { display: none; }
  .odo-vals { gap: 12px; }
  .odo-v b { font-size: 15px; }
  .odo-v i { font-size: 9px; }
}

/* ================================================================
   MINI-CARTE DE PARCOURS
   Schematique (pas geographique) : la video n'a pas de telemetrie GPS.
   Les pins sont places a leur position REELLE dans le voyage (progression).
   ================================================================ */

#mini {
  position: absolute; z-index: 7;
  right: clamp(20px, 4vw, 56px); bottom: 96px;
  width: 214px;
  padding: 13px 12px 10px;
  background: rgba(12, 34, 51, 0.66);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--cream-12);
  border-radius: 11px;
  opacity: 0;
  /* le zoom part du coin bas-droit : la carte grandit vers le haut et la gauche,
     sans jamais bouger de son ancrage */
  transform-origin: bottom right;
  transition: opacity 0.8s ease,
              transform 0.55s cubic-bezier(0.22, 0.68, 0.2, 1),
              border-color 0.45s ease, background-color 0.45s ease,
              box-shadow 0.45s ease;
  pointer-events: auto;
}
body.is-ready #mini { opacity: 1; }

#mini:hover {
  transform: scale(1.34);
  background: rgba(12, 34, 51, 0.82);
  border-color: rgba(235, 252, 131, 0.38);
  box-shadow: 0 18px 50px rgba(8, 24, 36, 0.5);
  z-index: 8;
}
/* pendant le survol, le rail s'efface pour laisser la place a la carte agrandie */
#mini:hover ~ #rail { opacity: 0.16; }

@media (max-height: 620px) {
  #mini { width: 178px; }
  #mini:hover { transform: scale(1.22); }
}

.mini-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 9px; color: var(--cream-40);
  padding: 0 4px 9px;
}
#miniStep { color: var(--lime); }

#miniSvg { display: block; width: 100%; height: auto; overflow: visible; }

.mini-pin { cursor: pointer; }
.mini-pin circle {
  fill: var(--navy);
  stroke: rgba(242, 239, 227, 0.7);
  stroke-width: 1.5;
  transition: fill 0.3s, stroke 0.3s, r 0.3s;
}
.mini-pin:hover circle { fill: var(--lime); stroke: var(--lime); }
.mini-pin.done circle { fill: rgba(242, 239, 227, 0.6); stroke: rgba(242, 239, 227, 0.6); }
.mini-pin.active circle { fill: var(--lime); stroke: var(--lime); }
.mini-pin .mini-hit { stroke: none; }
.mini-pin--star circle { stroke-width: 2; }

#miniNow { filter: drop-shadow(0 0 5px rgba(235, 252, 131, 0.9)); }

@media (max-width: 900px) { #mini { display: none; } }

/* ================================================================
   RAIL
   ================================================================ */

#rail {
  /* remonte et raccourci : la mini-carte agrandie occupe le bas-droit */
  position: absolute; right: clamp(20px, 4vw, 56px); top: 42%;
  transform: translateY(-50%);
  height: 36vh; z-index: 7;
  opacity: 0;
  transition: opacity 0.45s ease;
}
body.is-ready #rail { opacity: 1; }

.rail-line {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 2px; border-radius: 2px;
  background: rgba(242, 239, 227, 0.28);
  box-shadow: 0 0 10px rgba(8, 24, 36, 0.6);
}
#railFill {
  position: absolute; top: 0; left: 0; right: 0;
  height: 0%;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(235, 252, 131, 0.5);
}

.rail-stop {
  position: absolute; right: -4px;
  display: flex; align-items: center; gap: 12px;
  flex-direction: row-reverse;
}
.rail-stop i {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(12, 34, 51, 0.85);
  border: 1.5px solid rgba(242, 239, 227, 0.7);
  box-shadow: 0 1px 6px rgba(8, 24, 36, 0.6);
  transition: all 0.4s ease;
}
.rail-stop b {
  font-size: 10px; font-weight: 500;
  color: rgba(242, 239, 227, 0.78);
  text-shadow: 0 1px 10px rgba(8, 24, 36, 0.95), 0 0 3px rgba(8, 24, 36, 0.8);
  transition: color 0.4s ease;
  white-space: nowrap;
}
.rail-stop.active i { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 14px rgba(235, 252, 131, 0.75); }
.rail-stop.active b { color: var(--lime); }
.rail-stop.passed i { background: rgba(242, 239, 227, 0.65); border-color: rgba(242, 239, 227, 0.65); }

/* ================================================================
   HERO
   ================================================================ */

#hero {
  position: absolute; inset: 0; z-index: 8;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 6vw;
  will-change: opacity, transform;
}

.hero-kicker {
  font-size: 10px; color: var(--lime);
  min-height: 14px;
  margin-bottom: 22px;
  opacity: 0; transform: translateY(14px);
}
.caret {
  display: inline-block; width: 7px; height: 11px;
  background: var(--lime);
  margin-left: 4px; vertical-align: -1px;
  animation: blink 0.9s steps(1) infinite;
}

.hero-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(64px, 13vw, 190px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: var(--cream);
  text-shadow: 0 10px 60px rgba(8, 24, 36, 0.8);
  opacity: 0; transform: translateY(26px) scale(0.985);
}

.hero-rule {
  width: 64px; height: 3px;
  background: var(--lime);
  margin: 26px 0 22px;
  transform: scaleX(0);
}

.hero-tagline {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(19px, 2.4vw, 30px);
  letter-spacing: -0.01em;
  color: var(--cream);
  opacity: 0; transform: translateY(18px);
}

.hero-sub {
  max-width: 560px;
  margin-top: 14px;
  font-size: 14px; line-height: 1.6;
  color: var(--cream-60);
  text-shadow: 0 2px 18px rgba(8, 24, 36, 0.9);
  opacity: 0; transform: translateY(18px);
}

.hero-actions {
  margin-top: 38px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  opacity: 0; transform: translateY(18px);
}

.hero-hint { font-size: 9px; color: var(--cream-40); }

/* staggered reveal */
body.is-ready .hero-kicker,
body.is-ready .hero-title,
body.is-ready .hero-tagline,
body.is-ready .hero-sub,
body.is-ready .hero-actions {
  opacity: 1; transform: none;
  transition: opacity 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
body.is-ready .hero-rule {
  transform: scaleX(1);
  transition: transform 0.9s cubic-bezier(0.6, 0, 0.2, 1) 1.15s;
}
body.is-ready .hero-kicker { transition-delay: 0.15s; }
body.is-ready .hero-title { transition-delay: 0.45s; }
body.is-ready .hero-tagline { transition-delay: 1.0s; }
body.is-ready .hero-sub { transition-delay: 1.2s; }
body.is-ready .hero-actions { transition-delay: 1.45s; }

/* ================================================================
   BUTTONS
   ================================================================ */

.btn-lime {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em;
  color: var(--navy);
  background: var(--lime);
  border: none; cursor: pointer;
  padding: 16px 28px 15px;
  border-radius: 99px;
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.35s, box-shadow 0.35s;
  box-shadow: 0 8px 32px rgba(235, 252, 131, 0.18);
  pointer-events: auto;
}
.btn-lime:hover {
  background: var(--lime-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 44px rgba(235, 252, 131, 0.28);
}
.btn-arrow { font-family: var(--font-body); font-size: 14px; transition: transform 0.35s; }
.btn-lime:hover .btn-arrow { transform: translateY(2px); }
.btn-big:hover .btn-arrow { transform: translateX(4px); }
.btn-big { padding: 20px 36px 19px; font-size: 12px; }

/* bouton final : gros + magnetique (le champ capte la souris autour du bouton) */
.btn-field { padding: 34px 60px; display: inline-block; }
.btn-huge {
  padding: 28px 54px 27px;
  font-size: 15px;
  letter-spacing: 0.18em;
  box-shadow: 0 14px 48px rgba(235, 252, 131, 0.22);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.35s, box-shadow 0.35s;
  will-change: transform;
}
.btn-huge:hover {
  transform: none;
  background: var(--lime-strong);
  box-shadow: 0 20px 60px rgba(235, 252, 131, 0.32);
}
.btn-huge .btn-arrow { font-size: 18px; }
.btn-huge:hover .btn-arrow { transform: translateX(5px); }

/* ================================================================
   SCROLL CUE
   ================================================================ */

#scrollCue {
  position: absolute; bottom: 11vh; left: 50%; z-index: 8;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.8s ease 2.2s;
}
body.is-ready #scrollCue { opacity: 1; }

#scrollCue.gone { opacity: 0 !important; transition: opacity 0.4s ease 0s !important; }

.cue-line {
  width: 1px; height: 44px;
  background: var(--cream-40);
  position: relative; overflow: hidden;
}
.cue-line::after {
  content: ''; position: absolute; left: 0; top: -50%;
  width: 100%; height: 50%;
  background: var(--lime);
  animation: cueDrop 1.8s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}
@keyframes cueDrop {
  0% { top: -50%; }
  100% { top: 110%; }
}

/* ================================================================
   VEIL + TRACK + OUTRO
   ================================================================ */

#veil {
  position: absolute; inset: 0; z-index: 9;
  background: linear-gradient(to top, var(--navy) 20%, rgba(12, 34, 51, 0.6) 55%, transparent);
  opacity: 0; pointer-events: none;
}

/* TRACK_VH — hauteur du scroll. Le scrub en occupe 80 % :
   19.7 ecrans ici, valeur reportee dans SCRUB_SCREENS de build-frames.py. */
#track { height: 2460vh; position: relative; z-index: 0; }

/* coupe franche entre les deux chapitres */
#cut {
  position: absolute; inset: 0; z-index: 9;
  background: var(--navy);
  opacity: 0; pointer-events: none;
}

#outro {
  position: relative; z-index: 20;
  background: var(--navy);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  border-top: 1px solid var(--cream-12);
  padding: 12vh 0;
}

.outro-inner { max-width: 880px; text-align: center; }

/* --- section Situation & commodités (négatif de la home, pleine largeur) --- */
.outro-inner.sit {
  max-width: none;
  width: 100%;
  padding: 0 clamp(20px, 4vw, 56px);
  text-align: left;
}

.sit-kicker { font-size: 10px; color: var(--lime); margin-bottom: 20px; }

.sit-title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(42px, 6.8vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 44px;
}
.sit-ghost {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(242, 239, 227, 0.32);
}

.sit-lead {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: flex-end;
  gap: 28px 56px;
  margin-bottom: 56px;
}
.sit-text {
  max-width: 560px;
  font-size: 15px; line-height: 1.65;
  color: var(--cream-60);
}
.sit-stat b {
  display: block;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(40px, 4.6vw, 60px);
  color: var(--lime);
  line-height: 1;
  margin-bottom: 8px;
}
.sit-stat span { font-size: 9px; color: var(--cream-40); }

.sit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--cream-12);
  border: 1px solid var(--cream-12);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 64px;
}
.sit-col { background: var(--navy); padding: 26px 24px 20px; }
.sit-col-head {
  font-size: 9px; color: var(--lime);
  padding-bottom: 16px; margin-bottom: 4px;
  border-bottom: 1px solid var(--cream-12);
}
.sit-item {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(242, 239, 227, 0.07);
}
.sit-item:last-child { border-bottom: none; }
.sit-item b {
  display: block;
  font-size: 15px; font-weight: 600;
  color: var(--cream);
}
.sit-item span {
  display: block;
  font-size: 12px; color: var(--cream-40);
  margin-top: 3px;
}
.sit-item i {
  font-style: normal;
  font-size: 9px; color: var(--cream);
  border: 1px solid var(--cream-12);
  background: rgba(8, 24, 36, 0.5);
  padding: 6px 10px 5px;
  border-radius: 99px;
  white-space: nowrap;
}

.outro-inner.sit .outro-actions { align-items: center; }

.outro-actions {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  margin-bottom: 74px;
}
.outro-link { font-size: 10px; color: var(--cream-40); text-decoration: none; transition: color 0.3s; }
.outro-link:hover { color: var(--lime); }

.outro-foot {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  font-size: 8px; color: var(--cream-40);
  border-top: 1px solid var(--cream-12);
  padding-top: 30px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* portrait ou écran étroit : la carte se pose en bas, l'image reste lisible */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .card {
    --cardBase: 0px;
    left: 16px; right: 16px; top: auto; bottom: 96px;
    width: auto; max-width: 520px;
    --padY: 24px; --padX: 24px; --padB: 22px;
  }
  .card-title { font-size: 27px; margin-bottom: 18px; }
  .card-stats { gap: 20px; padding: 15px 0 16px; margin-bottom: 16px; }
  .card-stats .st + .st::before { left: -10px; }
  .card-stats .st > b { font-size: 32px; }
  .card-stats--4 .st > b { font-size: 23px; }
  .card-modes { gap: 18px; margin-bottom: 16px; }
  .card-note { font-size: 13px; }
}

@media (max-width: 760px) {
  #rail { display: none; }
  .hud-addr { display: none; }
  .bar { height: 6vh; }

  /* sur telephone la carte occupe deja la moitie de l'ecran : le bandeau se tasse
     pour laisser voir le survol derriere */
  .card-photo { height: 92px; margin-bottom: 18px; }

  .pin-stem { height: 38px; }
  .pin-tag { bottom: 48px; font-size: 9px; }

  .sit-grid { grid-template-columns: 1fr; }
  .sit-lead { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 761px) and (max-width: 1020px) {
  .sit-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  .grain, .pin-ring, .cue-line::after, .live-dot, .caret { animation: none; }
  body.is-ready .hero-kicker, body.is-ready .hero-title, body.is-ready .hero-tagline,
  body.is-ready .hero-sub, body.is-ready .hero-actions, body.is-ready .hero-rule {
    transition: none;
  }
}

/* ================================================================
   ECRANS BAS — la carte doit tenir dans la hauteur visible.
   Le teaser est souvent vu en iframe (moins de hauteur utile) ou en
   paysage sur portable : sans cela, les cartes fournies debordent.
   ================================================================ */

@media (max-height: 780px) {
  .card { --padY: 24px; --padX: 26px; --padB: 22px; }
  .card-kicker { margin-bottom: 15px; }
  .card-title { font-size: clamp(24px, 2.4vw, 30px); margin-bottom: 17px; }
  .card-stats { padding: 14px 0 15px; margin-bottom: 14px; }
  .card-stats .st > b { font-size: clamp(28px, 2.8vw, 36px); }
  .card-stats .st > span { margin-bottom: 7px; }
  .card-modes { margin-bottom: 14px; }
  .card-rows > div { padding: 6px 0; }
  .card-note { font-size: 13px; }
}

@media (max-height: 620px) {
  /* on sacrifie les donnees secondaires plutot que de deborder */
  .card-rows, .card-photo { display: none; }
  .card-feature { padding: 8px 0; margin-bottom: 11px; font-size: 8px; }
  .card-title { font-size: 22px; margin-bottom: 13px; }
  .card-stats .st > b { font-size: 26px; }
  .card-stats { padding: 11px 0 12px; margin-bottom: 11px; }
  .card-note { font-size: 12px; line-height: 1.5; }
  .card-logo .hiatus-logo { width: min(210px, 74%); }
}
