/* ==========================================================================
   Sondage Ciao • Kombucha (crème, brun, une couleur par saveur)
                  Energy (noir, halo de saveur, italique majuscule)
   ========================================================================== */

/* Polices de marque : si tu as les fichiers sous licence, dépose-les dans /public/fonts
   et décommente ces déclarations. Sinon, les équivalents Google Fonts prennent le relais.
@font-face { font-family: 'Salmond'; src: url('/fonts/Salmond-Bold.woff2') format('woff2'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: 'Blauernue'; src: url('/fonts/Blauernue-Regular.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Franklin Gothic ATF'; src: url('/fonts/FranklinGothicATF-Heavy.woff2') format('woff2'); font-weight: 800 900; font-style: italic; font-display: swap; }
*/

@property --split { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }

:root {
  --brown: #2f2521;
  --cream: #fcf6ec;
  --k-display: 'Salmond', 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --k-body: 'Blauernue', 'Figtree', system-ui, sans-serif;
  --e-display: 'Franklin Gothic ATF', 'Libre Franklin', 'Arial Black', sans-serif;
  --e-body: 'Geist', system-ui, sans-serif;
  --e-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --error-k: #a4161a;
  --error-e: #ff8f8f;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--brown);
  color: var(--cream);
  font-family: var(--k-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body[data-view="energy"] { background: #000; color: #fff; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

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

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.noscript { padding: 24px; text-align: center; font-size: 1.125rem; }

/* ---------------------------------------------------------------- boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform .3s var(--spring), background-color .2s, color .2s, box-shadow .25s;
}
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .65; cursor: progress; }

.btn--k-cream {
  border-radius: 999px;
  background: var(--cream);
  color: var(--brown);
  font: 700 1rem/1.1 var(--k-body);
}
.btn--e-white {
  border-radius: 8px;
  background: #fff;
  color: #000;
  font: 500 .85rem/1.1 var(--e-body);
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ==========================================================================
   Accueil : deux univers séparés par une diagonale
   ========================================================================== */

.home {
  --split: 50%;
  --slant: 6vw;
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
  transition: --split .8s var(--ease);
}

@media (hover: hover) {
  .home:has(.half--k:hover) { --split: 57%; }
  .home:has(.half--e:hover) { --split: 43%; }
}
.home:has(.half--k:focus-visible) { --split: 57%; }
.home:has(.half--e:focus-visible) { --split: 43%; }

.half {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.half:focus-visible { outline: none; }
.half:focus-visible .btn { outline: 3px solid currentColor; outline-offset: 4px; }

.half--k {
  clip-path: polygon(0 0, calc(var(--split) + var(--slant)) 0, calc(var(--split) - var(--slant)) 100%, 0 100%);
  color: var(--cream);
  background: linear-gradient(#8cc3ea, #9fd06a 60%, #4d8a2c); /* en attendant l'image */
}
.half--e {
  clip-path: polygon(calc(var(--split) + var(--slant)) 0, 100% 0, 100% 100%, calc(var(--split) - var(--slant)) 100%);
  color: #fff;
  background: #000;
}

.half__content {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: min(36vw, 480px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  transform: translate(-50%, -50%);
}
.half--k .half__content { left: calc(var(--split) / 2); }
.half--e .half__content { left: calc(var(--split) + (100% - var(--split)) / 2); }

.half__logo { display: block; }
.half--k .half__logo { width: clamp(150px, 17vw, 250px); }
.half--e .half__logo { width: clamp(140px, 14.5vw, 215px); } /* même hauteur visuelle que le logo Kombucha */

.half__title { text-wrap: balance; }
.half--k .half__title {
  font: 800 clamp(2rem, 1rem + 2.6vw, 3.7rem)/1 var(--k-display);
  font-variation-settings: 'wdth' 88, 'opsz' 96;
  letter-spacing: -.025em;
}
.half--e .half__title {
  font: italic 900 clamp(2rem, 1rem + 2.6vw, 3.7rem)/.92 var(--e-display);
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.half__lead { max-width: 30ch; font-size: 1.0625rem; line-height: 1.45; text-wrap: pretty; }
.nowrap { white-space: nowrap; }
.half--k .half__lead { opacity: .92; }
.half--e .half__lead { font-family: var(--e-body); color: rgba(255, 255, 255, .72); }

.half .btn { margin-top: 6px; }
@media (hover: hover) {
  .half--k:hover .btn { transform: translateY(-2px) rotate(-2deg) scale(1.04); }
  .half--e:hover .btn { transform: translateY(-2px) scale(1.04); box-shadow: 0 0 32px rgba(189, 161, 255, .55); }
}

.half__deco { position: absolute; inset: 0; pointer-events: none; }

/* Fond côté Kombucha : l'usine Ciao dans la nature (ciaokombucha.com). L'image couvre la partie
   visible la plus large (au survol) et l'usine se place derrière la bouteille. */
.half__scene {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(57% + var(--slant));
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 54% 35%;
  transition: scale 1.4s var(--ease);
}
@media (hover: hover) {
  .half--k:hover .half__scene { scale: 1.04; }
}
/* Voile vert sombre en bas pour que le texte se lise sur l'herbe et les tournesols */
.half__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 42, 28, .18) 0%, rgba(14, 42, 28, 0) 22%, rgba(14, 42, 28, 0) 42%, rgba(14, 42, 28, .62) 64%, rgba(12, 34, 22, .86) 100%);
}
.half--k .half__title, .half--k .half__lead { text-shadow: 0 2px 18px rgba(8, 28, 16, .55); }
.half--k .half__logo { filter: drop-shadow(0 2px 14px rgba(8, 28, 16, .45)); }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--r)); }
  50% { transform: translateY(-14px) rotate(calc(var(--r) + 6deg)); }
}

/* Halo et canette côté Energy */
.half__glow {
  position: absolute;
  left: calc(var(--split) + (100% - var(--split)) / 2);
  top: 38%;
  width: 80vmin;
  height: 80vmin;
  transform: translate(-50%, -50%);
  background-color: var(--home-glow, #6b5eb9);
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 100%);
  opacity: .85;
  transition: background-color 1.2s var(--ease);
}
.half__can, .half__bottle { position: relative; display: grid; place-items: center; margin-bottom: clamp(14px, 3.4vh, 40px); }

