/* =========================================================
   COCOON · mini-site Portes ouvertes CPNV
   ========================================================= */

@font-face { font-family: 'MA'; src: url(assets/fonts/MontserratAlternates-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'MA'; src: url(assets/fonts/MontserratAlternates-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'MA'; src: url(assets/fonts/MontserratAlternates-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --ink: #0d1321;
  --ink-2: #1b1f27;
  --emerald: #0b6e4f;
  --emerald-dark: #085a40;
  --amber: #fab62d;
  --bronze: #cc5803;
  --cream: #fbf6ec;
  --white: #ffffff;

  --gutter: clamp(16px, 5vw, 56px);
  --radius: 28px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: 'MA', system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

.eyebrow {
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bronze);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .95em 1.5em;
  border-radius: 999px;
  background: var(--amber); color: var(--ink);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: transform .25s var(--ease-back), background-color .2s;
}
.btn:active { transform: scale(.96); }
@media (hover: hover) { .btn:hover { transform: translateY(-2px) rotate(-1.5deg); } }
.btn .icon { width: 1.2em; height: 1.2em; flex: none; }
.btn--small { padding: .6em 1em; font-size: .85rem; background: rgba(255,255,255,.08); color: var(--white); border: 1px solid rgba(255,255,255,.14); }
.btn--small .icon { color: var(--amber); }

/* ---------- Barre du haut ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(12px + env(safe-area-inset-top)) var(--gutter) 12px;
  transition: background-color .3s, backdrop-filter .3s, box-shadow .3s;
}
.topbar.is-scrolled {
  background: rgba(13, 19, 33, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.topbar__logo { display: block; color: var(--bronze); }
.topbar__logo svg { display: block; width: 112px; height: auto; fill: currentColor; }
.topbar__nav { display: none; gap: 28px; font-weight: 700; font-size: .95rem; }
.topbar__nav a { text-decoration: none; opacity: .8; transition: opacity .2s; }
.topbar__nav a:hover { opacity: 1; }
.topbar .btn--small span { display: none; }
@media (min-width: 420px) { .topbar .btn--small span { display: inline; } }
@media (min-width: 860px) { .topbar__nav { display: flex; } }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(84px + env(safe-area-inset-top)) var(--gutter) 40px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 45% at 50% 42%, rgba(204, 88, 3, .28), transparent 70%),
    radial-gradient(50% 40% at 85% 95%, rgba(11, 110, 79, .35), transparent 70%),
    var(--ink);
}

/* Le logo géant en fond, façon « mot-titre » des inspirations */
.hero__ghost {
  position: absolute; z-index: -1;
  left: 50%; top: 44%;
  width: 150vw; max-width: none;
  transform: translate(-50%, -50%);
  fill: none; stroke: rgba(250, 182, 45, .14); stroke-width: .18;
}
.hero__ghost { display: none; }
@media (min-width: 760px) { .hero__ghost { display: block; width: 118vw; } }

.hero__stars { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero__stars .tw {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--s); height: var(--s);
  animation: twinkle 3.2s var(--d) ease-in-out infinite;
}
.tw.amber { fill: var(--amber); } .tw.white { fill: var(--white); } .tw.bronze { fill: var(--bronze); }
@keyframes twinkle {
  0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
  50% { transform: scale(.45) rotate(45deg); opacity: .5; }
}

.hero__title {
  display: flex; flex-direction: column; align-items: center;
  font-weight: 700;
  font-size: clamp(1.9rem, 8.4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -.01em;
}
.hero__title .l2 { font-size: .72em; margin-top: .18em; }
.hero__title .l3 {
  color: var(--amber); font-weight: 800; font-size: 1.12em;
  transform: rotate(-4deg); margin-top: .02em;
}
.hero__title span { animation: rise .9s var(--ease-out) both; }
.hero__title .l2 { animation-delay: .12s; }
.hero__title .l3 { animation: rise-tilt .9s .24s var(--ease-back) both; }
@keyframes rise { from { opacity: 0; transform: translateY(40%); } }
@keyframes rise-tilt { from { opacity: 0; transform: translateY(40%) rotate(4deg); } to { transform: rotate(-4deg); } }

/* ---------- Boulette 3D ---------- */
.ball {
  position: relative;
  width: min(86vw, 52svh, 520px);
  aspect-ratio: 1;
  margin: 4px auto 0;
}
.ball__canvas {
  position: absolute; inset: -12%;
  width: 124%; height: 124%;
  touch-action: pan-y;
  cursor: grab;
  opacity: 0; transition: opacity .6s;
}
.ball__canvas:active { cursor: grabbing; }
.ball__fallback {
  position: absolute; inset: 9%;
  width: 82%; height: 82%; object-fit: contain;
  animation: wobble 6s ease-in-out infinite;
  transition: opacity .5s;
}
@keyframes wobble { 50% { transform: rotate(10deg) translateY(-3%); } }
.ball.is-3d .ball__canvas { opacity: 1; }
.ball__fallback { opacity: 0; }
.ball.no-3d .ball__fallback { opacity: 1; }
.ball.no-3d .ball__hint { display: none; }
.ball__shadow {
  position: absolute; z-index: -1;
  left: 22%; right: 22%; bottom: 2%; height: 9%;
  background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent);
  filter: blur(4px);
}
.ball__hint {
  position: absolute; left: 50%; bottom: -6px;
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .45em;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
  white-space: nowrap;
  transition: opacity .6s;
}
.ball__hint svg { width: 16px; height: 16px; color: var(--amber); animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }
.ball.was-touched .ball__hint { opacity: 0; }

/* ---------- Compte à rebours ---------- */
.countdown-block { margin-top: clamp(18px, 3vh, 32px); width: 100%; }
.countdown-block__intro { font-size: clamp(.95rem, 3.6vw, 1.15rem); color: rgba(255,255,255,.8); }
.countdown-block__intro strong { color: var(--white); font-weight: 700; }

.countdown {
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(2px, 1vw, 18px);
  margin: 10px auto 0;
}
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 1.5em; font-size: clamp(2.4rem, 11.6vw, 8rem); }
.cd-num {
  display: block;
  font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.cd-num.tick { animation: tick .45s var(--ease-out); }
@keyframes tick { from { transform: translateY(-18%); opacity: .2; } }
.cd-label {
  margin-top: .5rem;
  font-size: clamp(.62rem, 2.4vw, .85rem); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.cd-sep {
  font-weight: 800; color: var(--amber);
  font-size: clamp(1.6rem, 7vw, 5.5rem); line-height: 1.1;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: .35; } }

.countdown-done {
  margin-top: 10px;
  font-weight: 800; font-size: clamp(2.2rem, 10vw, 5rem); line-height: 1.05;
  color: var(--amber);
}

.date-pill {
  display: inline-block;
  margin-top: 18px;
  padding: .32em .9em;
  border-radius: 999px;
  background: var(--amber); color: var(--ink);
  font-weight: 800; font-size: clamp(1.25rem, 5.4vw, 1.8rem);
  letter-spacing: .01em;
  transform: rotate(-2deg);
}
.date-pill--big { font-size: clamp(1.8rem, 9vw, 3.4rem); }

/* =========================================================
   BANDEAU DÉFILANT
   ========================================================= */
/* Zone autour de la banderole inclinée : la moitié haute laisse voir le hero
   (elle chevauche sa fin), la moitié basse est crème comme la section produit.
   Ainsi aucun bord sombre ou clair n'apparaît, quelle que soit la largeur. */
.marquee-zone {
  --pad: calc(2.2vw + 6px);
  position: relative; z-index: 2;
  padding: var(--pad) 0;
  margin-top: calc(-1 * var(--pad) - 30px);
  margin-bottom: -2px; /* évite une fine ligne d'arrondi avec la section produit */
  background: linear-gradient(to bottom, transparent 50%, var(--cream) 50%);
  overflow: hidden;
}
.marquee {
  overflow: hidden;
  background: var(--amber); color: var(--ink);
  padding: 14px 0;
  transform: rotate(-2deg) scale(1.05);
}
.marquee__track {
  display: flex; align-items: center; gap: 24px;
  width: max-content;
  animation: marquee 26s linear infinite;
  font-weight: 800; font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  white-space: nowrap;
}
.marquee__track svg { width: 22px; height: 22px; fill: var(--bronze); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   PRODUIT
   ========================================================= */
.product {
  background: var(--cream); color: var(--ink);
  padding: clamp(56px, 10vw, 120px) var(--gutter) clamp(64px, 10vw, 120px);
}
.product__head { max-width: 1100px; margin: 0 auto; }
.product__title { display: flex; align-items: center; gap: .18em; margin-top: 8px; }
.big3 {
  font-weight: 800; color: var(--bronze);
  font-size: clamp(7rem, 34vw, 15rem); line-height: .8;
}
.product__title .t {
  display: flex; flex-direction: column;
  font-weight: 800; font-size: clamp(1.9rem, 8.5vw, 4.4rem); line-height: 1;
}
.product__title em { font-style: normal; font-weight: 700; color: var(--bronze); font-size: .5em; margin-top: .4em; }

.ingredients {
  list-style: none; padding: 0;
  max-width: 1100px; margin: clamp(32px, 6vw, 64px) auto 0;
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) { .ingredients { grid-template-columns: repeat(3, 1fr); gap: 20px; } }

.ing {
  position: relative;
  border-radius: var(--radius);
  padding: 28px 24px 30px;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 18px;
  overflow: hidden;
}
.ing__icon { grid-row: span 2; width: 96px; height: 80px; }
.ing__num { font-weight: 800; font-size: .9rem; opacity: .75; align-self: end; }
.ing__name { font-weight: 800; font-size: clamp(1.5rem, 6vw, 2rem); line-height: 1.05; align-self: start; }
.ing--oat    { background: var(--emerald); color: var(--white); }
.ing--honey  { background: var(--amber);   color: var(--ink); }
.ing--honey .ing__num { color: var(--bronze); opacity: 1; }
.ing--peanut { background: var(--bronze);  color: var(--white); }
@media (min-width: 720px) {
  .ing { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 36px 20px 40px; }
  .ing__icon { grid-row: auto; width: 130px; height: 108px; margin-bottom: 10px; }
  .ing__num { align-self: auto; }
}
.ing:nth-child(1) { --r: -1.2deg; } .ing:nth-child(2) { --r: 1deg; } .ing:nth-child(3) { --r: -.8deg; }
@media (hover: hover) {
  .ing { transition: transform .35s var(--ease-back); }
  .ing:hover { transform: rotate(var(--r)) translateY(-6px); }
}

.product__note {
  display: inline-block; margin-top: 18px;
  padding: .45em 1em; border-radius: 999px;
  background: var(--emerald); color: var(--white);
  font-weight: 700; font-size: clamp(.9rem, 3.6vw, 1.05rem);
  transform: rotate(-1.5deg);
}
.product__note strong { color: var(--amber); font-weight: 800; }

/* Les autres goûts */
.flavors { max-width: 1100px; margin: clamp(56px, 9vw, 100px) auto 0; }
.flavors__head h3 { font-weight: 800; font-size: clamp(1.9rem, 7.5vw, 3.4rem); line-height: 1.02; margin-top: 8px; }
.flavors__head h3 span { color: var(--bronze); }
.flavors__list {
  list-style: none; padding: 0; margin: clamp(24px, 5vw, 44px) 0 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 559px) {
  .flavors__list { grid-template-columns: 1fr; }
  .flavors__list .flavor { display: grid; grid-template-columns: 104px 1fr; align-items: center; gap: 14px; text-align: left; padding: 10px 20px 10px 12px; }
  .flavors__list .flavor__art { width: 104px; margin: 0; }
}
.flavor {
  background: var(--bg); color: var(--fg);
  border-radius: var(--radius);
  padding: 22px 16px 26px;
  text-align: center;
}
.flavor__art { position: relative; width: min(100%, 210px); aspect-ratio: 1; margin: 0 auto 12px; }
.flavor__ring { position: absolute; inset: 16%; border-radius: 50%; border: clamp(10px, 2.4vw, 18px) solid var(--white); }
.flavor__art img { position: relative; width: 100%; height: 100%; object-fit: contain; transition: transform .4s var(--ease-back); }
.flavor h4 { margin: 0; font-weight: 800; font-size: clamp(1.25rem, 3.4vw, 1.7rem); line-height: 1.05; }
@media (hover: hover) { .flavor:hover img { transform: rotate(-8deg) scale(1.06); } }
.flavors__list .reveal:nth-child(2) { transition-delay: .1s; }
.flavors__list .reveal:nth-child(3) { transition-delay: .2s; }

/* « La vraie » */
.real {
  max-width: 1100px; margin: clamp(56px, 9vw, 110px) auto 0;
  display: grid; gap: 28px; align-items: center;
}
@media (min-width: 820px) { .real { grid-template-columns: 1fr 1fr; gap: 64px; } }
.real__visual { position: relative; width: min(100%, 440px); margin: 0 auto; aspect-ratio: 1; }
.real__ring {
  position: absolute; inset: 4%;
  border-radius: 50%;
  background: var(--amber);
}
.real__visual img {
  position: relative; width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 24px 28px rgba(80, 40, 0, .3));
  animation: spin-slow 40s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.real__star { position: absolute; fill: var(--emerald); }
.real__star.s1 { width: 34px; height: 34px; right: 2%; top: 6%; animation: twinkle 3s ease-in-out infinite; }
.real__star.s2 { width: 20px; height: 20px; left: 4%; bottom: 14%; fill: var(--bronze); animation: twinkle 3s 1.2s ease-in-out infinite; }
.real__text h3 { font-weight: 800; font-size: clamp(1.8rem, 7vw, 3rem); line-height: 1.05; margin: 10px 0 16px; }
.real__text p:last-child { font-size: 1.05rem; max-width: 46ch; color: rgba(13, 19, 33, .78); }

/* =========================================================
   ÉQUIPE
   ========================================================= */
.team {
  position: relative; overflow: hidden;
  background: var(--emerald);
  padding: clamp(72px, 12vw, 140px) var(--gutter);
}
.team__pattern { position: absolute; inset: 0; pointer-events: none; }
.team__pattern svg { position: absolute; fill: rgba(255,255,255,.07); }
.team__head { position: relative; max-width: 1100px; margin: 0 auto; }
.team__head .eyebrow { color: var(--amber); }
.team__head h2 { font-weight: 800; font-size: clamp(2rem, 8.5vw, 4.2rem); line-height: 1.02; margin-top: 8px; }
.team__head h2 span { color: var(--amber); }

.members {
  position: relative;
  list-style: none; padding: 0;
  max-width: 1100px; margin: clamp(32px, 6vw, 64px) auto 0;
  display: grid; gap: 22px 14px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 820px) { .members { grid-template-columns: repeat(3, 1fr); gap: 36px 28px; } }

.member { transform: rotate(var(--tilt)); }
.member__photo {
  border-radius: 22px; overflow: hidden;
  background: var(--cream);
  border: 5px solid var(--tile);
  aspect-ratio: 4 / 5;
}
.member__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
@media (hover: hover) {
  .member { transition: transform .35s var(--ease-back); }
  .member:hover { transform: rotate(0) translateY(-6px); }
  .member:hover img { transform: scale(1.05); }
}
.member__role {
  display: inline-block; margin-top: 14px;
  padding: .25em .7em; border-radius: 999px;
  background: var(--tile); color: var(--white);
  font-weight: 700; font-size: clamp(.68rem, 2.8vw, .8rem); letter-spacing: .02em;
}
.member[style*="--amber"] .member__role { color: var(--ink); }
.member[style*="--emerald"] .member__role { background: var(--cream); color: var(--emerald); }
.member h3 { font-weight: 800; font-size: clamp(1.05rem, 4.3vw, 1.5rem); margin-top: 8px; line-height: 1.1; }
.member p { font-size: clamp(.8rem, 3.2vw, .95rem); color: rgba(255,255,255,.72); margin-top: 2px; }

/* =========================================================
   RENDEZ-VOUS
   ========================================================= */
.rdv {
  position: relative; overflow: hidden;
  padding: clamp(80px, 14vw, 160px) var(--gutter);
  text-align: center;
  background:
    radial-gradient(55% 50% at 50% 0%, rgba(250, 182, 45, .18), transparent 70%),
    var(--ink);
}
.rdv__inner { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.rdv__logo { width: min(68vw, 300px); height: auto; fill: var(--bronze); }
.rdv__intro { margin-top: 32px; font-weight: 700; color: rgba(255,255,255,.75); font-size: 1.1rem; }
.rdv h2 { font-weight: 800; font-size: clamp(2.1rem, 9vw, 4.4rem); line-height: 1.02; margin-top: 6px; }
.rdv h2 span { color: var(--amber); }
.rdv .date-pill { margin-top: 24px; }
.rdv__sub { margin-top: 24px; font-size: 1.05rem; color: rgba(255,255,255,.8); }
.rdv__links { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rdv__site { font-weight: 700; color: rgba(255,255,255,.6); }

.footer {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 32px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: var(--ink); color: rgba(255,255,255,.45);
  font-size: .85rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer__logo { width: 84px; fill: rgba(255,255,255,.35); }

/* ---------- Apparition au scroll ---------- */
.reveal { opacity: 0; translate: 0 28px; transition: opacity .8s var(--ease-out), translate .8s var(--ease-out); }
.reveal.is-in { opacity: 1; translate: 0 0; }
.ingredients .reveal:nth-child(2), .members .reveal:nth-child(3n+2) { transition-delay: .1s; }
.ingredients .reveal:nth-child(3), .members .reveal:nth-child(3n) { transition-delay: .2s; }
.no-js .reveal { opacity: 1; translate: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; translate: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Hero desktop : texte + timer à gauche, boulette à droite ---------- */
@media (min-width: 960px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "title ball" "count ball";
    align-content: center;
    column-gap: 3vw;
    text-align: left;
    padding-left: max(var(--gutter), calc((100vw - 1280px) / 2));
    padding-right: max(var(--gutter), calc((100vw - 1280px) / 2));
  }
  .hero__title { grid-area: title; align-self: end; align-items: flex-start; font-size: clamp(3rem, 5.2vw, 5.4rem); }
  .hero__title .l3 { transform-origin: left center; }
  .ball { grid-area: ball; width: min(46vw, 74svh, 660px); margin: 0; justify-self: center; align-self: center; }
  .countdown-block { grid-area: count; align-self: start; margin-top: 36px; }
  .countdown { justify-content: flex-start; }
  .cd-unit { font-size: min(6vw, 6.2rem); align-items: flex-start; }
  .cd-sep { font-size: min(4vw, 4.2rem); }
  .date-pill { transform-origin: left center; }
}
