/* ============================================================
   LAYOUT COMMUN DES SCÈNES — Magasin virtuel Duvéa
   Le vocabulaire visuel partagé par les 4 scènes :
     • Caméra 2.5D (perspective + transform-style preserve-3d)
     • Surfaces (marbre Carabottino, parquet chevron, mur beige)
     • Lumière (halo doré, rai chaud, ambiance dorée tamisée)
     • Podium (cube en marbre clair pour exposer un produit)
     • Porte chêne (élément récurrent du hall et de la porte d'entrée)
   Les transitions inter-scènes (J3) animeront ces éléments via GSAP.
   ============================================================ */

/* ============================================================
   01 · SCÈNE — conteneur full-viewport
   ============================================================ */

.scene {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  isolation: isolate;     /* nouveau stacking context */
}

.scene__camera {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  perspective: 1400px;
  perspective-origin: 50% 60%;
}

.scene__stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform var(--duration-cinematic) var(--ease-cinematic);
}

/* Couches empilées (sky, back-wall, mid, fore, lighting) */
.scene__layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene__layer--interactive { pointer-events: auto; }

.scene__content {
  position: relative;
  z-index: var(--z-elevated);
  height: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   02 · SURFACES — marbre, parquet, mur, ciel
   Toutes les textures sont en CSS pur (gradients + repeating).
   Aucun asset image : zéro requête réseau supplémentaire.
   ============================================================ */

/* Mur beige chaud — utilisable en .surface--wall { ... } */
.surface--wall {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 244, 220, 0.30), transparent 60%),
    linear-gradient(180deg, #F1E9DA 0%, #E8DFCE 100%);
}

/* Marbre Carabottino — veines verticales subtiles */
.surface--marble {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 76px,
      rgba(184, 172, 154, 0.08) 77px,
      rgba(184, 172, 154, 0.16) 78px,
      rgba(184, 172, 154, 0.08) 79px,
      transparent 80px,
      transparent 156px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 38px,
      rgba(184, 172, 154, 0.05) 39px,
      transparent 40px,
      transparent 78px
    ),
    linear-gradient(180deg, var(--color-marbre) 0%, #E8E1D0 100%);
}

/* Parquet chêne clair — chevrons subtils */
.surface--parquet {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(168, 139, 104, 0.06) 0,
      rgba(168, 139, 104, 0.06) 28px,
      rgba(168, 139, 104, 0.12) 28px,
      rgba(168, 139, 104, 0.12) 29px,
      transparent 29px,
      transparent 57px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(168, 139, 104, 0.06) 0,
      rgba(168, 139, 104, 0.06) 28px,
      rgba(168, 139, 104, 0.12) 28px,
      rgba(168, 139, 104, 0.12) 29px,
      transparent 29px,
      transparent 57px
    ),
    linear-gradient(180deg, var(--color-bois-cl) 0%, #C8B295 100%);
}

/* Pierre claire (façade Loro Piana) */
.surface--stone {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 200px,
      rgba(154, 139, 121, 0.08) 200px,
      rgba(154, 139, 121, 0.10) 201px,
      transparent 201px,
      transparent 400px
    ),
    linear-gradient(180deg, #ECE3D0 0%, #DDD2BA 100%);
}

/* Ciel pâle, presque blanc-doré (porte d'entrée, journée) */
.surface--sky {
  background: linear-gradient(
    180deg,
    #F8EFD8 0%,
    #F0E5C8 40%,
    #E8DDB8 100%
  );
}

/* ============================================================
   03 · LUMIÈRE — halos chauds, rais, ambiance dorée
   Toujours en mix-blend-mode: screen ou multiply pour s'intégrer
   sans surcharger.
   ============================================================ */

.light-warm-halo {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 220, 160, 0.30) 0%,
    rgba(255, 200, 120, 0.10) 35%,
    transparent 70%
  );
  mix-blend-mode: screen;
  filter: blur(8px);
}

.light-ray {
  position: absolute;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 240, 200, 0.20) 0%,
    rgba(255, 230, 180, 0.08) 50%,
    transparent 100%
  );
  mix-blend-mode: screen;
  filter: blur(4px);
}

.light-projector {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 220, 160, 0.45) 0%,
    rgba(255, 200, 120, 0.18) 30%,
    transparent 65%
  );
  mix-blend-mode: screen;
  filter: blur(12px);
}

/* Vignette douce sur les bords (dramatise sans assombrir) */
.scene-vignette::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(62, 52, 42, 0.10) 100%
  );
  z-index: 1;
}

