/* ============================================================
   produit.css — fiche produit
   ============================================================ */

.crumb { display: flex; gap: 9px; align-items: center; font-size: 12.5px;
         color: var(--text-dim); margin-bottom: 22px }
.crumb a { text-decoration: none; color: var(--text-soft) }
.crumb a:hover { color: var(--accent) }

.fiche-head {
  padding: clamp(38px, 5vw, 64px) 0 clamp(34px, 4.4vw, 52px);
  background:
    radial-gradient(ellipse 60% 70% at 86% 4%, var(--accent-soft), transparent 66%),
    radial-gradient(ellipse 46% 54% at 6% 94%,
                    color-mix(in srgb, var(--teal) 16%, transparent), transparent 64%);
  border-bottom: 1px solid var(--line);
}
.fiche-title { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(290px,.8fr);
               gap: clamp(26px, 3.4vw, 50px); align-items: center }
.fiche-title > .p-shot[hidden] { display: none }
/* sans packshot, le texte reprend la place */
.fiche-title:has(> .p-shot[hidden]) { grid-template-columns: minmax(0,1fr) minmax(290px,.8fr) }
.fiche-title h1 { margin-bottom: 12px }
.p-sub { font-size: clamp(15px, 1.7vw, 19px); color: var(--accent);
         font-weight: 600; margin-bottom: 18px }
.p-sub, .fiche-title .lede { max-width: 56ch }

.p-buy { background: var(--bg-2); border: 1px solid var(--line);
         border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow) }
.p-price { font-family: var(--font-display); font-weight: var(--w-display);
           font-size: clamp(28px, 3.4vw, 40px); letter-spacing: var(--track); line-height: 1 }
.p-price-note { font-size: 11.5px; color: var(--text-dim); margin-top: 6px }
.p-quick { list-style: none; display: grid; gap: 0; margin: 20px 0 20px }
.p-quick li { padding: 12px 0; border-top: 1px solid var(--line); font-size: 13.5px }
.p-quick b { display: block; font-size: 11px; font-weight: 700;
             color: var(--text-dim); margin-bottom: 4px }
.p-quick span { color: var(--text-soft); line-height: 1.5 }
.p-buy .btn { width: 100%; justify-content: center }

/* ---------- bloc d'action ---------- */
.fiche-action { background: var(--bg-2); border-bottom: 1px solid var(--line) }
.action-grid { display: grid; grid-template-columns: .78fr 1.22fr;
               gap: clamp(30px, 5vw, 76px); align-items: center }

.action-plate { display: grid; justify-items: center; gap: 18px }
.plate-host { width: 100%; display: grid; place-items: center; min-height: 420px }
.plate-host .anatomy { max-width: 330px; max-height: 66vh }
.plate-loading { font-size: 12.5px; color: var(--text-dim) }

.replay {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-soft);
  background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--pill); padding: 11px 22px;
  transition: color .28s, border-color .28s, transform .28s;
}
.replay svg { width: 15px; height: 15px }
.replay:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px) }

/* ---------- trajet dans l'organisme ---------- */
.zones { list-style: none; margin: 30px 0 0; padding: 0; position: relative }
.zones::before {
  content: ""; position: absolute; inset-inline-start: 9px; top: 10px; bottom: 10px;
  width: 2px; background: var(--line);
}
.jstep {
  position: relative; display: flex; gap: 18px; padding: 0 0 22px 0;
  opacity: .34; filter: saturate(.2);
  transition: opacity .5s ease, filter .5s ease, transform .5s cubic-bezier(.2,.8,.2,1);
  transform: translateY(4px);
}
.jstep.is-on { opacity: 1; filter: none; transform: none }
/* l'étape que la caméra regarde en ce moment */
.jstep.is-zoom .jdot { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent-vivid) 26%, transparent) }
.jstep.is-zoom .jbody { transform: translateX(4px) }
.jstep .jbody { transition: transform .5s cubic-bezier(.2,.8,.2,1) }
[dir="rtl"] .jstep.is-zoom .jbody { transform: translateX(-4px) }
.jdot {
  position: relative; z-index: 1; flex: none; width: 20px; height: 20px; margin-top: 2px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--line);
  transition: background .45s, border-color .45s, box-shadow .45s;
}
.jstep.is-on .jdot { border-color: var(--accent-vivid); background: var(--accent-vivid);
                     box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent-vivid) 20%, transparent) }
