:root {
  --bg: #EDF1F4;
  --card: #FBFCFD;
  --fill: #DEE5EB;
  --ink: #0F1C2B;
  --ink2: #55657A;
  --ink3: #93A1B0;
  --accent: #163A5F;
  --on-accent: #F3F7FA;
  --coral: #FF7F5C;
  --brand-gradient: linear-gradient(165deg, #1F4D7A 0%, #163A5F 55%, #112E4C 100%);
  --shadow-card: 0 1px 2px rgba(15, 28, 43, .04), 0 12px 40px rgba(15, 28, 43, .07);
  --gutter: 32px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Instrument Sans', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .82; }

h1, h2, h3, h4 {
  font-weight: 700;
  font-stretch: 85%;
  color: var(--ink);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(237, 241, 244, .8);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: .5px solid rgba(15, 28, 43, .08);
}

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-spacer { flex: 1; }

.nav-links {
  display: flex;
  gap: 26px;
  font-size: 15px;
  font-weight: 600;
}

.nav-links a { color: var(--ink); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}

.mark {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand-gradient);
}

.mark svg { display: block; width: 100%; height: 100%; fill: var(--on-accent); }
.mark-top { fill: var(--coral); }

.wordmark {
  font-weight: 700;
  font-stretch: 85%;
  letter-spacing: -0.035em;
  font-size: 24px;
  line-height: 1;
}

/* ---------- Buttons ---------- */
.btn {
  flex: none;
  display: flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 600;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-soft {
  background: var(--fill);
  color: var(--accent);
}

.btn-sm { height: 40px; padding: 0 18px; font-size: 15px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 17px; }
.btn-soft.btn-lg { padding: 0 22px; }
.btn-xl { height: 56px; padding: 0 28px; font-size: 17px; margin-top: 32px; }
.btn-primary.btn-lg, .btn-xl { box-shadow: 0 8px 22px rgba(22, 58, 95, .25); }

/* ---------- Layout ---------- */
.root {
  position: relative;
  display: block;
  overflow-x: clip;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Trois colonnes : contenu | rail du parcours | contenu */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px minmax(0, 1fr);
}

.col { min-width: 0; }

.rail {
  position: relative;
  align-self: stretch;
}

.rail i {
  position: absolute;
  left: var(--x);
  top: var(--y);
}

/* ---------- Parcours ---------- */
.trail {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  pointer-events: none;
  display: none;
}

.trail-dot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--coral);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  box-shadow: 0 4px 14px rgba(255, 127, 92, .45);
}

/* ---------- Typography ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(15, 28, 43, .05), 0 4px 14px rgba(15, 28, 43, .06);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.display {
  margin: 24px 0 0;
  letter-spacing: -0.035em;
  font-size: clamp(54px, 7vw, 100px);
  line-height: .92;
  text-wrap: balance;
}

.period {
  display: inline-block;
  width: .19em;
  height: .19em;
  margin-left: .05em;
  border-radius: 999px;
  background: var(--coral);
}

.trail-on .period { opacity: 0; }

.lead {
  margin: 26px 0 0;
  max-width: 460px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink2);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink2);
}

.title {
  margin: 12px 0 0;
  letter-spacing: -0.03em;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: .95;
  text-wrap: balance;
}

.section-lead {
  margin: 20px 0 0;
  max-width: 460px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink2);
  text-wrap: pretty;
}

.title-md {
  margin: 12px 0 0;
  letter-spacing: -0.03em;
  font-size: clamp(36px, 4vw, 54px);
  line-height: .95;
}

.body-lg {
  margin: 18px 0 0;
  max-width: 420px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink2);
  text-wrap: pretty;
}

/* ---------- Phones ---------- */
/* Captures du prototype à 402×874, mises à l'échelle par --s */
.phone {
  --s: .8;
  width: calc(402px * var(--s));
  height: calc(874px * var(--s));
  border-radius: calc(48px * var(--s));
  overflow: hidden;
  box-shadow:
    0 calc(40px * var(--s)) calc(80px * var(--s)) rgba(0, 0, 0, .18),
    0 0 0 calc(1px * var(--s)) rgba(0, 0, 0, .12);
}

.phone img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Hero ---------- */
.hero {
  align-items: center;
  padding: 56px 0 120px;
}

.hero-phones {
  position: relative;
  min-width: 0;
  height: 720px;
}

.phone-back {
  position: absolute;
  left: min(0px, calc(100% - 470px));
  top: 70px;
  z-index: 1;
}

.phone-front {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
}

/* ---------- Showcases ---------- */
.features-head {
  padding: 40px 0 60px;
  scroll-margin-top: 80px;
}

.showcase {
  align-items: center;
  padding: 40px 0;
}

/* Téléphone à gauche en desktop, sous le texte en mobile */
.showcase--gym .showcase-text,
.showcase--gym .rail { order: 1; }

.stage {
  position: relative;
  min-width: 0;
  height: 640px;
  border-radius: 36px;
  overflow: hidden;
}