/* Canette 3D : le canvas déborde de la canette CSS pour laisser la place à la rotation. */
.product3d-host { position: absolute; pointer-events: none; }
.half__can .product3d-host { left: 50%; top: 50%; width: 300%; height: 135%; transform: translate(-50%, -50%); }
.half__bottle .product3d-host { left: 50%; top: 50%; width: 320%; height: 125%; transform: translate(-50%, -50%); }
.visual .product3d-host { inset: 0; }
.product3d { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .8s var(--ease); }
.has-3d .product3d { opacity: 1; }
.has-3d > .can-img, .has-3d > .bottle-img { opacity: 0; }
.can--home { --can-h: clamp(190px, 38vh, 420px); rotate: -7deg; }
@media (hover: hover) {
  .half--e:hover .can--home { rotate: 0deg; scale: 1.06; }
  .half--k:hover .bottle-img--home { rotate: 0deg; scale: 1.06; }
}

/* Pastille « ou » posée sur la diagonale */
.seam {
  position: absolute;
  left: var(--split);
  top: 50%;
  z-index: 2;
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--cream);
  color: var(--brown);
  transform: translate(-50%, -50%) rotate(-8deg);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
  pointer-events: none;
}
.seam__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: currentColor;
  font: 600 11px var(--k-body);
  letter-spacing: .02em;
  animation: ring 20s linear infinite;
}
.seam__word { font: 800 2.5rem/1 var(--k-display); font-variation-settings: 'wdth' 88; margin-top: -4px; }
@keyframes ring { to { rotate: 360deg; } }

/* Accueil en mode portrait : une moitié en haut, l'autre en bas */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1024px) {
  .home { --slant: 3.5svh; }
  .home:has(.half--k:focus-visible) { --split: 54%; }
  .home:has(.half--e:focus-visible) { --split: 46%; }
  .half--k { clip-path: polygon(0 0, 100% 0, 100% calc(var(--split) - var(--slant)), 0 calc(var(--split) + var(--slant))); }
  .half--e { clip-path: polygon(0 calc(var(--split) + var(--slant)), 100% calc(var(--split) - var(--slant)), 100% 100%, 0 100%); }

  .half__content { width: min(100% - 2 * var(--gutter), 440px); gap: 12px; }
  .half--k .half__content { left: 50%; top: calc(var(--split) / 2); }
  .half--e .half__content { left: 50%; top: calc(var(--split) + (100% - var(--split)) / 2); }
  .half__logo { display: none; }
  .half__can, .half__bottle { margin-bottom: 8px; }
  .half__title { font-size: clamp(1.75rem, 1rem + 4vw, 2.6rem) !important; }
  .half__lead { font-size: 1rem; }
  .half .btn { margin-top: 2px; min-height: 48px; }

  .half--e .half__content { gap: 10px; }
  .can--home { --can-h: clamp(110px, 17svh, 200px); rotate: -10deg; }
  .half__glow { left: 50%; top: 68%; width: 110vmin; height: 70vmin; }

  .half--k .half__content { gap: 10px; top: calc(var(--split) * .47); }
  .half__bottle .bottle-img--home { --bottle-img-h: clamp(110px, 16.5svh, 210px); rotate: 8deg; }
  .half__scene { width: 100%; height: calc(var(--split) + var(--slant)); object-position: 50% 30%; }
  .half__scrim {
    background: linear-gradient(180deg, rgba(14, 42, 28, .1) 0%, rgba(14, 42, 28, 0) 18%, rgba(14, 42, 28, .5) 52%, rgba(12, 34, 22, .82) 100%);
  }

  /* Décalée à droite sur la diagonale pour ne pas couvrir la canette */
  .seam { left: 82%; top: calc(var(--split) - var(--slant) * .2); width: 92px; height: 92px; }
  .seam__ring { font-size: 11.5px; }
  .seam__word { font-size: 1.9rem; }
}

@media (max-height: 640px) and (max-width: 760px) {
  .half__lead { display: none; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .half__lead, .half__logo { display: none; }
  .half__content { gap: 10px; }
  .can--home { --can-h: 36vh; }
  .half__bottle .bottle-img--home { --bottle-img-h: 40vh; }
}

/* ==========================================================================
   Canette Ciao Energy : image fixe (rendu du modèle 3D), remplacée par la 3D dès qu'elle est prête
   ========================================================================== */

/* La taille se règle avec --can-h (.can--home, .can--stage). */
.can-img {
  display: block;
  height: var(--can-h, 360px);
  width: auto;
  aspect-ratio: 360 / 760;
  flex: none;
  filter: drop-shadow(0 28px 36px rgba(0, 0, 0, .65));
  transition: rotate .7s var(--spring), scale .7s var(--spring), opacity .4s var(--ease);
  pointer-events: none;
}
.can-img.is-switching, .bottle-img.is-switching { animation: pop .6s var(--spring); }

/* Bouteille Ciao Kombucha (rendu du modèle 3D) : la taille se règle avec --bottle-img-h. */
.bottle-img {
  display: block;
  height: var(--bottle-img-h, 400px);
  width: auto;
  aspect-ratio: 360 / 1000;
  flex: none;
  filter: drop-shadow(0 26px 30px rgba(10, 30, 15, .45));
  transition: rotate .7s var(--spring), scale .7s var(--spring), opacity .4s var(--ease);
  pointer-events: none;
}
.bottle-img--home { --bottle-img-h: clamp(220px, 42vh, 470px); rotate: 6deg; }

@keyframes pop {
  0% { scale: .82; }
  100% { scale: 1; }
}

/* ==========================================================================
   Bouteille Ciao Kombucha (barre de progression)
   ========================================================================== */

.bottle {
  position: relative;
  height: var(--bottle-h, 60vh);
  aspect-ratio: 120 / 324;
  flex: none;
}
.bottle__glass {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--ink) 8%, rgba(255, 255, 255, .35));
  -webkit-mask: var(--bottle-mask) center / 100% 100% no-repeat;
  mask: var(--bottle-mask) center / 100% 100% no-repeat;
}
/* Liquide : il monte du fond (y = 320,4) jusqu'au haut de l'épaule (y = 50), soit de 1,1 % à 84,6 % de la
   hauteur (--level). Le corps du liquide s'arrête sous la surface, qui le recouvre : la surface peut ainsi
   rester horizontale quand la bouteille est penchée, et tanguer quand le niveau monte. */
