/* ==========================================================================
   Nouvelle Soif — landing d'attente
   Design : Figma xNJGLAxcGff91iYimHKMrP, node 258-405 (page) / 258-532 (modale)
   Cadre de référence : 1440 px. Le mobile est une déclinaison (non fournie au Figma).
   ========================================================================== */

:root {
  --navy:          #001e64;
  --violet:        #ab60fe;
  --yellow:        #fcf786;
  --lavender:      #e6e6ff;
  --lavender-mid:  #b4b4ff;
  --white:         #fff;

  --font-display: 'Syne', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;
  --font-sans:    'IBM Plex Sans', system-ui, sans-serif;

  /* Gouttière latérale : 64 px au Figma, resserrée en mobile */
  --gutter: clamp(20px, 4.45vw, 64px);
  /* Largeur des colonnes de texte centrées (648 px au Figma) */
  --measure: 648px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* `clip` plutôt que `hidden` : empêche le débordement horizontal des formes
     décoratives sans créer de conteneur de défilement (qui casserait
     position:sticky et le screenshot pleine page). */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: normal;
  overflow-x: hidden;
}

img, svg, picture { display: block; max-width: 100%; }

h1, h2, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 12px 20px;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  display: flex;
  align-items: center;
  padding: clamp(28px, 4.4vw, 64px) var(--gutter) clamp(20px, 2.2vw, 32px);
  background: var(--white);
}

.logo img { width: clamp(140px, 13vw, 193px); height: auto; }

/* ==========================================================================
   Hero
   ========================================================================== */

/* Sous 1200 px : empilement fluide. Au-delà : la géométrie exacte du Figma,
   reprise plus bas dans le bloc @media (min-width: 1200px). */

.hero {
  position: relative;
  padding: clamp(56px, 13vw, 192px) var(--gutter) clamp(72px, 17vw, 256px);
  isolation: isolate;
  /* La photo déborde volontairement vers le haut (elle passe sous le header)
     mais jamais sur les côtés : `clip` en X, `visible` en Y — combinaison
     permise, contrairement à hidden/visible. */
  overflow-x: clip;
  overflow-y: visible;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1089px;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  /* Le plancher doit laisser « FONCTION. » tenir dans 320 px moins la
     gouttière : au-delà de ~34 px le mot déborde. */
  font-size: clamp(30px, 8.6vw, 70px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--navy);
  /* Le titre passe par-dessus la capsule photo : ombre portée légère non désirée,
     on garde le bleu plein pour rester fidèle au Figma. */
}

/* --- Photo du hero ----------------------------------------------------------
   L'image est exportée du Figma AVEC le masque déjà appliqué : elle contient la
   capsule détourée, sur fond blanc pur (vérifié : 255,255,255 sur tout le
   pourtour), qui se fond dans celui de la page.

   C'est volontairement plus simple que l'ancien montage (masque SVG en CSS +
   boîte photo décalée) : le cadrage est figé dans le fichier, donc strictement
   IDENTIQUE sur tous les écrans — téléphone, tablette, desktop et 4K. Il n'y a
   plus de couverture à calculer, donc plus de risque de voir la forme tranchée
   net ou un coin vide.

   ⚠️ Ne pas remettre de `mask-image` par-dessus : le masque est déjà dans le
   fichier, et l'appliquer deux fois rognerait les extrémités arrondies.       */

.hero__art {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  width: 49%;
  pointer-events: none;
}

.hero__art img {
  width: 100%;
  height: auto;
}

/* --- Pastille « Bientôt en ligne » --- */

.badge {
  position: absolute;
  z-index: 3;
  top: clamp(40px, 6vw, 86px);
  left: 56%;
  display: grid;
  place-items: center;
  width: clamp(150px, 15vw, 212px);
  aspect-ratio: 1;
  border: 1px solid var(--navy);
  border-radius: 50%;
  background: transparent;
  text-align: center;
}

.badge span {
  font-size: clamp(13px, 1.2vw, 16px);
  text-transform: uppercase;
  padding: 0 20px;
}

