/* ============================================================
   CASES.CSS — Caisses style CS2 (theme Luvreizel)
   Bandes défilantes, tiers colorés, modal résultat.
   Scoped sous body.theme-luv.
   ============================================================ */

/* ── Couleurs des tiers ──────────────────────────────────── */
body.theme-luv {
    --tier-common:     #9aa3b2;
    --tier-uncommon:   #4b8bff;
    --tier-rare:       #2563ff;
    --tier-epic:       #a855f7;
    --tier-legendary:  #ff5b3a;
    --tier-mythical:   #ffb800;
}

/* ── Animations ──────────────────────────────────────────── */

@keyframes caseCardFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes caseGlowPulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--case-accent, rgba(255,138,31,0.0)); }
    50%      { box-shadow: 0 0 22px 4px var(--case-accent, rgba(255,138,31,0.4)); }
}

@keyframes caseShineSweep {
    0%   { transform: translateX(-100%) skewX(-22deg); opacity: 0; }
    35%  { opacity: 0.7; }
    100% { transform: translateX(220%) skewX(-22deg); opacity: 0; }
}

@keyframes caseWinFlash {
    0%   { background: rgba(255, 255, 255, 0); }
    35%  { background: rgba(255, 255, 255, 0.18); }
    100% { background: rgba(255, 255, 255, 0); }
}

@keyframes caseTickHit {
    0%   { opacity: 0.0; transform: scaleY(0.6); }
    25%  { opacity: 1.0; transform: scaleY(1.1); }
    100% { opacity: 0.0; transform: scaleY(0.4); }
}

@keyframes caseResultIn {
    0%   { opacity: 0; transform: translateY(28px) scale(0.94); }
    60%  { opacity: 1; transform: translateY(-2px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0)   scale(1); }
}

@keyframes caseOverlayIn {
    0%   { opacity: 0; backdrop-filter: blur(0px); }
    100% { opacity: 1; backdrop-filter: blur(14px); }
}

@keyframes caseSparkleDrift {
    0%   { opacity: 0; transform: translate(0, 0) scale(0.4); }
    20%  { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--sx, 60px), var(--sy, -80px)) scale(0); }
}

@keyframes caseRingPulse {
    0%   { transform: scale(0.7); opacity: 0.8; }
    100% { transform: scale(2.4); opacity: 0; }
}

@keyframes caseChipSpin {
    0%   { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* ── Vue Index — liste des caisses ───────────────────────── */

body.theme-luv .cases-index {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

body.theme-luv .cases-index__header {
    text-align: center;
    margin-bottom: 28px;
}

body.theme-luv .cases-index__title {
    font-family: var(--luv-font-heading);
    font-weight: 800;
    font-size: 32px;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--luv-text);
}

body.theme-luv .cases-index__subtitle {
    color: var(--luv-text-dim);
    font-size: 14.5px;
    max-width: 560px;
    margin: 0 auto;
}

body.theme-luv .cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

body.theme-luv .case-card {
    --case-accent: #ff8a1f;
    position: relative;
    isolation: isolate;
    background: linear-gradient(180deg, var(--luv-card) 0%, rgba(12, 18, 32, 0.92) 100%);
    border: 1px solid var(--luv-line);
    border-radius: var(--luv-r-md);
    padding: 22px 18px 18px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1),
                border-color 0.22s ease,
                box-shadow 0.22s ease;
}

body.theme-luv .case-card__bg {
    /* Background d'ambiance de la caisse — image src injectée via JS
       (style="background-image:url(...)"). Suffisamment net pour qu'on
       distingue le design, mais avec un voile sombre + radial vignette
       pour préserver le contraste texte. */
    position: absolute;
    inset: -18px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(2.5px) brightness(0.62) saturate(1.30) contrast(1.05);
    opacity: 1;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.32s ease, filter 0.32s ease, transform 0.32s ease;
    will-change: transform, opacity, filter;
}

body.theme-luv .case-card__bg::after {
    /* voile sombre — laisse respirer le haut de l'image de fond et tombe
       franchement vers le noir dans le tiers bas, là où vit le bouton de mise
       (le contraste de l'orange doit rester clair sur n'importe quel bg). */
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(7, 12, 22, 0.08) 0%,
            rgba(7, 12, 22, 0.28) 40%,
            rgba(7, 12, 22, 0.72) 78%,
            rgba(7, 12, 22, 0.94) 100%),
        radial-gradient(ellipse at 50% 40%, transparent 0%, rgba(7, 12, 22, 0.22) 80%);
}

