/* ==========================================================================
   SWHAT landing : styles
   Maquette Figma « Landing Desktop » (1512 px de large). Les tailles de titre
   sont en vw plafonnées à la valeur Figma, pour garder la composition de 360 à 1512 px.
   ========================================================================== */

/* --- Polices (auto-hébergées) --------------------------------------------- */
@font-face { font-family: "Nohemi"; src: url("fonts/nohemi-thin.woff2") format("woff2"); font-weight: 100; font-display: swap; }
@font-face { font-family: "Nohemi"; src: url("fonts/nohemi-black.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

/* --- Jetons (palette Figma « colors + fonts ») ----------------------------- */
:root {
  /* Taille du titre du hero : 166 px à 1512 px comme Figma, plafonnée par la hauteur d'écran
     pour que l'état final tienne. Sur :root car .so-what s'en sert aussi. */
  --title-size: clamp(52px, min(10.98vw, 17vh), 166px);
  /* Distance entre le centre de l'écran et le bas de « pour rien » dans l'état final, en tailles
     de titre (demi-hauteur du titre 1.54 + décalage du bas). Recalculer si --shift-bottom change. */
  --hero-below: 2.22;
  --aubergine: #161223;
  --light-pink: #ffa1ba;
  --cta-pink: #ff4968;
  --yellow: #ffcd6a;
  --light-blue: #c1d6ff;
  --pale-blue: #dde9ff;   /* fond de la section waitlist, relevé sur l'export */

  --font-title: "Nohemi", "Arial Black", sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 30px);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);   /* léger rebond, l'univers est « peps » */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--aubergine);
  color: var(--light-blue);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 600px) { body { font-size: 16px; } }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--font-title); font-weight: 900; text-transform: uppercase; }
p { margin: 0; }
a { color: inherit; }
.thin { font-weight: 100; }

.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--yellow); color: var(--aubergine); padding: 8px 16px; border-radius: 100px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* --- Boutons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border: 0; border-radius: 100px;
  font-family: var(--font-title); font-weight: 900; font-size: 16px; line-height: 1.3;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease-pop), box-shadow .35s var(--ease-pop), background-color .2s;
}
.btn--pink { background: var(--cta-pink); color: var(--aubergine); }
.btn:hover:not(:disabled) { transform: translateY(-3px) rotate(-2deg) scale(1.04); box-shadow: 0 6px 0 var(--aubergine), 0 6px 0 2px var(--yellow); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* --- En-tête -------------------------------------------------------------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--gutter);
}
.site-header__logo img { width: clamp(84px, 9vw, 115px); }

/* ==========================================================================
   HERO
   --p (0 à 1) est posé par main.js selon le scroll dans .hero.
   Valeur par défaut 1 = état final (sans JS, ou animations réduites).
   Les décalages sont en em de la taille du titre : la composition suit la taille d'écran.
   ========================================================================== */
.hero {
  --p: 1;
  /* Figma : « Ne publiez » remonte de 0.48em, « plus pour rien » descend de 0.88em.
     On retire 0.2em aux deux pour garder l'ensemble centré verticalement. */
  --shift-top: -0.68em;
  --shift-bottom: 0.68em;
  --phone-w: 1.53em;         /* 254 px */
  --phone-h: 2.84em;         /* 472 px */
  /* Haut du téléphone par rapport au centre du titre : -1.58em (demi-hauteur du titre)
     -0.1em (écart Figma) -0.2em (recentrage ci-dessus). */
  --phone-offset: -1.88em;
  position: relative;
  height: 230vh;             /* longueur de scroll consacrée à l'animation */
}
.hero__stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: grid; place-items: center;
  overflow: hidden;
}
.hero__title {
  position: relative;
  font-size: var(--title-size);
  line-height: .77;
  letter-spacing: -0.01em;
  color: var(--yellow);
  text-align: center;
  white-space: nowrap;
}
.js .hero { --e: 0; }
.hero__half { display: block; position: relative; will-change: transform; }
.hero__half--top    { transform: translateY(calc(var(--e, var(--p)) * var(--shift-top))); }
.hero__half--bottom { transform: translateY(calc(var(--e, var(--p)) * var(--shift-bottom))); z-index: 3; }
.line { display: block; }

/* Illustration « hot trending » posée en haut à droite du titre. */
.hero__sticker {
  position: absolute; z-index: 4;
  width: 1.1em; left: calc(50% + .46em); top: -.41em;
  animation: float 4s ease-in-out infinite;
}