.bottle { --level: calc(1.1% + var(--p) * 83.5%); }
.bottle__liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: max(0%, calc(var(--level) - 9%));
  background-color: var(--liquid, var(--accent));
  transition: background-color .6s var(--ease);
}
.bottle__surface {
  position: absolute;
  left: -20%;
  right: -20%;
  height: 16%;
  /* La ligne moyenne des vagues (11 % de la hauteur de la bande) tombe pile sur le niveau. */
  bottom: calc(var(--level) - 14.24%);
  opacity: clamp(0, var(--p) * 40, 1);
  transform-origin: 50% 11%;
}
.bottle__slosh { position: absolute; inset: 0; transform-origin: 50% 11%; }
.bottle__slosh.is-sloshing { animation: slosh 1.9s cubic-bezier(.3, .6, .4, 1); }
@keyframes slosh {
  0% { rotate: 0deg; }
  14% { rotate: -4deg; }
  34% { rotate: 2.8deg; }
  54% { rotate: -1.6deg; }
  74% { rotate: .7deg; }
  100% { rotate: 0deg; }
}
/* Deux houles douces qui glissent en sens inverse : la surface du fond (plus claire) et celle de devant,
   avec un reflet de lumière sur le dessus. Les vagues sont des masques SVG répétés, le liquide garde sa couleur. */
.bottle__wave {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 200%;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  transition: background-color .6s var(--ease);
}
.bottle__wave--back {
  background: linear-gradient(rgba(255, 255, 255, .42), rgba(255, 255, 255, .42)), var(--liquid, var(--accent));
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20400%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0%208C66%202%20134%202%20200%208S334%2014%20400%208V100H0Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20400%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0%208C66%202%20134%202%20200%208S334%2014%20400%208V100H0Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 50% 100%;
  mask-size: 50% 100%;
  animation: swell-back 9s linear infinite;
}
/* Liseré de lumière sur le bord de la surface (ménisque) : la même vague, juste un peu plus haut. */
.bottle__wave--rim {
  top: -2.2%;
  bottom: 2.2%;
  background: rgba(255, 255, 255, .7);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20400%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0%2011C66%205%20134%205%20200%2011S334%2017%20400%2011V100H0Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20400%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0%2011C66%205%20134%205%20200%2011S334%2017%20400%2011V100H0Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 25% 100%;
  mask-size: 25% 100%;
  animation: swell-front 5.5s linear infinite;
}
.bottle__wave--front {
  background: linear-gradient(rgba(255, 255, 255, .5) 4%, rgba(255, 255, 255, .12) 13%, rgba(255, 255, 255, 0) 22%), var(--liquid, var(--accent));
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20400%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0%2011C66%205%20134%205%20200%2011S334%2017%20400%2011V100H0Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20400%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0%2011C66%205%20134%205%20200%2011S334%2017%20400%2011V100H0Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 25% 100%;
  mask-size: 25% 100%;
  animation: swell-front 5.5s linear infinite;
}
@keyframes swell-front { to { transform: translateX(-50%); } }
@keyframes swell-back { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* Volume : bords plus sombres et reflet vertical, comme dans une bouteille ronde, et fond un peu plus dense. */
.bottle__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 8, 10, .26) 0%, rgba(20, 8, 10, 0) 16%, rgba(255, 255, 255, .16) 26%, rgba(255, 255, 255, 0) 38%, rgba(20, 8, 10, 0) 72%, rgba(20, 8, 10, .28) 100%),
    linear-gradient(0deg, rgba(20, 8, 10, .18) 0%, rgba(20, 8, 10, 0) 45%);
}

/* Bulles : elles montent jusqu'à la surface, où elles disparaissent. */
.bottle__bubbles { position: absolute; inset: 0; opacity: clamp(0, (var(--p) - .06) * 12, 1); }
.bubble {
  position: absolute;
  bottom: 3%;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .35) 60%, rgba(255, 255, 255, .1));
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .5);
  animation: rise var(--d) cubic-bezier(.45, 0, .8, .6) infinite;
  animation-delay: var(--delay);
}
@keyframes rise {
  0% { bottom: 3%; opacity: 0; transform: translateX(0); }
  12% { opacity: .85; }
  35% { transform: translateX(var(--sway)); }
  65% { transform: translateX(calc(var(--sway) * -.6)); }
  90% { opacity: .75; }
  100% { bottom: calc(var(--level) - 2%); opacity: 0; transform: translateX(0); }
}

.bottle__outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.bottle__shape {
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: stroke .6s var(--ease);
}
/* Étiquette translucide, comme sur la vraie bouteille, qui laisse voir le niveau du liquide. */
.bottle__label-bg { fill: var(--ink); fill-opacity: .58; transition: fill .6s var(--ease); }
/* Les lettres du logo sont en currentColor : c'est la couleur du texte qui les colore. */
.bottle__logo { color: var(--bg); opacity: .92; transition: color .6s var(--ease); }
.bottle__ridge { fill: none; stroke: var(--ink); stroke-opacity: .22; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.bottle__shine { fill: rgba(255, 255, 255, .4); }
/* Bouchon métallique : bande cannelée en haut, pointillés, bague plus large en bas */
.cap__skirt, .cap__ring { stroke: var(--ink); stroke-width: 2px; vector-effect: non-scaling-stroke; transition: stroke .6s var(--ease); }
.cap__knurl { fill: rgba(60, 35, 38, .22); }
.cap__ribs { fill: none; stroke: rgba(50, 28, 30, .45); stroke-width: .6px; }
.cap__dashes { fill: none; stroke: rgba(40, 22, 24, .7); stroke-width: 1.1px; }

.bottle--mini { height: 52px; }
.bottle--mini .bottle__shape, .bottle--mini .cap__skirt, .bottle--mini .cap__ring { stroke-width: 1.2px; }
.bottle--mini :is(.bottle__logo, .cap__ribs, .cap__dashes, .cap__knurl, .bottle__ridge, .bottle__shine) { display: none; }

/* ==========================================================================
   Coque commune des sondages
   ========================================================================== */

.survey {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: --p 1.1s var(--spring);
}
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px var(--gutter);
}
.bar__logo { display: block; width: clamp(88px, 9vw, 124px); text-decoration: none; }
.bar__logo svg { width: 100%; height: auto; }