body.theme-luv .case-card:hover .case-card__bg {
    filter: blur(1.5px) brightness(0.72) saturate(1.40) contrast(1.08);
    transform: scale(1.04);
}

body.theme-luv .case-card::before {
    /* sweep brillant au hover */
    content: "";
    position: absolute;
    inset: -50% -20% auto auto;
    width: 60%;
    height: 220%;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.10) 50%, transparent 70%);
    transform: translateX(-220%) skewX(-22deg);
    pointer-events: none;
    z-index: 2;
}

body.theme-luv .case-card::after {
    /* halo accent au hover */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, var(--case-accent) 0%, transparent 65%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
    z-index: 0;
}

body.theme-luv .case-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--case-accent) 60%, var(--luv-line));
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6),
                0 0 0 1px color-mix(in srgb, var(--case-accent) 30%, transparent);
}

body.theme-luv .case-card:hover::before {
    animation: caseShineSweep 0.95s ease-out;
}

body.theme-luv .case-card:hover::after {
    opacity: 0.22;
}

body.theme-luv .case-card__img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    margin-bottom: 16px;
    z-index: 1;
}

body.theme-luv .case-card__img-wrap::before {
    /* halo derrière l'icône */
    content: "";
    position: absolute;
    inset: 22% 22%;
    background: radial-gradient(circle, var(--case-accent) 0%, transparent 70%);
    opacity: 0.35;
    filter: blur(20px);
    z-index: 0;
}

body.theme-luv .case-card__img {
    position: relative;
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.55));
    animation: caseCardFloat 4.5s ease-in-out infinite;
    z-index: 1;
}

body.theme-luv .case-card__name {
    font-family: var(--luv-font-heading);
    font-weight: 800;
    font-size: 18px;
    margin: 0 0 4px;
    color: var(--luv-text);
    text-align: center;
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

body.theme-luv .case-card__desc {
    font-size: 12.5px;
    color: var(--luv-text-mute);
    text-align: center;
    margin: 0 0 16px;
    min-height: 32px;
    position: relative;
    z-index: 1;
}

body.theme-luv .case-card__rarity-strip {
    display: flex;
    gap: 3px;
    margin-bottom: 14px;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

body.theme-luv .case-card__rarity-strip > span {
    flex: 1;
    background: var(--tier-common);
}
body.theme-luv .case-card__rarity-strip > span.tier-common    { background: var(--tier-common); }
body.theme-luv .case-card__rarity-strip > span.tier-uncommon  { background: var(--tier-uncommon); }
body.theme-luv .case-card__rarity-strip > span.tier-rare      { background: var(--tier-rare); }
body.theme-luv .case-card__rarity-strip > span.tier-epic      { background: var(--tier-epic); }
body.theme-luv .case-card__rarity-strip > span.tier-legendary { background: var(--tier-legendary); }
body.theme-luv .case-card__rarity-strip > span.tier-mythical  { background: var(--tier-mythical); }

body.theme-luv .case-card__cost {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(255, 138, 31, 0.10);
    border: 1px solid rgba(255, 138, 31, 0.30);
    border-radius: var(--luv-r-sm);
    font-weight: 700;
    color: var(--luv-orange);
    font-size: 15px;
    position: relative;
    z-index: 1;
}

body.theme-luv .case-card__cost .luvcoin-icon {
    height: 18px;
    width: auto;
}

/* ── Vue Détail ──────────────────────────────────────────── */

body.theme-luv .case-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

body.theme-luv .case-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    margin-bottom: 16px;
    background: var(--luv-card);
    border: 1px solid var(--luv-line);
    border-radius: var(--luv-r-sm);
    color: var(--luv-text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

body.theme-luv .case-back:hover {
    color: var(--luv-orange);
    border-color: rgba(255, 138, 31, 0.4);
}

body.theme-luv .case-detail__head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--luv-card) 0%, rgba(12, 18, 32, 0.88) 100%);
    border: 1px solid var(--luv-line);
    border-radius: var(--luv-r-md);
    margin-bottom: 18px;
}