/* Le smartphone : monte du bas, bien droit, et s'insère entre les deux moitiés. */
.hero__phone {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--phone-w) * 1); height: var(--phone-h);
  font-size: var(--title-size);
  margin-left: calc(var(--phone-w) / -2);
  margin-top: var(--phone-offset);
  border: 3px solid var(--light-blue);
  border-radius: clamp(14px, 2vw, 30px);
  overflow: hidden;
  background: #000;
  z-index: 2;
  /* Monte tout droit, à la verticale (pas de rotation). */
  transform: translateY(calc((1 - var(--e, var(--p))) * 110vh));
  will-change: transform;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
}
.hero__phone video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero__notch {
  position: absolute; top: 2.3%; left: 50%; width: 19%; height: 2.3%;
  transform: translateX(-50%); background: #000; border-radius: 30px;
}
.hero__scroll {
  position: absolute; left: 50%; bottom: clamp(16px, 3vh, 40px);
  width: 43px; height: 71px; margin-left: -21.5px;
  display: grid; place-items: center;
  border: 1px solid var(--yellow); border-radius: 100px; color: var(--yellow);
  z-index: 5;
  /* La flèche invite à scroller : elle s'efface quand le téléphone arrive. */
  opacity: calc(1 - var(--e, var(--p)) * 2.5);
}
.hero__scroll svg { transform: rotate(90deg); animation: nudge 1.6s ease-in-out infinite; }

/* Entrée au chargement : chaque ligne du titre monte depuis un masque. */
/* Masque bas uniquement (clip-path) : les lettres Thin dépassent le haut de la ligne et ne doivent pas être rognées. */
.js .hero__title .line { clip-path: inset(-0.6em -0.3em -0.12em -0.3em); }
.js .hero__title .line > span { display: inline-block; transform: translateY(105%); transition: transform .9s var(--ease-out); }
.js .hero__title .line:nth-child(3) > span, .js .hero__half--bottom .line:nth-child(1) > span { transition-delay: .1s; }
.js .hero__half--bottom .line:nth-child(1) > span { transition-delay: .2s; }
.js .hero__half--bottom .line:nth-child(2) > span { transition-delay: .3s; }
.js .hero__sticker { opacity: 0; scale: .4; transition: opacity .5s .7s, scale .7s var(--ease-pop) .7s; }
.is-loaded .hero__title .line > span { transform: none; }
.is-loaded .hero__sticker { opacity: 1; scale: 1; }


/* --- So what? ------------------------------------------------------------- */
.so-what {
  display: flex; flex-direction: column; align-items: center; gap: 30px;
  max-width: calc(599px + 2 * var(--gutter)); margin: 0 auto;
  /* Remonte le texte sous le titre du hero : on annule le vide sous « pour rien »
     dans l'écran collé, pour ne garder que 40 px d'écart. */
  margin-top: calc(var(--title-size) * var(--hero-below) - 50vh + 40px);
  position: relative; z-index: 1;
  padding: 0 var(--gutter) clamp(100px, 10vw, 150px);
  text-align: center;
}
.so-what__text strong { font-weight: 700; }

/* --- Méthode (fond bleu clair) -------------------------------------------- */
.method {
  background: var(--light-blue); color: var(--aubergine);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: clamp(40px, 5vw, 90px);
  padding: clamp(80px, 10vw, 150px) clamp(var(--gutter), 13.6vw, 206px);
  align-items: start;
}
.method__intro { position: relative; padding-top: clamp(60px, 5vw, 80px); }
.method__ill { position: absolute; top: 0; left: clamp(40px, 4.5vw, 68px); width: clamp(80px, 7.7vw, 117px); }
.method__title { white-space: nowrap; font-size: clamp(36px, 4.4vw, 66px); line-height: .77; letter-spacing: -0.01em; }
.btn-arrow {
  display: inline-grid; place-items: center; margin-top: 18px;
  width: 78px; height: 43px; border: 1px solid currentColor; border-radius: 100px; color: var(--aubergine);
  transition: transform .35s var(--ease-pop), background-color .2s, color .2s;
}
.btn-arrow:hover { background: var(--aubergine); color: var(--light-blue); transform: translateX(6px); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 40px; }
.step { counter-increment: step; position: relative; padding-left: 37px; }
.step::before {
  content: counter(step) "."; position: absolute; left: 0; top: 0;
  font-family: var(--font-title); font-weight: 900; font-size: 30px; line-height: 1;
}
.step__title { font-size: clamp(24px, 2vw, 30px); line-height: 1; text-transform: none; max-width: 458px; margin-bottom: 14px; }

