/* smavee.com — accueil. Les bases (couleurs, en-tête, boutons, pied de page) sont dans site.css.
   Un seul moment fort : le simulateur. Le reste reste calme, et ce sont les vraies captures de l'app qui parlent. */

/* ─── Téléphone ───────────────────────────────────────── */
/* --w fixe la largeur ; tout le reste du cadre en découle. */
.device {
  --w: 300px;
  position: relative;
  width: var(--w);
  flex-shrink: 0;
  padding: calc(var(--w) * 0.028);
  border-radius: calc(var(--w) * 0.165);
  background: #050c09;
  box-shadow:
    0 0 0 1px var(--line-strong),
    inset 0 0 0 1px rgba(232, 244, 241, 0.06),
    0 50px 100px -30px rgba(0, 0, 0, 0.7);
}
.device img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.14);
}
.device-sm { --w: 240px; }

/* ─── Sections ────────────────────────────────────────── */

.band { padding-top: var(--section); }

.band-title {
  max-width: 760px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.band-lead {
  max-width: 520px;
  margin-top: 18px;
  color: var(--text-2);
  font-size: 18px;
}

.checks {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; color: var(--p1); }

/* ─── Hero ────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -420px;
  right: -260px;
  width: 1100px;
  height: 1100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 196, 167, 0.2) 0%, rgba(0, 196, 167, 0) 62%);
  pointer-events: none;
}
/* Contrepoint chaud, à peine perceptible, repris de la part ambre de l'anneau. */
.hero::after {
  content: "";
  position: absolute;
  left: -320px;
  bottom: -420px;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 174, 74, 0.07) 0%, rgba(255, 174, 74, 0) 60%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  z-index: 1;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center;
  gap: 24px;
  min-height: min(calc(100svh - 72px), 860px);
}

.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 32px; padding-block: 56px; }

/* Le titre porte la page : trois lignes, chacune posée à sa place au chargement. */
.hero h1 {
  font-size: clamp(56px, 8.4vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.hero h1 .line > span { display: block; }

.hero-lead {
  max-width: 34em;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--text-2);
}

.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 4px; }
.hero-actions .store-badges { justify-content: flex-start; }
.hero-note { color: var(--text-2); font-size: 14px; }

.hero-visual {
  position: relative;
  height: 720px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual .orbe {
  inset: 50% auto auto 50%;
  width: 640px;
  height: 640px;
  transform: translate(-50%, -50%);
}

.hero-visual .device { position: absolute; }
.device-front {
  --w: 300px;
  left: 50%;
  top: 50%;
  transform: translate(-62%, -50%);
  animation: rise 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.device-back {
  --w: 252px;
  left: 50%;
  top: 50%;
  transform: translate(-2%, -57%);
  animation: rise-back 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translate(-62%, -44%); }
}
@keyframes rise-back {
  from { opacity: 0; transform: translate(-2%, -51%); }
}

/* ─── Simulateur ──────────────────────────────────────── */

.sim-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.sim-grid::before {
  /* La seule grande surface de la page : elle signale l'endroit où l'on peut agir. */
  content: "";
  grid-area: 1 / 1 / 2 / 3;
  align-self: stretch;
  margin: calc(clamp(32px, 4.5vw, 64px) * -1);
  border-radius: 36px;
  background: linear-gradient(160deg, #163126 0%, var(--card) 55%, #10241c 100%);
  border: 1px solid var(--line);
  z-index: -1;
}
.sim { position: relative; z-index: 0; }
.sim .wrap { padding-inline: calc(var(--gutter-l) + clamp(32px, 4.5vw, 64px)); }
.sim-copy, .sim-result { grid-row: 1; }
.sim-copy { grid-column: 1; }
.sim-result { grid-column: 2; }

.sim-copy h2 {
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.sim-profile { border: 0; margin: 36px 0 0; padding: 0; min-width: 0; }
.sim-profile legend,
.sim-amount label {
  display: block;
  padding: 0;
  margin-bottom: 12px;
  color: var(--text-2);
  font-size: 15px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented label {
  padding: 10px 18px;
  border-radius: 12px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.segmented label:hover { color: var(--text); }
.segmented input:checked + label { background: var(--brand); color: var(--on-brand); }
.segmented input:focus-visible + label { outline: 2px solid var(--p2); outline-offset: 2px; }

.sim-amount { margin-top: 32px; }
.sim-amount output {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(56px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.sim-amount input[type="range"] {
  --fill: 23.08%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  max-width: 420px;
  height: 28px;
  margin: 20px 0 0;
  background: transparent;
  cursor: pointer;
}
.sim-amount input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--brand) var(--fill), rgba(232, 244, 241, 0.14) var(--fill));
}
.sim-amount input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--brand) var(--fill), rgba(232, 244, 241, 0.14) var(--fill));
}
.sim-amount input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.sim-amount input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.sim-amount input[type="range"]:focus-visible { outline: 2px solid var(--p2); outline-offset: 4px; border-radius: 8px; }

.sim-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.sim-quick button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-2);
  font: 600 15px/1 var(--font-body);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.sim-quick button:hover { color: var(--text); }