body.theme-luv .case-detail__icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45));
}

body.theme-luv .case-detail__title {
    font-family: var(--luv-font-heading);
    font-weight: 800;
    font-size: 22px;
    margin: 0 0 3px;
    color: var(--luv-text);
}

body.theme-luv .case-detail__desc {
    font-size: 13px;
    color: var(--luv-text-mute);
    margin: 0;
}

/* ── Contrôles multi-open / quick (avant le bouton OUVRIR) ─ */

body.theme-luv .case-cta-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

body.theme-luv .case-count-picker {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: rgba(10, 20, 40, 0.55);
    border: 1px solid var(--luv-line);
    border-radius: 10px;
}

body.theme-luv .case-count-btn {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--luv-text-mute);
    font-family: var(--luv-font-body);
    font-weight: 700;
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    letter-spacing: 0.02em;
}

body.theme-luv .case-count-btn:hover:not(.case-count-btn--active) {
    color: var(--luv-text);
    background: rgba(255, 255, 255, 0.04);
}

body.theme-luv .case-count-btn--active {
    background: linear-gradient(180deg, #ffa040 0%, #ff7a0a 100%);
    color: #0a1428;
    box-shadow: 0 2px 8px -2px rgba(255, 138, 31, 0.55),
                inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.theme-luv .case-quick-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    color: var(--luv-text-mute);
    padding: 4px 4px 4px 6px;
    border-radius: 8px;
    transition: color 0.15s ease;
}

body.theme-luv .case-quick-toggle:hover {
    color: var(--luv-text);
}

body.theme-luv .case-quick-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

body.theme-luv .case-quick-toggle__pill {
    width: 28px;
    height: 16px;
    background: rgba(10, 20, 40, 0.85);
    border: 1px solid var(--luv-line);
    border-radius: 999px;
    position: relative;
    transition: background 0.18s ease, border-color 0.18s ease;
}

body.theme-luv .case-quick-toggle__dot {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--luv-text-mute);
    transition: transform 0.2s cubic-bezier(0.5, 1.6, 0.5, 1), background 0.18s ease;
}

body.theme-luv .case-quick-toggle input:checked ~ .case-quick-toggle__pill {
    background: linear-gradient(135deg, #ffa040 0%, #ff7a0a 100%);
    border-color: transparent;
}

body.theme-luv .case-quick-toggle input:checked ~ .case-quick-toggle__pill .case-quick-toggle__dot {
    transform: translateX(12px);
    background: #fff;
}

body.theme-luv .case-quick-toggle__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

body.theme-luv .case-quick-toggle__label svg {
    color: var(--luv-orange);
}

body.theme-luv .case-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    background: linear-gradient(180deg, #ffa040 0%, #ff7a0a 100%);
    border: none;
    border-radius: var(--luv-r-sm);
    color: #0a1428;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 6px 16px -4px rgba(255, 138, 31, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.12s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

body.theme-luv .case-open-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px -4px rgba(255, 138, 31, 0.65),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    filter: brightness(1.05);
}

body.theme-luv .case-open-btn:active:not(:disabled) {
    transform: translateY(0);
}

body.theme-luv .case-open-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.4);
}

body.theme-luv .case-open-btn__label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.theme-luv .case-open-btn__cost {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(10, 20, 40, 0.85);
    color: #ffd56b;
    border-radius: 6px;
    font-weight: 800;
    font-size: 13.5px;
}

body.theme-luv .case-open-btn__cost .luvcoin-icon {
    height: 16px;
    width: auto;
}

/* ── Bobine défilante (animation CS2) ────────────────────── */

body.theme-luv .case-roulette {
    position: relative;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 138, 31, 0.10) 0%, transparent 60%),
        linear-gradient(180deg, #0d1626 0%, #060a14 100%);
    border: 1px solid var(--luv-line);
    border-radius: var(--luv-r-md);
    height: 220px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 14px rgba(0, 0, 0, 0.55);
}