/* --- Équipe ---------------------------------------------------------------- */
.team {
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(80px, 10vw, 150px) var(--gutter) clamp(100px, 12vw, 200px);
  text-align: center; overflow: hidden;
}
.team__ill { width: clamp(130px, 13vw, 195px); margin-bottom: 20px; }
.team__heading { position: relative; display: grid; place-items: center; }
.team__title {
  position: relative; z-index: 2;
  font-size: clamp(48px, 10.98vw, 166px); line-height: .77; letter-spacing: -0.01em;
  color: var(--light-pink); white-space: nowrap;
}
/* La photo passe derrière le titre, décalée à droite comme dans la maquette. */
.team__photo {
  position: absolute; z-index: 1;
  width: clamp(130px, 21vw, 319px); aspect-ratio: 319 / 514; object-fit: cover;
  right: -24%; top: 4%;
  border-radius: clamp(14px, 2vw, 30px);
  rotate: 4deg;
  transform-origin: 50% 0;   /* pivote depuis le haut, comme une photo épinglée */
  transition: rotate .6s var(--ease-pop);
}
.team__photo.is-in { animation: sway 6s ease-in-out 1.4s infinite; }
.team__photo:hover { animation-play-state: paused; rotate: -3deg; scale: 1.03; transition: rotate .5s var(--ease-pop), scale .5s var(--ease-pop); }
.team__text { max-width: 651px; margin-top: clamp(50px, 7vw, 110px); }
.team__text strong { font-weight: 700; }

@media (max-width: 900px) {
  .method { grid-template-columns: 1fr; }
}

/* --- Waitlist (fond bleu pâle) --------------------------------------------- */
.waitlist {
  background: var(--pale-blue); color: var(--aubergine);
  display: flex; flex-direction: column; align-items: center; gap: 44px;
  padding: clamp(120px, 18vw, 285px) var(--gutter) clamp(120px, 13vw, 200px);
  text-align: center;
}
.waitlist__title { position: relative; white-space: nowrap; font-size: clamp(22px, 6.3vw, 66px); line-height: .9; /* .9 : l'accent de « DÉCOLLAGE » ne touche pas la ligne du dessus */ letter-spacing: -0.01em; }
.waitlist__bolt {
  position: absolute; right: -1.25em; top: -0.5em; width: 1.3em;
  animation: zap 2.8s ease-in-out infinite;
}
.waitlist__form { width: min(412px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.input {
  width: 100%; height: 45px; padding: 0 20px;
  border: 1px solid var(--aubergine); border-radius: 100px; background: transparent;
  font: 400 14px/1 var(--font-body); color: var(--aubergine); text-align: center;
  transition: box-shadow .25s, border-color .25s;
}
.input::placeholder { color: var(--aubergine); opacity: 1; }
.input:focus { outline: none; box-shadow: 0 0 0 3px var(--cta-pink); }
.consent { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 12px; line-height: 1.45; cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--cta-pink); cursor: pointer; }
.waitlist__status { min-height: 1.5em; font-size: 14px; font-weight: 700; }
.waitlist__status.is-error { color: #c4002a; }

/* --- Pied de page ---------------------------------------------------------- */
.site-footer {
  display: flex; flex-direction: column; align-items: center; gap: 19px;
  padding: 40px var(--gutter) 31px; text-align: center;
}
.site-footer__brand { display: flex; align-items: center; gap: 10px; }
.site-footer__brand > img { width: clamp(150px, 13.3vw, 201px); }
.social { display: block; width: 50px; transition: transform .35s var(--ease-pop); }
.social:hover { transform: translateY(-3px) rotate(-8deg); }
.site-footer__legal { font-size: 12px; }
.site-footer__legal a { text-decoration: none; margin-left: 8px; }
.site-footer__legal a:hover { text-decoration: underline; }

/* --- Apparitions au scroll (classe .is-in posée par main.js) ---------------- */
.js .reveal { opacity: 0; transform: translateY(40px) rotate(1.5deg); transition: opacity .7s var(--ease-out), transform .9s var(--ease-pop); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .steps .step:nth-child(2) { transition-delay: .12s; }
.js .steps .step:nth-child(3) { transition-delay: .24s; }
.js .team__title .line:nth-child(2) { transition-delay: .1s; }
.js .team__title .line:nth-child(3) { transition-delay: .2s; }
/* Entrée de la photo : arrive d'en haut en tournoyant, comme un polaroid lancé, et se pose avec un rebond. */
.js .team__photo.reveal { opacity: 0; transform: translate(40%, -60%) rotate(28deg) scale(.7); transition: opacity .4s ease-out .15s, transform 1.2s var(--ease-pop) .15s; }
.js .team__photo.reveal.is-in { opacity: 1; transform: none; }

@keyframes float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -10px; rotate: -4deg; } }
@keyframes sway { 0%, 100% { rotate: 4deg; } 50% { rotate: 1deg; } }
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }
@keyframes zap { 0%, 80%, 100% { rotate: 0deg; scale: 1; } 85% { rotate: -12deg; scale: 1.15; } 90% { rotate: 8deg; } 95% { rotate: -4deg; } }
.float { animation: float 5s ease-in-out infinite; }

