/* Ambiances de démonstration — 10/10/2026.
 * Décor uniquement : aucun changement de place du texte ou des contrôles.
 * Séquences pilotées par motion.js, quatre secondes, sans boucle ni son.
 */
.motion-scene{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;contain:paint}
.motion-sheen,.motion-ribbon,.motion-halo,.motion-lion,.motion-ripple{position:absolute;opacity:0;pointer-events:none}
.motion-sheen{left:40%;top:10%;width:30%;height:80%;background:linear-gradient(115deg,transparent 30%,#fff0 40%,#fff9 49%,#fff0 57%,transparent 70%);mix-blend-mode:screen;transform:translateX(-50%)}
.motion-ribbon{left:60%;top:-12%;width:19%;height:125%;background:linear-gradient(90deg,#a50712,#eb2636 48%,#ffb0b0 50%,#c91d2d 52%,#6e0710);box-shadow:20px 0 50px #0003;transform:rotate(-14deg)}
.motion-halo{left:46%;top:8%;width:50%;height:82%;background:radial-gradient(ellipse,#f5ce8d45,transparent 65%);mix-blend-mode:screen}
.motion-lion{display:none;left:47%;top:12%;width:45%;height:76%;max-width:none;object-fit:contain;filter:drop-shadow(0 12px 24px #0008);transform-origin:50% 60%}
.motion-ripple{left:43%;top:64%;width:52%;height:23%;border:1px solid #80fffaa6;border-radius:50%;box-shadow:0 -2px 14px #42e9e729,inset 0 2px 7px #b4fffe22;transform:scale(.55)}
.motion-ripple:nth-last-child(2){top:68%;width:46%;left:46%}
.motion-ripple:last-child{top:71%;width:40%;left:49%}
:root[data-theme="noir"] .motion-lion{display:block}
#motion-title{font-family:var(--font);font-size:1rem;line-height:1.3}
.motion-controls{padding:1rem;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--accent) 5%,var(--surface));display:grid;gap:.7rem}
.motion-controls p{font-size:.78rem;line-height:1.6;margin:0}
.motion-controls .button{justify-self:start;font-size:.75rem;min-height:44px}
#motion-status{font-size:.7rem;color:var(--muted);min-height:1.6em}
@media(max-width:1099px){.motion-lion{left:45%;top:24%;width:53%;height:68%}.motion-sheen{left:48%;width:50%}.motion-ribbon{left:70%;width:22%}}
@media(max-width:600px){.motion-lion{left:68%;top:48%;width:30%;height:19%}.motion-halo{left:62%;top:40%;width:38%;height:32%}.motion-ribbon{left:77%;width:22%}.motion-ripple{top:72%;left:34%;width:64%;height:17%}.motion-sheen{left:45%;top:40%;width:55%;height:60%}}
@media(prefers-reduced-motion:reduce){.motion-scene{display:none}}

.noir-morph{display:none;position:absolute;left:53%;top:18%;width:40%;height:66%;z-index:2;padding:0;border:0;background:transparent;cursor:grab;isolation:isolate;touch-action:manipulation}
:root[data-theme="noir"][data-noir-ready="true"] .hero-art{background-image:url('../assets/images/noir-decor.webp')}
:root[data-theme="noir"] .noir-morph:not([hidden]){display:block}
.noir-morph img{position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:contain;pointer-events:none;filter:drop-shadow(0 20px 30px #0006)}
.noir-lion{opacity:0}.noir-morph[data-state="lion"] .noir-x{opacity:0}.noir-morph[data-state="lion"] .noir-lion{opacity:1}
.noir-morph:focus-visible{outline:2px solid #e6c79f;outline-offset:6px;border-radius:20px}
.morph-hint{position:absolute;bottom:-20px;left:0;width:100%;font:400 .65rem var(--font);color:#f2e6d6;text-shadow:0 1px 4px #000;background:#1118;border-radius:20px;padding:6px}
.noir-morph:is(:hover,:focus-visible) img{filter:drop-shadow(0 0 22px #ffd89366)}
@media(max-width:800px){.noir-morph{left:62%;top:45%;width:36%;height:39%}.morph-hint{font-size:.5rem;bottom:-10px}}
@media(max-width:480px){.noir-morph{left:61%;top:53%;width:37%;height:25%}.morph-hint{font-size:.44rem}}
/* Immersif : le X du décor est l'unique contrôle visible du film local.
 * La dernière image contient son retour et son halo ; aucun fondu de lion.
 */
.noir-motion-video{display:none;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;pointer-events:none}
:root[data-theme="noir"][data-noir-video="true"] .hero-art{background-image:url('../assets/images/hero-noir.webp')}
:root[data-theme="noir"][data-noir-video="true"] .noir-morph{cursor:pointer;left:52%;top:10%;width:41%;height:74%}
:root[data-theme="noir"][data-noir-video="true"] .noir-morph img,
:root[data-theme="noir"][data-noir-video="true"] .morph-hint{visibility:hidden}
:root[data-theme="noir"][data-noir-video="true"] .motion-controls{display:none}
:root[data-theme="noir"][data-noir-video-state="playing"] .noir-motion-video,
:root[data-theme="noir"][data-noir-video-state="loading"] .noir-motion-video,
:root[data-theme="noir"][data-noir-video-state="finished"] .noir-motion-video{display:block}
:root[data-theme="noir"][data-noir-video-state="playing"] .noir-morph{visibility:hidden}
/* Le recadrage mobile descend le X jusqu'au sol : sa zone tactile doit le suivre. */
@media(max-width:600px){.noir-motion-video{object-position:70% bottom}:root[data-theme="noir"][data-noir-video="true"] .noir-morph{left:40%;top:20%;width:60%;height:75%}}
/* La réduction des mouvements coupe les ambiances automatiques, pas le film
   explicitement demandé sur le X. Son état reste piloté par motion.js. */
/* Invitation discrète : curseur sculpté sur ordinateur, éclat bref au toucher.
   Aucun libellé ni contrôle supplémentaire. Film et zone tactile inchangés. */
@media (hover:hover) and (pointer:fine){
 :root[data-theme="noir"][data-noir-video="true"] #noir-morph{cursor:url('../assets/cursors/lion-gold.svg') 16 16,pointer}
}
@media (hover:none) and (prefers-reduced-motion:no-preference){
 :root[data-theme="noir"][data-noir-video="true"] #noir-morph::after{content:"";position:absolute;left:60%;top:30%;width:12px;height:12px;pointer-events:none;opacity:0;background:linear-gradient(90deg,transparent 40%,#fff2cd 50%,transparent 60%),linear-gradient(0deg,transparent 40%,#fff2cd 50%,transparent 60%);filter:drop-shadow(0 0 5px #e6c79f);animation:x-gold-glint 2.4s cubic-bezier(.16,1,.3,1) 2}
 :root[data-noir-video-state="loading"] #noir-morph::after,:root[data-noir-video-state="playing"] #noir-morph::after{display:none}
}
@keyframes x-gold-glint{0%,25%,80%,100%{opacity:0;transform:scale(.4) rotate(0deg)}45%{opacity:.85;transform:scale(1) rotate(20deg)}60%{opacity:.3;transform:scale(.65) rotate(35deg)}}

/* Même fenêtre photographique au repos et en lecture : pas de zoom mobile.
   Ratio du décor 1672/941 ; le film 848/480 reste entier, sans nouveau montage. */
@media(max-width:600px){
 :root[data-theme="noir"][data-noir-video="true"] .noir-motion-video{inset:auto;left:70%;bottom:0;width:auto;height:65%;aspect-ratio:1672 / 941;object-fit:fill;transform:translateX(-70%)}
}