/* --- Bande défilante --- */

.marquee {
  position: absolute;
  left: 0;
  bottom: clamp(24px, 8vw, 116px);
  z-index: 4;
  width: 100%;
  height: 53px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--violet);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}

.marquee__group {
  flex: none;
  padding-right: 0;
  color: var(--yellow);
  font-weight: 500;
  font-size: 16px;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   Intro + compte à rebours
   ========================================================================== */

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 3vw, 32px);
  padding: clamp(40px, 4.4vw, 64px) var(--gutter) clamp(72px, 9vw, 128px);
  text-align: center;
}

.intro__lead {
  max-width: var(--measure);
  font-weight: 500;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
}

.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
}

.countdown__label {
  font-weight: 500;
  font-size: clamp(18px, 2vw, 24px);
  text-transform: uppercase;
}

.countdown__clock {
  display: flex;
  align-items: flex-start;
  gap: clamp(6px, 1.2vw, 16px);
}

.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown__num {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(46px, 8.6vw, 96px);
  line-height: .9;
  font-variant-numeric: tabular-nums;
  font-variation-settings: 'wdth' 100;
}

.countdown__cap {
  font-weight: 500;
  font-size: clamp(12px, 1.2vw, 16px);
  letter-spacing: .01em;
  margin-top: 4px;
}

.countdown__sep {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(46px, 8.6vw, 96px);
  line-height: .9;
}

.countdown__done {
  font-weight: 500;
  font-size: clamp(18px, 2vw, 24px);
  text-transform: uppercase;
}

/* ==========================================================================
   Newsletter
   ========================================================================== */

.signup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(36px, 6vw, 64px);
  padding: clamp(80px, 17vw, 256px) var(--gutter);
  background: var(--white);
  text-align: center;
}

.signup__title {
  max-width: 869px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 5.8vw, 64px);
  line-height: .9;
}

.signup__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
  width: 100%;
}

.signup__intro {
  max-width: var(--measure);
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.5;
}

/* --- Champ + bouton en une pilule --- */

.form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  max-width: var(--measure);
  padding: 8px 8px 8px 32px;
  background: var(--lavender);
  border-radius: 184px;
  transition: box-shadow .2s ease;
}

.form:focus-within { box-shadow: 0 0 0 2px var(--navy); }

.form__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--navy);
  padding: 0;
}

.form__input::placeholder { color: var(--lavender-mid); }
.form__input:focus { outline: none; }

.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__submit {
  flex: none;
  padding: 16px 24px;
  border-radius: 184px;
  background: var(--navy);
  color: var(--white);
  text-align: center;
  transition: background-color .2s ease, opacity .2s ease;
}

.form__submit:hover { background: #002b8f; }
.form__submit[disabled] { opacity: .6; cursor: progress; }

.form__message {
  min-height: 1.4em;
  max-width: var(--measure);
  font-weight: 500;
  line-height: 1.5;
}

.form__message.is-error { color: #b3261e; }

.form__legal {
  max-width: var(--measure);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.5;
  opacity: .7;
}

/* État de succès : le formulaire cède la place au message */
.signup.is-done .form,
.signup.is-done .signup__intro { display: none; }

.signup.is-done .form__message {
  font-size: clamp(18px, 2vw, 24px);
}

/* ==========================================================================
   Réseaux sociaux
   ========================================================================== */

.social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: clamp(24px, 3vw, 32px) var(--gutter) clamp(80px, 17vw, 256px);
  background: var(--white);
  text-align: center;
}

.social__title {
  max-width: var(--measure);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
  text-transform: uppercase;
}

.social__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 0;
}

.social__links a {
  display: block;
  width: 55px;
  transition: transform .2s ease;
}

.social__links a:hover { transform: translateY(-3px); }

.social__note {
  max-width: var(--measure);
  font-weight: 500;
  line-height: 1.5;
}

/* ==========================================================================
   Section formule (fond dégradé)
   ========================================================================== */

