/* ============================================================================
   styles.css — KOVELA. Hauteurs de section reprises du blueprint MESURÉ chez la
   cible (spec/blueprint.json) : ce sont elles qui donnent au site sa course de
   défilement, et donc son rythme. Une section de 3870 px n'est pas un caprice —
   c'est ce qui laisse la place à un scrub.
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--jade);
  color: var(--lin);
  font-family: var(--corps);
  font-size: var(--t-corps);
  line-height: 1.55;
  overflow-x: hidden;
}
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-3); }
.sticky-ecran { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden; }
.micro { font-size: var(--t-micro); letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }

/* ── Préchargement : plein écran clair, puis coupe franche vers le héros ─────
   Chez la cible, cette coupe est la plus forte transition de toute la page :
   Δ 95,4 % de surface entre deux images à 180 px d'écart. */
#prechargement {
  position: fixed; inset: 0; z-index: 90;
  background: var(--lin); display: grid; place-items: center;
}
#prechargement .mot {
  font-family: var(--display); font-size: var(--t-geant);
  color: var(--foret); letter-spacing: .02em; position: relative;
}
#prechargement .pastille {
  position: absolute; width: 1.1em; height: 1.1em; border-radius: 50%;
  background: var(--jade); left: 0; top: 50%; transform: translateY(-50%); z-index: -1;
}
#prechargement .anneaux { position: absolute; inset: -40vh -40vw; z-index: -2; opacity: 0; }
#prechargement .anneaux i {
  position: absolute; inset: 0; margin: auto; border: 1px solid var(--sauge); border-radius: 50%;
}

/* ── En-tête ─────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 88px;
  display: flex; align-items: center; background: transparent;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.marque { font-family: var(--display); font-size: 1.4rem; letter-spacing: .04em; color: var(--lin); }
.site-header nav { display: flex; gap: var(--sp-3); }
.site-header nav a { color: var(--lin); text-decoration: none; font-size: var(--t-micro);
  letter-spacing: .14em; text-transform: uppercase; opacity: .85; transition: opacity .25s ease; }
.site-header nav a:hover, .site-header nav a:focus-visible { opacity: 1; }
.bouton {
  display: inline-block; padding: .7em 1.5em; border-radius: 999px;
  background: var(--lin); color: var(--foret); text-decoration: none;
  font-size: var(--t-micro); letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  transition: transform .3s cubic-bezier(.16,1,.3,1), background-color .3s ease;
}
.bouton:hover, .bouton:focus-visible { transform: translateY(-3px); background: var(--sauge); }

/* ── Sections, aux hauteurs mesurées ─────────────────────────────────────── */
section { position: relative; }
#hero            { height: 2745px; background: var(--jade); }
#intro           { height: 2565px; background: var(--jade); }
#social          { height: 3870px; background: var(--jade); }
#gas             { height: 3150px; background: var(--jade); }
#taste           { height: 3240px; background: var(--lin); color: var(--foret); }
#collection      { height: 1344px; background: var(--lin); color: var(--foret); }
#inside          { height: 1070px; background: var(--foret); }
#ingredients     { height:  872px; background: var(--lin); color: var(--foret); }
#serve           { height:  828px; background: var(--foret); }
#story           { height:  522px; background: var(--lin); color: var(--foret); }
#faq             { height:  753px; background: var(--lin); color: var(--foret); text-align: center; }
.site-footer     { height:  900px; background: var(--foret); }
#find            { height:  828px; background: var(--foret); }

/* ── Héros ───────────────────────────────────────────────────────────────── */
.titre-geant {
  font-family: var(--display); font-size: var(--t-geant); line-height: .88;
  letter-spacing: .01em; margin: 0; text-align: center;
}
.titre-geant .lettre { display: inline-block; will-change: transform, opacity; }
.halo {
  position: absolute; inset: 0; margin: auto; width: 120vmin; height: 120vmin;
  background: radial-gradient(circle, var(--lin) 0%, transparent 62%);
  opacity: 0; pointer-events: none;
}
.canette {
  position: absolute; width: 132px; height: 340px; border-radius: 62px;
  background: linear-gradient(96deg, var(--encre), var(--jade) 46%, var(--sauge));
  box-shadow: 0 40px 90px rgba(0,0,0,.28); will-change: transform;
}
.canette::before {
  content: 'KOVELA'; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: 1.5rem; color: var(--lin);
  writing-mode: vertical-rl; letter-spacing: .3em;
}
.canette::after {
  content: ''; position: absolute; left: 8%; right: 8%; top: 6px; height: 14px;
  border-radius: 999px; background: var(--sauge); opacity: .85;
}

/* ── Feuilles flottantes : le liant parallaxe de tout le site ────────────── */
.feuilles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.feuille {
  position: absolute; width: 46px; height: 46px; border-radius: 50% 8% 50% 8%;
  background: var(--sauge); opacity: .55; will-change: transform;
}
.feuille.sombre { background: var(--encre); opacity: .38; }

/* ── Intro ───────────────────────────────────────────────────────────────── */
.bloc-texte { max-width: 34rem; }
.bloc-texte h2 { font-family: var(--display); font-size: var(--t-h2); line-height: .94; margin: 0 0 var(--sp-2); }
.bloc-texte p { margin: 0 0 var(--sp-3); opacity: .9; }

/* ── Trait : l'illustration au trait qui zoome ───────────────────────────── */
.trait { width: min(78vmin, 620px); height: min(78vmin, 620px); will-change: transform; }
.trait svg { width: 100%; height: 100%; display: block; }
.trait path, .trait circle, .trait ellipse { fill: none; stroke: currentColor; stroke-width: 2.2; opacity: .55; }