.survey__body {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.visual { display: none; }

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(8px, 3vh, 40px) var(--gutter) 0;
}
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 660px;
}
.screen > form, .screen > .end { flex: 1; display: flex; flex-direction: column; }
.screen.is-entering { animation: screen-in .55s var(--ease) both; }
.screen.is-leaving {
  position: absolute;
  top: clamp(8px, 3vh, 40px);
  left: var(--gutter);
  right: var(--gutter);
  width: auto;
  pointer-events: none;
  animation: screen-out .32s var(--ease) forwards;
}
@keyframes screen-in {
  from { opacity: 0; transform: translateY(calc(var(--dir) * 36px)) rotate(calc(var(--dir) * .6deg)); }
}
@keyframes screen-out {
  to { opacity: 0; transform: translateY(calc(var(--dir) * -36px)); }
}

.screen__title { text-wrap: balance; outline: none; }
.screen__lead { margin-top: 14px; max-width: 46ch; font-size: 1.125rem; line-height: 1.5; text-wrap: pretty; }
.q__hint { margin-top: 12px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 28px 0 calc(20px + env(safe-area-inset-bottom));
}
.nav .btn--primary { flex: 1; max-width: 320px; margin-left: auto; }
.intro .nav .btn--primary { margin-left: 0; }
.nav.is-shaking { animation: shake .4s ease; }
@keyframes shake {
  20%, 60% { translate: -7px 0; }
  40%, 80% { translate: 7px 0; }
}

.form-error:empty { display: none; }
.form-error { align-self: flex-start; margin-top: 18px; padding: 9px 16px; font-weight: 600; }

/* Choix */
.options { display: grid; gap: 10px; margin-top: 26px; }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 12px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .3s var(--spring), background-color .2s, color .2s, border-color .2s, box-shadow .2s, opacity .2s;
}
.opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
.opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.opt:has(input:focus-visible) { outline: 3px solid currentColor; outline-offset: 3px; }
.opt__label { flex: 1; line-height: 1.25; }
.opt__key { display: none; flex: none; place-items: center; width: 26px; height: 26px; font-size: .75rem; font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  .opt__key { display: inline-grid; }
}
.opt__tick {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  scale: 0;
  transition: scale .35s var(--spring);
}
.opt__tick::after {
  content: '';
  width: 10px;
  height: 6px;
  margin-top: -2px;
  border: solid currentColor;
  border-width: 0 0 2.5px 2.5px;
  rotate: -45deg;
}
.opt:has(input:checked) .opt__tick { scale: 1; }

.other { margin-top: 16px; max-width: 480px; }

/* Plusieurs propositions libres */
.ideas { display: grid; gap: 10px; margin-top: 26px; max-width: 560px; }
.ideas__row { display: flex; align-items: center; gap: 8px; }
.ideas__row .field { flex: 1; min-width: 0; }
.ideas__remove {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s, background-color .2s;
}
.ideas__remove:hover { opacity: 1; }
.ideas__row:only-child .ideas__remove { visibility: hidden; }
.ideas__add {
  justify-self: start;
  align-self: flex-start;
  margin-top: 14px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  transition: transform .3s var(--spring), background-color .2s, box-shadow .2s;
}
.ideas__add:active { transform: scale(.96); }

/* Échelle de note */
.scale {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(6px, 2vw, 18px);
  margin-top: 32px;
  max-width: 520px;
}
.scale__item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scale__item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.scale__item:has(input:focus-visible) { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 12px; }
.scale__mark { display: grid; place-items: center; transition: transform .35s var(--spring), background-color .2s, color .2s, filter .2s; }
.scale__num { font-weight: 700; font-variant-numeric: tabular-nums; }
.scale__ends { display: flex; justify-content: space-between; gap: 16px; max-width: 520px; margin-top: 10px; font-size: .95rem; }

