/* Vitrine du thème Candy (08/11/2026) : l'accueil façon Pecandou, dans la DA Candy (voir vitrine.js).
   Une propriété par rôle : `translate` = flottement, `scale` = toucher, `transform` = arrivée et défilement. */

body.cl-on {
  --cl-titre: var(--wc-display-font, 'Luckiest Guy', cursive);
  --cl-ressort: cubic-bezier(.34, 1.56, .64, 1);
}

/* L'accueil remplace l'en-tête, les catégories et la grille d'origine (gardées cachées : la fiche s'ouvre par elles). */
body.cl-on:not(.cl-grille) #shopHeader,
body.cl-on:not(.cl-grille) #shoppingLayout { display: none !important; }
body.cl-on.cl-grille #cl-vitrine { display: none; }
body.cl-on #appContent { padding-left: 0 !important; padding-right: 0 !important; }
body.cl-on #shoppingSection > :not(#cl-vitrine) { padding-left: 1rem; padding-right: 1rem; }

/* ---------- Le héros ---------- */
.cl-hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - var(--cl-nav, 96px) - 60px);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 16px 70px; /* le bouton panier rond déborde au-dessus de la barre du bas */
}
/* Le logo du client, en tuile blanche au-dessus des bandeaux : sans lui, la boutique perdait sa marque. */
.cl-logo {
  position: relative; z-index: 3; width: 58px; height: 58px; object-fit: contain; padding: 5px;
  background: #fff; border: 3px solid #fff; border-radius: 22px; box-shadow: 0 10px 22px rgba(42, 11, 74, .35);
  animation: g-flotte 4s ease-in-out infinite;
}
.cl-titre {
  position: relative; z-index: 3; margin: 6px 0 0;
  display: flex; flex-direction: column; align-items: center;
  font: 400 clamp(26px, 8.6vw, 50px)/1.02 var(--cl-titre); text-transform: uppercase; white-space: nowrap;
}
.cl-etiq {
  display: inline-block; padding: .22em .5em .14em; color: #fff; border: 3px solid #fff; border-radius: 16px;
  text-shadow: 0 3px 0 rgba(42, 11, 74, .35);
  box-shadow: 0 10px 22px rgba(42, 11, 74, .35), inset 0 -5px 0 rgba(0, 0, 0, .15), inset 0 3px 0 rgba(255, 255, 255, .45);
}
.cl-etiq--0 { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%), linear-gradient(135deg, var(--g-d), var(--g-a)); rotate: -3deg; }
.cl-etiq--1 { background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%), linear-gradient(135deg, #7b2cf0, var(--g-b)); rotate: 2deg; margin-top: 4px; font-size: .78em; }
.cl-anime .cl-etiq { animation: cl-tampon .55s calc(.15s + var(--k) * .18s) var(--cl-ressort) both; }
@keyframes cl-tampon { from { opacity: 0; scale: 1.8; } to { opacity: 1; scale: 1; } }

/* Le produit vedette flotte en grand, avec un halo de gelée derrière. */
.cl-vedette {
  position: relative; z-index: 2; flex: 1; min-height: 0; width: 100%;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; cursor: pointer; touch-action: pan-y;
}
.cl-vedette::before {
  content: ""; position: absolute; width: min(70vw, 340px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.75), rgba(255, 120, 230, .35) 45%, rgba(255,255,255,0) 70%);
  filter: blur(6px);
}
.cl-flotte { position: relative; display: block; animation: cl-flotte 4.6s ease-in-out infinite; }
.cl-vedette img { display: block; height: min(40svh, 78vw); width: auto; max-width: 86vw; object-fit: contain; filter: drop-shadow(0 22px 22px rgba(42, 11, 74, .45)); }
.cl-anime .cl-vedette { animation: cl-tombe .9s .35s var(--cl-ressort) both; }
@keyframes cl-flotte { 0%, 100% { translate: 0 -8px; rotate: -2deg; } 50% { translate: 0 8px; rotate: 2deg; } }
@keyframes cl-tombe { from { opacity: 0; transform: translateY(-70px) scale(.7); } to { opacity: 1; transform: none; } }

