/* ============================================================
   JELIBO — Nouvelle Vague
   Candy-shop maximalism : cobalt / rose / tangerine / lime
   ============================================================ */

:root {
  /* palette calquée sur les vrais bonbons + logo Jelibo */
  --rose: #f2739b;        /* rose du logo */
  --rose-deep: #d9527f;
  --corail: #ff6f61;
  --bleu: #45cbe0;
  --jaune: #ffd84d;
  --vert: #6bd549;
  --creme: #fff6ea;
  --encre: #221338;
  --rouge: #ff2e4c;
  /* alias hérités */
  --cobalt: var(--bleu);
  --tangerine: var(--corail);
  --lime: var(--jaune);
  --font-logo: 'Shrikhand', 'Baloo 2', cursive;
  --font-display: 'Baloo 2', sans-serif;
  --font-body: 'Bricolage Grotesque', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }
html:focus-within { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--creme);
  color: var(--encre);
  overflow-x: hidden;
  cursor: none;
}
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}

::selection { background: var(--rose); color: var(--creme); }

/* grain */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== custom cursor ===== */
.cursor {
  position: fixed; z-index: 10000; pointer-events: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--rose);
  transform: translate(-50%, -50%);
  transition: background .2s;
}
.cursor-ring {
  position: fixed; z-index: 9999; pointer-events: none;
  width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid var(--rose);
  transform: translate(-50%, -50%) scale(1);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), border-color .2s, opacity .2s;
}
.cursor-ring.big { transform: translate(-50%, -50%) scale(1.9); border-color: var(--bleu); }
.cursor.big { background: var(--bleu); }

/* ===== topbar ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  mix-blend-mode: normal;
}
.wordmark {
  font-family: var(--font-logo); font-weight: 400;
  font-size: 1.9rem; letter-spacing: .01em;
  color: var(--rose); text-decoration: none;
  text-shadow: 2.5px 2.5px 0 var(--rose-deep);
  transform: rotate(-3deg);
  display: inline-block;
}
.topnav { display: flex; gap: 22px; }
.topnav a {
  font-weight: 600; font-size: .95rem; text-decoration: none;
  color: var(--creme);
  background: var(--encre);
  padding: 8px 16px; border-radius: 999px;
  border: 2px solid var(--encre);
  transition: background .2s, border-color .2s, transform .2s, color .2s;
}
.topnav a:hover { background: var(--rose); border-color: var(--encre); transform: rotate(-2deg) scale(1.05); }
.cart-btn {
  position: relative;
  background: var(--lime); color: var(--encre);
  border: 3px solid var(--encre);
  border-radius: 999px;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  box-shadow: 4px 4px 0 var(--encre);
  transition: transform .15s, box-shadow .15s;
  cursor: none;
}
.cart-btn:hover { transform: translate(-2px,-2px) rotate(-4deg); box-shadow: 6px 6px 0 var(--encre); }
.cart-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--encre); }
.cart-count {
  position: absolute; top: -7px; right: -7px;
  background: var(--rose); color: var(--creme);
  font-family: var(--font-display); font-weight: 800; font-size: .78rem;
  min-width: 24px; height: 24px; padding: 0 5px;
  border-radius: 999px; border: 2.5px solid var(--encre);
  display: grid; place-items: center;
  transition: transform .2s cubic-bezier(.34,1.8,.64,1);
}
.cart-count.bump { transform: scale(1.45) rotate(10deg); }

/* ===== flying gummy layer ===== */
.fly-layer {
  position: fixed; inset: 0; z-index: 500;
  pointer-events: none;
}
.fly-gummy {
  position: absolute; top: 0; left: 0;
  transform-origin: top left;
  will-change: transform;
}
.fly-gummy canvas, .fly-gummy video {
  width: 100%; height: 100%; display: block;
  object-fit: cover; border-radius: 24px;
}

