/*
 * Domaine des Graminées — couche d'ambiance V17.
 * Extension isolée de la V16 : aucune scène existante n'est supprimée.
 */

.home-luxury-ambience-v17 {
  --lux-scroll: 0;
  --lux-tapestry-shift: -8px;
  --lux-light-shift: 22px;
  --lux-pointer-x: 50vw;
  --lux-pointer-y: 45vh;
  --lux-champagne: 231, 203, 132;
  --lux-copper: 196, 112, 48;
  --lux-forest: 8, 34, 25;
  --lux-tapestry-opacity: 0.075;
  --lux-light-opacity: 0.16;
  --lux-glint-opacity: 0.38;
  background-color: #061910;
}

.home-luxury-ambience-v17[data-active-day-stage="sunrise"],
.home-luxury-ambience-v17[data-active-day-stage="morning"] {
  --lux-tapestry-opacity: 0.065;
  --lux-light-opacity: 0.18;
  --lux-glint-opacity: 0.28;
}

.home-luxury-ambience-v17[data-active-day-stage="day"] {
  --lux-tapestry-opacity: 0.055;
  --lux-light-opacity: 0.14;
  --lux-glint-opacity: 0.24;
}

.home-luxury-ambience-v17[data-active-day-stage="evening"] {
  --lux-tapestry-opacity: 0.09;
  --lux-light-opacity: 0.22;
  --lux-glint-opacity: 0.5;
}

.home-luxury-ambience-v17[data-active-day-stage="night"] {
  --lux-tapestry-opacity: 0.11;
  --lux-light-opacity: 0.14;
  --lux-glint-opacity: 0.62;
}