/* Mode multi : on empile N mini-bobines verticalement, height auto. */
body.theme-luv .case-roulette--multi {
    height: auto;
    padding: 12px;
    overflow: visible;
}

body.theme-luv .case-multi-reels {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.theme-luv .case-multi-reels .case-reel-mask {
    position: relative;
    inset: auto;
    height: 110px;
    border-radius: 8px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 138, 31, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, #101c30 0%, #07101e 100%);
    overflow: hidden;
}

body.theme-luv .case-multi-reels .case-reel-mask::before,
body.theme-luv .case-multi-reels .case-reel-mask::after {
    width: 60px;
}

body.theme-luv .case-multi-reels .case-reel-mask::before {
    background: linear-gradient(90deg, #07101e 0%, transparent 100%);
}
body.theme-luv .case-multi-reels .case-reel-mask::after {
    background: linear-gradient(-90deg, #07101e 0%, transparent 100%);
}

body.theme-luv .case-multi-reels .case-reel__center-line {
    top: 6px;
    bottom: 6px;
    width: 2px;
}

/* Items réduits dans les mini-bobines pour tenir dans 110px de hauteur */
body.theme-luv .case-multi-reels .case-reel-item {
    width: 92px;
    height: 96px;
    margin: 0 4px;
    padding: 8px 6px 9px;
}

body.theme-luv .case-multi-reels .case-reel-item img {
    width: 50px;
    height: 50px;
}

body.theme-luv .case-multi-reels .case-reel-item__label {
    font-size: 10.5px;
    margin-top: 3px;
}

/* On masque le pointer top/bottom de la zone parente quand on est en multi
   (chaque mini-reel a déjà sa center-line). */
body.theme-luv .case-roulette--multi > .case-reel__pointer { display: none; }

@media (max-width: 720px) {
    body.theme-luv .case-multi-reels .case-reel-item {
        width: 78px;
        height: 86px;
    }
    body.theme-luv .case-multi-reels .case-reel-item img {
        width: 42px;
        height: 42px;
    }
}

body.theme-luv .case-roulette__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--luv-text-mute);
    text-align: center;
    padding: 20px;
}

body.theme-luv .case-roulette__placeholder svg {
    color: var(--luv-orange);
    opacity: 0.7;
}

body.theme-luv .case-roulette__placeholder p {
    font-size: 13.5px;
    margin: 0;
}

/* Masque qui contient la bobine défilante */
body.theme-luv .case-reel-mask {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Fondu sur les bords (gauche/droite) */
body.theme-luv .case-reel-mask::before,
body.theme-luv .case-reel-mask::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 110px;
    pointer-events: none;
    z-index: 3;
}
body.theme-luv .case-reel-mask::before {
    left: 0;
    background: linear-gradient(90deg, #060a14 0%, transparent 100%);
}
body.theme-luv .case-reel-mask::after {
    right: 0;
    background: linear-gradient(-90deg, #060a14 0%, transparent 100%);
}

body.theme-luv .case-reel {
    display: flex;
    align-items: center;
    height: 100%;
    will-change: transform;
}

/* Repère central */
body.theme-luv .case-reel__center-line {
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ff8a1f 0%, #ffd56b 50%, #ff8a1f 100%);
    border-radius: 2px;
    box-shadow: 0 0 14px rgba(255, 138, 31, 0.7),
                0 0 28px rgba(255, 138, 31, 0.45);
    z-index: 4;
    pointer-events: none;
}

body.theme-luv .case-reel__pointer {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #ff8a1f;
    filter: drop-shadow(0 0 6px rgba(255, 138, 31, 0.7));
    z-index: 5;
}

body.theme-luv .case-reel__pointer--top {
    top: 0;
}

body.theme-luv .case-reel__pointer--bottom {
    bottom: 0;
}

/* Item dans la bobine */
body.theme-luv .case-reel-item {
    --tier-color: var(--tier-common);
    --prize-glow: var(--tier-color);
    flex: 0 0 auto;
    width: 150px;
    height: 180px;
    margin: 0 6px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.25) 100%),
        linear-gradient(180deg, #1a253b 0%, #0f1828 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px 14px;
}

body.theme-luv .case-reel-item::before {
    /* barre de couleur en bas */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--tier-color);
    box-shadow: 0 0 10px var(--tier-color);
}

body.theme-luv .case-reel-item::after {
    /* halo de couleur derrière */
    content: "";
    position: absolute;
    inset: auto 12% 18% 12%;
    height: 60%;
    background: radial-gradient(circle, var(--prize-glow) 0%, transparent 70%);
    opacity: 0.22;
    filter: blur(14px);
    z-index: 0;
    pointer-events: none;
}

body.theme-luv .case-reel-item img {
    position: relative;
    width: 88px;
    height: 88px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 10px var(--prize-glow))
        drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
    z-index: 1;
}