.sim-quick button[aria-pressed="true"] { border-color: var(--brand); color: var(--text); }

.sim-result { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 28px; }

.sim-ring { position: relative; width: min(100%, 300px); aspect-ratio: 1; }
.sim-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.sim-ring .seg {
  fill: none;
  stroke-width: 20;
  transition: stroke-dasharray 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), stroke-dashoffset 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sim-centre {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.sim-centre span { color: var(--text-2); font-size: 14px; }
.sim-centre strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.sim-rows { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 420px; }
.sim-rows li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 76px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.sim-rows .dot { width: 10px; height: 10px; border-radius: 50%; }
.sim-rows .pct { color: var(--text-2); }
.sim-rows b { text-align: right; font-weight: 600; }

.sim-result figcaption { max-width: 420px; color: var(--text-2); font-size: 13px; line-height: 1.5; }

/* ─── Pour qui ────────────────────────────────────────── */

.audience {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 56px;
}
.audience article { padding-top: 22px; border-top: 2px solid var(--accent); }
.audience h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; }
.audience p { margin-top: 10px; color: var(--text-2); }

/* ─── Étapes : une vraie séquence, d'où les numéros ───── */

.steps {
  list-style: none;
  margin: 64px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.steps li { display: flex; flex-direction: column; align-items: flex-start; }
.steps .device { margin-bottom: 32px; align-self: center; }
.step-n {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 50%;
  border: 1px solid var(--brand);
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.steps h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; }
.steps p { margin-top: 10px; color: var(--text-2); }

/* ─── Fonctionnalités : texte + vraie capture ─────────── */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: center;
}
.feature-reverse .feature-media { order: 2; }

.feature-media {
  position: relative;
  display: flex;
  justify-content: center;
  padding-block: 24px;
}
.feature-media::before {
  content: "";
  position: absolute;
  inset: 10% 5%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 196, 167, 0.16), rgba(0, 196, 167, 0));
  pointer-events: none;
}
.feature-media .device { --w: 320px; }

.feature-text h2 {
  font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.feature-text > p { margin-top: 18px; max-width: 34em; color: var(--text-2); font-size: 18px; }

/* ─── Confiance ───────────────────────────────────────── */

.trust-list {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}
.trust-list li { padding-top: 22px; border-top: 1px solid var(--line-strong); }
.trust-list svg { width: 26px; height: 26px; color: var(--p1); }
.trust-list h3 { margin-top: 16px; font-size: 19px; letter-spacing: -0.01em; }
.trust-list p { margin-top: 8px; color: var(--text-2); font-size: 16px; }

.scope {
  margin-top: 80px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  border: 1px solid var(--line);
}
.scope-title { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.02em; }
.scope-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 48px;
  margin-top: 28px;
}
.scope-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; align-content: start; }
.scope-cols li { display: flex; gap: 12px; align-items: flex-start; }
.scope-cols svg { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; }
.scope .is svg { color: var(--p1); }
.scope .isnt svg { color: var(--text-2); }
.scope .isnt li { color: var(--text-2); }
.scope-foot { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; }