/* Note par saveur : une ligne par saveur, la note sur la même ligne (deux lignes quand la place manque) */
.ratings { container-type: inline-size; display: grid; gap: 10px; margin-top: 24px; }
.ratings__ends { display: flex; justify-content: space-between; gap: 16px; font-size: .9rem; }
.rate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "thumb name scale skip";
  align-items: center;
  gap: 6px 12px;
  padding: 8px 10px 8px 8px;
  transition: background-color .2s, border-color .2s, box-shadow .2s;
}
.rate__thumb { grid-area: thumb; justify-self: center; pointer-events: none; }
.rate__name { grid-area: name; min-width: 0; overflow-wrap: anywhere; }
.rate__scale { grid-area: scale; display: grid; grid-template-columns: repeat(var(--n), auto); align-items: center; gap: 6px; transition: opacity .2s; }
.rate__item { position: relative; display: grid; justify-items: center; align-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rate__item input, .rate__skip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rate__item:has(input:focus-visible), .rate__skip:has(input:focus-visible) { outline: 3px solid currentColor; outline-offset: 2px; border-radius: 10px; }
.rate__mark { display: grid; place-items: center; transition: transform .3s var(--spring), background-color .2s, color .2s, filter .2s; }
.rate__num { position: relative; font-variant-numeric: tabular-nums; pointer-events: none; transition: color .2s; }
.rate__skip {
  grid-area: skip;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.rate:has(.rate__skip input:checked) .rate__scale { opacity: .35; }
.rate:has(.rate__skip input:checked) .rate__thumb { filter: grayscale(1); opacity: .55; }
.rate.is-missing { animation: shake .4s ease; }
@container (max-width: 500px) {
  .rate { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "thumb name skip" "thumb scale scale"; padding-right: 8px; }
  .rate__scale { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding-bottom: 2px; }
}
/* Note sur plus de 5 : toujours sur deux lignes */
.ratings--many .rate { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "thumb name skip" "thumb scale scale"; padding-right: 8px; }
.ratings--many .rate__scale { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); padding-bottom: 2px; }

/* Champs */
.fields { display: grid; gap: 18px; margin-top: 28px; max-width: 480px; }
.field-label { display: block; margin-bottom: 8px; font-weight: 600; }
.field {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  font-size: 1.125rem;
  line-height: 1.4;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field:focus { outline: none; }
.field--area { min-height: 160px; resize: vertical; }
.q--text .field { margin-top: 26px; max-width: 560px; }
.field-error { margin-top: 6px; font-size: .95rem; font-weight: 600; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.screen__legal { margin-top: 20px; max-width: 52ch; font-size: .875rem; line-height: 1.5; opacity: .8; }
.screen__legal a { text-underline-offset: 3px; }

/* Page âge et ville */
.age { position: relative; width: 8.5rem; }
.field--age { padding-right: 3.2rem; font-variant-numeric: tabular-nums; }
.age__unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 600; opacity: .6; pointer-events: none; }
.combo { position: relative; }
.combo__input.is-picked { padding-right: 44px; background-image: none; }
.combo__list {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(320px, 45vh);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
}
.combo__opt, .combo__empty { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 12px; }
.combo__opt { cursor: pointer; }
.combo__name { font-weight: 600; }
.combo__meta { font-size: .875rem; opacity: .65; font-variant-numeric: tabular-nums; white-space: nowrap; }
.combo__empty { opacity: .7; }
.text-button {
  justify-self: start;
  margin-top: 8px;
  padding: 4px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.field-group { display: grid; }
.field-group .field-label { justify-self: start; }

/* Carte « Continuer avec ces infos » */
.reuse { margin-top: 24px; max-width: 480px; display: grid; gap: 4px; padding: 18px; }
.reuse__title { font-weight: 800; font-size: 1.15rem; }
.reuse__details { margin-bottom: 12px; overflow-wrap: anywhere; opacity: .8; }
.reuse .btn { width: 100%; }
.reuse__or { margin-top: 24px; font-weight: 600; opacity: .75; }
.reuse__or + .fields { margin-top: 12px; }

/* Fins */
.end__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.end__socials { margin-top: 28px; font-size: .95rem; }
.end__socials a { text-underline-offset: 3px; font-weight: 600; }
.end { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }

/* ==========================================================================
   Univers Kombucha
   ========================================================================== */

.survey--k {
  --bg: #c9e1b8;
  --ink: #006e4b;
  --accent: #428257;
  background-color: var(--bg);
  color: var(--brown);
  transition: --p 1.1s var(--spring), background-color .6s var(--ease);
}
.survey--k .bar { background-color: var(--bg); transition: background-color .6s var(--ease); }
.survey--k .bar__logo { color: var(--brown); }
.survey--k .bar__progress { display: flex; align-items: center; gap: 10px; }
.survey--k .bar__fruit { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); }
.survey--k .bar__count {
  min-width: 2.6em;
  font: 800 1.15rem/1 var(--k-display);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.is-popping { animation: pop-in .6s var(--spring); }
.visual__fruit.is-popping { animation: pop-in .6s var(--spring), bob 6s ease-in-out infinite; }
@keyframes pop-in {
  0% { scale: .3; opacity: 0; }
  60% { scale: 1.12; opacity: 1; }
  100% { scale: 1; }
}

.survey--k .screen__title {
  font: 800 clamp(1.9rem, 1.15rem + 2.5vw, 3.5rem)/1.02 var(--k-display);
  font-variation-settings: 'wdth' 88, 'opsz' 96;
  letter-spacing: -.025em;
  color: var(--ink);
  transition: color .6s var(--ease);
}
.survey--k .q__hint { font-size: 1rem; font-weight: 600; opacity: .7; }

.survey--k .btn { border-radius: 999px; font: 700 1.0625rem/1.1 var(--k-body); }
.survey--k .btn--primary { background: var(--brown); color: var(--cream); }
.survey--k .btn--ghost { background: transparent; color: var(--brown); box-shadow: inset 0 0 0 2px rgba(47, 37, 33, .35); }
@media (hover: hover) {
  .survey--k .btn--primary:hover:not([disabled]) { background: var(--ink); transform: translateY(-2px) rotate(-1.5deg); }
  .survey--k .btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--brown); }
}

.survey--k .form-error { border-radius: 999px; background: var(--brown); color: var(--cream); }
.survey--k .field-error { color: var(--error-k); }

.survey--k .opt {
  border-radius: 20px;
  background: rgba(255, 255, 255, .55);
  border: 2px solid transparent;
  font-size: 1.0625rem;
  font-weight: 600;
}
.survey--k .opt__key { border-radius: 8px; border: 1.5px solid currentColor; opacity: .55; }
.survey--k .opt__tick { background: var(--bg); color: var(--ink); }
@media (hover: hover) {
  .survey--k .opt:hover:not(:has(input:disabled, input:checked)) { background: rgba(255, 255, 255, .85); transform: translateY(-2px); }
}
.survey--k .opt:has(input:checked) {
  background: var(--ink);
  color: var(--bg);
  transform: rotate(-1deg) scale(1.02);
}
.survey--k .opt:has(input:checked) .opt__key { opacity: 1; }

/* Tuiles de saveur Kombucha */
.options--flavors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.survey--k .opt--flavor {
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  min-height: 0;
  padding: 12px 10px 14px;
  border-radius: 24px;
  background: var(--opt-bg);
  color: var(--opt-ink);
  border: 2px solid color-mix(in srgb, var(--opt-ink) 22%, transparent);
  font: 800 1.05rem/1.1 var(--k-display);
  font-variation-settings: 'wdth' 90;
  text-align: center;
}
.survey--k .opt--flavor .opt__key { position: absolute; top: 10px; left: 10px; }
.survey--k .opt--flavor .opt__tick { position: absolute; top: 10px; right: 10px; background: var(--opt-ink); color: var(--opt-bg); }
.survey--k .opt--flavor .opt__label { flex: none; }
.opt__thumb {
  width: 78%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .2));
  transition: transform .45s var(--spring);
  pointer-events: none;
}
@media (hover: hover) {
  .survey--k .opt--flavor:hover { background: var(--opt-bg); transform: translateY(-3px) rotate(1deg); }
  .survey--k .opt--flavor:hover .opt__thumb { transform: rotate(-8deg) scale(1.06); }
}
.survey--k .opt--flavor:has(input:checked) {
  background: var(--opt-bg);
  color: var(--opt-ink);
  border-color: var(--opt-ink);
  box-shadow: 0 0 0 3px var(--opt-ink), 0 16px 30px rgba(0, 0, 0, .14);
  transform: rotate(-2deg) scale(1.03);
}
.survey--k .opt--flavor:has(input:checked) .opt__thumb { transform: rotate(-10deg) scale(1.14); }