body.theme-luv .case-reel-item__label {
    position: relative;
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--luv-text);
    text-align: center;
    z-index: 1;
    line-height: 1.2;
}

body.theme-luv .case-reel-item.tier-common    { --tier-color: var(--tier-common); }
body.theme-luv .case-reel-item.tier-uncommon  { --tier-color: var(--tier-uncommon); }
body.theme-luv .case-reel-item.tier-rare      { --tier-color: var(--tier-rare); }
body.theme-luv .case-reel-item.tier-epic      { --tier-color: var(--tier-epic); }
body.theme-luv .case-reel-item.tier-legendary { --tier-color: var(--tier-legendary); }
body.theme-luv .case-reel-item.tier-mythical  { --tier-color: var(--tier-mythical); }

/* État "winner" : l'item au centre quand la bobine s'arrête */
body.theme-luv .case-reel-item.is-winner {
    border-color: var(--tier-color);
    box-shadow: 0 0 0 1px var(--tier-color),
                0 0 22px var(--tier-color),
                inset 0 0 18px rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.35s ease;
}

/* Flash blanc qui balaye la zone quand on s'arrête */
body.theme-luv .case-roulette.is-flash::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    animation: caseWinFlash 0.55s ease-out;
}

/* ── Tableau des prix ────────────────────────────────────── */

body.theme-luv .case-prizes {
    background: linear-gradient(180deg, var(--luv-card) 0%, rgba(12, 18, 32, 0.85) 100%);
    border: 1px solid var(--luv-line);
    border-radius: var(--luv-r-md);
    padding: 18px 20px 22px;
}

body.theme-luv .case-prizes__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

body.theme-luv .case-prizes__head h3 {
    font-family: var(--luv-font-heading);
    font-weight: 800;
    font-size: 16px;
    margin: 0;
    color: var(--luv-text);
}

body.theme-luv .case-prizes__hint {
    font-size: 12px;
    color: var(--luv-text-mute);
}

body.theme-luv .case-prizes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

body.theme-luv .case-prize {
    --tier-color: var(--tier-common);
    --prize-glow: var(--tier-color);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 18px 10px 12px;
    overflow: hidden;
    min-height: 140px;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

body.theme-luv .case-prize:hover {
    transform: translateY(-2px);
    border-color: var(--tier-color);
}

body.theme-luv .case-prize::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--tier-color);
    box-shadow: 0 0 8px var(--tier-color);
    z-index: 2;
}

body.theme-luv .case-prize::after {
    /* halo coloré différencié derrière l'image */
    content: "";
    position: absolute;
    top: 18px;
    left: 50%;
    width: 80px;
    height: 80px;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--prize-glow) 0%, transparent 70%);
    opacity: 0.22;
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}

/* Pas de halo sur les tickets / chips physiques : l'asset porte déjà l'identité. */
body.theme-luv .case-prize.kind-phys::after { display: none; }
body.theme-luv .case-prize.kind-phys img    { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55)); }

body.theme-luv .case-prize.tier-common    { --tier-color: var(--tier-common); }
body.theme-luv .case-prize.tier-uncommon  { --tier-color: var(--tier-uncommon); }
body.theme-luv .case-prize.tier-rare      { --tier-color: var(--tier-rare); }
body.theme-luv .case-prize.tier-epic      { --tier-color: var(--tier-epic); }
body.theme-luv .case-prize.tier-legendary { --tier-color: var(--tier-legendary); }
body.theme-luv .case-prize.tier-mythical  { --tier-color: var(--tier-mythical); }