.luxury-ambience-layer {
  position: fixed;
  inset: 0;
  z-index: 18;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.luxury-ambience-layer__light,
.luxury-ambience-layer__glint {
  position: absolute;
  display: block;
  pointer-events: none;
}

.luxury-ambience-layer__light {
  inset: -28%;
  opacity: var(--lux-light-opacity);
  background:
    radial-gradient(circle at var(--lux-pointer-x) var(--lux-pointer-y), rgba(var(--lux-champagne), 0.5) 0, rgba(var(--lux-champagne), 0.13) 8%, transparent 26%),
    conic-gradient(from 215deg at 50% 48%, transparent 0 35%, rgba(var(--lux-champagne), 0.08) 42%, transparent 49% 100%);
  transform: translate3d(0, var(--lux-light-shift), 0) scale(1.08);
  mix-blend-mode: screen;
}

.home-luxury-ambience-v17 main > section.luxury-reveal-section {
  position: relative;
  isolation: isolate;
}

.luxury-section-decor,
.luxury-section-decor > i {
  position: absolute;
  display: block;
  pointer-events: none;
}

.luxury-section-decor {
  inset: 0;
  z-index: 11;
  overflow: hidden;
  contain: paint;
}

.luxury-section-decor__weave {
  inset: -8%;
  opacity: var(--lux-tapestry-opacity);
  background:
    repeating-linear-gradient(92deg, rgba(255, 246, 211, 0.19) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(2deg, rgba(2, 16, 11, 0.68) 0 2px, transparent 2px 7px),
    repeating-radial-gradient(ellipse at 50% 50%, rgba(232, 206, 144, 0.12) 0 1px, transparent 1px 11px);
  background-size: 122px 100%, 100% 74px, 86px 58px;
  mix-blend-mode: soft-light;
  transform: translate3d(0, var(--lux-tapestry-shift), 0) rotate(-0.28deg);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 0 36%, rgba(0, 0, 0, 0.45) 67%, #000 100%);
  mask-image: radial-gradient(ellipse at center, transparent 0 36%, rgba(0, 0, 0, 0.45) 67%, #000 100%);
}

.luxury-section-decor__halo {
  inset: 0;
  opacity: calc(var(--lux-light-opacity) * 0.66);
  background:
    radial-gradient(circle at -3% 42%, rgba(var(--lux-champagne), 0.32), transparent 27%),
    radial-gradient(circle at 103% 70%, rgba(var(--lux-copper), 0.23), transparent 25%);
  mix-blend-mode: screen;
  transform: translate3d(0, var(--lux-light-shift), 0);
}

.luxury-section-decor__thread {
  left: clamp(18px, 4vw, 68px);
  right: clamp(18px, 4vw, 68px);
  top: clamp(14px, 2.2vw, 38px);
  height: 1px;
  opacity: 0.46;
  background: linear-gradient(90deg, transparent, rgba(var(--lux-champagne), 0.46) 18%, rgba(255, 246, 218, 0.82) 50%, rgba(var(--lux-champagne), 0.46) 82%, transparent);
  box-shadow: 0 calc(100svh - clamp(30px, 4.4vw, 76px)) rgba(var(--lux-champagne), 0.16);
}

.luxury-ambience-layer__glint {
  width: 4px;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: calc(var(--lux-glint-opacity) * 0.7);
  background: rgb(255, 237, 182);
  box-shadow:
    0 0 5px rgba(255, 229, 161, 0.88),
    0 0 18px rgba(228, 183, 85, 0.58);
  animation: luxury-glint-breathe 5.8s ease-in-out infinite;
}

.luxury-ambience-layer__glint::before,
.luxury-ambience-layer__glint::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: linear-gradient(90deg, transparent, rgba(255, 239, 191, 0.7), transparent);
  transform: translate(-50%, -50%);
}

.luxury-ambience-layer__glint::before {
  width: 28px;
  height: 1px;
}

.luxury-ambience-layer__glint::after {
  width: 1px;
  height: 22px;
}

.luxury-ambience-layer__glint--1 { left: 8%; top: 18%; animation-delay: -1.4s; }
.luxury-ambience-layer__glint--2 { left: 27%; top: 69%; animation-delay: -4.1s; transform: scale(0.72); }
.luxury-ambience-layer__glint--3 { right: 17%; top: 31%; animation-delay: -2.8s; transform: scale(0.86); }
.luxury-ambience-layer__glint--4 { right: 6%; top: 76%; animation-delay: -0.6s; transform: scale(0.58); }
.luxury-ambience-layer__glint--5 { left: 52%; top: 12%; animation-delay: -5.2s; transform: scale(0.52); }
.luxury-ambience-layer__glint--6 { left: 64%; top: 88%; animation-delay: -3.5s; transform: scale(0.68); }

.home-luxury-ambience-v17[data-active-day-stage="day"] .luxury-ambience-layer__glint,
.home-luxury-ambience-v17[data-active-day-stage="morning"] .luxury-ambience-layer__glint,
.home-luxury-ambience-v17[data-active-day-stage="sunrise"] .luxury-ambience-layer__glint {
  box-shadow: 0 0 6px rgba(255, 231, 166, 0.64), 0 0 13px rgba(229, 188, 99, 0.28);
}

.luxury-effects-ready .home-luxury-ambience-v17 main > section.luxury-reveal-section {
  --lux-section-depth: 0;
  opacity: 0.9;
  filter: saturate(0.9) brightness(0.94);
  transform: translate3d(0, 28px, 0);
  transition:
    opacity 900ms cubic-bezier(0.2, 0.72, 0.22, 1),
    filter 1200ms cubic-bezier(0.2, 0.72, 0.22, 1),
    transform 1100ms cubic-bezier(0.2, 0.72, 0.22, 1);
  will-change: opacity, filter, transform;
}

.luxury-effects-ready .home-luxury-ambience-v17 main > section.luxury-reveal-section.is-luxury-inview {
  opacity: 1;
  filter: none;
  transform: translate3d(0, 0, 0);
}

.home-luxury-ambience-v17 .luxury-shine-surface {
  position: relative;
  isolation: isolate;
}

.luxury-surface-shine {
  position: absolute;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  border: 1px solid rgba(var(--lux-champagne), 0.2);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms ease;
  clip-path: inset(0 round 18px);
}

.luxury-surface-shine::before {
  content: "";
  position: absolute;
  top: -42%;
  bottom: -42%;
  left: -70%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(255, 245, 214, 0.03), rgba(255, 225, 152, 0.36), rgba(255, 250, 226, 0.05), transparent);
  filter: blur(1px);
  transform: rotate(12deg);
}

.luxury-shine-surface.is-luxury-surface-visible > .luxury-surface-shine {
  opacity: 0.68;
}

.luxury-shine-surface.is-luxury-surface-visible > .luxury-surface-shine::before {
  animation: luxury-surface-sweep 4.8s cubic-bezier(0.25, 0.7, 0.22, 1) 180ms 1 both;
}

.luxury-shine-surface:hover > .luxury-surface-shine,
.luxury-shine-surface:focus-within > .luxury-surface-shine {
  opacity: 0.95;
  box-shadow: inset 0 0 28px rgba(var(--lux-champagne), 0.08);
}

.luxury-shine-surface:hover > .luxury-surface-shine::before,
.luxury-shine-surface:focus-within > .luxury-surface-shine::before {
  animation: luxury-surface-sweep 1.15s cubic-bezier(0.2, 0.75, 0.2, 1) 1 both;
}

.luxury-hearths {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.premium-emotion > :not(.luxury-hearths) {
  position: relative;
  z-index: 2;
}

.luxury-hearth {
  position: absolute;
  bottom: clamp(8px, 2.5vw, 30px);
  width: clamp(86px, 12vw, 174px);
  height: clamp(90px, 13vw, 190px);
  opacity: 0.88;
  filter: saturate(0.88);
}

.luxury-hearth--left { left: clamp(-52px, -2vw, -12px); }
.luxury-hearth--right { right: clamp(-52px, -2vw, -12px); transform: scaleX(-1); }

.luxury-hearth::before {
  content: "";
  position: absolute;
  inset: 18% -45% -36%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 181, 75, 0.34) 0, rgba(206, 94, 29, 0.17) 30%, transparent 70%);
  filter: blur(11px);
  animation: luxury-hearth-glow 2.9s ease-in-out infinite alternate;
}

