/* ═══════════════════════════════════════════════════════════════
   /assets/css/hero-lux.css — Hero 3D interactif Curevina
   Ruban de soie piloté au scroll + produits 3D (Three.js)
   Le contenu reste lisible sans JavaScript.
═══════════════════════════════════════════════════════════════ */

/* overflow-x: hidden casse position: sticky — clip garde le même rendu */
html, body { overflow-x: clip; }

.lux-hero {
  position: relative;
  height: 340vh;
  background: #2A1D12;
  z-index: 1;
}

.lux-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #C9A777;
}

/* ── Couches visuelles ─────────────────────────────── */
.lux-poster,
.lux-frames,
.lux-webgl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.lux-poster {
  object-fit: cover;
  object-position: 30% 50%;
  z-index: 0;
  transition: opacity .8s ease;
}

.lux-frames { z-index: 1; opacity: 0; transition: opacity .8s ease; }
.lux-ready .lux-frames { opacity: 1; }
.lux-ready .lux-poster { opacity: 0; }

.lux-webgl {
  z-index: 3;
  opacity: 0;
  transition: opacity 1s ease;
  touch-action: pan-y;
}
.lux-gl .lux-webgl { opacity: 1; }
.lux-webgl.is-grab { cursor: grab; }
.lux-webgl.is-grabbing { cursor: grabbing; }
.lux-webgl.is-pointer { cursor: pointer; }

/* Lumière chaude + vignette pour la lisibilité */
.lux-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 72% 42%, rgba(255,236,204,.18), transparent 70%),
    linear-gradient(180deg, rgba(42,29,18,.18) 0%, transparent 22%, transparent 70%, rgba(42,29,18,.42) 100%);
}

/* ── Textes ─────────────────────────────────────────── */
.lux-copy {
  position: absolute;
  z-index: 4;
  color: #2A1D12;
  pointer-events: none;
}
.lux-copy a,
.lux-copy button { pointer-events: auto; }

.lux-copy-a {
  top: calc(50% + 34px);
  left: 52%;
  right: var(--gutter, 48px);
  transform: translateY(calc(-46% + var(--lux-y, 0px)));
  max-width: 640px;
  will-change: transform, opacity;
}

.lux-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #7A4A0C;
  margin-bottom: clamp(10px, 2.4vh, 22px);
}
.lux-kicker::before {
  content: '';
  width: 36px;
  height: 1px;
  background: currentColor;
}

.lux-title {
  font-family: Prata, 'Iowan Old Style', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, min(4.2vw, 8vh) + .5rem, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin-bottom: clamp(14px, 3vh, 26px);
  color: #2A1D12;
}
.lux-line { display: block; overflow: hidden; padding-bottom: .08em; }
.lux-line > span { display: block; }
.lux-title em {
  font-style: italic;
  color: #A0620E;
}

.lux-sub {
  font-size: clamp(1rem, .5vw + .85rem, 1.18rem);
  line-height: 1.65;
  color: #4A331D;
  max-width: 470px;
  margin-bottom: clamp(18px, 4vh, 36px);
}