body.theme-luv .case-prize img {
    position: relative;
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
    margin-bottom: 8px;
    filter:
        drop-shadow(0 0 8px var(--prize-glow))
        drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
    z-index: 1;
}

body.theme-luv .case-prize__label {
    position: relative;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--luv-text);
    line-height: 1.25;
    margin-bottom: 4px;
    z-index: 1;
}

body.theme-luv .case-prize__chance {
    position: relative;
    font-size: 11px;
    color: var(--luv-text-mute);
    font-variant-numeric: tabular-nums;
    margin-top: auto;
    z-index: 1;
}

body.theme-luv .case-prize.tier-mythical .case-prize__chance,
body.theme-luv .case-prize.tier-legendary .case-prize__chance {
    color: var(--tier-color);
    font-weight: 700;
}

/* ── Modal résultat ──────────────────────────────────────── */

body.theme-luv .case-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 16, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: caseOverlayIn 0.35s ease-out;
}

body.theme-luv .case-result-modal {
    --tier-color: var(--tier-common);
    position: relative;
    width: 100%;
    max-width: 480px;
    background:
        radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--tier-color) 22%, transparent) 0%, transparent 55%),
        linear-gradient(180deg, #1a253b 0%, #0a1224 100%);
    border: 1px solid color-mix(in srgb, var(--tier-color) 50%, var(--luv-line));
    border-radius: 18px;
    padding: 32px 28px 26px;
    text-align: center;
    box-shadow:
        0 30px 60px -20px rgba(0, 0, 0, 0.8),
        0 0 0 1px color-mix(in srgb, var(--tier-color) 30%, transparent),
        0 0 60px -10px color-mix(in srgb, var(--tier-color) 60%, transparent);
    animation: caseResultIn 0.45s cubic-bezier(0.2, 0.7, 0.2, 1.2);
    overflow: hidden;
}

body.theme-luv .case-result-modal.tier-common    { --tier-color: var(--tier-common); }
body.theme-luv .case-result-modal.tier-uncommon  { --tier-color: var(--tier-uncommon); }
body.theme-luv .case-result-modal.tier-rare      { --tier-color: var(--tier-rare); }
body.theme-luv .case-result-modal.tier-epic      { --tier-color: var(--tier-epic); }
body.theme-luv .case-result-modal.tier-legendary { --tier-color: var(--tier-legendary); }
body.theme-luv .case-result-modal.tier-mythical  { --tier-color: var(--tier-mythical); }

body.theme-luv .case-result-modal__sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.theme-luv .case-result-modal__sparkles span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tier-color);
    box-shadow: 0 0 6px var(--tier-color);
    animation: caseSparkleDrift 1.4s ease-out forwards;
}

body.theme-luv .case-result-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--luv-text-mute);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    z-index: 3;
}

body.theme-luv .case-result-modal__close:hover {
    color: var(--luv-text);
    background: rgba(255, 255, 255, 0.1);
}

body.theme-luv .case-result-modal__top {
    position: relative;
    z-index: 1;
}

body.theme-luv .case-result-modal__eyebrow {
    display: inline-block;
    padding: 4px 12px;
    background: color-mix(in srgb, var(--tier-color) 15%, transparent);
    color: var(--tier-color);
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

body.theme-luv .case-result-modal__title {
    font-family: var(--luv-font-heading);
    font-weight: 800;
    font-size: 26px;
    color: var(--luv-text);
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

body.theme-luv .case-result-modal__prize {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 22px 0 8px;
    z-index: 1;
}

/* Cercle pulsé retiré : trop visuellement agité sur le modal résultat,
   le drop-shadow + le glow custom suffisent. Pseudo conservé pour
   compatibilité éventuelle mais désactivé. */
body.theme-luv .case-result-modal__prize::before {
    display: none;
}

body.theme-luv .case-result-modal__prize img {
    position: relative;
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 20px var(--prize-glow, var(--tier-color)))
        drop-shadow(0 12px 24px color-mix(in srgb, var(--tier-color) 55%, rgba(0,0,0,0.4)));
    z-index: 1;
}

body.theme-luv .case-result-modal__prize-label {
    position: relative;
    font-size: 19px;
    font-weight: 800;
    color: var(--luv-text);
    z-index: 1;
}

body.theme-luv .case-result-modal__code-wrap {
    position: relative;
    margin-top: 18px;
    padding: 14px 14px 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px dashed color-mix(in srgb, var(--tier-color) 50%, var(--luv-line));
    border-radius: 12px;
    z-index: 1;
}

body.theme-luv .case-result-modal__code-label {
    display: block;
    font-size: 11px;
    color: var(--luv-text-mute);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

body.theme-luv .case-result-modal__code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

body.theme-luv .case-result-modal__code {
    font-family: var(--luv-font-mono);
    font-size: 19px;
    font-weight: 700;
    color: var(--tier-color);
    background: rgba(0, 0, 0, 0.45);
    padding: 8px 14px;
    border-radius: 8px;
    letter-spacing: 0.05em;
    user-select: all;
}

body.theme-luv .case-result-modal__copy {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--luv-text);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

body.theme-luv .case-result-modal__copy:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--tier-color);
    color: var(--tier-color);
}