/* Les autres produits gravitent autour, comme les noix de Pecandou. */
.cl-satellite { position: absolute; z-index: 1; width: 19vw; max-width: 104px; pointer-events: none; }
.cl-satellite img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 10px rgba(42, 11, 74, .4)); animation: cl-derive calc(4s + var(--t, 0s)) ease-in-out infinite; }
/* Largeurs par visuel (la boîte et l'huile sont hautes, le sachet est large). */
.cl-sat--0 { left: 3%; top: 33%; width: 13vw; max-width: 70px; rotate: -14deg; --t: .6s; }
.cl-sat--1 { right: 1%; top: 46%; width: 19vw; max-width: 104px; rotate: 16deg; --t: 1.4s; }
.cl-sat--2 { left: 7%; bottom: 22%; width: 9vw; max-width: 50px; rotate: 12deg; --t: 2s; }
@keyframes cl-derive { 0%, 100% { translate: 0 -9px; } 50% { translate: 0 9px; } }

/* Bulles de savon qui montent. */
.cl-bulles { position: absolute; inset: 0; pointer-events: none; }
.cl-bulles i {
  position: absolute; bottom: -60px; left: calc(6% + var(--i) * 13%);
  width: calc(14px + (var(--i) * 7px) % 30px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,.15) 40%, rgba(255, 140, 240, .25) 70%, rgba(120, 220, 255, .4));
  border: 1px solid rgba(255,255,255,.6);
  animation: cl-monte calc(7s + var(--i) * 1.3s) calc(var(--i) * -1.7s) linear infinite;
}
@keyframes cl-monte { to { transform: translateY(-110svh) translateX(20px); } }

.cl-hero__bas { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.cl-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: min(100%, 360px); min-height: 62px; border: 3px solid #fff; border-radius: 22px; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0) 48%), linear-gradient(135deg, var(--g-d), var(--g-a));
  color: #fff; font: 400 26px/1 var(--cl-titre); letter-spacing: .03em; text-transform: uppercase; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  box-shadow: 0 7px 0 #a0128f, 0 16px 28px rgba(160, 18, 143, .45);
  transition: translate .12s, box-shadow .12s;
}
.cl-cta:active { translate: 0 6px; box-shadow: 0 1px 0 #a0128f, 0 6px 12px rgba(160, 18, 143, .35); }
.cl-cta svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation: cl-fleche 1.3s ease-in-out infinite; }
@keyframes cl-fleche { 50% { translate: 0 4px; } }
.cl-anime .cl-hero__bas { animation: cl-monte-bas .7s .7s var(--cl-ressort) both; }
@keyframes cl-monte-bas { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.cl-preuve {
  margin: 0; padding: 5px 14px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--g-ink);
  font-size: 13px; font-weight: 500; box-shadow: 0 4px 12px rgba(42,11,74,.25);
}
.cl-preuve b { font-weight: 800; color: var(--g-a); }