/* ── Bandeau média qui se replie ─────────────────────────────────────────── */
.bandeau {
  width: min(90vw, 1100px); height: 46vh; overflow: hidden; border-radius: 4px;
  background: linear-gradient(140deg, var(--encre), var(--foret));
  display: grid; place-items: end start; padding: var(--sp-3); will-change: height;
}
.bandeau h2 { font-family: var(--display); font-size: var(--t-h2); line-height: .94; margin: 0; }

/* ── Titre en dérive horizontale ─────────────────────────────────────────── */
.derive { white-space: nowrap; will-change: transform; }

/* ── Carrousel horizontal ────────────────────────────────────────────────── */
.rail { display: flex; gap: var(--sp-2); will-change: transform; }
.carte {
  flex: 0 0 417px; height: 62vh; border-radius: 3px; padding: var(--sp-3);
  display: flex; flex-direction: column; justify-content: flex-end; color: var(--foret);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.carte:nth-child(1) { background: var(--carte-1); }
.carte:nth-child(2) { background: var(--carte-2); }
.carte:nth-child(3) { background: var(--carte-3); }
.carte:hover, .carte:focus-within { transform: translateY(-10px); }
.carte h3 { font-family: var(--slab); font-size: var(--t-h3); margin: 0 0 var(--sp-1); font-weight: 700; }
.carte p { margin: 0; font-size: var(--t-corps); }

/* ── Grilles mesurées ────────────────────────────────────────────────────── */
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.grille-2 { display: grid; grid-template-columns: 787fr 379fr; gap: var(--sp-4); align-items: start; }
.grille-pied { display: grid; grid-template-columns: 317fr 835fr; gap: var(--sp-4); align-items: start; }

.boite-ing {
  border: 1px solid currentColor; padding: var(--sp-3); min-height: 300px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background-color .3s ease, color .3s ease;
}
.boite-ing:hover, .boite-ing:focus-within { background: var(--foret); color: var(--lin); }
.boite-ing h3 { font-family: var(--display); font-size: var(--t-h3); margin: 0; }

/* ── Bandeau défilant ────────────────────────────────────────────────────── */
.ruban { overflow: hidden; }
.ruban .piste {
  display: flex; gap: var(--sp-4); white-space: nowrap; will-change: transform;
  font-family: var(--display); font-size: var(--t-h2); letter-spacing: .02em;
}

/* ── Questions ───────────────────────────────────────────────────────────── */
.question { border-top: 1px solid currentColor; padding: var(--sp-3) 0; text-align: left; }
.question summary {
  font-family: var(--slab); font-weight: 700; font-size: var(--t-h3);
  cursor: pointer; list-style: none; transition: opacity .25s ease;
}
.question summary:hover, .question summary:focus-visible { opacity: .6; }
.question summary::-webkit-details-marker { display: none; }
.question p { margin: var(--sp-2) 0 0; max-width: 44rem; }

/* ── Pied ────────────────────────────────────────────────────────────────── */
.site-footer .mot-geant {
  font-family: var(--display); font-size: clamp(4rem, 16vw, 15rem);
  line-height: .8; color: var(--lin); margin: 0; letter-spacing: .01em;
}
.lien-fleche {
  font-family: var(--display); font-size: var(--t-h2); color: var(--lin);
  text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: .1em;
  display: inline-block; transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.lien-fleche:hover, .lien-fleche:focus-visible { transform: translateX(14px); }

/* ── Mobile : parité de mouvement. Ce qui bouge au desktop bouge ici aussi —
     un site qui ne s'anime qu'à un viewport échoue au diff, qui mesure aux deux. */
@media (max-width: 760px) {
  .grille-3, .grille-2, .grille-pied { grid-template-columns: 1fr; }
  .carte { flex: 0 0 78vw; }
  .site-header nav { display: none; }
  #hero { height: 2200px; } #intro { height: 2000px; } #social { height: 2600px; }
  #gas { height: 2200px; } #taste { height: 2400px; }
}

/* ── Décor SVG : les marqueurs de structure ne sont pas décoratifs ────────────
   `sections.mjs` compte `img,picture,svg[width],video` pour former le jeton d'une
   section (S[H2+IMG], S[H2+IMGx]…). Un visuel dessiné en CSS pur ne compte pas —
   et la cible, elle, porte 17 images. Dessiner en div revenait donc à changer
   l'ALPHABET de la page, pas seulement sa technique. Mesuré : la fidélité
   structurelle est tombée à 0,562 pour cette seule raison. */
.deco { display: block; }
.deco-rangee { display: flex; gap: var(--sp-2); align-items: flex-end; margin-top: var(--sp-4); opacity: .8; }
.carte .deco { margin-bottom: auto; }
svg.canette { position: absolute; border-radius: 0; background: none; box-shadow: none; }
svg.canette::before, svg.canette::after { content: none; }
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
/* Le bandeau TRAVERSE la section au lieu de s'y empiler : chez la cible, le
   ScrollTrigger .marquee (18758→20180) chevauche deux sections. Empilé, il ajoutait
   753 px au document et décalait toutes les courses de scrub en aval. */
#marquee { position: absolute; top: 0; left: 0; right: 0; height: 260px;
           background: var(--sauge); color: var(--foret); z-index: 1; }
#marquee .sticky-ecran { position: static; height: 260px; }
#find { height: 828px; background: var(--foret); }