body.theme-luv .case-result-modal__copy.is-copied {
    color: #14c46a;
    border-color: #14c46a;
}

body.theme-luv .case-result-modal__claim-info {
    font-size: 12px;
    color: var(--luv-text-dim);
    margin: 10px 0 0;
    line-height: 1.45;
}

body.theme-luv .case-result-modal__claim-info strong {
    color: var(--luv-text);
}

/* ── Multi-open : grid de résultats dans le modal ────────── */

@keyframes caseMultiCellIn {
    0%   { opacity: 0; transform: translateY(14px) scale(0.92); }
    60%  { opacity: 1; transform: translateY(-2px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0)    scale(1); }
}

body.theme-luv .case-result-modal__multi {
    width: 100%;
    margin-top: 8px;
    position: relative;
    z-index: 1;
}

body.theme-luv .case-result-modal__multi-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    align-items: baseline;
    padding: 10px 14px;
    margin-bottom: 14px;
    background: rgba(10, 20, 40, 0.55);
    border: 1px solid var(--luv-line);
    border-radius: 10px;
    font-size: 13px;
    color: var(--luv-text-mute);
}

body.theme-luv .case-result-modal__multi-summary strong {
    color: var(--luv-text);
    font-weight: 800;
    font-size: 18px;
    margin-right: 4px;
}

body.theme-luv .case-result-modal__multi-summary .case-result-modal__multi-sum-lp strong {
    color: #ffd56b;
}

body.theme-luv .case-result-modal__multi-summary .case-result-modal__multi-sum-phys strong {
    color: var(--tier-mythical);
}

body.theme-luv .case-result-modal__multi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

body.theme-luv .case-result-modal__multi-cell {
    --tier-color: var(--tier-common);
    --prize-glow: var(--tier-color);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 6px 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.30) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    animation: caseMultiCellIn 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

body.theme-luv .case-result-modal__multi-cell.tier-common    { --tier-color: var(--tier-common); }
body.theme-luv .case-result-modal__multi-cell.tier-uncommon  { --tier-color: var(--tier-uncommon); }
body.theme-luv .case-result-modal__multi-cell.tier-rare      { --tier-color: var(--tier-rare); }
body.theme-luv .case-result-modal__multi-cell.tier-epic      { --tier-color: var(--tier-epic); }
body.theme-luv .case-result-modal__multi-cell.tier-legendary { --tier-color: var(--tier-legendary); }
body.theme-luv .case-result-modal__multi-cell.tier-mythical  { --tier-color: var(--tier-mythical); }

body.theme-luv .case-result-modal__multi-cell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--tier-color);
    box-shadow: 0 0 8px var(--tier-color);
}

body.theme-luv .case-result-modal__multi-cell::after {
    content: "";
    position: absolute;
    top: 12px;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--prize-glow) 0%, transparent 70%);
    opacity: 0.25;
    filter: blur(8px);
    pointer-events: none;
    z-index: 0;
}

body.theme-luv .case-result-modal__multi-cell.kind-phys::after { display: none; }

body.theme-luv .case-result-modal__multi-cell img {
    position: relative;
    width: 44px;
    height: 44px;
    object-fit: contain;
    margin-bottom: 5px;
    filter:
        drop-shadow(0 0 7px var(--prize-glow))
        drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    z-index: 1;
}

