/* Page d'accueil, même direction que les captures App Store : chaque partie s'ouvre sur une photo de moto (trail,
   roadster, sportive) fondue dans le noir, puis le téléphone à l'écran assombri, d'où la fonction sort en gros plan.
   Le lime reste rare : les chiffres clés, le podium et les boutons. */
:root {
  --glass: hsl(0 0% 100% / 0.05);
  --glass-line: hsl(0 0% 100% / 0.1);
  --on-lime: hsl(75 30% 5%);
  --warning: hsl(38 95% 58%);
  --danger-text: hsl(0 85% 66%);
  --page: 1160px;
  --gutter: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.landing {
  /* la lueur du phare, en haut à droite, comme le fond des écrans de l'appli */
  background:
    radial-gradient(70vw 60vh at 100% -10%, hsl(66 100% 49% / 0.13), transparent 70%),
    linear-gradient(180deg, hsl(75 20% 6%) 0%, var(--bg) 40%);
  background-repeat: no-repeat;
  overflow-x: hidden;
}

.sr-only,
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  background: var(--lime);
  color: var(--on-lime);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Bientôt / disponible : un seul attribut sur <html> choisit les textes et les boutons (accueil.js). */
[data-store='soon'] .when-live,
[data-store='live'] .when-soon { display: none !important; }

/* En-tête */
.top {
  max-width: var(--page);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.logo { display: block; color: var(--text); }
.logo svg { display: block; width: 132px; height: auto; fill: currentColor; }

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font: 700 16px/1 'Red Hat Display', sans-serif;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), opacity 160ms;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible,
.field input:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.btn-primary { background: var(--lime); color: var(--on-lime); }
.btn-primary:hover { background: hsl(66 100% 56%); }
.btn-ghost { background: var(--glass); color: var(--text); box-shadow: inset 0 0 0 1px var(--glass-line); min-height: 44px; }
.btn-ghost:hover { background: hsl(0 0% 100% / 0.09); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.btn[aria-busy='true'] { opacity: 0.6; cursor: progress; }

/* Petits sur-titres et légendes : la police « instrument » */
.kicker {
  font: 500 12px/1.4 'Red Hat Mono', ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

main {
  position: relative;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
main > section { position: relative; z-index: 1; }

/* La photo d'ouverture de chaque partie : pleine largeur, fondue dans le noir en haut et en bas */
.scene { isolation: isolate; --band: 640px; }
.scene-photo {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  height: var(--band);
  background: var(--photo) center 45% / cover no-repeat;
}
.scene-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    hsl(75 18% 4% / 0.92) 0%,
    hsl(75 18% 4% / 0.6) 22%,
    hsl(75 18% 4% / 0.15) 48%,
    hsl(75 18% 4% / 0.6) 76%,
    var(--bg) 100%
  );
}
.hero .scene-photo { top: -88px; height: calc(var(--band) + 88px); }

/* Téléphones : les vraies captures de l'appli dans un cadre simple */
.phone {
  position: relative;
  width: min(300px, 72vw);
  aspect-ratio: 598 / 1300;
  margin: 0 auto;
  padding: 7px;
  border-radius: 46px;
  background: hsl(75 8% 9%);
  box-shadow:
    inset 0 0 0 1px hsl(0 0% 100% / 0.12),
    0 50px 90px -30px hsl(0 0% 0% / 0.9),
    0 0 0 6px hsl(75 18% 4%);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 39px; }
/* l'écran s'assombrit : la fonction en sort, en gros plan */
.phone.is-dim img { filter: brightness(0.42) saturate(0.85); }
figure { margin: 0; }

/* Gros plan : une partie de l'écran, reconstruite deux fois plus grande. Toutes les tailles sont en cqw, d'après la
   maquette Figma (carte de 1140 px : 1 px = 1/11,4 cqw), pour garder les proportions à toutes les largeurs. */
.scene-visual { position: relative; }
.zoom {
  position: absolute;
  z-index: 2;
  top: var(--at, 25%);
  left: 50%;
  width: min(400px, 92vw);
  transform: translateX(-50%);
  container-type: inline-size;
}
.zc {
  display: grid;
  gap: 2.5cqw;
  padding: 6.3cqw;
  border-radius: 7cqw;
  overflow: hidden;
  background:
    linear-gradient(135deg, hsl(0 0% 100% / 0.02), hsl(68 85% 35% / 0.22)),
    var(--surface);
  box-shadow: inset 0 0 0 1px hsl(0 0% 100% / 0.12), 0 30px 70px -20px hsl(0 0% 0% / 0.85);
}
.zc p { margin: 0; }
.zc hr { width: 100%; border: 0; border-top: 1px solid var(--glass-line); margin: 0.6cqw 0; }
.z-row { display: flex; align-items: baseline; gap: 1.9cqw; }
.z-hero { font: italic 900 28.9cqw/0.9 'Red Hat Display', sans-serif; color: var(--lime); letter-spacing: -0.02em; }
.z-unit { font-weight: 700; font-size: 8.8cqw; color: var(--muted); }
.z-sub { font-size: 5.1cqw; color: hsl(70 6% 78%); }
.z-meta { font-size: 3.9cqw; color: var(--muted); }
.z-title { font-weight: 700; font-size: 8.4cqw; line-height: 1.1; }
.z-mono { font: 500 3.2cqw 'Red Hat Mono', monospace; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.z-stats { display: flex; align-items: flex-end; gap: 7cqw; }
.z-stats p { display: grid; gap: 0.4cqw; }
.z-stats b { font: italic 900 10.5cqw/1 'Red Hat Display', sans-serif; font-variant-numeric: tabular-nums; }
.z-stats b i { font-style: normal; font-weight: 700; font-size: 0.42em; color: var(--muted); margin-left: 0.12em; }
.z-stats span { font-size: 4cqw; color: var(--muted); white-space: nowrap; }
.z-stats .z-lime { color: var(--lime); font-size: 13.4cqw; }
.z-bar { height: 2.3cqw; border-radius: 99px; background: linear-gradient(90deg, #4f5bd5, #2bb3e6, #5fe0b7, #b7f04a, #e3f900); }
.z-ends { display: flex; justify-content: space-between; font-size: 3.5cqw; color: var(--muted); }
.z-pill { align-self: center; padding: 1.2cqw 2.6cqw; border-radius: 99px; background: hsl(0 0% 100% / 0.08); font-weight: 700; font-size: 3.7cqw; }

.zc-flush { padding: 0; gap: 0; }
.z-img { position: relative; aspect-ratio: 1140 / 620; background: center / cover no-repeat; }
.z-tag {
  position: absolute;
  left: 4.2cqw;
  top: 4.2cqw;
  padding: 1.2cqw 2.6cqw;
  border-radius: 99px;
  background: hsl(0 0% 0% / 0.6);
  font: 500 3cqw 'Red Hat Mono', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.z-body { display: grid; gap: 1.9cqw; padding: 4.9cqw 5.6cqw 5.6cqw; }

.zc-post { padding: 5.3cqw; gap: 3cqw; }
.z-who { display: flex; align-items: center; gap: 2.6cqw; }
.z-who img { width: 13.2cqw; height: 13.2cqw; border-radius: 50%; object-fit: cover; }
.z-who > div { display: grid; gap: 0.5cqw; }
.z-name { display: flex; align-items: center; gap: 1.6cqw; font-weight: 700; font-size: 5.4cqw; }
.z-badge { padding: 0.8cqw 2cqw; border-radius: 99px; background: hsl(0 0% 100% / 0.08); font-weight: 500; font-size: 3.2cqw; color: hsl(70 6% 78%); }
.z-text { font-size: 4.6cqw; line-height: 1.36; }
.z-img-post { aspect-ratio: 1020 / 600; border-radius: 4.9cqw; overflow: hidden; }
.z-tag-bottom { top: auto; bottom: 3cqw; left: 3cqw; font: 500 3.3cqw 'Red Hat Display', sans-serif; letter-spacing: 0; text-transform: none; }
.z-foot { display: flex; gap: 5.3cqw; font-weight: 700; font-size: 4.2cqw; }
.z-foot span { display: inline-flex; align-items: center; gap: 1.4cqw; }
.z-foot svg { width: 4.9cqw; height: 4.9cqw; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.z-comment { font-size: 4cqw; color: hsl(70 6% 78%); }
.z-comment b { color: var(--text); }

.z-podium { display: flex; justify-content: center; align-items: flex-end; gap: 3.2cqw; margin-top: 1.6cqw; }
.z-step { display: grid; justify-items: center; gap: 1.6cqw; width: 26.3cqw; }
.z-step img { width: 15.8cqw; height: 15.8cqw; border-radius: 50%; object-fit: cover; }
.z-1 img { width: 20.2cqw; height: 20.2cqw; box-shadow: 0 0 0 0.7cqw var(--lime); }
.z-step .z-name { font-size: 4.4cqw; }
.z-pts { display: inline-flex; align-items: center; gap: 1cqw; font-weight: 700; font-size: 3.9cqw; }
.z-pts::before { content: ''; width: 3.2cqw; height: 3.2cqw; border-radius: 50%; background: var(--lime); }
.z-step span {
  width: 100%;
  padding-top: 2.3cqw;
  border-radius: 3.2cqw;
  background: hsl(0 0% 100% / 0.07);
  text-align: center;
  font: italic 900 9.6cqw/1 'Red Hat Display', sans-serif;
  color: hsl(70 6% 78%);
}
.z-2 span { height: 20.2cqw; }
.z-1 span { height: 29cqw; background: hsl(66 100% 49% / 0.22); color: var(--lime); }
.z-3 span { height: 14.9cqw; }

/* Accueil */
.hero {
  display: grid;
  gap: 56px;
  padding: 12vh 0 120px;
  --band: 760px;
}
.hero h1 { margin: 18px 0 24px; font-weight: 900; line-height: 0.92; }
.h1-big {
  display: block;
  font-style: italic;
  font-size: clamp(76px, 19vw, 168px);
  letter-spacing: -0.035em;
  /* l'italique déborde un peu à droite : on lui laisse la place */
  padding-right: 0.08em;
}
.h1-rest { display: block; font-size: clamp(30px, 6.4vw, 54px); letter-spacing: -0.02em; margin-top: 6px; }
.lede { font-size: 19px; line-height: 1.55; color: hsl(70 6% 78%); max-width: 520px; margin: 0 0 32px; }
.hero .store-link { margin-bottom: 28px; }

/* Inscription */
.signup { max-width: 520px; }
.signup-fields { display: flex; gap: 10px; align-items: flex-end; }
.field { flex: 1; display: grid; min-width: 0; }
.field input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--text);
  font: 500 17px 'Red Hat Display', sans-serif;
}
.field input::placeholder { color: hsl(70 6% 52%); }
.field input[aria-invalid='true'] { border-color: var(--danger-text); }
.signup-fields .btn { height: 52px; flex: none; }


.signup-help { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.signup-help a { color: var(--muted); }
.signup-status { margin: 8px 0 0; font-weight: 700; font-size: 15px; }
.signup-status[data-tone='error'] { color: var(--danger-text); }
.signup.is-done .signup-fields,
.signup.is-done .signup-help { display: none; }
.signup.is-done .signup-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 20px;
  background: hsl(66 100% 49% / 0.12);
  box-shadow: inset 0 0 0 1px hsl(66 100% 49% / 0.35);
  font-size: 17px;
}

/* Fonctionnalités */
.feat { display: grid; gap: 48px; padding: 120px 0; }
.scene.feat { padding-top: 150px; }
.feat h2,
.finish h2 {
  font-weight: 900;
  font-style: italic;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 14px 0 20px;
  padding-right: 0.06em;
}
.feat-text > p:not(.kicker) { font-size: 18px; line-height: 1.6; color: hsl(70 6% 78%); max-width: 480px; margin: 0; }
.feat-rank h2 span { display: block; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.chips li { padding: 10px 18px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); font-weight: 500; }

/* Illustration des zones de confidentialité */
.privacy {
  width: min(320px, 80vw);
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  background: radial-gradient(120% 90% at 30% 20%, hsl(180 25% 13%), hsl(190 25% 8%));
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 40px 80px -30px hsl(0 0% 0% / 0.8);
}
.privacy svg { display: block; width: 100%; height: auto; }
.privacy .contours path { fill: none; stroke: hsl(180 20% 30% / 0.5); stroke-width: 1.2; }
.privacy .zone { fill: hsl(0 0% 100% / 0.04); stroke: hsl(0 0% 100% / 0.5); stroke-width: 1.5; stroke-dasharray: 5 6; }
.privacy .hidden-trace { fill: none; stroke: hsl(0 0% 100% / 0.22); stroke-width: 4; stroke-dasharray: 2 8; stroke-linecap: round; }
.privacy .shown-trace { fill: none; stroke: var(--lime); stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 6px hsl(66 100% 49% / 0.5)); }
.privacy .trace-end { fill: var(--bg); stroke: hsl(0 0% 100% / 0.7); stroke-width: 3; }
.privacy text { fill: hsl(0 0% 100% / 0.7); font: 500 12px 'Red Hat Mono', monospace; letter-spacing: 0.14em; text-transform: uppercase; }

/* Gratuit / Premium */
.plans {
  display: grid;
  gap: 16px;
  padding: 72px 0 40px;
}
.plan { padding: 28px; border-radius: 28px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--glass-line); }
.plan h3 { margin: 0 0 8px; font-size: 22px; font-weight: 900; }
.plan p { margin: 0; color: hsl(70 6% 78%); }
.safety { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* Arrivée */
.finish { padding: 200px 0 40px; text-align: center; --band: 620px; }
.finish .scene-photo { height: 100%; background-position: center 35%; }
/* le formulaire passe sur la photo : on l'assombrit davantage */
.finish .scene-photo::after {
  background: linear-gradient(180deg, var(--bg) 0%, hsl(75 18% 4% / 0.55) 28%, hsl(75 18% 4% / 0.78) 62%, var(--bg) 100%);
}
.finish .signup { margin: 0 auto; text-align: left; }
.finish .store-link { margin: 8px 0 32px; }
.finish h2 { margin: 18px auto 32px; max-width: 760px; }

/* au-dessus des photos des parties, qui peuvent déborder de leur section */
.foot { position: relative; z-index: 2; max-width: var(--page); margin: 96px auto 0; padding: 24px var(--gutter) 40px; }

/* Grand écran : texte et téléphone côte à côte, en alternance */
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; align-items: center; padding-top: 6vh; }
  .feat { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; padding: 90px 0; }
  .scene.feat { align-items: start; padding-top: 140px; --band: 720px; }
  .scene .feat-text { padding-top: 60px; }
  /* sur grand écran, la photo s'assombrit aussi du côté du texte */
  .scene-photo { background-position: center 40%; }
  .scene .scene-photo::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, hsl(75 18% 4% / 0.75), transparent 60%); }
  .scene.feat-flip .scene-photo::before { background: linear-gradient(270deg, hsl(75 18% 4% / 0.75), transparent 60%); }
  .feat-flip .feat-text { order: 2; }
  .feat-text { padding-left: 4%; }
  .feat-flip .feat-text { padding-left: 0; padding-right: 4%; }
  .plans { grid-template-columns: 1fr 1fr; }
  .safety { grid-column: 1 / -1; }
  .phone { width: 320px; }
  .hero .phone { width: 330px; }
  .hero { align-items: start; }
}

@media (max-width: 520px) {
  :root { --gutter: 16px; }
  .signup-fields { flex-direction: column; align-items: stretch; }
  .signup-fields .btn { width: 100%; }
  .hero { padding-bottom: 96px; }
  .feat { padding: 96px 0; }
  .scene { --band: 600px; }
  .hero { --band: 720px; }
  /* sur téléphone, le texte couvre toute la photo : on l'assombrit au milieu aussi */
  .scene-photo::after {
    background: linear-gradient(180deg, hsl(75 18% 4% / 0.9) 0%, hsl(75 18% 4% / 0.62) 25%, hsl(75 18% 4% / 0.5) 55%, hsl(75 18% 4% / 0.72) 80%, var(--bg) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}