/* ─── FAQ ─────────────────────────────────────────────── */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: start;
}
.faq .band-title { position: sticky; top: 112px; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq summary:focus-visible { outline: 2px solid var(--p2); outline-offset: 4px; border-radius: 6px; }
.faq details > div { padding: 0 40px 24px 0; color: var(--text-2); display: grid; gap: 12px; }

/* ─── Appel final ─────────────────────────────────────── */

.cta {
  position: relative;
  overflow: hidden;
  margin-top: var(--section);
  padding-block: clamp(120px, 14vw, 200px);
  text-align: center;
}
.cta-orbe {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(760px, 140vw);
  height: min(760px, 140vw);
  transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(closest-side, transparent 48%, #000 70%);
  mask-image: radial-gradient(closest-side, transparent 48%, #000 70%);
}
.cta-orbe .orbe-ring { opacity: 0.22; }
.cta-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cta h2 {
  max-width: 12ch;
  font-size: clamp(40px, 5.6vw, 72px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.cta p { max-width: 30em; color: var(--text-2); }

/* ─── Écrans moyens ───────────────────────────────────── */

@media (max-width: 1024px) {
  .trust-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-back { display: none; }
  .device-front { transform: translate(-50%, -50%); animation-name: rise-center; }
  @keyframes rise-center { from { opacity: 0; transform: translate(-50%, -44%); } }
}

/* ─── Petits écrans ───────────────────────────────────── */

@media (max-width: 860px) {
  /* Sur téléphone, le visuel passe en premier, recadré et fondu en bas. */
  .hero-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 0; }
  .hero-visual {
    order: -1;
    height: 440px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 98%);
    mask-image: linear-gradient(to bottom, #000 70%, transparent 98%);
  }
  .hero-visual .orbe { width: 420px; height: 420px; top: 52%; }
  .device-front { --w: min(62vw, 260px); top: 24px; transform: translateX(-50%); animation-name: rise-top; }
  @keyframes rise-top { from { opacity: 0; transform: translate(-50%, 24px); } }
  .hero-copy { padding-block: 8px 0; gap: 22px; }

  .sim .wrap { padding: 32px calc(var(--gutter-r) + 20px) 32px calc(var(--gutter-l) + 20px); }
  .sim-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .sim-grid::before { grid-area: 1 / 1 / 3 / 2; margin: -32px -20px; border-radius: 28px; }
  .sim-copy, .sim-result { grid-column: 1; }
  .sim-result { grid-row: 2; }
  .sim-ring { width: min(100%, 260px); }

  .audience,
  .steps,
  .feature,
  .faq,
  .scope-cols { grid-template-columns: minmax(0, 1fr); }
  .audience { gap: 32px; }

  /* Les trois étapes défilent à l'horizontale, une capture à la fois. */
  .steps {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: min(78vw, 300px);
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter-l) * -1) calc(var(--gutter-r) * -1);
    padding-inline: var(--gutter-l) var(--gutter-r);
    /* Sans ça, chaque étape se cale contre le bord de l'écran et le texte est rogné. */
    scroll-padding-inline: var(--gutter-l) var(--gutter-r);
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .steps::-webkit-scrollbar { display: none; }
  .steps li { scroll-snap-align: start; }
  .steps .device { --w: min(60vw, 230px); }

  .feature-media { order: -1; }
  .feature-reverse .feature-media { order: -1; }
  .feature-media .device { --w: min(64vw, 270px); }

  .faq { gap: 24px; }
  .faq .band-title { position: static; }
  .faq summary { font-size: 17px; padding: 18px 0; }
  .faq details > div { padding-right: 0; }
}

@media (max-width: 560px) {
  .trust-list { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .segmented label { padding: 10px 13px; }
  .sim-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .sim-quick button { padding: 0 4px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .device-front, .device-back { animation: none; }
  .sim-ring .seg, .segmented label, .faq summary::after { transition: none; }
}

/* ─── Mouvement ───────────────────────────────────────── */
/* Un seul enchaînement au chargement (titre, puis téléphones), puis des apparitions discrètes
   des captures au défilement. Rien ne bouge si le visiteur a réduit les animations. */

@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line > span { animation: line-up 1.1s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero h1 .line:nth-child(2) > span { animation-delay: 0.09s; }
  .hero h1 .line:nth-child(3) > span { animation-delay: 0.18s; }
  .hero-copy > :not(h1) { animation: copy-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.45s both; }
  .hero-copy > :nth-child(3) { animation-delay: 0.55s; }
  .device-front { animation-delay: 0.3s; }
  .device-back { animation-delay: 0.45s; }

  @keyframes line-up {
    from { transform: translateY(105%); }
  }

  @keyframes copy-in {
    from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  }

  /* Profondeur : en quittant le hero, le téléphone de derrière glisse moins vite que celui de devant.
     Grands écrans seulement : en dessous, le téléphone de derrière est masqué. */
  @supports (animation-timeline: scroll()) {
  @media (min-width: 1025px) {
    .device-front, .device-back {
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 700px;
      animation-fill-mode: both;
    }
    .device-front { animation-name: rise, drift-front; animation-duration: 1s, auto; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), linear; }
    .device-back { animation-name: rise-back, drift-back; animation-duration: 1.2s, auto; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), linear; }
    @keyframes drift-front { to { translate: 0 -40px; } }
    @keyframes drift-back { to { translate: 0 40px; } }
  }
  }

  /* Apparitions au défilement : la classe .motion est posée par site.js. */
  .motion [data-reveal] {
    opacity: 0;
    translate: 0 32px;
    scale: 0.98;
    transition: opacity 0.9s ease, translate 1.1s cubic-bezier(0.2, 0.8, 0.2, 1), scale 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 0.12s);
  }
  .motion [data-reveal].is-in { opacity: 1; translate: none; scale: none; }

  .segmented label, .sim-quick button { transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease; }
  .sim-quick button:active, .segmented label:active { transform: scale(0.96); }
}