/* Note en bulles qui grossissent */
.survey--k .scale__mark {
  width: calc(34px + var(--i) * 11px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--ink);
  position: relative;
}
.survey--k .scale__mark::after {
  content: '';
  position: absolute;
  top: 18%;
  left: 22%;
  width: 24%;
  height: 24%;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  color: #fff;
}
.survey--k .scale__item.is-lit .scale__mark { background: var(--ink); transform: scale(1.08); }
.survey--k .scale__item.is-lit .scale__mark::after { opacity: .5; }
.survey--k .scale__num { font: 800 1.15rem/1 var(--k-display); color: var(--ink); }
.survey--k .scale__ends { font-weight: 600; opacity: .75; }

/* Note par saveur Kombucha : bulles aux couleurs de la saveur, le chiffre dedans */
.survey--k .ratings__ends { font-weight: 600; opacity: .75; }
.survey--k .rate {
  border-radius: 22px;
  background: var(--opt-bg);
  color: var(--opt-ink);
  border: 2px solid color-mix(in srgb, var(--opt-ink) 22%, transparent);
}
.survey--k .rate__thumb { width: 46px; height: 46px; margin-left: 2px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); transition: transform .45s var(--spring), filter .2s, opacity .2s; }
.survey--k .rate__name { font: 800 1.1rem/1.05 var(--k-display); font-variation-settings: 'wdth' 90; }
.survey--k .rate__item { place-items: center; }
.survey--k .rate__mark, .survey--k .rate__num { grid-area: 1 / 1; }
.survey--k .rate__mark {
  width: calc(30px + var(--i) * 12px / (var(--n) - 1));
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2.5px solid var(--opt-ink);
  background: rgba(255, 255, 255, .45);
}
.survey--k .rate__num { font: 800 .95rem/1 var(--k-display); color: var(--opt-ink); }
.survey--k .rate__item.is-lit .rate__mark { background: var(--opt-ink); transform: scale(1.08); }
.survey--k .rate__item.is-lit .rate__num { color: var(--opt-bg); }
.survey--k .rate__skip {
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--opt-ink) 35%, transparent);
  font: 700 .9rem/1 var(--k-body);
}
.survey--k .rate__skip:has(input:checked) { background: var(--opt-ink); color: var(--opt-bg); box-shadow: none; }
.survey--k .rate:has(.rate__item input:checked) .rate__thumb { transform: rotate(-10deg) scale(1.1); }
.survey--k .rate.is-missing { border-color: var(--error-k); box-shadow: 0 0 0 3px color-mix(in srgb, var(--error-k) 30%, transparent); }
@media (hover: hover) {
  .survey--k .rate__skip:hover:not(:has(input:checked)) { background: rgba(255, 255, 255, .8); }
}

.survey--k .field {
  border-radius: 16px;
  border: 2px solid color-mix(in srgb, var(--ink) 28%, transparent);
  background: rgba(255, 255, 255, .6);
  color: var(--brown);
}
.survey--k .field::placeholder { color: rgba(47, 37, 33, .5); }
.survey--k .field:focus { border-color: var(--ink); background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 18%, transparent); }
.survey--k .field[aria-invalid="true"] { border-color: var(--error-k); }