.jstep.is-phase .jdot { width: 14px; height: 14px; margin-top: 5px; margin-inline-start: 3px }
.jstep.is-shield.is-on .jdot { border-color: var(--warn); background: var(--warn);
                     box-shadow: 0 0 0 5px color-mix(in srgb, var(--warn) 22%, transparent) }

.jbody { padding-bottom: 2px }
.jbody b { display: block; font-family: var(--font-display); font-weight: 800;
           font-size: 15px; letter-spacing: -.02em; margin-bottom: 4px }
.jstep.is-phase .jbody b { font-size: 13px; font-weight: 700; color: var(--text-soft) }
.jbody p { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; max-width: 56ch; margin: 0 }
.jstep.is-shield .jbody b { color: var(--warn) }

.jactives { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 8px }
.jact i {
  font-style: normal; font-size: 11.5px; font-weight: 700;
  padding: 5px 12px; border-radius: var(--pill);
  background: var(--accent-soft); color: var(--accent);
  display: inline-block;
}
.zones-note { font-size: 12px; color: var(--text-dim); margin-top: 6px; line-height: 1.55 }

/* ---------- mécanisme ---------- */
.mech { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px }
@media (max-width: 820px) { .mech { grid-template-columns: 1fr } }
.mech article {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden;
}
.mech article::before { content: ""; position: absolute; inset: 0 0 auto 0;
                        height: 3px; background: var(--accent) }
.mech h3 { font-size: 16px; margin-bottom: 9px }
.mech p { font-size: 13.5px; color: var(--text-soft); line-height: 1.62 }

/* ---------- deux colonnes ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 68px) }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr } }
.two-col h2 { margin-bottom: 20px }

.benefits { list-style: none; display: grid; gap: 0 }
.benefits li {
  display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 14.5px; color: var(--text-soft); line-height: 1.6;
}
.benefits li::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: 8px;
  border-radius: 50%; background: var(--accent);
}

.p-warning {
  margin-top: 26px; padding: 16px 18px; border-radius: 10px;
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 34%, transparent);
  font-size: 13px; color: var(--text-soft); line-height: 1.6;
}
.p-warning b { color: var(--text); display: block; margin-bottom: 5px; font-size: 12px }

.related-block .card { text-decoration: none }

@media (max-width: 960px) {
  .fiche-title, .action-grid { grid-template-columns: 1fr }
  .plate-host { min-height: 320px }
  .plate-host .anatomy { max-width: 250px }
}


/* ---------- visuel de contexte sur la fiche ---------- */
.comp-grid { display: grid; grid-template-columns: 1fr auto; gap: clamp(28px, 4vw, 60px);
             align-items: start }
.p-vis { margin: 0; text-align: center; background: var(--surface);
         border-radius: var(--radius); padding: 24px 28px; width: 250px }
.p-vis img { height: 190px; width: auto; margin: 0 auto 12px; object-fit: contain }
.p-vis figcaption { font-size: 12px; font-weight: 700; color: var(--text-soft) }
@media (max-width: 900px) { .comp-grid { grid-template-columns: 1fr }
                            .p-vis { width: 100%; padding: 20px } }

/* ============================================================
   Packshot 3D — la boîte comme objet

   Quatre plans à des profondeurs différentes dans une même scène
   en perspective. Le relief ne vient pas de la photo, qui est
   plate, mais du décalage entre ces plans quand la scène tourne.
   Les variables --rx, --ry, --sx, --sy, --px, --py, --lift sont
   écrites par shot3d.js ; sans JavaScript tout reste au repos et
   la boîte s'affiche normalement.
   ============================================================ */
.p-shot {
  --rx: 0deg; --ry: 0deg;
  --sx: 0px;  --sy: 0px;
  --px: 0%;   --py: 0%;
  --lift: 0;
  --tint: var(--teal);

  position: relative; margin: 0;
  width: min(290px, 28vw); aspect-ratio: 1 / 1.18;
  perspective: 1100px; perspective-origin: 50% 42%;
}
.p-shot[data-axe="vitamines"] { --tint: var(--teal) }
.p-shot[data-axe="fertilite"] { --tint: var(--plum) }
.p-shot[data-axe="beaute"]    { --tint: var(--rose) }

.shot-stage {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .9s cubic-bezier(.16,.84,.26,1);
}
.p-shot:hover .shot-stage { transition-duration: 0s }

