/* ================================================================
   MOXIE HOME — Section « Disco Volante » (moxiehome/views/templates/sections/disco.tpl)
   Maquette : .disco — « Illuminez » blanc, « vos soirées. » à la couleur de la lumière choisie
   ================================================================ */
.moxie-dv {
  --dv: #FF4FA3;
  isolation: isolate;
  background: #0a0812;
  color: #EDEAF6;
  max-height: none;
  display: flex;
  align-items: center;
  transition: background .6s;
  padding-top: clamp(20px, 3.5vh, 44px);
  padding-bottom: clamp(20px, 3.5vh, 44px);
}
.moxie-dv.soiree { background: #050409; }
.moxie-dv__grille {
  width: 100%; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center;
}

/* Scène : photo de l'enceinte, lumière recolorée, halo, sol */
.moxie-dv__scene {
  position: relative; aspect-ratio: 1; width: 100%; max-width: min(480px, 64vh);
  justify-self: center; display: grid; place-items: center;
}
.moxie-dv__halo {
  position: absolute; left: 50%; top: 55%; width: 80%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, var(--dv), transparent 62%); opacity: .35; filter: blur(40px); transition: background .4s;
}
.moxie-dv__objet { position: relative; width: 78%; animation: moxie-dv-flotte 5s ease-in-out infinite; will-change: transform; }
.moxie-dv__objet img { width: 100%; height: auto; display: block; border-radius: 8px; filter: drop-shadow(0 30px 30px rgba(0,0,0,.7)); }
/* calque qui recolore la lumière rose de la photo dans la couleur choisie */
.moxie-dv__led {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color;
  background: radial-gradient(ellipse 34% 14% at 50% 56%, var(--dv) 0%, var(--dv) 45%, transparent 100%); transition: background .4s;
}
.moxie-dv__eteint {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s; mix-blend-mode: multiply;
  background: radial-gradient(ellipse 36% 16% at 50% 56%, rgba(70,70,78,.92) 0%, rgba(70,70,78,.7) 55%, transparent 100%);
}
.moxie-dv.lumieres-off .moxie-dv__eteint { opacity: 1; }
.moxie-dv.lumieres-off .moxie-dv__halo, .moxie-dv.lumieres-off .moxie-dv__sol { opacity: 0 !important; }
.moxie-dv.lumieres-off .moxie-dv__led {
  opacity: 1 !important; background: radial-gradient(ellipse 36% 16% at 50% 56%, #8a8a90 0%, #8a8a90 55%, transparent 100%);
}
.moxie-dv.lumieres-off .moxie-dv__faisceaux { opacity: 0 !important; }
.moxie-dv.hors-tension .moxie-dv__objet img { filter: drop-shadow(0 30px 30px rgba(0,0,0,.7)) brightness(.75); }
.moxie-dv__boutons button {
  position: absolute; top: 69%; width: 7%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer; padding: 0; transition: background .15s, box-shadow .15s;
}
.moxie-dv__boutons button:hover { background: rgba(255,255,255,.12); box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.moxie-dv__boutons button:active, .moxie-dv__boutons button.appui { background: rgba(255,255,255,.3); box-shadow: 0 0 14px 2px var(--dv); }
.moxie-dv__boutons button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.moxie-dv__bulle {
  position: absolute; left: 50%; top: 2%; translate: -50% 0; margin: 0; white-space: nowrap;
  background: rgba(10,8,18,.88); border: 1px solid rgba(255,255,255,.2); color: #fff; font-weight: 800; font-size: 14px;
  padding: 8px 14px; border-radius: 999px; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.moxie-dv__bulle.vue { opacity: 1; }
.moxie-dv__bulle i { display: inline-block; width: 7px; height: 12px; margin-left: 2px; border-radius: 2px; background: rgba(255,255,255,.25); vertical-align: -1px; }
.moxie-dv__bulle i.on { background: var(--dv); }
.moxie-dv__sol {
  position: absolute; left: 20%; right: 20%; bottom: 6%; height: 7%; border-radius: 50%;
  background: radial-gradient(ellipse, var(--dv), transparent 70%); opacity: .45; filter: blur(8px);
}
@keyframes moxie-dv-flotte { 50% { transform: translateY(-10px); } }

/* Panneau */
.moxie-dv__surtitre { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #C9B5FF; }
.moxie-dv__titre {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800; text-transform: uppercase;
  font-size: clamp(40px, 5vw, 72px); line-height: .92; color: #fff; margin: 10px 0 12px;
}
/* « vos soirées. » : arc-en-ciel qui défile, ou exactement la couleur de la lumière choisie */
.moxie-dv__illu {
  background: linear-gradient(90deg, #FF4FA3, #FFD84D, #38E1FF, #A77BFF, #FF4FA3); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: moxie-dv-degrade 6s linear infinite; filter: drop-shadow(0 0 18px var(--dv));
}
.moxie-dv.unie .moxie-dv__illu {
  background: none; color: var(--dv); animation: none; filter: none;
  text-shadow: 0 0 30px var(--dv); transition: color .4s, text-shadow .4s;
}
.moxie-dv__chapo { color: #D6CEF0; font-size: 15px; max-width: 46ch; margin: 0; }
.moxie-dv__q { display: flex; align-items: center; gap: 10px; font-weight: 700; margin: 14px 0 8px; font-size: 15px; }
.moxie-dv__q b {
  width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #120c1f;
  display: inline-grid; place-items: center; font-size: 13px;
}
.moxie-dv__q span { color: #C9B5FF; font-weight: 600; }
.moxie-dv__couleurs { display: flex; flex-wrap: wrap; gap: 10px; }
.moxie-dv__couleurs button {
  width: 38px; height: 38px; border-radius: 50%; border: 3px solid #0a0812;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25); cursor: pointer; padding: 0; transition: transform .15s;
}
.moxie-dv__couleurs button:hover { transform: scale(1.1); }
.moxie-dv__couleurs button[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 18px var(--c, #fff); }
.moxie-dv__ambiance { display: flex; flex-wrap: wrap; gap: 8px; }
.moxie-dv__soiree {
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 900; font-size: 17px;
  color: #0a0812; background: linear-gradient(90deg, #FF4FA3, #FFD84D, #38E1FF, #A77BFF); background-size: 300% 100%;
  animation: moxie-dv-degrade 6s linear infinite; box-shadow: 0 0 34px -6px var(--dv);
}
.moxie-dv__soiree[aria-pressed="true"] { background: #fff; animation: none; }
.moxie-dv__micro {
  min-height: 50px; padding: 0 18px; border-radius: 999px; border: 1.5px dashed rgba(255,255,255,.35);
  background: rgba(255,255,255,.05); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
}
.moxie-dv__micro[aria-pressed="true"] { border-style: solid; border-color: #1ED760; background: rgba(30,215,96,.12); color: #1ED760; }
@keyframes moxie-dv-degrade { to { background-position: 300% 0; } }
.moxie-dv__astuce { font-size: 12px; line-height: 1.35; color: #8e86a8; margin: 8px 0 0; }
.moxie-dv__specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.moxie-dv__specs li {
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 6px 9px;
  font-size: 11px; color: #B9A8E8; display: flex; flex-direction: column;
}
.moxie-dv__specs b { color: #fff; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 17px; }

/* Achat : prix réel de la fiche + bouton vers le vrai panier */
.moxie-dv__achat { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.moxie-dv__prix { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 40px; line-height: 1; color: #fff; }
.moxie-dv .moxie-home-achat { background: #fff; color: #0a0812; }
.moxie-dv .moxie-home-achat:hover { background: var(--dv); color: #0a0812; }
.moxie-dv .moxie-home-achat.is-indisponible,
.moxie-dv .moxie-home-achat.is-indisponible:hover { background: rgba(255,255,255,.14); color: #a9a3bd; }
.moxie-dv .moxie-home-achat.is-ajoute { background: #1ED760; color: #07150b; }
.moxie-dv .moxie-home-achat__fiche, .moxie-dv__fiche { color: #fff; border-bottom-color: var(--dv); }
.moxie-dv__fiche { font-weight: 800; font-size: 14px; text-decoration: none; border-bottom: 2px solid var(--dv); }

/* Mode soirée : faisceaux qui balaient, confettis lumineux */
.moxie-dv__faisceaux { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .6s; pointer-events: none; }
.moxie-dv.soiree .moxie-dv__faisceaux { opacity: 1; }
.moxie-dv__faisceaux i {
  position: absolute; top: -20%; width: 22%; height: 140%; transform-origin: 50% 0;
  background: linear-gradient(180deg, var(--dv), transparent 75%); opacity: .22; filter: blur(14px);
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); animation: moxie-dv-balaye 5s ease-in-out infinite alternate;
}
.moxie-dv__faisceaux i:nth-child(1) { left: 6%; animation-delay: -1s; }
.moxie-dv__faisceaux i:nth-child(2) { left: 32%; animation-delay: -3s; animation-duration: 6s; }
.moxie-dv__faisceaux i:nth-child(3) { left: 58%; animation-delay: -2s; animation-duration: 4.5s; }
.moxie-dv__faisceaux i:nth-child(4) { left: 82%; animation-delay: -4s; }
@keyframes moxie-dv-balaye { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
.moxie-dv__confettis { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.moxie-dv__confettis i {
  position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c);
  animation: moxie-dv-confetti 2.4s ease-out forwards;
}
@keyframes moxie-dv-confetti { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }

/* Mobile : un écran — titre, enceinte à côté du choix de lumière, ambiance, achat */
@media (max-width: 860px) {
  .moxie-dv { align-items: flex-start; }
  .moxie-dv__grille {
    grid-template-columns: 140px minmax(0, 1fr);
    grid-template-areas:
      "titre titre"
      "scene q1"
      "scene couleurs"
      "q2 q2"
      "ambiance ambiance"
      "achat achat";
    gap: 10px 12px;
  }
  .moxie-dv__panneau { display: contents; }
  .moxie-dv__surtitre, .moxie-dv__chapo, .moxie-dv__astuce, .moxie-dv__specs { display: none; }
  .moxie-dv__titre { grid-area: titre; font-size: clamp(32px, 9vw, 44px); margin: 0; }
  .moxie-dv__scene { grid-area: scene; max-width: 140px; }
  .moxie-dv__objet { width: 100%; }
  .moxie-dv__bulle { font-size: 11px; padding: 5px 9px; top: -6%; }
  .moxie-dv__q--lumiere { grid-area: q1; margin: 0; align-self: end; font-size: 14px; }
  .moxie-dv__couleurs { grid-area: couleurs; align-self: start; gap: 8px; }
  .moxie-dv__couleurs button { width: 30px; height: 30px; }
  .moxie-dv__q--ambiance { grid-area: q2; margin: 4px 0 0; font-size: 14px; }
  .moxie-dv__ambiance { grid-area: ambiance; }
  .moxie-dv__soiree { min-height: 44px; font-size: 15px; padding: 0 20px; }
  .moxie-dv__micro { min-height: 44px; font-size: 13px; }
  .moxie-dv__achat { grid-area: achat; margin-top: 4px; }
  .moxie-dv__prix { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .moxie-dv__objet, .moxie-dv__faisceaux i, .moxie-dv__soiree, .moxie-dv__illu { animation: none; }
}
