/* Accueil et page Contact. Le ruban routier du logo est le fil de la page.
   Sans script, tout est lisible : chaque étape de « À quoi sert Itini » a son
   propre écran. Avec script, sur grand écran, le téléphone reste en place et
   l'écran change pendant le défilement (GSAP + Lenis, hébergés sur itini.fr). */

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: #0a1a3a;
  font: 1.05rem/1.6 var(--font);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  body { background: #061029; color: #e6eeff; }
}
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font); letter-spacing: -.025em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
[id] { scroll-margin-top: 80px; }
.intro { margin: 0 0 40px; max-width: 36rem; color: #4b5b7d; }
@media (prefers-color-scheme: dark) { .intro { color: #9fb1d6; } }

/* ---------- Ouverture ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #04163f;
}
.hero__in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 20px 72px;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 24px;
  align-items: center;
}
.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.04em;
}
.hero .lead { margin: 0 0 30px; max-width: 32rem; font-size: 1.2rem; color: #c9d8f5; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: 8px;
  font: 700 1rem var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--aqua); color: var(--ink); }
.btn--solid:hover { box-shadow: 0 10px 28px rgba(91, 231, 255, .4); }
.btn:disabled { opacity: .62; cursor: not-allowed; transform: none; box-shadow: none; }
.textlink { color: #fff; font-weight: 600; text-underline-offset: 4px; }
.dispo { margin: 14px 0 0; color: #c9d8f5; font-size: .95rem; }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { box-shadow: 0 10px 28px rgba(31, 123, 255, .4); }

.hero__visual { position: relative; display: grid; place-items: center; min-height: 520px; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.street { stroke: #5be7ff; stroke-opacity: .1; stroke-width: 2; fill: none; }
.road-glow { stroke: #5be7ff; stroke-opacity: .28; stroke-width: 60; fill: none; stroke-linecap: round; filter: blur(14px); }
.road-edge { stroke: #cfe6ff; stroke-opacity: .85; stroke-width: 40; fill: none; stroke-linecap: round; }
.road-body { stroke: url(#roadGradient); stroke-width: 34; fill: none; stroke-linecap: round; }
.road-dash { stroke: #fff; stroke-width: 3.5; fill: none; stroke-dasharray: 10 18; opacity: 0; animation: fade .6s 2s forwards, flow 2.4s linear 2s infinite; }
.draw { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 2.2s .25s cubic-bezier(.55, .1, .25, 1) forwards; }
.draw--late { animation-delay: .4s; }
.alert { opacity: 0; transform-box: fill-box; transform-origin: center; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes pop { to { opacity: 1; transform: scale(1); } }
.alert { transform: scale(.4); }

/* ---------- Maquette de téléphone ---------- */
.phone {
  position: relative;
  width: min(260px, 100%);
  aspect-ratio: 1 / 2.092;
  padding: 3.1%;
  border-radius: 42px;
  background: #0b1530;
  box-shadow: 0 0 0 2px #25396b, 0 24px 50px rgba(2, 10, 40, .45);
}
.phone::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 50%;
  width: 70px;
  height: 18px;
  margin-left: -35px;
  border-radius: 12px;
  background: #0b1530;
  z-index: 2;
}
.phone .screen { display: block; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; }
.phone--hero { position: relative; z-index: 1; transform: rotate(-3deg); }

/* ---------- À quoi sert Itini ---------- */
.story { padding: 84px 0 8px; }
.story h2, .proof h2 { margin: 0 0 12px; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; line-height: 1.1; }
.steps { list-style: none; margin: 0; padding: 0; }
.step {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 40px;
  align-items: center;
  padding: 36px 0;
}
.step:nth-child(even) .step__shot { order: -1; }
.step h3 { margin: 0 0 10px; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; line-height: 1.12; }
.step p { margin: 0 0 8px; max-width: 30rem; }
.step .meta { color: #5a6b8f; font-size: .95rem; }
@media (prefers-color-scheme: dark) { .step .meta { color: #94a8d0; } }
.step__shot { display: grid; place-items: center; }
.step__shot .phone { width: min(250px, 100%); box-shadow: 0 0 0 2px #25396b, 0 24px 50px rgba(2, 10, 40, .28); }
.caption { margin: 8px 0 0; color: #5a6b8f; font-size: .85rem; }
@media (prefers-color-scheme: dark) { .caption { color: #94a8d0; } }

/* Mode épinglé : grand écran, script actif. Les étapes se superposent. */
.story.is-pinned .steps { display: grid; height: min(640px, calc(100vh - 150px)); }
.story.is-pinned .step { grid-area: 1 / 1; padding: 0; }
.story.is-pinned .step__shot { order: 0; }
.story.is-pinned .step:nth-child(even) .step__shot { order: 0; }
.story.is-pinned .step__shot .phone { height: 100%; width: auto; max-height: 100%; }
.story.is-pinned .step:not(:first-child) .step__shot { opacity: 0; }
.story.is-pinned .step:not(:first-child) .step__text { opacity: 0; }
.dots { display: none; list-style: none; margin: 0; padding: 0; }
.story.is-pinned .dots { display: flex; gap: 8px; margin-top: 18px; }
.dots li { width: 28px; height: 4px; margin: 0; border-radius: 4px; background: #c6d6f3; transition: background-color .3s ease; }
.dots li.on { background: var(--blue); }

/* ---------- Chiffres ---------- */
.proof {
  margin-top: 72px;
  padding: 84px 0 80px;
  color: #fff;
  background: #04163f;
}
.proof .intro { color: #b9c9e8; margin-bottom: 36px; }
.stats { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-top: 1px solid var(--line-ink); }
.stats li { margin: 0; padding: 26px 22px 26px 0; border-bottom: 1px solid var(--line-ink); }
.stats .num { display: block; font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--aqua); font-variant-numeric: tabular-nums; }
.stats .what { display: block; margin-top: 8px; color: #c9d8f5; font-size: .98rem; max-width: 15rem; }
.proof a { color: var(--aqua); }

.sources { padding: 64px 0 24px; }
.sources h2 { margin: 0 0 10px; font-size: 1.6rem; font-weight: 800; }

.closing { margin: 64px auto 0; max-width: 1080px; padding: 0 20px; }
.closing__in {
  padding: 48px 40px;
  border-radius: 12px;
  color: #fff;
  background: #0b47c9;
}
.closing h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.12; max-width: 30rem; }
.closing p { margin: 0 0 24px; color: #e3eeff; max-width: 30rem; }

/* ---------- Page Contact ---------- */
.hero--short .hero__in { grid-template-columns: 1fr; padding: 56px 20px 56px; }
.hero--short + .wrap { padding-top: 24px; }
.hero--short h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.topics { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid #d9e3f5; }
.topics li { margin: 0; }
.topic {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto;
  gap: 8px 32px;
  align-items: baseline;
  padding: 28px 4px;
  border-top: 1px solid #d9e3f5;
  color: inherit;
  text-decoration: none;
  transition: background-color .2s ease, padding-left .25s ease;
}
.topic:hover { background: #f1f6ff; padding-left: 16px; }
.topic h2 { margin: 0; font-size: 1.35rem; font-weight: 800; }
.topic p { margin: 0; color: #4b5b7d; font-size: 1rem; }
.topic .go { font-weight: 700; color: var(--blue); }
@media (prefers-color-scheme: dark) {
  .topics, .topic { border-color: #1b3677; }
  .topic:hover { background: #0b1d4a; }
  .topic p { color: #9fb1d6; }
}
.direct { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 26px 28px; border-radius: 12px; background: #eaf2ff; }
@media (prefers-color-scheme: dark) { .direct { background: #0c2150; } }
.direct .mail { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 800; letter-spacing: -.02em; word-break: break-all; }
.direct p { margin: 0; flex: 1 1 100%; color: #4b5b7d; font-size: .98rem; }
@media (prefers-color-scheme: dark) { .direct p { color: #9fb1d6; } }
.notes { margin: 36px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 44rem; }
.notes li { margin: 0; padding-left: 20px; position: relative; color: #3a4a6c; font-size: .98rem; }
.notes li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--aqua); }
@media (prefers-color-scheme: dark) { .notes li { color: #b3c3e4; } }

/* ---------- Petits écrans ---------- */
@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; padding-top: 48px; }
  .hero__visual { min-height: 460px; }
  .step { grid-template-columns: 1fr; gap: 20px; }
  .step:nth-child(even) .step__shot { order: 0; }
  .topic { grid-template-columns: 1fr; padding: 22px 4px; }
  .closing__in { padding: 36px 24px; }
}

/* ---------- Mouvement réduit : tout est posé, rien ne bouge ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .draw { animation: none; stroke-dashoffset: 0; }
  .road-dash { animation: none; opacity: 1; }
  .alert { animation: none; opacity: 1; transform: none; }
  .btn, .topic { transition: none; }
  .btn:hover, .topic:hover { transform: none; }
}