.stage-light {
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.stage-light .phone {
  position: absolute;
  left: 50%;
  top: 56px;
  margin-left: -161px;
}

.stage-dark { background: var(--brand-gradient); }

.stage-dark .phone {
  position: absolute;
  right: 28px;
  top: 56px;
}

.scale {
  max-width: 340px;
  margin-top: 28px;
}

.scale-bar {
  display: flex;
  gap: 3px;
}

.scale-bar span {
  flex: 1;
  height: 12px;
  border-radius: 4px;
}

.scale-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px 0 10px;
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
}

.chip i {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.topo {
  position: absolute;
  left: 24px;
  bottom: 28px;
  z-index: 2;
  width: 200px;
  margin: 0;
  border-radius: 20px;
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
}

.topo svg {
  display: block;
  background: #C9C2B4;
}

.topo-line {
  fill: #F3F7FA;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55));
}

.topo-line .topo-top { fill: var(--coral); }

.topo figcaption { padding: 10px 12px 12px; }

.topo strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.topo figcaption span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink2);
}

/* ---------- Cards ---------- */
.cards { padding: 60px 0 40px; }

.cards-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cards-col--stagger { padding-top: 150px; }

.card {
  border-radius: 32px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.card h3 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1;
}

.card p {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink2);
  text-wrap: pretty;
}

.card-media { overflow: hidden; }
.card-head { padding: 34px 34px 0; }
.card-media h3 { font-size: 36px; }
.card-media p { margin: 12px 0 0; max-width: 400px; }

.card-screen {
  position: relative;
  height: 400px;
  margin-top: 28px;
  overflow: hidden;
}

.card-screen .phone {
  position: absolute;
  left: 50%;
  top: 0;
  margin-left: -145px;
}

.card-screen--profile .phone { top: -150px; }

.card-icon { padding: 30px 34px 32px; }
.card-icon h3 { margin-top: 20px; font-size: 30px; }
.card-icon p { margin: 10px 0 0; }

.card-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(22, 58, 95, .1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Comment ça marche ---------- */
.steps-head {
  padding: 100px 0 20px;
  scroll-margin-top: 80px;
}

.step {
  align-items: center;
  padding: 26px 0;
}

.step .rail { min-height: 150px; }

.step-text { max-width: 380px; }

.step-text--end {
  margin-left: auto;
  text-align: right;
}

.step h4 {
  margin: 0;
  letter-spacing: -0.025em;
  font-size: 30px;
  line-height: 1.05;
}

.step p {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink2);
}

.stop,
.step-badge {
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-stretch: 85%;
}

.stop {
  position: absolute;
  left: var(--x);
  top: 50%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  font-size: 24px;
  box-shadow: 0 0 0 6px var(--bg);
  transition: background .25s, color .25s;
}

.stop.is-on {
  background: var(--coral);
  color: #2A0F07;
}

/* Pastille numérotée affichée à la place du rail en mobile */
.step-badge {
  display: none;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  font-size: 20px;
}

/* ---------- CTA ---------- */
.cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 150px 0 130px;
  scroll-margin-top: 60px;
}

.cta-icon {
  position: relative;
  width: 168px;
  height: 168px;
  border-radius: 38px;
  background: var(--brand-gradient);
  box-shadow: 0 2px 4px rgba(15, 28, 43, .1), 0 24px 60px rgba(15, 28, 43, .25);
}

.cta-icon svg { display: block; fill: var(--on-accent); }

.cta-slot {
  position: absolute;
  left: 72%;
  top: 27%;
  width: 20%;
  height: 20%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--coral);
  box-shadow: inset 0 0 0 2px rgba(255, 127, 92, .6);
}

/* La prise du parcours vient se poser dans l'icône */
.trail-on .cta-slot { background: rgba(255, 127, 92, 0); }

.cta .title { margin-top: 40px; }

.cta-sub {
  margin: 16px 0 0;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink2);
}

/* ---------- Footer ---------- */
.footer { border-top: .5px solid rgba(15, 28, 43, .1); }

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
}

.brand-sm { gap: 9px; }
.brand-sm .mark { width: 28px; height: 28px; border-radius: 7px; }
.brand-sm .wordmark { font-size: 20px; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
  font-weight: 600;
}

.footer-links a { color: var(--ink2); }

.footer-copy {
  width: 100%;
  font-size: 13px;
  color: var(--ink3);
}

/* ---------- Mobile : une colonne, sans parcours ---------- */
@media (max-width: 899px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .nav-links { display: none; }

  .hero-phones { margin-top: 56px; }
  .phone-back { left: 0; }

  .showcase--gym .stage { order: 2; }
  .showcase-text { padding: 40px 0; }

  .cards-col--stagger { padding-top: 0; }
  .cards { row-gap: 24px; }

  .step-text--end {
    margin-left: 0;
    text-align: left;
  }

  .step-badge { display: flex; }
}