/* --- halo, le plan le plus lointain --- */
.shot-halo {
  position: absolute; inset: 2% 2% 12%;
  border-radius: 50%;
  background: radial-gradient(circle at calc(50% + var(--px)) calc(46% + var(--py)),
              color-mix(in srgb, var(--tint) 42%, transparent),
              transparent 64%);
  filter: blur(18px);
  transform: translateZ(-90px) scale(1.25) translate(var(--sx), var(--sy));
  opacity: calc(.72 + var(--lift) * .28);
}

/* --- la boîte --- */
.shot-box {
  position: absolute; inset: 0 0 14% 0;
  display: grid; place-items: center;
  transform: translateZ(42px);
  transform-style: preserve-3d;
}
.shot-img {
  max-width: 88%; max-height: 100%; width: auto; height: auto;
  filter:
    drop-shadow(calc(var(--sx) * -.5) calc(14px + var(--sy) * -.4) 26px rgba(4,67,75,.30))
    drop-shadow(0 3px 5px rgba(4,67,75,.16));
}

/* voile spéculaire : une bande claire qui balaie la face selon
   l'inclinaison, comme la lumière sur un carton pelliculé */
.shot-gloss {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg,
              transparent 36%,
              rgba(255,255,255,.34) 48%,
              rgba(255,255,255,.06) 56%,
              transparent 66%);
  mix-blend-mode: screen;
  opacity: calc(var(--lift) * .9);
  transform: translateX(calc(var(--px) * 1.6)) translateZ(2px);
}

/* --- reflet au sol --- */
.shot-floor {
  position: absolute; inset: auto 0 0 0; height: 24%;
  display: grid; place-items: start center;
  overflow: hidden; pointer-events: none;
  transform: translateZ(10px) translate(calc(var(--sx) * .3), 0);
  -webkit-mask-image: linear-gradient(#000, transparent 72%);
          mask-image: linear-gradient(#000, transparent 72%);
}
.shot-floor img {
  max-width: 88%; height: auto;
  transform: scaleY(-1);
  opacity: .22; filter: blur(1.4px);
}

/* --- arrivée dans l'écran --- */
.p-shot .shot-stage { opacity: 0; transform: rotateX(8deg) translateY(18px) scale(.96) }
.p-shot.is-in .shot-stage {
  opacity: 1;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: opacity .7s ease, transform 1s cubic-bezier(.16,.84,.26,1);
}

@media (max-width: 1100px) { .fiche-title { grid-template-columns: auto 1fr }
                             .fiche-title > .p-buy { grid-column: 1 / -1 } }
@media (max-width: 760px)  { .fiche-title { grid-template-columns: 1fr }
                             .p-shot { width: min(300px, 76vw); margin-inline: auto } }

@media (prefers-reduced-motion: reduce) {
  .p-shot .shot-stage,
  .p-shot.is-in .shot-stage { opacity: 1; transform: none; transition: none }
  .shot-gloss { display: none }
}

/* ============================================================
   Packshot en situation — même décor que la vitrine de la page
   Produits : mur de pierre, plateau de bois, la boîte posée dessus.
   ============================================================ */
.p-shot {
  width: min(340px, 30vw); aspect-ratio: 720 / 860;
  border-radius: var(--radius-lg); overflow: hidden;
  background: #cbbfae url(/assets/scenes/fond.webp) center / cover no-repeat;
  box-shadow: 0 26px 50px -26px rgba(40,28,16,.55);
}
.p-shot .shot-halo, .p-shot .shot-floor, .p-shot .shot-gloss { display: none }
/* le plateau commence à 70 % de la hauteur ; la base de la boîte
   est posée à 86 %, donc sur le bois et non devant lui */
.p-shot .shot-box { display: block; inset: 15% 17% 14% 17%; transform: translateZ(30px) }
.p-shot .shot-img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: contain; object-position: 50% 100%;
  /* ombre courte et serrée : un objet posé, pas suspendu */
  filter: drop-shadow(calc(var(--sx) * -.25) 2px 3px rgba(30,18,8,.45));
}
/* ombre de contact : la silhouette de la boîte écrasée à sa base */
.p-shot .shot-sh {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: 50% 100%;
  filter: brightness(0) blur(9px); opacity: .32;
  transform-origin: 50% 100%;
  transform: translate(calc(14px + var(--sx) * .5), 3px) scaleY(.1) skewX(-55deg);
}
.p-shot .shot-sh.is-near { filter: brightness(0) blur(2px); opacity: .6;
  transform: translate(calc(var(--sx) * .2), 2px) scaleY(.025) }
@media (max-width: 760px) { .p-shot { width: min(330px, 84vw) } }