/* ===== hero ===== */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  background: var(--creme);
  background-image: radial-gradient(circle at 15% 20%, rgba(242,115,155,.22), transparent 40%),
                    radial-gradient(circle at 86% 24%, rgba(69,203,224,.20), transparent 38%),
                    radial-gradient(circle at 20% 84%, rgba(255,216,77,.25), transparent 40%),
                    radial-gradient(circle at 84% 80%, rgba(107,213,73,.16), transparent 38%);
  overflow: hidden;
  display: grid; place-items: center;
  z-index: 10;
}
.hero-inner {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 11vh 20px 0;
  gap: clamp(10px, 2.2vh, 24px);
}
.hero-badge span {
  display: inline-block;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(.8rem, 1.6vw, 1.05rem); letter-spacing: .22em;
  color: var(--encre);
  background: var(--bleu);
  border: 3px solid var(--encre);
  border-radius: 999px;
  padding: 10px 26px;
  transform: rotate(-3deg);
  box-shadow: 5px 5px 0 var(--encre);
  animation: badge-bob 3.2s ease-in-out infinite;
}
@keyframes badge-bob {
  0%,100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-1.5deg) translateY(-7px); }
}
.hero-title {
  font-family: var(--font-logo); font-weight: 400;
  font-size: clamp(4.2rem, 16vw, 14rem);
  line-height: .95;
  letter-spacing: .005em;
  color: var(--rose);
  user-select: none;
  transform: rotate(-4deg);
}
.hero-title .lt {
  display: inline-block;
  text-shadow: .045em .045em 0 var(--rose-deep), .1em .1em 0 rgba(148,110,190,.28);
  animation: lt-wave 2.8s ease-in-out infinite;
}
.lt1 { animation-delay: 0s; } .lt2 { animation-delay: .12s; } .lt3 { animation-delay: .24s; }
.lt4 { animation-delay: .36s; } .lt5 { animation-delay: .48s; } .lt6 { animation-delay: .6s; }
@keyframes lt-wave {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2.5%) rotate(-1.2deg); }
}
.hero-tag {
  position: absolute;
  right: clamp(16px, 3.5vw, 48px);
  bottom: clamp(64px, 9vh, 96px);
  text-align: right;
  font-weight: 600;
  font-size: clamp(.95rem, 1.5vw, 1.15rem);
  color: var(--encre);
  max-width: 24ch;
  text-wrap: balance;
}

/* countdown */
.countdown {
  position: absolute;
  left: clamp(16px, 3.5vw, 48px);
  bottom: clamp(28px, 5vh, 56px);
  text-align: left;
}
.cd-label {
  font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  font-size: .8rem; color: var(--rose-deep); margin-bottom: 10px;
}
.cd-grid { display: flex; gap: 12px; justify-content: flex-start; }
.cd-cell {
  background: #fff;
  border: 3px solid var(--encre);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--encre);
  padding: 10px 14px 8px;
  min-width: 78px;
  display: flex; flex-direction: column; align-items: center;
}
.cd-cell:nth-child(odd) { transform: rotate(-2deg); }
.cd-cell:nth-child(even) { transform: rotate(2deg); }
.cd-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--encre);
}
.cd-unit { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--corail); }

.scroll-hint {
  position: absolute;
  right: clamp(16px, 3.5vw, 48px);
  bottom: clamp(28px, 5vh, 56px);
  font-weight: 800; color: var(--rose-deep); opacity: .95;
  font-size: .9rem; letter-spacing: .1em; text-transform: uppercase;
}
.hint-arrow { display: inline-block; animation: arrow-drop 1.4s ease-in-out infinite; }
@keyframes arrow-drop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ===== marquees ===== */
.marquee {
  overflow: hidden; white-space: nowrap;
  padding: 18px 0;
  border-top: 3px solid var(--encre);
  border-bottom: 3px solid var(--encre);
  position: relative; z-index: 20;
}
.marquee-a { background: var(--rose); color: var(--creme); }
.marquee-b { background: var(--bleu); color: var(--encre); }
.marquee-track {
  display: inline-flex;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  letter-spacing: .06em;
  animation: marquee 28s linear infinite;
}
.marquee-track.reverse { animation-direction: reverse; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .hero-title .lt, .hero-badge span, .hint-arrow { animation: none; }
}

/* ===== collection ===== */
.collection {
  position: relative;
  background: var(--creme);
  padding: clamp(70px, 10vw, 130px) clamp(20px, 5vw, 70px) clamp(90px, 11vw, 150px);
  z-index: 10;
}
.collection-head { text-align: center; margin-bottom: clamp(44px, 6vw, 80px); }
.collection-head h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 6.5vw, 5rem);
  line-height: 1;
  color: var(--encre);
}
.collection-head h2 em {
  font-style: normal; color: var(--corail);
  text-decoration: underline wavy var(--bleu) 5px;
  text-underline-offset: 10px;
}
.collection-head p { margin-top: 20px; font-weight: 600; font-size: 1.15rem; color: var(--encre); opacity: .75; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(20px, 2.5vw, 36px);
  max-width: 1560px; margin: 0 auto;
}