/* --- Pages légales (confidentialite.html, mentions-legales.html, cgv.html) --- */
.site-header--static { position: static; }
.legal { max-width: 720px; margin: 0 auto; padding: clamp(40px, 8vw, 100px) var(--gutter) clamp(80px, 10vw, 140px); }
.legal h1 { font-size: clamp(40px, 7vw, 80px); line-height: .85; color: var(--yellow); margin-bottom: 16px; }
.legal h2 { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.1; text-transform: none; color: var(--light-pink); margin: 48px 0 12px; }
.legal p, .legal li { font-size: 16px; }
.legal p + p, .legal ul + p { margin-top: 12px; }
.legal ul { margin: 12px 0 0; padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--yellow); }
.legal__updated { font-size: 14px; opacity: .7; }
.site-footer__legal a[aria-current="page"] { text-decoration: underline; }

/* ==========================================================================
   MOBILE (jusqu'à 700 px) : maquette Figma « Landing Mobile » (390 px de large).
   Mesures relevées sur l'export, converties en vw pour tenir de 360 à 700 px.
   ========================================================================== */
@media (max-width: 700px) {
  /* En-tête */
  .site-header { padding: 13px 16px; }
  .site-header__logo img { width: 75px; }
  .site-header .btn { font-size: 13px; padding: 9px 16px; }

  /* Hero : titre pleine largeur (« POUR RIEN » ~ 330 px à 390 px). Le téléphone fait
     ~2em x 3.5em et sépare le titre de 2.5em au total, réparti haut/bas pour rester centré. */
  :root { --title-size: clamp(52px, min(17vw, 9vh), 120px); --hero-below: 2.79; }
  .hero {
    --phone-w: 1.97em; --phone-h: 3.5em;
    --shift-top: -1.25em; --shift-bottom: 1.25em;
    --phone-offset: -2.27em;   /* haut du téléphone = haut de « NE » + 0.52em */
    height: 200vh;
  }
  .hero__sticker { width: .78em; left: calc(50% + .5em); top: -.06em; }

  /* Accroche */
  .so-what { gap: 32px; }
  .so-what .btn { font-size: 16px; padding: 14px 32px; }

  /* Méthode : une colonne, titre aligné à gauche */
  .method { padding: 90px 24px 100px; gap: 56px; }
  .method__intro { padding-top: 52px; }
  .method__ill { width: 68px; left: 56px; }
  .method__title { font-size: min(12vw, 60px); line-height: .8; }
  .btn-arrow { margin-top: 24px; }
  .steps { gap: 36px; }
  .step::before, .step__title { font-size: 21px; }
  .step { padding-left: 38px; }

  /* Équipe : titre, puis photo centrée en dessous, puis texte */
  .team { padding: 90px 24px 110px; }
  .team__ill { width: 90px; margin-bottom: 36px; }
  .team__heading { display: flex; flex-direction: column; align-items: center; }
  .team__title { font-size: min(16.5vw, 110px); order: 1; }
  .team__photo { position: relative; order: 2; right: auto; top: auto; width: 55%; margin-top: 56px; rotate: 0deg; }
  .team__photo.is-in { animation: none; }
  .team__text { margin-top: 40px; }

  /* Waitlist : éclair centré au-dessus du titre, champ et bouton pleine largeur */
  .waitlist { padding: 140px 24px 120px; gap: 32px; }
  .waitlist__title { display: flex; flex-direction: column; align-items: center; font-size: min(7.3vw, 40px); line-height: .97; }
  .waitlist__bolt { position: static; order: -1; width: 46px; margin-bottom: 24px; }
  .waitlist__form { width: 100%; gap: 14px; }
  /* min(14px, 3.6vw) : le texte d'aide du champ « nom » tient en entier jusqu'à 360 px */
  .input { height: 52px; padding: 0 18px; text-align: left; font-size: min(14px, 3.6vw); }
  .waitlist__form .btn { width: 100%; height: 52px; font-size: 16px; }

  /* Pied de page : badge, puis icônes, puis mentions */
  .site-footer { padding: 56px 16px 28px; gap: 24px; }
  .site-footer__brand { flex-direction: column; gap: 20px; }
  .site-footer__brand > img { width: 184px; }
  .site-footer__legal { font-size: 12px; }
}

/* --- Animations coupées si l'utilisateur le demande ------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero { height: auto; --p: 1 !important; --e: 1 !important; }
  .hero__stage { position: relative; min-height: 100vh; }
  .js .reveal, .js .hero__title .line > span { opacity: 1; transform: none; }
  .js .hero__sticker { opacity: 1; scale: 1; }
}