/* ---------- La bande penchée qui défile ---------- */
.cl-bande {
  position: relative; z-index: 1; overflow: hidden; width: 108%; margin: -8px -4% 8px; padding: 11px 0; rotate: -2deg;
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 50%), linear-gradient(90deg, #7b2cf0, var(--g-a), var(--g-d));
  border-top: 3px solid #fff; border-bottom: 3px solid #fff; box-shadow: 0 10px 24px rgba(42,11,74,.35);
}
.cl-bande div { display: flex; width: max-content; animation: cl-defile 24s linear infinite; }
.cl-bande span { padding: 0 16px; color: #fff; font: 400 18px/1 var(--cl-titre); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.cl-bande span::after { content: "✦"; margin-left: 32px; color: var(--g-c); }
@keyframes cl-defile { to { transform: translateX(-50%); } }

/* ---------- Les rayons ---------- */
.cl-rayons { padding: 10px 0 110px; }
.cl-rayon { margin-top: 18px; scroll-margin-top: 70px; }
.cl-rayon__tete { display: flex; align-items: baseline; justify-content: space-between; padding: 0 18px; margin-bottom: 8px; }
.cl-rayon__tete h2 { margin: 0; color: #fff; font: 400 28px/1 var(--cl-titre); text-transform: uppercase; text-shadow: 0 3px 0 rgba(42,11,74,.55), 0 0 18px rgba(224,32,224,.45); }
.cl-voir { border: 2px solid #fff; border-radius: 99px; padding: 6px 12px; background: rgba(255,255,255,.92); color: var(--g-ink); font-weight: 800; font-size: 13px; box-shadow: 0 4px 0 rgba(42,11,74,.25); }
.cl-voir:active { scale: .94; }
.cl-rail {
  display: flex; gap: 14px; overflow-x: auto; padding: 8px 18px 22px; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.cl-rail::-webkit-scrollbar { display: none; }

.cl-carte {
  position: relative; flex: 0 0 min(56vw, 230px); scroll-snap-align: start; cursor: pointer;
  border: 3px solid #fff; border-radius: 28px; overflow: hidden;
  background: radial-gradient(circle at 30% 12%, #fff, rgba(255,255,255,0) 55%), linear-gradient(165deg, #fff4fd, #f3e3ff 55%, #e2f8ff);
  box-shadow: 0 16px 30px rgba(42,11,74,.38), inset 0 -8px 16px rgba(138,43,226,.12);
}
.cl-anime .cl-carte { opacity: 0; transform: translateY(28px) scale(.94); }
.cl-anime .cl-carte.cl-vu { opacity: 1; transform: none; transition: opacity .45s ease, transform .65s var(--cl-ressort); transition-delay: calc(var(--i) * 70ms); }
.cl-carte.g-tenu { scale: 1.03 .95; transition: scale .12s ease-out; }
.cl-carte.g-rebond, .cl-vedette.g-rebond { animation: g-rebond .5s var(--cl-ressort); }
/* Photos et vidéos du client, en 9:16 le plus souvent : recadrées en 3:4 comme sur la carte du moteur. */
.cl-carte__photo { position: relative; aspect-ratio: 3 / 4; margin: 8px 8px 0; border-radius: 22px; overflow: hidden; background: linear-gradient(160deg, #ffe3fa, #e6dbff); }
.cl-carte__photo :is(img, video) { display: block; width: 100%; height: 100%; object-fit: cover; }
.cl-carte__photo::after { /* reflet qui passe */
  content: ""; position: absolute; top: -20%; bottom: -20%; width: 45%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.6) 45%, transparent 70%);
  animation: g-reflet 5.5s calc(var(--i) * .8s) ease-in-out infinite;
}
.cl-carte__bas { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px 14px; }
.cl-carte__bas b { color: var(--g-ink); font: 400 19px/1.05 var(--cl-titre); text-transform: uppercase; }
.cl-prix { color: var(--g-a); font-weight: 900; font-size: 18px; }
.cl-prix small { color: #7a5c99; font-weight: 700; font-size: 12px; text-transform: uppercase; }
.cl-plus {
  position: absolute; right: 16px; top: 16px; width: 46px; height: 46px; display: grid; place-items: center; z-index: 2;
  border: 3px solid #fff; border-radius: 50%; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 50%), linear-gradient(135deg, var(--g-d), var(--g-a));
  box-shadow: 0 8px 16px rgba(255,74,26,.45), inset 0 -3px 0 rgba(0,0,0,.18);
}
.cl-plus svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.cl-plus:active { scale: .9; }
.cl-hop { animation: g-hop .6s var(--cl-ressort); }

.cl-vide { margin: 10px 18px; padding: 22px; text-align: center; border: 3px solid #fff; border-radius: 26px; background: linear-gradient(165deg, #fffaff, #f3e3ff); color: var(--g-ink); box-shadow: 0 16px 30px rgba(42,11,74,.35); }
.cl-vide b { display: block; font: 400 22px/1.1 var(--cl-titre); text-transform: uppercase; margin-bottom: 6px; }

#cl-retour { margin: 4px 0 12px; border: 2px solid #fff; border-radius: 99px; padding: 8px 14px; background: rgba(255,255,255,.92); color: var(--g-ink); font-weight: 800; }

/* ---------- Le vol vers le panier et la barre flottante ---------- */
.cl-vol { position: fixed; z-index: 9998; pointer-events: none; object-fit: cover; border-radius: 18px; will-change: transform; }
#cl-barre {
  position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(var(--cl-nav, 96px) + 10px);
  display: flex; align-items: center; gap: 10px; padding: 9px 10px 9px 9px; border: 3px solid #fff; border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%), linear-gradient(135deg, #7b2cf0, var(--g-a));
  color: #fff; box-shadow: 0 14px 30px rgba(42,11,74,.5); cursor: pointer;
  transform: translateY(160%); opacity: 0; transition: transform .45s var(--cl-ressort), opacity .25s;
}
#cl-barre.is-on { transform: none; opacity: 1; }
#cl-barre.cl-hop { animation: g-hop .6s var(--cl-ressort); }
.cl-barre__n { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--g-c); color: var(--g-ink); font-weight: 900; font-size: 17px; border: 2px solid #fff; }
.cl-barre__t { flex: 1; text-align: left; font-size: 15px; }
.cl-barre__t b { font-weight: 900; font-size: 17px; }
.cl-barre__go { padding: 9px 14px; border-radius: 16px; background: #fff; color: var(--g-a); font: 400 16px/1 var(--cl-titre); text-transform: uppercase; }

/* ---------- Fiche produit : bas d'écran, options en pastilles ---------- */
body.cl-on #productModal.is-open { align-items: flex-end !important; padding: 0 !important; }
body.cl-on #productModalPanel { width: 100% !important; max-width: 640px !important; max-height: 92svh !important; border-radius: 30px 30px 0 0 !important; border-bottom: 0 !important; }
body.cl-on #productModal.is-open #productModalPanel { animation: cl-feuille .5s var(--cl-ressort) !important; }
@keyframes cl-feuille { from { transform: translateY(100%); } to { transform: none; } }
body.cl-on #productModalPanel { overflow-y: auto !important; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
body.cl-on #productModalPanel #modalPurchase { min-height: 58px; font-size: 18px !important; margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 6px) !important; }
/* La photo tient dans un tiers d'écran : options, quantité et bouton restent visibles sans défiler. */
body.cl-on #modalMediaGallery, body.cl-on #modalMediaGallery > div { height: min(34svh, 300px) !important; }
body.cl-on #modalMediaGallery :is(img, video) { height: 100% !important; width: 100% !important; object-fit: contain !important; background: #fff; border-radius: 18px; }
body.cl-on #modalOption[data-cl] { display: none !important; }
.cl-pastilles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cl-pastilles button {
  padding: 10px 16px; border-radius: 99px; border: 2px solid #e6d3ff; background: #fff; color: var(--g-ink);
  font-weight: 800; font-size: 15px; box-shadow: 0 4px 0 rgba(42,11,74,.12); transition: scale .15s var(--cl-ressort);
}
.cl-pastilles button.on {
  border-color: #fff; color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.2);
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0) 50%), linear-gradient(135deg, var(--g-b), #7b5cff);
  box-shadow: 0 6px 14px rgba(32,216,240,.45);
}
.cl-pastilles button:active { scale: .92; }

@media (prefers-reduced-motion: reduce) {
  .cl-on *, .cl-on *::before, .cl-on *::after { animation: none !important; transition: none !important; }
  .cl-anime .cl-carte { opacity: 1; transform: none; }
}

/* La barre du bas reste au-dessus de tout ce qui défile (la bande penchée passait devant). */
body.cl-on #bottomNav { z-index: 70 !important; }

/* La barre panier s'efface quand une fiche ou la commande est ouverte. */
body.cl-on:has(#productModal.is-open) #cl-barre,
body.cl-on:has(#orderModal:not(.hidden)) #cl-barre { transform: translateY(160%); opacity: 0; pointer-events: none; }

/* « Installer l'app » ne reste qu'en haut de l'accueil : plus bas, il flottait sur les cartes. */
body.cl-on.cl-defile .install-btn { opacity: 0; pointer-events: none; transition: opacity .25s; }

/* Avec le logo au-dessus des bandeaux, le bocal rétrécit un peu : le bouton « Je commande » reste au-dessus de la barre du bas. */
.cl-hero:has(.cl-logo) .cl-vedette img { height: min(31svh, 64vw); }
.cl-hero:has(.cl-logo) .cl-titre { margin-top: 2px; }

/* Aucun glissement sur le côté (08/11/2026, vu par Timour dans le navigateur d'une appli) : la bande penchée fait 108 %
   pour couvrir les bords une fois inclinée, et la zone qui défile (#appContent, overflow auto) la laissait déborder. */
body.cl-on #cl-vitrine { overflow-x: clip; }
body.cl-on #appContent { overflow-x: hidden; }
.cl-etiq { max-width: calc(100vw - 28px); }
