/* ===== Lorelei et la Foire marchande (js/lorelei.js) =====
   Scène 1600 × 900 mise à l'échelle (lo-stage), carte crème unie arrondie sans contour, bouton « Passer ». Préfixe lo-. */
dialog#lorelei-dialog { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; box-sizing: border-box;
  border: 0; background: #07041a; color: #3a2412; overflow: hidden; cursor: default; }
dialog#lorelei-dialog::backdrop { background: rgba(4, 2, 16, .85); }
#lorelei-dialog.lo-load > * { visibility: hidden; }
.lo-stage { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; overflow: hidden; pointer-events: none; }
.lo-stage > * { position: absolute; left: 0; top: 0; transform-origin: 50% 50%; will-change: transform, opacity; }
.lo-stage img { display: block; user-select: none; }
.lo-sky, .lo-alley { width: 1600px; height: 900px; object-fit: cover; }
.lo-alley { -webkit-mask-image: linear-gradient(transparent, #000 16%); mask-image: linear-gradient(transparent, #000 16%); }
.lo-star { width: 4px; height: 4px; border-radius: 50%; background: radial-gradient(circle, #fff, rgba(220, 210, 255, 0) 70%); }
.lo-glow { width: 420px; height: 370px; mix-blend-mode: screen; }
.lo-spark { width: 40px; height: 40px; mix-blend-mode: screen; }
.lo-blue { filter: brightness(1.5) drop-shadow(0 0 7px #3fc0ff) drop-shadow(0 0 3px #3fc0ff); }
.lo-red { filter: brightness(1.5) drop-shadow(0 0 7px #ff3f60) drop-shadow(0 0 3px #ff7a50); }
/* Rubans de la Foire : bande centrale de l'image entre 0 et 58 % de la hauteur, texte centré dessus avec un contour de la couleur du ruban */
.lo-ribbon { width: 640px; height: 112px; }
.lo-ribbon img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lo-ribbon span { position: absolute; left: 12%; right: 12%; top: 29%; transform: translateY(-46%); text-align: center; white-space: nowrap;
  font: normal 36px/1 var(--font-title); color: #fff; letter-spacing: .5px;
  text-shadow: 0 0 2px var(--ink), 0 0 2px var(--ink), 2px 2px 0 var(--ink), -2px 2px 0 var(--ink), 2px -2px 0 var(--ink), -2px -2px 0 var(--ink), 0 3px 0 var(--ink), 0 5px 6px rgba(0, 0, 0, .45); }
.lo-blue-r { --ink: #0a3d78; }
.lo-red-r { --ink: #6d0a18; }
.lo-rival { width: 600px; height: 105px; }
.lo-rival span { font-size: 34px; }
.lo-half-l { clip-path: polygon(0 0, 50% 0, 47.5% 14%, 51.5% 28%, 48% 42%, 51% 58%, 48.5% 72%, 50% 100%, 0 100%); }
.lo-half-r { clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%, 48.5% 72%, 51% 58%, 48% 42%, 51.5% 28%, 47.5% 14%); }
.lo-name { width: 700px; height: 122px; }
.lo-name span { font-size: 46px; }
.lo-role { width: 260px; height: 50px; box-sizing: border-box; border-radius: 25px; background: linear-gradient(#6a2f9a, #3c1764); color: #ffe3a6; display: flex; align-items: center; justify-content: center;
  font: normal 26px/1 var(--font-title); padding-top: 2px; box-shadow: 0 6px 14px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .18); text-shadow: 0 2px 0 #24083e; }
.lo-st { width: 89px; height: 89px; filter: drop-shadow(0 0 8px rgba(255, 214, 110, .85)); }
.lo-pt { width: 62px; height: 62px; mix-blend-mode: screen; }
.lo-stflash, .lo-glint { filter: brightness(1.6) drop-shadow(0 0 10px #ffe08a); }
.lo-coin { width: 40px; height: 40px; background: url(../img/lorelei/pieces.png) 0 0 / 121.9px 121.9px no-repeat; }
.lo-smoke { width: 260px; height: 260px; filter: brightness(1.6); }
.lo-shade { width: 1600px; height: 900px; background: linear-gradient(90deg, rgba(8, 4, 24, .2), rgba(8, 4, 24, .78) 70%); }
.lo-figure { filter: drop-shadow(0 18px 14px rgba(0, 0, 0, .55)); }
.lo-kunai { width: 260px; height: 38px; filter: brightness(1.35) drop-shadow(0 0 6px rgba(230, 200, 255, .95)) drop-shadow(0 4px 4px rgba(0, 0, 0, .5)); transform-origin: 100% 50%; }

.lo-skip { position: absolute; z-index: 4; right: 24px; top: 20px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.lo-skip[hidden] { display: none; }
.lo-card { position: absolute; z-index: 3; left: max(24px, 4vw); bottom: max(24px, 6vh); width: min(600px, 100% - 48px); box-sizing: border-box; padding: 18px 24px; border-radius: 20px; background: #fbf0d8;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .6); font-size: 16px; line-height: 1.4; opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: opacity .35s, transform .45s cubic-bezier(.2, .9, .3, 1.2); }
.lo-card.on { opacity: 1; visibility: visible; transform: none; }
.lo-card h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font: normal 25px/1.15 var(--font-title); color: #6a2c8c; }
.lo-card h2 img { height: 48px; width: auto; flex: none; }
.lo-body p { margin: 0 0 6px; }
.lo-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* Téléphone et fenêtres hautes : carte pleine largeur en bas */
.lo-portrait .lo-card { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 14px 16px; }
.lo-portrait .lo-card h2 { font-size: 22px; }
.lo-portrait .lo-foot .btn { flex: 1 1 auto; }
.lo-portrait .lo-skip { right: 12px; top: 12px; }

/* Images absentes : portrait et carte seuls */
#lorelei-dialog.lo-still { background: radial-gradient(circle at 70% 30%, #5a2c86, #241046 50%, #07041a); }
#lorelei-dialog.lo-still .lo-stage, #lorelei-dialog.lo-still .lo-skip { display: none; }
#lorelei-dialog.lo-still .lo-card, #lorelei-dialog.lo-still .lo-card.on { left: 50%; right: auto; bottom: 50%; width: min(600px, 100% - 24px); transform: translate(-50%, 50%); }
@media (prefers-reduced-motion: reduce) { #lorelei-dialog .lo-card { transition: none !important; } }
html.dark-win #lorelei-dialog .lo-card { background: var(--dw-bg); color: var(--dw-ink); color-scheme: dark; }
html.dark-win #lorelei-dialog .lo-card h2 { color: #d6a8ff; }