.luxury-hearth::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 15%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 211, 125, 0.8), rgba(178, 76, 24, 0.62) 36%, rgba(48, 24, 13, 0.18) 72%, transparent);
  box-shadow: 0 0 20px rgba(226, 124, 43, 0.44);
}

.luxury-hearth i {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 28%;
  height: 61%;
  border-radius: 62% 38% 54% 46% / 76% 62% 38% 24%;
  transform-origin: 50% 100%;
  background: linear-gradient(45deg, rgba(255, 64, 17, 0.08) 14%, rgba(255, 96, 27, 0.82) 45%, rgba(255, 211, 99, 0.9) 68%, rgba(255, 255, 228, 0.72));
  box-shadow: 0 0 34px rgba(255, 84, 22, 0.44);
  filter: blur(0.7px);
  mix-blend-mode: screen;
  animation: luxury-flame var(--lux-flame-speed, 1.9s) ease-in-out infinite alternate;
}

.luxury-hearth i:nth-child(1) { margin-left: -34%; height: 43%; --lux-flame-scale: 0.72; --lux-flame-speed: 1.8s; animation-delay: -0.45s; }
.luxury-hearth i:nth-child(2) { margin-left: -14%; height: 68%; --lux-flame-scale: 1.04; --lux-flame-speed: 2.3s; }
.luxury-hearth i:nth-child(3) { margin-left: 10%; height: 49%; --lux-flame-scale: 0.82; --lux-flame-speed: 1.6s; animation-delay: -0.86s; }

.luxury-sound-control {
  position: fixed;
  right: clamp(14px, 2vw, 30px);
  bottom: clamp(16px, 2vw, 30px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 9px 14px 9px 11px;
  border: 1px solid rgba(var(--lux-champagne), 0.5);
  border-radius: 999px;
  color: #fff7e5;
  background: linear-gradient(145deg, rgba(7, 30, 21, 0.88), rgba(3, 16, 12, 0.94));
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 244, 207, 0.11);
  -webkit-backdrop-filter: blur(16px) saturate(1.18);
  backdrop-filter: blur(16px) saturate(1.18);
  cursor: pointer;
  transform: translateZ(0);
  transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms ease, background 240ms ease;
}

.luxury-sound-control:hover,
.luxury-sound-control:focus-visible {
  border-color: rgba(246, 219, 151, 0.9);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.42), 0 0 24px rgba(var(--lux-champagne), 0.13);
  transform: translateY(-2px);
}

.luxury-sound-control:focus-visible {
  outline: 2px solid #f4d991;
  outline-offset: 3px;
}

.luxury-sound-control[aria-pressed="true"] {
  border-color: rgba(246, 215, 138, 0.86);
  background: linear-gradient(145deg, rgba(45, 36, 17, 0.94), rgba(8, 30, 21, 0.95));
}

.luxury-sound-control__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #f2d58b;
  background: radial-gradient(circle, rgba(var(--lux-champagne), 0.17), rgba(var(--lux-champagne), 0.03) 70%);
  box-shadow: inset 0 0 0 1px rgba(var(--lux-champagne), 0.23);
}

.luxury-sound-control__mark i {
  width: 2px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
}

.luxury-sound-control__mark i:nth-child(2) { height: 13px; }

.luxury-sound-control[aria-pressed="true"] .luxury-sound-control__mark i {
  animation: luxury-sound-bar 0.78s ease-in-out infinite alternate;
}