.lux-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.lux-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 100px;
  font-family: Karla, system-ui, sans-serif;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .35s cubic-bezier(.22,.61,.36,1), background .35s, color .35s, box-shadow .35s;
}
.lux-btn-dark {
  background: #2A1D12;
  color: #F7EEDE;
  box-shadow: 0 14px 34px -14px rgba(42,29,18,.7);
}
.lux-btn-dark:hover { background: #96590C; transform: translateY(-2px); }
.lux-btn-ghost {
  color: #2A1D12;
  border: 1.5px solid rgba(42,29,18,.45);
  backdrop-filter: blur(6px);
  background: rgba(247,238,222,.18);
}
.lux-btn-ghost:hover { background: #2A1D12; color: #F7EEDE; transform: translateY(-2px); }
.lux-btn .arw { transition: transform .3s; }
.lux-btn:hover .arw { transform: translateX(4px); }

/* Texte de fin (le ruban s'est posé) */
.lux-copy-b {
  left: 52%;
  right: var(--gutter, 48px);
  top: 50%;
  transform: translateY(calc(-50% + var(--lux-y, 0px)));
  max-width: 560px;
  opacity: 0;
  visibility: hidden;
}
.lux-copy-b h2 {
  font-family: Prata, Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 3vw + .8rem, 3.8rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin-bottom: 18px;
}
.lux-copy-b h2 em { font-style: italic; color: #A0620E; }
.lux-copy-b p {
  color: #4A331D;
  max-width: 440px;
  margin-bottom: 30px;
  line-height: 1.65;
}
.lux-js .lux-copy-b { visibility: visible; }

/* ── Interface ─────────────────────────────────────── */
.lux-hint {
  position: absolute;
  z-index: 4;
  left: 52%;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Mono', monospace;
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(42,29,18,.7);
  pointer-events: none;
  opacity: 0;
}
.lux-hint svg { animation: luxHand 2.4s ease-in-out infinite; }
@keyframes luxHand {
  0%, 100% { transform: translateX(-4px); }
  50%      { transform: translateX(6px); }
}

.lux-progress {
  position: absolute;
  z-index: 4;
  right: var(--gutter, 48px);
  top: 50%;
  width: 2px;
  height: 120px;
  margin-top: -60px;
  background: rgba(42,29,18,.16);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
}
.lux-progress span {
  position: absolute;
  inset: 0;
  background: #A0620E;
  transform-origin: top;
  transform: scaleY(0);
}

.lux-scroll {
  position: absolute;
  z-index: 4;
  left: var(--gutter, 48px);
  bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(247,238,222,.85);
  pointer-events: none;
}
.lux-scroll i {
  width: 1px;
  height: 40px;
  background: linear-gradient(#F7EEDE, transparent);
  animation: luxScroll 2s cubic-bezier(.4,0,.2,1) infinite;
  transform-origin: top;
}
@keyframes luxScroll {
  0%   { transform: scaleY(0); opacity: 1; }
  70%  { transform: scaleY(1); opacity: .6; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* Étiquette au survol d'un produit 3D */
.lux-tip {
  position: absolute;
  z-index: 5;
  left: 0;
  top: 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(247,238,222,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -18px rgba(42,29,18,.6);
  color: #2A1D12;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -120%, 0) scale(.92);
  transition: opacity .25s ease, transform .25s ease;
  white-space: nowrap;
}
.lux-tip.on { opacity: 1; transform: translate3d(-50%, -130%, 0) scale(1); }
.lux-tip strong {
  display: block;
  font-family: Prata, Georgia, serif;
  font-weight: 400;
  font-size: 1rem;
  margin-bottom: 2px;
}
.lux-tip span {
  font-family: 'DM Mono', monospace;
  font-size: .7rem;
  letter-spacing: .12em;
  color: #96590C;
}

/* ── Animation d'entrée (seulement si JS actif) ───── */
.lux-js .lux-kicker,
.lux-js .lux-sub,
.lux-js .lux-btns-a { transform: translateY(14px); }
.lux-js .lux-line > span { transform: translateY(30%); }

.lux-in .lux-kicker,
.lux-in .lux-sub,
.lux-in .lux-btns-a {
  transform: none;
  transition: opacity 1s cubic-bezier(.22,.61,.36,1), transform 1s cubic-bezier(.22,.61,.36,1);
}
.lux-in .lux-kicker { transition-delay: .15s; }
.lux-in .lux-sub    { transition-delay: .95s; }
.lux-in .lux-btns-a { transition-delay: 1.15s; }
.lux-in .lux-line > span {
  transform: none;
  transition: transform 1.2s cubic-bezier(.19,1,.22,1);
}
.lux-in .lux-line:nth-child(1) > span { transition-delay: .3s; }
.lux-in .lux-line:nth-child(2) > span { transition-delay: .45s; }
.lux-in .lux-line:nth-child(3) > span { transition-delay: .6s; }
.lux-in .lux-hint,
.lux-in .lux-progress { opacity: 1; transition: opacity 1s ease 1.6s; }

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .lux-hero { height: 260vh; }
  .lux-poster { object-position: 22% 50%; }
  .lux-vignette {
    background: linear-gradient(180deg, rgba(42,29,18,.1) 0%, transparent 30%, rgba(247,238,222,.0) 45%, rgba(239,226,206,.82) 78%, rgba(239,226,206,.95) 100%);
  }
  .lux-copy-a,
  .lux-copy-b {
    left: var(--gutter, 20px);
    right: var(--gutter, 20px);
    top: auto;
    bottom: 64px;
    transform: translateY(var(--lux-y, 0px));
    max-width: none;
  }
  .lux-title { font-size: clamp(2.2rem, 9vw, 3.2rem); margin-bottom: 16px; }
  .lux-sub { font-size: .98rem; margin-bottom: 24px; }
  .lux-btn { padding: 14px 22px; font-size: .74rem; }
  .lux-hint { display: none; }
  .lux-progress { display: none; }
  .lux-scroll { display: none; }
}

/* ── Mouvement réduit : version fixe, sans pin ───── */
@media (prefers-reduced-motion: reduce) {
  .lux-hero { height: auto; }
  .lux-stage { position: relative; }
  .lux-frames, .lux-webgl, .lux-hint, .lux-progress, .lux-scroll, .lux-copy-b { display: none; }
  .lux-ready .lux-poster { opacity: 1; }
  .lux-js .lux-kicker, .lux-js .lux-sub, .lux-js .lux-btns-a, .lux-js .lux-line > span { transform: none; }
}

/* ═══════════════════════════════════════════════════
   Section "La différence" — ruban satin 3D
═══════════════════════════════════════════════════ */
.diff-canvas-wrap { position: relative; touch-action: pan-y; }
.diff-canvas-wrap canvas { cursor: grab; }
.diff-canvas-wrap canvas:active { cursor: grabbing; }
.diff-hotspot { cursor: pointer; }
.diff-hotspot { opacity: .85; transform: none; }
.diff-hotspot .diff-hotspot-desc { opacity: .9; }
.diff-hotspot.visible { opacity: 1; }
.diff-hotspot.visible .diff-hotspot-label { color: #E3A63F; }
