/* V432 — L'UNIVERS DE CHAQUE CHAMPION SUR LE DISQUE-SÉLECTEUR (src/ui/encre-univers.js,
   src/content/univers-champions-v432.js). Liée après selection-disque.css, avant paysage-mobile.css.

   · .scd-univers : plein écran, sous le corps de l'écran ; il porte la couche de l'univers installé,
     et pendant une propagation la couche entrante (dévoilée par clip-path) et le front d'encre.
   · l'écriture : un élément marqué data-ecrit-v432 qui a pris l'univers porte data-u et les
     variables --u-* (police d'affiche, couleurs) posées par le moteur ; u-encre = le saignement.
   · les effets : une animation légère par univers (transform / opacité / position de fond :
     rien qui recalcule la page), coupée en mouvement réduit. */

.scd-univers { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: strict; }
/* V433 — Les effets n'animent que transform et opacity (plus de background-position, qui repeignait
   le fond entier à chaque image). */
.scd-u-couche, .scd-u-encre { position: absolute; inset: 0; }
/* (Essayé : un calque par couche, will-change. En composition logicielle la cadence s'effondre — mesuré
   médiane 83 à 116 ms — : pas de will-change ici.) */
.scd-u-couche { background-color: #030608; background-size: cover, cover; background-position: center, center; background-repeat: no-repeat, no-repeat; }
.scd-u-encre { opacity: 0.92; }
/* V433 — Une encre interrompue se fige (encre-univers.js) : ses animations s'arrêtent, sinon le fond
   animé serait repeint à travers son contour à chaque image. */
.scd-u-couche.figee *, .scd-u-couche.figee *::before, .scd-u-couche.figee *::after { animation: none !important; }
.scd-u-effet, .scd-u-voile { position: absolute; inset: 0; }
/* Le voile : l'univers assombri au centre et aux bords, pour que le champion et l'écriture se lisent. */
.scd-u-voile { background: radial-gradient(ellipse 34% 52% at 50% 44%, rgba(0, 0, 0, 0.18), transparent 70%), radial-gradient(ellipse 80% 75% at 50% 46%, transparent 40%, rgba(0, 0, 0, 0.62)); }
.scd-u-goutte { position: absolute; z-index: 3; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid var(--u-lisere, #fff); box-shadow: 0 0 18px var(--u-lisere, #fff); animation: scd-u-goutte 0.65s cubic-bezier(0.15, 0.8, 0.3, 1) forwards; }
@keyframes scd-u-goutte { from { transform: scale(0.2); opacity: 1; } to { transform: scale(10); opacity: 0; border-width: 1px; } }
/* Le petit rebond du champion quand l'encre part de lui (écrasé, puis dépasse, puis revient). */
#selectionChampionsV279 .scd-idle.scd-pop { transform-origin: 50% 100%; animation: scd-pop 0.55s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes scd-pop { 0% { scale: 1.06 0.93; } 45% { scale: 0.97 1.04; } 100% { scale: 1 1; } }

/* Le changeur et le sommaire sur un fond sombre : l'univers passe derrière sans gêner la lecture. */
#selectionChampionsV279 .scd-changeur { padding: 8px; border-radius: 10px; background: linear-gradient(180deg, rgba(3, 6, 8, 0.86), rgba(3, 6, 8, 0.74)); }

/* ------------------------------------------------------------------ l'écriture prise par l'univers */
.scd-nom-bloc[data-u] .scd-nom {
  font-family: var(--u-police), Barlow, sans-serif; font-weight: 400;
  font-size: calc(clamp(34px, 4.2vw, 60px) * var(--u-taille, 1)); line-height: 1.02;
  color: var(--u-nom); text-shadow: var(--u-ombre); text-transform: var(--u-casse, uppercase); letter-spacing: 0.01em; padding: 0.06em 0.1em 0.1em;
}
.scd-nom-bloc[data-u] .scd-titre { color: var(--u-accent); text-shadow: 1px 1px 0 #000; }
.scd-nom-bloc[data-u] .scd-titre em { font-family: var(--u-texte), Barlow, sans-serif; font-style: normal; color: var(--u-texte-couleur); text-shadow: 1px 1px 0 #000, 0 0 6px #000, 0 0 2px #000; }
.scd-lcd[data-u] { background: var(--u-panneau); border-color: var(--u-bord); box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(0, 0, 0, 0.55), 0 0 24px color-mix(in srgb, var(--u-bord) 30%, transparent); }
.scd-lcd[data-u] .scd-lcd-tete { color: color-mix(in srgb, var(--u-accent) 70%, #000); }
.scd-lcd[data-u] .scd-lcd-lecture { color: var(--u-accent); }
.scd-lcd[data-u] .scd-piste-n { color: var(--u-accent); text-shadow: none; }
.scd-lcd[data-u] .scd-piste-ligne { border-top-color: color-mix(in srgb, var(--u-bord) 35%, transparent); }
.scd-lcd[data-u] .scd-piste-ligne b { font-family: var(--u-police), Barlow, sans-serif; font-size: calc(17px * var(--u-taille, 1)); line-height: 1.2; letter-spacing: 0.02em; color: var(--u-nom); text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.85); text-transform: var(--u-casse, uppercase); }
.scd-lcd[data-u] .scd-piste-ligne b i { margin-left: 6px; font: 400 11px var(--u-texte), Barlow, sans-serif; letter-spacing: 0.06em; color: var(--u-accent); text-transform: uppercase; }
.scd-lcd[data-u] .scd-piste-ligne p { font-family: var(--u-texte), Barlow, sans-serif; color: var(--u-texte-couleur); }
.scd-bonus[data-u] { background: var(--u-panneau); border-color: var(--u-bord); }
.scd-bonus[data-u] .scd-bonus-titre { font-family: var(--u-police), Barlow, sans-serif; font-size: calc(14px * var(--u-taille, 1)); letter-spacing: 0.04em; color: var(--u-nom); text-transform: var(--u-casse, uppercase); }
/* Le saignement : l'écriture arrive floue et un peu grosse, comme l'encre qui prend sur le papier. */
.u-encre { animation: scd-u-saigne 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
@keyframes scd-u-saigne { 0% { filter: blur(7px); opacity: 0.15; transform: scale(1.04); } 55% { filter: blur(0); opacity: 1; } 100% { transform: scale(1); } }

/* Quelques touches propres à une affiche. */
.scd-nom-bloc[data-u="lady_compact"] .scd-nom { background: linear-gradient(90deg, #59ecff, #ff5ec8 35%, #8a5cff 65%, #c9e6ff); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.9)); }
.scd-nom-bloc[data-u="capitaine_corner"] .scd-nom { -webkit-text-stroke: 2px #000; transform: rotate(-3deg) skewX(-6deg); }
.scd-nom-bloc[data-u="don_pellicula"] .scd-nom { letter-spacing: 0.03em; }
.scd-nom-bloc[data-u="flux"] .scd-nom { animation: scd-u-hante 4s steps(1) infinite; }
@keyframes scd-u-hante { 0%, 88%, 100% { translate: 0 0; opacity: 1; } 89% { translate: -4px 0; opacity: 0.6; } 91% { translate: 3px 0; } 93% { translate: 0 0; opacity: 1; } }

/* ------------------------------------------------------------------ les effets des fonds */
/* Don : vieux film (grain qui saute, rayures, scintillement du projecteur). */
.scd-u-couche[data-univers="don_pellicula"] .scd-u-effet {
  inset: -60px;
  background:
    linear-gradient(90deg, transparent 0 31%, rgba(255, 236, 200, 0.16) 31% 31.12%, transparent 31.12% 68%, rgba(0, 0, 0, 0.3) 68% 68.08%, transparent 68.08%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.85 0 0 0 0 0.72 0 0 0 0 0.5 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  opacity: 0.5; animation: scd-u-grain 0.42s steps(3) infinite, scd-u-projecteur 2.8s steps(1) infinite;
}
@keyframes scd-u-grain { 0% { transform: translate(0, 0); } 33% { transform: translate(37px, 23px); } 66% { transform: translate(-22px, -31px); } 100% { transform: translate(11px, 12px); } }
@keyframes scd-u-projecteur { 0%, 100% { opacity: 0.5; } 17% { opacity: 0.38; } 23% { opacity: 0.55; } 61% { opacity: 0.42; } }
/* Funky : les faisceaux de la boule à facettes qui balaient la salle. */
.scd-u-couche[data-univers="funky_45"] .scd-u-effet { inset: -60% -30% 0; transform-origin: 50% 0; background: conic-gradient(from 150deg at 50% 0, transparent 0 8deg, rgba(255, 194, 58, 0.16) 9deg 12deg, transparent 13deg 22deg, rgba(255, 61, 154, 0.14) 23deg 26deg, transparent 27deg 38deg, rgba(150, 80, 255, 0.14) 39deg 42deg, transparent 43deg 60deg); animation: scd-u-balaye 9s ease-in-out infinite alternate; }
@keyframes scd-u-balaye { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
/* Mister VHS : la bande de tracking qui descend. */
.scd-u-couche[data-univers="mister_vhs"] .scd-u-effet { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px); }
.scd-u-couche[data-univers="mister_vhs"] .scd-u-effet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12%; background: linear-gradient(transparent, rgba(255, 255, 255, 0.05) 30%, rgba(255, 240, 220, 0.16) 50%, rgba(255, 255, 255, 0.04) 70%, transparent); animation: scd-u-tracking 5.5s linear infinite; }
@keyframes scd-u-tracking { from { transform: translateY(-120%); } to { transform: translateY(850%); } }
/* Player One : lignes de balayage et horizon qui pulse. */
.scd-u-couche[data-univers="player_one"] .scd-u-effet { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0 2px, transparent 2px 4px), radial-gradient(ellipse 60% 18% at 50% 62%, rgba(255, 90, 90, 0.22), transparent 70%); animation: scd-u-pulse 2.4s ease-in-out infinite; }
@keyframes scd-u-pulse { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
/* Floppy : la pluie de données. */
.scd-u-couche[data-univers="floppy"] .scd-u-effet { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='260'%3E%3Cdefs%3E%3ClinearGradient id='p' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%235dff8a' stop-opacity='0'/%3E%3Cstop offset='0.85' stop-color='%235dff8a' stop-opacity='0.35'/%3E%3Cstop offset='1' stop-color='%23d8ffe4' stop-opacity='0.9'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='8' y='10' width='3' height='120' fill='url(%23p)'/%3E%3Crect x='46' y='120' width='3' height='90' fill='url(%23p)'/%3E%3Crect x='77' y='40' width='3' height='150' fill='url(%23p)'/%3E%3Crect x='104' y='170' width='3' height='70' fill='url(%23p)'/%3E%3C/svg%3E"); inset: -260px 0 0; opacity: 0.55; animation: scd-u-pluie 3.2s linear infinite; }
@keyframes scd-u-pluie { from { transform: translateY(0); } to { transform: translateY(260px); } }
/* Lady Compact : lasers en éventail et stroboscope. */
.scd-u-couche[data-univers="lady_compact"] .scd-u-effet { inset: 0 -40% -40%; transform-origin: 50% 100%; background: conic-gradient(from -40deg at 50% 100%, transparent 0 6deg, rgba(89, 236, 255, 0.2) 6.5deg 7.2deg, transparent 8deg 18deg, rgba(255, 94, 200, 0.2) 18.5deg 19.2deg, transparent 20deg 31deg, rgba(138, 92, 255, 0.22) 31.5deg 32.2deg, transparent 33deg 45deg, rgba(89, 236, 255, 0.18) 45.5deg 46.2deg, transparent 47deg 80deg); animation: scd-u-lasers 6s ease-in-out infinite alternate, scd-u-strobo 3.6s steps(1) infinite; }
@keyframes scd-u-lasers { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
@keyframes scd-u-strobo { 0%, 92%, 100% { filter: none; } 93% { filter: brightness(2.2); } 95% { filter: none; } 96% { filter: brightness(1.8); } }
/* Capitaine Corner : la trame de points et l'éclat qui tourne. */
.scd-u-couche[data-univers="capitaine_corner"] .scd-u-effet { background: radial-gradient(circle, rgba(0, 0, 0, 0.22) 1.6px, transparent 2px) 0 0 / 9px 9px; }
.scd-u-couche[data-univers="capitaine_corner"] .scd-u-voile::before { content: ""; position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 210, 74, 0.1) 0 6deg, transparent 6deg 15deg); animation: scd-u-eclat 40s linear infinite; }
@keyframes scd-u-eclat { to { transform: rotate(360deg); } }
/* Plug : néons qui grésillent et pluie en biais. */
.scd-u-couche[data-univers="plug"] .scd-u-effet { inset: -100px 0 0 -40px; background: repeating-linear-gradient(105deg, transparent 0 46px, rgba(160, 230, 255, 0.12) 46px 47px, transparent 47px 90px); animation: scd-u-averse 1.4s linear infinite, scd-u-neon 3.3s steps(1) infinite; }
@keyframes scd-u-averse { from { transform: translate(0, 0); } to { transform: translate(-24px, 90px); } }
@keyframes scd-u-neon { 0%, 100% { opacity: 1; } 41% { opacity: 0.6; } 43% { opacity: 1; } 71% { opacity: 0.75; } 72% { opacity: 1; } }
/* Sire Blu : rayons de lumière et poussière qui monte. */
.scd-u-couche[data-univers="sire_blu"] .scd-u-effet { background: linear-gradient(112deg, transparent 0 40%, rgba(200, 220, 255, 0.1) 44%, transparent 50%, transparent 58%, rgba(255, 220, 140, 0.08) 61%, transparent 66%); animation: scd-u-pulse 5s ease-in-out infinite; }
.scd-u-couche[data-univers="sire_blu"] .scd-u-effet::before { content: ""; position: absolute; inset: 0 0 -360px; background: radial-gradient(circle, rgba(255, 230, 160, 0.5) 1px, transparent 1.6px) 0 0 / 70px 90px; animation: scd-u-poussiere 14s linear infinite; }
@keyframes scd-u-poussiere { from { transform: translate(0, 0); } to { transform: translate(30px, -360px); } }
/* Flux : la neige de la télé et la barre qui roule. */
.scd-u-couche[data-univers="flux"] .scd-u-effet {
  inset: -40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.75 0 0 0 0 0.95 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.32; animation: scd-u-neige 0.3s steps(3) infinite;
}
.scd-u-couche[data-univers="flux"] .scd-u-voile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 16%; background: linear-gradient(transparent, rgba(190, 250, 255, 0.12), transparent); animation: scd-u-roule 4s linear infinite; }
@keyframes scd-u-roule { from { transform: translateY(-120%); } to { transform: translateY(650%); } }
@keyframes scd-u-neige { 0% { transform: translate(0, 0); } 33% { transform: translate(-23px, 17px); } 66% { transform: translate(19px, -11px); } 100% { transform: translate(0, 0); } }

/* Téléphone en paysage : l'écriture d'affiche à la taille de l'afficheur réduit. */
@media (max-height: 560px) {
  .scd-nom-bloc[data-u] .scd-nom { font-size: calc(26px * var(--u-taille, 1)); }
  .scd-lcd[data-u] .scd-piste-ligne b { font-size: calc(12px * var(--u-taille, 1)); }
  .scd-lcd[data-u] .scd-piste-ligne b i { font-size: 8px; }
  .scd-bonus[data-u] .scd-bonus-titre { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .scd-univers *, .u-encre, #selectionChampionsV279 .scd-idle.scd-pop, .scd-nom-bloc[data-u] .scd-nom { animation: none !important; }
}