.luxury-sound-control[aria-pressed="true"] .luxury-sound-control__mark i:nth-child(2) { animation-delay: -0.42s; }
.luxury-sound-control[aria-pressed="true"] .luxury-sound-control__mark i:nth-child(3) { animation-delay: -0.19s; }

.luxury-sound-control__copy {
  display: grid;
  gap: 1px;
  text-align: left;
  line-height: 1;
}

.luxury-sound-control__copy strong {
  font-family: var(--font-sans, Arial, sans-serif);
  font-size: 0.74rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.luxury-sound-control__copy small {
  color: rgba(255, 248, 230, 0.66);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

@keyframes luxury-glint-breathe {
  0%, 100% { opacity: calc(var(--lux-glint-opacity) * 0.22); filter: blur(0.3px); }
  48% { opacity: var(--lux-glint-opacity); filter: blur(0); }
}

@keyframes luxury-surface-sweep {
  0% { transform: translate3d(-10%, 0, 0) rotate(12deg); opacity: 0; }
  18% { opacity: 0.8; }
  100% { transform: translate3d(590%, 0, 0) rotate(12deg); opacity: 0; }
}

@keyframes luxury-hearth-glow {
  from { opacity: 0.66; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1.05); }
}

@keyframes luxury-flame {
  0% { transform: rotate(43deg) scale(var(--lux-flame-scale, 0.9)) skew(-3deg, -4deg); opacity: 0.55; }
  45% { transform: rotate(48deg) scale(calc(var(--lux-flame-scale, 0.9) * 0.92), calc(var(--lux-flame-scale, 0.9) * 1.06)) skew(2deg, 3deg); opacity: 0.88; }
  100% { transform: rotate(42deg) scale(calc(var(--lux-flame-scale, 0.9) * 1.06), calc(var(--lux-flame-scale, 0.9) * 0.94)) skew(-2deg, 4deg); opacity: 0.68; }
}

@keyframes luxury-sound-bar {
  from { transform: scaleY(0.48); opacity: 0.64; }
  to { transform: scaleY(1.18); opacity: 1; }
}

@media (max-width: 760px) {
  .home-luxury-ambience-v17 {
    --lux-tapestry-opacity: 0.05;
    --lux-light-opacity: 0.11;
  }

  .luxury-ambience-layer__glint--2,
  .luxury-ambience-layer__glint--5,
  .luxury-ambience-layer__glint--6 {
    display: none;
  }

  .luxury-section-decor__weave {
    background-size: 88px 100%, 100% 62px, 72px 46px;
  }

  .luxury-sound-control {
    right: 12px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    min-height: 46px;
    padding: 7px 10px 7px 8px;
  }

  .luxury-sound-control__mark {
    width: 28px;
    height: 28px;
  }

  .luxury-sound-control__copy small {
    display: none;
  }

  .luxury-hearths {
    height: 33%;
  }

  .luxury-hearth {
    bottom: 2px;
    width: 96px;
    height: 106px;
    opacity: 0.68;
  }

  .luxury-hearth--left { left: -46px; }
  .luxury-hearth--right { right: -46px; }

  .luxury-effects-ready .home-luxury-ambience-v17 main > section.luxury-reveal-section {
    transform: translate3d(0, 18px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .luxury-ambience-layer__light,
  .luxury-ambience-layer__glint,
  .luxury-section-decor__weave,
  .luxury-section-decor__halo,
  .luxury-surface-shine::before,
  .luxury-hearth::before,
  .luxury-hearth i,
  .luxury-sound-control__mark i {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .luxury-ambience-layer__glint {
    opacity: 0.16;
  }

  .luxury-effects-ready .home-luxury-ambience-v17 main > section.luxury-reveal-section,
  .luxury-effects-ready .home-luxury-ambience-v17 main > section.luxury-reveal-section.is-luxury-inview {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .luxury-shine-surface.is-luxury-surface-visible > .luxury-surface-shine {
    opacity: 0.25;
  }

  .luxury-hearth {
    opacity: 0.5;
  }
}

@media (prefers-contrast: more) {
  .luxury-ambience-layer {
    display: none;
  }

  .luxury-sound-control {
    border-width: 2px;
    background: #06180f;
  }
}

@media print {
  .luxury-ambience-layer,
  .luxury-hearths,
  .luxury-sound-control,
  [data-luxury-sound-status],
  .luxury-surface-shine {
    display: none !important;
  }
}