.card {
  background: #fff;
  border: 3.5px solid var(--encre);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--encre);
  transition: transform .25s cubic-bezier(.34,1.4,.64,1), box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translate(-4px,-6px) rotate(-.7deg); box-shadow: 14px 14px 0 var(--encre); }
.card:nth-child(2):hover { transform: translate(-2px,-6px) rotate(.7deg); }

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-bottom: 3.5px solid var(--encre);
  overflow: hidden;
}
.card-media canvas, .card-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block; object-fit: cover;
}
.card-media .spin-hint {
  position: absolute; right: 12px; bottom: 12px;
  font-size: .7rem; font-weight: 800; letter-spacing: .12em;
  background: var(--creme); border: 2.5px solid var(--encre);
  border-radius: 999px; padding: 5px 12px;
  box-shadow: 3px 3px 0 var(--encre);
  opacity: 0; transform: translateY(6px);
  transition: opacity .25s, transform .25s;
}
.card-media:hover .spin-hint { opacity: 1; transform: translateY(0); }

.card-tag {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-display); font-weight: 800; font-size: .72rem;
  letter-spacing: .14em;
  background: var(--encre); color: var(--creme);
  padding: 7px 14px; border-radius: 999px;
  transform: rotate(-3deg);
}

.card-body { padding: 24px 24px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.6rem, 2.4vw, 2rem); line-height: 1;
}
.card-desc { font-size: .98rem; line-height: 1.5; opacity: .8; flex: 1; }

.formats { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-body); font-weight: 700; font-size: .85rem;
  background: #fff; color: var(--encre);
  border: 2.5px solid var(--encre); border-radius: 999px;
  padding: 8px 15px;
  transition: transform .15s, background .15s, color .15s;
  cursor: none;
}
.chip:hover { transform: translateY(-2px) rotate(-2deg); }
.chip.on { background: var(--encre); color: #fff; }
.chip.soldout { opacity: .55; text-decoration: line-through; }
.chip.soldout.on { background: var(--rouge); color: var(--creme); opacity: 1; text-decoration: line-through; }
.chip .chip-note { font-size: .68rem; text-decoration: none; display: inline-block; margin-left: 4px; }

.add-btn {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  border: 3px solid var(--encre); border-radius: 999px;
  padding: 15px 20px;
  box-shadow: 5px 5px 0 var(--encre);
  transition: transform .15s, box-shadow .15s, filter .2s;
  cursor: none;
  color: var(--encre);
}
.add-btn:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--encre); filter: saturate(1.2); }
.add-btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--encre); }
.add-btn.added { background: var(--lime) !important; }

.notify {
  display: flex; gap: 8px;
}
.notify input {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-weight: 600; font-size: .92rem;
  border: 3px solid var(--encre); border-radius: 999px;
  padding: 12px 18px; background: var(--creme);
  outline: none;
}
.notify input:focus { border-color: var(--cobalt); }
.notify button {
  font-family: var(--font-display); font-weight: 800; font-size: .95rem;
  background: var(--encre); color: var(--creme);
  border: 3px solid var(--encre); border-radius: 999px;
  padding: 12px 20px;
  box-shadow: 4px 4px 0 rgba(25,16,49,.35);
  cursor: none;
  transition: transform .15s;
}
.notify button:hover { transform: translate(-2px,-2px); }
.notify-ok { font-weight: 700; font-size: .92rem; color: var(--cobalt); }
.soldout-line { font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--rouge); }

/* ===== macro / manifeste ===== */
.macro {
  position: relative;
  background: var(--encre);
  z-index: 10;
  padding-bottom: clamp(70px, 9vw, 120px);
}
.macro-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 340px;
  overflow: hidden;
  border-bottom: 3px solid var(--encre);
}
.macro-media canvas, .macro-media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.macro-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(25,16,49,.85));
}
.macro-copy {
  position: relative;
  max-width: 900px;
  margin: -110px auto 0;
  padding: 0 24px;
  z-index: 2;
}
.macro-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: .92;
  color: var(--creme);
  -webkit-text-stroke: 2px var(--encre);
  text-shadow: 7px 7px 0 var(--rose);
}
.macro-text {
  margin-top: 28px;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.6;
  color: var(--creme);
  opacity: .92;
  max-width: 56ch;
}