.survey--k .combo__list { border-radius: 16px; background: #fff; color: var(--brown); box-shadow: 0 16px 40px rgba(47, 37, 33, .18); }
.survey--k .combo__opt { border-radius: 10px; }
.survey--k .combo__opt[aria-selected="true"], .survey--k .combo__opt:hover { background: color-mix(in srgb, var(--bg) 70%, #fff); color: var(--ink); }
.survey--k .combo__input.is-picked { border-color: var(--ink); }
.survey--k .text-button { color: var(--ink); }
.survey--k .ideas__remove { color: var(--ink); }
.survey--k .ideas__remove:hover { background: rgba(255, 255, 255, .6); }
.survey--k .ideas__add { border-radius: 999px; background: rgba(255, 255, 255, .55); color: var(--ink); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 30%, transparent); font-family: var(--k-body); font-size: 1rem; }
@media (hover: hover) {
  .survey--k .ideas__add:hover { background: rgba(255, 255, 255, .85); transform: translateY(-2px) rotate(-1deg); }
}
.survey--k .reuse { border-radius: 22px; background: rgba(255, 255, 255, .6); border: 2px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.survey--k .reuse__title { font-family: var(--k-display); color: var(--ink); font-size: 1.35rem; }

.survey--k .end__title {
  font-size: clamp(2.8rem, 1.4rem + 6vw, 6.5rem);
  line-height: .95;
}

/* ==========================================================================
   Univers Energy
   ========================================================================== */

.survey--e {
  --glow: #6b5eb9;
  --light: #bda1ff;
  background: #000;
  color: #fff;
  font-family: var(--e-body);
}
.survey__glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-color: var(--glow);
  -webkit-mask-image: radial-gradient(70% 45% at 50% 0%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 100%);
  mask-image: radial-gradient(70% 45% at 50% 0%, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 100%);
  opacity: .75;
  transition: background-color .8s var(--ease);
}
.survey--e .bar { background: linear-gradient(#000 55%, rgba(0, 0, 0, 0)); }
.survey--e .bar__logo { color: #fff; }

.charge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  font: 500 .72rem/1 var(--e-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
.charge__track { position: relative; width: clamp(70px, 20vw, 240px); height: 2px; background: rgba(255, 255, 255, .16); }
.charge__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: calc(var(--p) * 100%);
  background: linear-gradient(90deg, var(--glow), var(--light));
  box-shadow: 0 0 12px var(--light);
}
.charge__fill::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--light);
  box-shadow: 0 0 10px var(--light);
  transform: translateY(-50%);
}
.charge__pct { min-width: 3.4em; text-align: right; color: #fff; font-variant-numeric: tabular-nums; }
.survey--e .bar__count { font: 500 .72rem/1 var(--e-mono); letter-spacing: .12em; color: rgba(255, 255, 255, .7); }

.survey--e .screen__title {
  font: italic 900 clamp(2rem, 1.05rem + 3vw, 4.2rem)/.94 var(--e-display);
  text-transform: uppercase;
  letter-spacing: -.01em;
}
.survey--e .screen__lead { color: rgba(255, 255, 255, .72); }
.survey--e .q__hint {
  font: 500 .75rem/1.4 var(--e-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--light);
}

.survey--e .btn { border-radius: 8px; font: 500 .9rem/1.1 var(--e-body); letter-spacing: .05em; text-transform: uppercase; }
.survey--e .btn--primary { background: #fff; color: #000; }
.survey--e .btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
@media (hover: hover) {
  .survey--e .btn--primary:hover:not([disabled]) { background: var(--light); box-shadow: 0 0 32px color-mix(in srgb, var(--light) 55%, transparent); }
  .survey--e .btn--ghost:hover { box-shadow: inset 0 0 0 1px #fff; }
}

.survey--e .form-error { border-radius: 8px; color: var(--error-e); background: rgba(255, 90, 90, .1); box-shadow: inset 0 0 0 1px rgba(255, 143, 143, .4); }
.survey--e .field-error { color: var(--error-e); }

.survey--e .opt {
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 1.0625rem;
  font-weight: 500;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.survey--e .opt__key {
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .3);
  font-family: var(--e-mono);
  font-weight: 500;
  color: rgba(255, 255, 255, .7);
}
.survey--e .opt__tick { background: #000; color: var(--light); }
@media (hover: hover) {
  .survey--e .opt:hover:not(:has(input:disabled, input:checked)) { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .08); }
}
.survey--e .opt:has(input:checked) {
  background: var(--light);
  border-color: var(--light);
  color: #000;
  box-shadow: 0 0 28px color-mix(in srgb, var(--light) 45%, transparent);
}
.survey--e .opt:has(input:checked) .opt__key { color: #000; border-color: rgba(0, 0, 0, .4); }

/* Tuiles de saveur Energy : mini canettes */
.survey--e .opt--flavor {
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 10px 14px;
  overflow: hidden;
  text-align: center;
  font: italic 900 1rem/1 var(--e-display);
  text-transform: uppercase;
  background:
    radial-gradient(60% 50% at 50% 40%, color-mix(in srgb, var(--opt-glow) 38%, transparent), transparent 75%),
    rgba(255, 255, 255, .03);
}
.survey--e .opt--flavor .opt__label { flex: none; }
.survey--e .opt--flavor .opt__key { position: absolute; top: 8px; left: 8px; }
.survey--e .opt--flavor .opt__tick { position: absolute; top: 8px; right: 8px; }
/* Vignette : rendu de la vraie canette de la saveur */
.opt__canimg {
  height: clamp(110px, 16vh, 150px);
  width: auto;
  aspect-ratio: 360 / 760;
  rotate: -8deg;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .6));
  transition: transform .45s var(--spring), filter .3s;
  pointer-events: none;
}
@media (hover: hover) {
  .survey--e .opt--flavor:hover { border-color: var(--opt-light); }
  .survey--e .opt--flavor:hover .opt__canimg { transform: translateY(-6px) rotate(14deg); }
}
.survey--e .opt--flavor:has(input:checked) {
  background:
    radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--opt-light) 45%, transparent), transparent 75%),
    color-mix(in srgb, var(--opt-glow) 40%, #000);
  border-color: var(--opt-light);
  color: #fff;
  box-shadow: 0 0 30px color-mix(in srgb, var(--opt-glow) 60%, transparent);
}
.survey--e .opt--flavor:has(input:checked) .opt__canimg {
  transform: scale(1.1) rotate(10deg);
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--opt-light) 70%, transparent)) drop-shadow(0 12px 14px rgba(0, 0, 0, .5));
}
.survey--e .opt--flavor:has(input:checked) .opt__key { color: #fff; border-color: rgba(255, 255, 255, .5); }

/* Note en éclairs */
.survey--e .scale__mark { width: clamp(30px, 8vw, 44px); }
.survey--e .scale__mark svg { width: 100%; height: auto; overflow: visible; }
.survey--e .scale__mark path { fill: transparent; stroke: rgba(255, 255, 255, .45); stroke-width: 1.5; stroke-linejoin: round; transition: fill .2s, stroke .2s; }
.survey--e .scale__item.is-lit .scale__mark { transform: scale(1.1) rotate(-6deg); filter: drop-shadow(0 0 12px var(--light)); }
.survey--e .scale__item.is-lit .scale__mark path { fill: var(--light); stroke: var(--light); }
.survey--e .scale__num { font: 500 .85rem/1 var(--e-mono); color: rgba(255, 255, 255, .8); }
.survey--e .scale__ends { font-family: var(--e-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }

/* Note par saveur Energy : mini canette et éclairs à la couleur de la saveur */
.survey--e .ratings__ends { font-family: var(--e-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.survey--e .rate {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  background:
    radial-gradient(55% 140% at 0% 50%, color-mix(in srgb, var(--opt-glow) 36%, transparent), transparent 72%),
    rgba(255, 255, 255, .03);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.survey--e .rate__thumb {
  height: 56px;
  width: auto;
  aspect-ratio: 360 / 760;
  margin: -4px 4px;
  rotate: -8deg;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .6));
  transition: transform .45s var(--spring), filter .3s, opacity .2s;
}
.survey--e .rate__name { font: italic 900 1rem/1.05 var(--e-display); text-transform: uppercase; }
.survey--e .rate__scale { gap: 8px; }
.survey--e .rate__item { gap: 5px; padding: 2px 3px; }
.survey--e .rate__mark { width: 22px; }
.survey--e .rate__mark svg { width: 100%; height: auto; overflow: visible; }
.survey--e .rate__mark path { fill: transparent; stroke: rgba(255, 255, 255, .45); stroke-width: 1.5; stroke-linejoin: round; transition: fill .2s, stroke .2s; }
.survey--e .rate__item.is-lit .rate__mark { transform: scale(1.12) rotate(-6deg); filter: drop-shadow(0 0 8px var(--opt-light)); }
.survey--e .rate__item.is-lit .rate__mark path { fill: var(--opt-light); stroke: var(--opt-light); }
.survey--e .rate__num { font: 500 .7rem/1 var(--e-mono); color: rgba(255, 255, 255, .7); }
.survey--e .rate__skip {
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .3);
  font: 500 .72rem/1 var(--e-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}
.survey--e .rate__skip:has(input:checked) { background: #fff; border-color: #fff; color: #000; }
.survey--e .rate:has(.rate__item input:checked) { border-color: color-mix(in srgb, var(--opt-light) 55%, transparent); }
.survey--e .rate:has(.rate__item input:checked) .rate__thumb { transform: rotate(14deg) scale(1.06); filter: drop-shadow(0 0 12px color-mix(in srgb, var(--opt-light) 60%, transparent)) drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); }
.survey--e .rate.is-missing { border-color: var(--error-e); box-shadow: 0 0 0 1px var(--error-e); }
@media (hover: hover) {
  .survey--e .rate__skip:hover:not(:has(input:checked)) { border-color: rgba(255, 255, 255, .7); }
}

.survey--e .field {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .05);
  color: #fff;
  font-family: var(--e-body);
}
.survey--e .field::placeholder { color: rgba(255, 255, 255, .4); }
.survey--e .field:focus { border-color: var(--light); box-shadow: 0 0 0 3px color-mix(in srgb, var(--light) 30%, transparent); }
.survey--e .field[aria-invalid="true"] { border-color: var(--error-e); }
.survey--e .field-label { font-weight: 500; }
.survey--e .combo__list { border-radius: 10px; background: #111; border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 16px 40px rgba(0, 0, 0, .6); }
.survey--e .combo__opt { border-radius: 6px; }
.survey--e .combo__opt[aria-selected="true"], .survey--e .combo__opt:hover { background: color-mix(in srgb, var(--light) 22%, #111); }
.survey--e .combo__meta { font-family: var(--e-mono); font-size: .8rem; }
.survey--e .combo__input.is-picked { border-color: var(--light); }
.survey--e .text-button { color: rgba(255, 255, 255, .8); font-family: var(--e-body); }
.survey--e .ideas__remove { color: #fff; }
.survey--e .ideas__remove:hover { background: rgba(255, 255, 255, .1); }
.survey--e .ideas__add { border-radius: 8px; background: rgba(255, 255, 255, .04); color: var(--light); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--light) 55%, transparent); font: 500 .8rem/1 var(--e-mono); letter-spacing: .08em; text-transform: uppercase; }
@media (hover: hover) {
  .survey--e .ideas__add:hover { background: color-mix(in srgb, var(--light) 16%, transparent); box-shadow: inset 0 0 0 1px var(--light), 0 0 20px color-mix(in srgb, var(--light) 35%, transparent); }
}
.survey--e .reuse { border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid color-mix(in srgb, var(--light) 50%, transparent); }
.survey--e .reuse__title { font: italic 900 1.4rem/1 var(--e-display); text-transform: uppercase; }
.survey--e .reuse__details { font-family: var(--e-mono); font-size: .85rem; }

.end__charge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font: 500 .75rem/1 var(--e-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--light);
}
.end__charge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: blink 1.2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25; } }
.survey--e .end__title { font-size: clamp(2.8rem, 1.4rem + 6vw, 6.5rem); line-height: .9; }

/* ==========================================================================
   Grand écran : visuel produit à côté des questions
   ========================================================================== */

@media (min-width: 640px) {
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .options--flavors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .survey--e .options--flavors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .survey__body { align-items: start; }
  .survey--k .survey__body { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); }
  .survey--e .survey__body { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); }
  .visual {
    position: sticky;
    top: 0;
    display: grid;
    place-items: center;
    height: 100dvh;
    margin-top: -72px;
  }
  .survey--e .visual { order: 2; }
  .stage { padding-top: 9vh; }
  .screen.is-leaving { top: 9vh; }

  .survey--k .bar__fruit, .survey--k .bottle--mini { display: none; }
  .bottle--big { --bottle-h: min(62vh, 560px); rotate: -5deg; }
  /* La bouteille est penchée, le liquide reste à l'horizontale. */
  .bottle--big .bottle__surface { rotate: 5deg; }
  .visual__fruit {
    position: absolute;
    right: 2%;
    bottom: 8%;
    width: min(15vw, 200px);
    aspect-ratio: 1;
    object-fit: contain;
    filter: drop-shadow(0 20px 26px rgba(0, 0, 0, .22));
    --r: -10deg;
    animation: bob 6s ease-in-out infinite;
  }
  .can--stage { --can-h: min(64vh, 580px); rotate: 9deg; }
  .survey__glow {
    -webkit-mask-image: radial-gradient(40% 55% at 78% 50%, #000 0%, rgba(0, 0, 0, .35) 50%, transparent 100%);
    mask-image: radial-gradient(40% 55% at 78% 50%, #000 0%, rgba(0, 0, 0, .35) 50%, transparent 100%);
  }
  .nav { padding-bottom: 48px; }
}

/* Mobile : boutons collés en bas, à portée de pouce */
@media (max-width: 959px) {
  .nav {
    position: sticky;
    bottom: 0;
    z-index: 4;
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    padding-top: 22px;
  }
  .survey--k .nav { background: linear-gradient(rgba(255, 255, 255, 0), var(--bg) 34%); }
  .survey--e .nav { background: linear-gradient(rgba(0, 0, 0, 0), #000 34%); }
  .nav .btn--primary { max-width: none; }
  .end__actions .btn { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  .charge__label { display: none; }
  .survey--e .bar { gap: 12px; }
}

/* ==========================================================================
   Célébration finale
   ========================================================================== */

.burst { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.burst > * { position: absolute; left: 50%; top: 40%; }
.burst__fruit { width: clamp(52px, 7vw, 84px); aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .18)); }
.burst__dot { width: 14px; height: 14px; border-radius: 50%; }
.burst__bolt { width: clamp(24px, 3vw, 36px); }
.burst__bolt svg { fill: currentColor; filter: drop-shadow(0 0 6px currentColor); }
.burst__spark { width: 3px; height: 26px; border-radius: 2px; background: currentColor; box-shadow: 0 0 10px currentColor; }

.burst__flash {
  position: absolute;
  inset: 0;
  left: 0;
  top: 0;
  background: radial-gradient(circle at 50% 40%, var(--flash), transparent 70%);
  animation: flash .9s ease-out forwards;
}
@keyframes flash {
  0% { opacity: 0; }
  12% { opacity: .55; }
  100% { opacity: 0; }
}

@media (max-width: 639px) {
  .survey--k .opt--flavor .opt__thumb { width: 62%; }
}

/* ==========================================================================
   Mouvement réduit
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .bubble { display: none; }
}
