/* Intro d'affrontement (versus.js) : bandes en biais aux couleurs des camps, héros en pose de combat,
   éclairs sur les coupes, « VS » qui s'écrase avec un éclair blanc et une secousse */
.versus {
    position: absolute; inset: 0; z-index: 40; overflow: hidden; cursor: pointer;
    background: radial-gradient(ellipse at 50% 50%, #2a1f6a, #07061a 75%);
    animation: versus-shake 0.45s 1.4s ease-out;
}
.versus.leaving { animation: versus-out 0.42s ease-in forwards; }
@keyframes versus-out { to { opacity: 0; transform: scale(1.08); } }
@keyframes versus-shake {
    10% { transform: translate(-1.6cqw, 1cqw); } 25% { transform: translate(1.4cqw, -1.2cqw); }
    45% { transform: translate(-1cqw, 0.6cqw); } 70% { transform: translate(0.6cqw, -0.4cqw); }
}
.versus-band {
    position: absolute; inset: 0; clip-path: var(--clip);
    background:
        repeating-linear-gradient(115deg, rgb(255 255 255 / 0.05) 0 1.2cqw, transparent 1.2cqw 3.6cqw),
        radial-gradient(ellipse at 30% 50%, color-mix(in srgb, var(--color) 85%, white), color-mix(in srgb, var(--color) 55%, #0a0820) 70%);
    animation: band-in 0.5s var(--delay) cubic-bezier(.2, 1.2, .4, 1) both;
}
.versus-band.from-left { --from: -110%; }
.versus-band.from-right { --from: 110%; }
@keyframes band-in { from { transform: translateX(var(--from)); } }
/* Lignes de vitesse qui défilent dans chaque bande */
.versus-band::after {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, transparent 0 2.4cqw, rgb(255 255 255 / 0.12) 2.4cqw 2.6cqw);
    animation: speed-lines 0.6s linear infinite; mix-blend-mode: overlay;
}
@keyframes speed-lines { to { transform: translateX(-12cqw); } }
.versus-hero {
    position: absolute; z-index: 1; object-fit: contain; filter: drop-shadow(0 0 3cqw rgb(0 0 0 / 0.6)) drop-shadow(0 0 1.4cqw var(--color));
    animation: hero-in 0.6s calc(var(--delay) + 0.15s) cubic-bezier(.2, 1.3, .4, 1) both, hero-idle 2.4s 1.6s ease-in-out infinite;
}
.from-left .versus-hero { left: -4%; width: 62%; }
.from-right .versus-hero { right: -4%; width: 62%; transform: scaleX(-1); }
.versus-hero.portrait { width: 44%; border-radius: 50%; }
.from-left .versus-hero.portrait { left: 6%; }
.from-right .versus-hero.portrait { right: 6%; }
@keyframes hero-in { from { opacity: 0; translate: 0 6cqw; scale: 0.8; } }
@keyframes hero-idle { 50% { translate: 0 -1cqw; } }
.versus-text { position: absolute; z-index: 2; max-width: 54%; transform: translateY(-50%); animation: text-in 0.5s calc(var(--delay) + 0.35s) ease-out both; }
.versus-text.from-left { right: 5%; text-align: right; }
.versus-text.from-right { left: 5%; text-align: left; }
.versus-rank { height: 1.5em; width: auto; vertical-align: -0.38em; margin-inline-end: 0.2em; filter: drop-shadow(0 0.4cqw 0.6cqw rgb(0 0 0 / 0.5)); }
/* 3 ou 4 joueurs : bandes basses, textes resserrés pour tenir dans la bande */
.versus-text.compact .versus-name { font-size: 6.4cqw; }
.versus-text.compact .versus-label { margin-top: 0.4cqw; font-size: 2.8cqw; }
.versus-text.compact .versus-stats { margin-top: 0.6cqw; font-size: 2.6cqw; }
.versus-text.compact .versus-cry { margin-top: 0.8cqw; padding: 1cqw 2cqw; font-size: 3cqw; }
@keyframes text-in { from { opacity: 0; translate: 0 3cqw; } }
.versus-name {
    font: 8cqw/1 var(--font-display, "Lilita One", sans-serif); color: #fff8e7;
    text-shadow: 0 0.6cqw 0 #2a1450, 0 0 2.4cqw var(--color), 0 0 0.8cqw var(--color);
}
.versus-label { margin-top: 0.8cqw; font: 900 3.2cqw/1.2 var(--font-body, sans-serif); color: #fff1b8; text-shadow: 0 0.3cqw 0 #2a1450; }
.versus-cry {
    display: inline-block; margin-top: 1.6cqw; padding: 1.6cqw 2.8cqw; border-radius: 2.4cqw;
    background: #fffaf0; color: #2a1d12; font: 900 3.6cqw/1.25 var(--font-body, sans-serif);
    box-shadow: 0 0 0 0.5cqw var(--color), 0 1cqw 2cqw rgb(0 0 0 / 0.4);
    animation: cry-pop 0.4s calc(var(--delay) + 1.5s) cubic-bezier(.2, 1.5, .4, 1) both;
}
@keyframes cry-pop { from { opacity: 0; scale: 0.4; } }
.versus-bolts { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.versus-bolts path { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: bolt-draw 0.25s 1.3s ease-out forwards, bolt-flicker 0.15s 1.6s steps(2) 6; }
.bolt-glow { stroke: #9fd4ff; stroke-width: 1.6; filter: blur(0.6px); opacity: 0.8; }
.bolt-core { stroke: #ffffff; stroke-width: 0.5; }
@keyframes bolt-draw { to { stroke-dashoffset: 0; } }
@keyframes bolt-flicker { 50% { opacity: 0.3; } }
.versus-flash { position: absolute; inset: 0; z-index: 4; background: #fff; opacity: 0; pointer-events: none; animation: vs-flash 0.5s 1.4s ease-out; }
@keyframes vs-flash { 0% { opacity: 0.9; } 100% { opacity: 0; } }
.versus-vs {
    position: absolute; left: 50%; top: 50%; z-index: 5; translate: -50% -50%;
    font: 30cqw/1 var(--font-display, "Lilita One", sans-serif); letter-spacing: -0.06em; color: #fff1b8;
    -webkit-text-stroke: 1cqw #8a5a12; paint-order: stroke fill;
    text-shadow: 0 1.2cqw 0 #5a3608, 0 0 6cqw rgb(255 210 120 / 0.95), 0 0 14cqw rgb(140 190 255 / 0.9);
    animation: vs-slam 0.35s 1.05s cubic-bezier(.5, 0, .7, 1.6) both, vs-pulse 1.2s 1.5s ease-in-out infinite;
}
@keyframes vs-slam { from { opacity: 0; scale: 3.4; rotate: -18deg; } to { opacity: 1; scale: 1; rotate: -8deg; } }
@keyframes vs-pulse { 0%, 100% { scale: 1; rotate: -8deg; } 50% { scale: 1.08; rotate: -6deg; } }
@media (prefers-reduced-motion: reduce) {
    .versus, .versus-band, .versus-hero, .versus-text, .versus-cry, .versus-vs, .versus-bolts path, .versus-band::after { animation-duration: 0.01s; animation-delay: 0s; animation-iteration-count: 1; }
}
.versus-stats {
    display: inline-block; margin-top: 1cqw; padding: 0.8cqw 2cqw; border-radius: 99cqw;
    background: rgb(10 8 40 / 0.7); box-shadow: inset 0 0 0 0.35cqw #e8b84a; color: #fff1b8;
    font: 900 3cqw/1.2 var(--font-body, sans-serif); letter-spacing: 0.02em;
}