/* ===== newsletter ===== */
.wave-club {
  background: var(--corail);
  border-top: 3px solid var(--encre);
  padding: clamp(70px, 9vw, 120px) 24px;
  text-align: center;
  position: relative; z-index: 10;
}
.wave-club h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  color: var(--creme);
  -webkit-text-stroke: 2px var(--encre);
  text-shadow: 6px 6px 0 var(--encre);
}
.wave-club p { margin-top: 16px; font-weight: 600; font-size: 1.1rem; color: var(--encre); }
.club-form {
  margin: 34px auto 0;
  display: flex; gap: 10px;
  max-width: 460px;
}
.club-form input {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  border: 3px solid var(--encre); border-radius: 999px;
  padding: 16px 22px;
  background: var(--creme);
  outline: none;
  box-shadow: 5px 5px 0 var(--encre);
}
.club-form button {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  background: var(--encre); color: var(--lime);
  border: 3px solid var(--encre); border-radius: 999px;
  padding: 16px 28px;
  box-shadow: 5px 5px 0 rgba(25,16,49,.4);
  cursor: none;
  transition: transform .15s;
}
.club-form button:hover { transform: translate(-2px,-2px) rotate(-2deg); }
.club-ok { margin-top: 20px; font-weight: 800; color: var(--encre); font-size: 1.1rem; }

/* ===== footer ===== */
.footer {
  background: var(--encre); color: var(--creme);
  text-align: center;
  padding: 60px 24px 40px;
  position: relative; z-index: 10;
}
.footer-brand {
  font-family: var(--font-logo); font-weight: 400; font-size: 2.2rem;
  color: var(--rose);
  text-shadow: 2.5px 2.5px 0 var(--rose-deep);
  transform: rotate(-3deg);
}
.footer p { margin-top: 8px; font-size: .95rem; opacity: .85; }
.footer-fine { font-size: .8rem !important; opacity: .5 !important; }

/* ===== cart drawer ===== */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(25,16,49,.55);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 960;
  width: min(420px, 92vw);
  background: var(--creme);
  border-left: 3.5px solid var(--encre);
  transform: translateX(105%);
  transition: transform .38s cubic-bezier(.32,1.15,.42,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 3px solid var(--encre);
  background: var(--rose);
}
.drawer-head h3 {
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  color: var(--creme); -webkit-text-stroke: 1px var(--encre);
  text-shadow: 3px 3px 0 var(--encre);
}
.drawer-close {
  background: var(--creme); border: 3px solid var(--encre);
  border-radius: 999px; width: 42px; height: 42px;
  font-size: 1.1rem; font-weight: 800;
  box-shadow: 3px 3px 0 var(--encre);
  cursor: none;
  transition: transform .15s;
}
.drawer-close:hover { transform: rotate(90deg); }
.drawer-items { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.drawer-empty { text-align: center; opacity: .7; font-weight: 600; margin-top: 40px; line-height: 1.6; }
.d-item {
  display: flex; align-items: center; gap: 14px;
  border: 3px solid var(--encre); border-radius: 20px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--encre);
}
.d-swatch {
  width: 46px; height: 46px; border-radius: 14px;
  border: 2.5px solid var(--encre);
  flex-shrink: 0;
}
.d-info { flex: 1; min-width: 0; }
.d-name { font-family: var(--font-display); font-weight: 800; font-size: .98rem; line-height: 1.1; }
.d-meta { font-size: .8rem; opacity: .7; font-weight: 600; }
.d-qty { display: flex; align-items: center; gap: 8px; }
.d-qty button {
  width: 28px; height: 28px; border-radius: 999px;
  border: 2.5px solid var(--encre); background: var(--creme);
  font-weight: 800; cursor: none;
}
.d-qty button:hover { background: var(--lime); }
.d-price { font-weight: 800; font-size: .92rem; min-width: 62px; text-align: right; }
.drawer-foot { border-top: 3px solid var(--encre); padding: 20px 24px 26px; background: #fff; }
.drawer-total {
  display: flex; justify-content: space-between;
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  margin-bottom: 14px;
}
.checkout {
  width: 100%;
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  background: var(--cobalt); color: var(--creme);
  border: 3px solid var(--encre); border-radius: 999px;
  padding: 16px;
  box-shadow: 5px 5px 0 var(--encre);
  cursor: none;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.checkout:hover { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--encre); }
.checkout.done { background: var(--lime); color: var(--encre); }
.drawer-fine { margin-top: 12px; text-align: center; font-size: .78rem; opacity: .55; font-weight: 600; }

/* small screens */
@media (max-width: 640px) {
  .topnav { display: none; }
  .cd-cell { min-width: 64px; padding: 8px 10px 6px; }
  .macro-copy { margin-top: -70px; }
  .club-form { flex-direction: column; }
}
