/* ============================================================
   PAGE PRODUIT (produits.php) — styles extraits de la page.
   Réutilise les tokens globaux de site.css (var(--brand)…).
   Aucune couleur en dur : tout passe par les tokens.
   ============================================================ */
.pdp {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

/* ---- carrousel ---- */
.pdp-media { position: sticky; top: 96px; width: 100%; max-width: 420px; margin: 0 auto; }
.pdp-gallery { position: relative; }
.pdp-gallery[hidden] { display: none; }
.pdp-stage {
  position: relative;
  aspect-ratio: var(--pdp-ratio, 2 / 3);  /* forme des photos, par produit (carte 2/3, plaque 1/1) */
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(90% 90% at 50% 18%, var(--brand-soft), transparent 62%),
    linear-gradient(165deg, var(--stage-a) 0%, var(--stage-b) 100%);
}
.pdp-slide {
  position: absolute; inset: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
.pdp-slide.is-current { opacity: 1; pointer-events: auto; }
.pdp-photo { width: 100%; height: 100%; object-fit: cover; }
.pdp-note {
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 700;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--overlay);
}

.pdp-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  background: var(--overlay);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0; transition: opacity .3s ease, background .2s ease, color .2s ease;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.pdp-gallery:hover .pdp-arrow,
.pdp-arrow:focus-visible { opacity: 1; }
.pdp-arrow:hover { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.pdp-arrow.prev { left: 14px; }
.pdp-arrow.next { right: 14px; }

.pdp-dots {
  position: absolute; left: 0; right: 0; bottom: 16px;
  display: flex; justify-content: center; gap: 8px;
}
.pdp-dot {
  width: 7px; height: 7px; padding: 0;
  border-radius: 999px; border: none; cursor: pointer;
  background: var(--dot);
  transition: background .25s ease, transform .25s ease, width .25s ease;
}
.pdp-dot:hover { background: var(--dot-strong); }
.pdp-dot.is-current { background: var(--brand); width: 20px; }

/* ---- panneau ---- */
.pdp-panel { text-align: left; }
.pdp-panel .kicker { margin-bottom: 16px; }
.pdp-title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.03;
  margin: 0 0 18px; text-wrap: balance;
}
.pdp-pitch {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6; color: var(--muted);
  margin: 0 0 36px; max-width: 42ch;
}

.pdp-field { margin-bottom: 28px; }
.pdp-field-label {
  display: block;
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 14px;
}

/* axe 1 : personnalisation */
.pdp-options { display: flex; flex-direction: column; gap: 10px; }
.pdp-option {
  text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  transition: border-color .25s ease, background .25s ease;
}
.pdp-option:hover { border-color: var(--border-gold); }
.pdp-option.is-active { border-color: var(--border-gold); background: var(--brand-soft); }
.pdp-option-name { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.pdp-option-tag { font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* axe 2 : quantité — sélecteur + raccourcis */
.pdp-qty-control {
  display: inline-flex; align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-soft);
}
.pdp-step {
  width: 48px; cursor: pointer;
  background: none; border: none; color: var(--text);
  font-size: 20px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, color .2s ease;
}
.pdp-step:hover { background: var(--brand); color: var(--on-brand); }
.pdp-qty-input {
  width: 78px; text-align: center;
  background: none; border: none; color: var(--text);
  font-size: 17px; font-weight: 800; letter-spacing: -0.01em;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  outline: none;
  -moz-appearance: textfield;
}
.pdp-qty-input::-webkit-outer-spin-button,
.pdp-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdp-qty-input:focus { box-shadow: inset 0 0 0 2px var(--brand-ring); }

.pdp-qty-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pdp-chip {
  cursor: pointer;
  min-width: 44px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13.5px; font-weight: 700;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.pdp-chip:hover { border-color: var(--border-gold); color: var(--text); }
.pdp-chip.is-active { border-color: var(--border-gold); background: var(--brand-soft); color: var(--brand); }

/* prix */
.pdp-price { margin: 10px 0 26px; }
.pdp-price-label {
  display: block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 8px;
}
.pdp-amount {
  display: block;
  font-size: clamp(40px, 5vw, 54px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--text);
  transition: opacity .25s ease;
}
.pdp-amount.is-swapping { opacity: 0; }
.pdp-price-break {
  margin: 14px 0 22px;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px;
  font-size: 14px; color: var(--muted);
}
.pdp-total-qty { font-weight: 600; color: var(--muted); }
.pdp-price-dot { color: var(--muted-2); opacity: 0.6; }
.pdp-percard { color: var(--text); font-weight: 800; transition: opacity .25s ease; }
.pdp-percard.is-swapping { opacity: 0; }
.pdp-unit { color: var(--muted-2); letter-spacing: 0.02em; }

.pdp-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pdp-deposit {
  margin: 14px 0 0;
  font-size: 13px; line-height: 1.5; color: var(--muted);
}
.pdp-deposit[hidden] { display: none; }
.pdp-deposit-amount { color: var(--brand); font-weight: 800; }

/* ---- reveal : animation vidéo de la carte 3D (autoplay, aucun cadre, fond transparent) ---- */
.pdp-reveal3d {
  position: relative;
  min-height: 96vh;
  overflow: hidden;               /* la carte géante déborde et est clippée par la scène */
}
.pdp-reveal3d-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  opacity: 0;                     /* révélée par le JS quand l'animation démarre */
}

/* ---- responsive : carrousel au-dessus, panneau en dessous ---- */
@media (max-width: 860px) {
  .pdp { grid-template-columns: 1fr; gap: 34px; }
  .pdp-media { position: static; top: auto; }
  .pdp-panel { text-align: center; }
  .pdp-field-label { text-align: center; }
  .pdp-pitch { margin-left: auto; margin-right: auto; }
  .pdp-price-break { justify-content: center; }
  .pdp-actions { justify-content: center; }
  .pdp-arrow { opacity: 1; } /* pas de hover au doigt */
}

@media (prefers-reduced-motion: reduce) {
  .pdp-slide, .pdp-amount, .pdp-percard, .pdp-arrow, .pdp-dot, .pdp-option, .pdp-chip, .pdp-step { transition: none; }
}