.formule {
  position: relative;
  padding: clamp(80px, 13vw, 192px) var(--gutter) clamp(240px, 26vw, 384px);
  border-top: 1px solid var(--navy);
  overflow: hidden;
  isolation: isolate;
}

.formule__bg {
  position: absolute;
  inset: -10% -25%;
  z-index: -1;
  background-image: image-set(url('../img/gradient.webp') type('image/webp'),
                              url('../img/gradient.jpg') type('image/jpeg'));
  background-size: cover;
  background-position: center;
  opacity: .8;
}

/* Voile violet du Figma (mix-blend-mode darken sur rgba(171,96,254,.2)) */
.formule__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(171, 96, 254, .2);
  mix-blend-mode: darken;
}

.formule__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 32px);
}

.formule__title {
  max-width: 867px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 5.8vw, 64px);
  line-height: 1.06;
  letter-spacing: -.015em;
  color: var(--yellow);
}

.formule__text {
  max-width: 979px;
  font-weight: 500;
  letter-spacing: .01em;
}

.formule__text p { line-height: 1.62; }
.formule__text p + p { margin-top: 1.62em; }

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chip {
  padding: 10px 16px;
  border: 1px solid var(--navy);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-variation-settings: 'wdth' 100;
  white-space: nowrap;
}

.formule__petals {
  position: absolute;
  left: 50%;
  bottom: clamp(-190px, -14vw, -100px);
  z-index: 0;
  width: clamp(320px, 45vw, 646px);
  height: auto;
  translate: -50% 0;
  animation: petals-spin 12s linear infinite;
}

@keyframes petals-spin {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(24px, 3vw, 32px) var(--gutter);
  background: var(--violet);
  border-top: 1px solid var(--navy);
  color: var(--white);
  position: relative;
  z-index: 2;
}

.site-footer__contact {
  text-decoration: underline;
  text-underline-position: from-font;
}

/* ==========================================================================
   Bandeau de consentement

   Ancré en bas, compact et sur une seule ligne en desktop : le formulaire
   d'inscription est l'objectif de la page, le bandeau ne doit jamais le
   recouvrir ni retarder sa lecture.
   ========================================================================== */

.consent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 90;
  transform: translateX(-50%);

  display: flex;
  align-items: center;
  gap: 20px;
  width: min(calc(100% - 32px), 760px);
  padding: 14px 18px;

  background: var(--navy);
  color: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0, 30, 100, .28);

  font-size: 13px;
  line-height: 1.45;
}

.consent[hidden] { display: none; }

.consent__text { flex: 1 1 auto; }

.consent__actions {
  flex: none;
  display: flex;
  gap: 8px;
}

.consent__btn {
  padding: 9px 18px;
  border-radius: 100px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 13px;
  white-space: nowrap;
  transition: opacity .2s ease;
}

.consent__btn:hover { opacity: .85; }

.consent__btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .45);
}

.consent:focus-visible,
.consent__btn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .consent {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    bottom: 10px;
    text-align: center;
  }

  .consent__actions { justify-content: center; }
  .consent__btn { flex: 1 1 0; }
}

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

/* ==========================================================================
   Modale Contact — node 258-532
   ========================================================================== */

.modal {
  width: min(100%, 1440px);
  max-width: 100%;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-mono);
  margin: auto;
}

.modal::backdrop { background: rgba(0, 30, 100, .55); }

.modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(24px, 3vw, 32px) var(--gutter);
  background: var(--violet);
  border-top: 1px solid var(--navy);
  border-bottom: 1px solid var(--navy);
  color: var(--white);
}

.modal__close {
  text-decoration: underline;
  text-underline-position: from-font;
  font-size: 16px;
  line-height: 1;
  padding: 4px 8px;
  margin: -4px -8px;
}

.modal__body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  padding: clamp(24px, 3vw, 32px) var(--gutter) clamp(56px, 9vw, 128px);
}

.card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: var(--lavender);
}

.card__title {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--navy);
  font-weight: 500;
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.16;
}

.card__role {
  font-weight: 300;
  line-height: 1.2;
}