/* ============================================================
   04 · PODIUM — cube en marbre pour exposer un produit
   ============================================================ */

.podium {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out-soft);
}

.podium:hover {
  transform: translateY(-4px);
}

.podium__product {
  position: relative;
  width: 240px;
  height: 200px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 18px 24px rgba(62, 52, 42, 0.18));
  transition:
    transform var(--duration-base) var(--ease-out-soft),
    filter var(--duration-base) var(--ease-out-soft);
}

.podium:hover .podium__product {
  transform: translateY(-6px);
  filter: drop-shadow(0 28px 36px rgba(62, 52, 42, 0.24));
}

.podium__base {
  position: relative;
  width: 220px;
  height: 80px;
  background:
    linear-gradient(180deg, var(--color-marbre) 0%, #DCD3C0 50%, #C4B9A2 100%);
  border-radius: 2px;
  box-shadow:
    0 20px 30px rgba(62, 52, 42, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.50);
}

.podium__base::before {
  /* Fin filet doré sur le dessus */
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-discret) 50%, transparent);
  opacity: 0.6;
}

.podium__halo {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 280px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 220, 160, 0.35) 0%,
    rgba(255, 200, 120, 0.10) 40%,
    transparent 70%
  );
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(20px);
}

/* ============================================================
   05 · PORTE — élément récurrent (porte d'entrée, hall)
   Style chêne clair, poignée laiton verticale.
   ============================================================ */

.door {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.door__panel {
  position: relative;
  width: 140px;
  height: 280px;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.10) 0%,
      transparent 30%,
      transparent 70%,
      rgba(62, 52, 42, 0.10) 100%
    ),
    linear-gradient(90deg,
      var(--color-bois-cl) 0%,
      var(--color-bois-med) 50%,
      var(--color-bois-cl) 100%
    );
  border-radius: 2px 2px 0 0;
  box-shadow:
    0 12px 24px rgba(62, 52, 42, 0.18),
    inset 0 0 40px rgba(168, 139, 104, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
  transition:
    box-shadow var(--duration-base) var(--ease-out-soft),
    transform var(--duration-base) var(--ease-out-soft);
}

.door:hover .door__panel {
  box-shadow:
    0 16px 32px rgba(62, 52, 42, 0.24),
    inset 0 0 60px rgba(255, 220, 160, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    var(--shadow-glow-warm);
  transform: translateY(-2px);
}

/* Cadre intérieur de la porte (panneau) */
.door__panel::before {
  content: '';
  position: absolute;
  inset: 18px 14px;
  border: 1px solid rgba(62, 52, 42, 0.20);
  border-radius: 1px;
}

/* Poignée laiton verticale */
.door__handle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 56px;
  background: linear-gradient(180deg, #C9A875 0%, #A88B5C 50%, #8A6E40 100%);
  border-radius: var(--radius-pill);
  box-shadow:
    0 1px 2px rgba(62, 52, 42, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.40);
}

/* Plaque dorée sous la porte */
.door__plaque {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-md);
  color: var(--color-gold-text);
  letter-spacing: var(--tracking-wide);
  transition: color var(--duration-fast) var(--ease-out-soft);
}

.door:hover .door__plaque {
  color: var(--color-bois-med);
}

/* ============================================================
   06 · BACK BUTTON — bouton retour discret (haut-gauche)
   ============================================================ */

.scene-back {
  position: absolute;
  top: var(--space-5);
  left: var(--space-5);
  z-index: var(--z-sticky);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out-soft);
}

.scene-back:hover {
  color: var(--text-primary);
  background: var(--color-blanc-pur);
}

.scene-back::before {
  content: '←';
  font-family: var(--font-serif);
  font-size: var(--fs-base);
}

/* ============================================================
   07 · TITRES DE SCÈNE
   ============================================================ */

.scene-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, var(--fs-4xl));
  line-height: var(--lh-tight);
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
  text-align: center;
}

.scene-eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold-text);
  text-align: center;
  display: block;
}

/* ============================================================
   08 · MODES DE TRANSITION (préparés pour J3 avec GSAP)
   Classes utilitaires que les timelines GSAP cibleront.
   ============================================================ */

.scene--fade-out { opacity: 0; transition: opacity var(--duration-cinematic); }
.scene--zoomed   { transform: scale(1.04); transition: transform var(--duration-cinematic) var(--ease-cinematic); }