body.theme-luv .case-result-modal__multi-cell.kind-phys img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

body.theme-luv .case-result-modal__multi-cell-label {
    position: relative;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--luv-text);
    line-height: 1.2;
    z-index: 1;
}

body.theme-luv .case-result-modal__multi-codes {
    margin-top: 16px;
    padding: 12px 14px;
    background: rgba(255, 138, 31, 0.06);
    border: 1px solid rgba(255, 138, 31, 0.25);
    border-radius: 10px;
}

body.theme-luv .case-result-modal__multi-codes-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--luv-text);
}

body.theme-luv .case-result-modal__multi-codes-hint {
    font-size: 11px;
    color: var(--luv-text-mute);
    font-weight: 500;
}

body.theme-luv .case-result-modal__multi-codes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

body.theme-luv .case-result-modal__multi-codes-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: rgba(10, 20, 40, 0.65);
    border-radius: 7px;
    font-size: 12.5px;
}

body.theme-luv .case-result-modal__multi-codes-row code {
    flex: 1;
    font-family: var(--luv-font-mono);
    color: var(--luv-orange);
    font-weight: 700;
    letter-spacing: 0.05em;
}

body.theme-luv .case-result-modal__multi-codes-row .case-result-modal__multi-codes-prize {
    color: var(--luv-text-mute);
}

body.theme-luv .case-result-modal__multi-codes-row button {
    appearance: none;
    border: 1px solid rgba(255, 138, 31, 0.4);
    background: rgba(255, 138, 31, 0.10);
    color: var(--luv-orange);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

body.theme-luv .case-result-modal__multi-codes-row button:hover {
    background: rgba(255, 138, 31, 0.20);
}

@media (max-width: 720px) {
    body.theme-luv .case-result-modal__multi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    body.theme-luv .case-result-modal__multi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    body.theme-luv .case-cta-controls {
        align-items: stretch;
    }
    body.theme-luv .case-count-picker {
        justify-content: space-around;
    }
}

body.theme-luv .case-result-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    position: relative;
    z-index: 1;
}

body.theme-luv .case-result-modal__again,
body.theme-luv .case-result-modal__home {
    flex: 1;
    padding: 11px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}

body.theme-luv .case-result-modal__again {
    background: linear-gradient(180deg, #ffa040 0%, #ff7a0a 100%);
    border: none;
    color: #0a1428;
    box-shadow: 0 6px 14px -4px rgba(255, 138, 31, 0.5);
}

body.theme-luv .case-result-modal__again:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

body.theme-luv .case-result-modal__home {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--luv-line);
    color: var(--luv-text);
}

body.theme-luv .case-result-modal__home:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 138, 31, 0.4);
}

/* ── Petite "toast" d'erreur ─────────────────────────────── */

body.theme-luv .case-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #c2233a;
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13.5px;
    box-shadow: 0 12px 24px -6px rgba(194, 35, 58, 0.6);
    z-index: 9500;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1.2);
    pointer-events: none;
}

body.theme-luv .case-toast.is-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 720px) {
    body.theme-luv .case-detail__head {
        grid-template-columns: auto 1fr;
    }
    body.theme-luv .case-detail__cta {
        grid-column: 1 / -1;
    }
    body.theme-luv .case-open-btn {
        width: 100%;
        justify-content: center;
    }
    body.theme-luv .case-roulette {
        height: 180px;
    }
    /* En mode multi (x5/x10) la zone doit s'étendre selon le nombre de mini-
       bobines empilées — sinon les bobines débordent et overlap par-dessus
       le panneau "Prix possibles" qui suit dans le flow. */
    body.theme-luv .case-roulette.case-roulette--multi {
        height: auto;
    }
    body.theme-luv .case-reel-item {
        width: 120px;
        height: 150px;
    }
    body.theme-luv .case-reel-item img {
        width: 70px;
        height: 70px;
    }
    body.theme-luv .cases-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Cibles tactiles ≥44px sur mobile (audit UI/UX 06/2026) ── */
@media (max-width: 768px) {
    body.theme-luv .case-count-btn {
        min-height: 44px;
        min-width: 44px;
    }
}