.card__rows {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 0 16px;
  font-weight: 300;
  line-height: 1.6;
}

.card__rows dt { grid-column: 1; }

/* `min-width: 0` + césure : sans eux, une adresse longue comme
   vannessa@nouvellesoif.com impose sa largeur à la colonne, la carte s'élargit
   et écrase ses voisines. Les trois cartes restent ainsi de largeur égale. */
.card__rows dd {
  grid-column: 2;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.card__rows a { text-decoration: underline; text-underline-position: from-font; }

/* ==========================================================================
   Desktop ≥ 1200 px — géométrie reprise à l'identique du Figma (cadre 1440).
   Le hero y est un canevas de 789 px de haut où chaque pièce est posée aux
   coordonnées du fichier de design :
     titre    left 64,  top 192   (1089 × 256)
     capsule  left 45 %, top -45,75 %  → 1695 × 1240
     pastille left 807, top 86    (212 × 212)
     bande    top 480, pleine largeur, 53 px
   ========================================================================== */

@media (min-width: 1200px) {
  .hero {
    height: 789px;
    padding: 0 var(--gutter);
  }

  .hero__inner {
    position: absolute;
    left: var(--gutter);
    top: 192px;
    width: 1089px;
    height: 256px;
  }

  .hero__art {
    left: auto;
    right: 0;
    /* Remonte la capsule pour qu'elle passe sous le header, comme au Figma. */
    top: -100px;
    width: 49%;
  }

  .badge {
    left: 807px;
    top: 86px;
  }

  .marquee {
    top: 480px;
    bottom: auto;
  }
}

/* ==========================================================================
   Responsive — le Figma ne fournit qu'un cadre 1440 ; déclinaison Minimal.
   ========================================================================== */

@media (max-width: 1100px) {
  .chips { justify-content: flex-start; }
  .chip { white-space: normal; }
}

@media (max-width: 900px) {
  .modal__body { flex-direction: column; }
  .card { width: 100%; }
}

/* Sous 1200 px, la géométrie absolue du Figma ne tient plus : le hero passe en
   pile (titre au-dessus, photo en diagonale dessous). Le masque garde ses
   proportions 1695/1240, donc la forme reste identique, à l'échelle de l'écran. */

@media (max-width: 1199px) {
  .hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: clamp(96px, 30vw, 200px);
  }

  /* La photo revient dans le flux, sous le titre, et déborde dans la gouttière
     pour que la capsule touche le bord de l'écran comme en desktop. */
  .hero__art {
    position: relative;
    top: auto;
    right: auto;
    /* `auto` et non `100%` : la largeur est alors donnée par l'étirement du
       conteneur flex, ce qui laisse la marge négative pousser l'image jusqu'au
       bord de l'écran. Avec `100%`, la largeur est figée et la marge n'a plus
       d'effet — la capsule s'arrêtait avant le bord. */
    width: auto;
    margin-top: -44px;
    margin-right: calc(-1 * var(--gutter));
  }

  .badge {
    top: auto;
    bottom: clamp(96px, 14vw, 150px);
    left: auto;
    right: var(--gutter);
  }

  .marquee { bottom: clamp(24px, 4vw, 40px); }
}

@media (max-width: 780px) {
  .badge { width: clamp(112px, 32vw, 150px); }
  .badge span { font-size: 12px; padding: 0 12px; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
  }

  .form {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
  }

  .form__input { width: 100%; text-align: center; padding: 8px 0; }
  .form__submit { width: 100%; }
}

@media (max-width: 480px) {
  .countdown__clock { gap: 4px; }
  .countdown__sep { font-size: 38px; }
  .countdown__num { font-size: 40px; }
  .chips { gap: 8px; }
  .chip { font-size: 14px; padding: 8px 14px; }
}

/* ==========================================================================
   Préférences d'accessibilité
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .marquee__track,
  .formule__petals { animation: none; }

  .marquee__track { transform: none; }

  *, *::before, *::after {
    transition-duration: .01ms !important;
  }
}
