/* ==========================================================================
   VAFM — Hit de l'année (hit.css)
   Même langage visuel que le reste du site : fond blanc / gris clair,
   rouge VAFM, Plus Jakarta Sans, cartes arrondies aux ombres douces.
   Tout est préfixé .hit- pour ne rien casser du reste du site.
   ========================================================================== */

.hit-stage {
    --hit-accent: var(--accent, #E61E2A);
    --hit-dark: var(--text-dark, #121212);
    --hit-muted: var(--text-muted, #6e6e73);
    --hit-gray: var(--light-gray, #f5f5f7);
    --hit-border: var(--border-color, #e5e5ea);
    position: relative;
    color: var(--hit-dark);
}

/* ------------------------------ Bandeau d'intro ------------------------------ */
.hit-hero {
    position: relative; overflow: hidden; text-align: center;
    padding: clamp(30px, 5vw, 60px) clamp(18px, 4vw, 48px);
    border-radius: 28px; border: 1px solid var(--hit-border); margin-bottom: 28px;
    background:
        radial-gradient(620px 320px at 0% 0%, rgba(230, 30, 42, .11), transparent 70%),
        radial-gradient(520px 300px at 100% 100%, rgba(255, 138, 0, .12), transparent 70%),
        var(--hit-gray);
}

/* petites formes de fête qui flottent */
.hit-deco { position: absolute; pointer-events: none; opacity: .85; animation: hit-drift 7s ease-in-out infinite; }
.hit-deco.c { border-radius: 50%; }
.hit-deco.t { width: 0 !important; height: 0 !important; background: none !important; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 12px solid var(--dc, #E61E2A); }
@keyframes hit-drift {
    0%, 100% { transform: translateY(0) rotate(var(--r0, 0deg)); }
    50% { transform: translateY(-14px) rotate(calc(var(--r0, 0deg) + 40deg)); }
}

.hit-hero > *:not(.hit-deco) { position: relative; z-index: 1; }

.hit-kicker {
    display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 999px;
    background: #fff; border: 1px solid var(--hit-border); box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
    font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hit-accent);
}
.hit-kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--hit-accent); animation: hit-pulse 1.8s infinite; }
@keyframes hit-pulse {
    0% { box-shadow: 0 0 0 0 rgba(230, 30, 42, .55); }
    70% { box-shadow: 0 0 0 10px rgba(230, 30, 42, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 30, 42, 0); }
}

.hit-title { margin: 18px 0 12px; font-size: clamp(2rem, 5.4vw, 3.6rem); line-height: 1.05; font-weight: 800; letter-spacing: -.035em; color: var(--hit-dark); }
.hit-title span { color: var(--hit-accent); }
.hit-sub { margin: 0 auto; max-width: 560px; color: var(--hit-muted); font-size: clamp(.92rem, 1.5vw, 1.04rem); line-height: 1.6; font-weight: 500; }

.hit-countdown { display: flex; justify-content: center; gap: 10px; margin: 26px 0 6px; }
.hit-cd-box { min-width: 72px; padding: 14px 8px 11px; text-align: center; border-radius: 16px; background: #fff; border: 1px solid var(--hit-border); box-shadow: 0 6px 18px rgba(0, 0, 0, .04); }
.hit-cd-box b { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hit-cd-box small { display: block; margin-top: 7px; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--hit-muted); font-weight: 700; }
.hit-cd-label { font-size: .8rem; color: var(--hit-muted); margin: 10px 0 0; font-weight: 600; }

.hit-status {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px;
    margin: 22px auto 0; padding: 10px 12px 10px 20px; max-width: 640px; border-radius: 999px;
    background: #fff; border: 1px solid var(--hit-border); box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
    font-size: .92rem; font-weight: 600; text-align: center;
}
.hit-status:not(:has(.hit-btn)) { padding: 12px 22px; }
.hit-status strong { font-weight: 800; }
.hit-status .hit-muted { color: var(--hit-muted); font-weight: 500; }

.hit-btn {
    appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; border-radius: 999px; font: inherit; font-weight: 800; font-size: .88rem; color: #f43434;
    background: var(--hit-accent); box-shadow: 0 8px 22px rgba(230, 30, 42, .28);
    transition: transform .25s var(--transition-smooth, cubic-bezier(.25, 1, .5, 1)), background .25s, box-shadow .25s;
}
.hit-btn:hover { background: var(--accent-hover, #b8141e); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(230, 30, 42, .34); }
.hit-btn:active { transform: scale(.97); }
.hit-btn.ghost { background: #ffd5d5; color: var(--hit-dark); box-shadow: none; border: 1px solid var(--hit-border); }
.hit-btn.ghost:hover { background: var(--hit-gray); box-shadow: none; }
.hit-btn[disabled] { opacity: .55; pointer-events: none; }

.hit-demo-badge { display: inline-block; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px; background: #fff7e0; color: #8a6100; font-size: .72rem; font-weight: 800; border: 1px solid #f3dca0; }

.hit-demo-badge[hidden], .hit-winner[hidden] { display: none; }

.hit-winner {
    margin: 0 auto 28px; max-width: 640px; padding: 26px 22px; text-align: center; border-radius: 24px;
    background: #fff; border: 2px solid var(--hit-accent); box-shadow: 0 16px 40px -14px rgba(230, 30, 42, .35);
}
.hit-winner .crown { display: block; width: 40px; height: 40px; margin: 0 auto 8px; color: var(--hit-accent); animation: hit-float 3s ease-in-out infinite; }
.hit-winner h3 { margin: 4px 0; font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; }
.hit-winner p { margin: 0; color: var(--hit-muted); font-weight: 600; }
@keyframes hit-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.hit-stage svg { display: block; width: 100%; height: 100%; }

/* ------------------------------ Grille de jaquettes ------------------------------ */
.hit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; perspective: 1300px; perspective-origin: 50% 30%; }
@media (max-width: 1024px) { .hit-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
    .hit-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hit-hero { border-radius: 22px; }
    .hit-cd-box { min-width: 62px; }
    .hit-cd-box b { font-size: 1.5rem; }
    .hit-status { border-radius: 22px; }
}

.hit-card {
    position: relative; appearance: none; border: 0; padding: 0; background: none; cursor: pointer;
    text-align: left; color: inherit; font: inherit; transform-style: preserve-3d;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(var(--tz, 0px));
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .45s, filter .45s;
    -webkit-tap-highlight-color: transparent; outline: none;
}
.hit-card:focus-visible .hit-card-face { box-shadow: 0 0 0 3px var(--hit-accent); }

.hit-card-face {
    position: relative; display: block; padding: 10px 10px 16px; border-radius: var(--radius-premium, 16px);
    background: #fff; border: 1px solid var(--hit-border); box-shadow: 0 4px 20px rgba(0, 0, 0, .05);
    transition: box-shadow .35s, border-color .35s;
}
.hit-card:hover .hit-card-face { box-shadow: 0 18px 38px rgba(0, 0, 0, .12); }

/* Jaquette */
.hit-cover {
    position: relative; display: block; aspect-ratio: 1; border-radius: 11px; overflow: hidden;
    background: linear-gradient(135deg, #ececf0, #dcdce2);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.hit-cover-ph {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 800; letter-spacing: -.05em; color: rgba(0, 0, 0, .12);
}
.hit-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s, transform .6s var(--transition-smooth, ease); }
.hit-cover img.is-loaded { opacity: 1; }
.hit-card:hover .hit-cover img.is-loaded { transform: scale(1.05); }
.hit-cover:not(.is-ready)::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .6) 50%, transparent 80%);
    transform: translateX(-100%); animation: hit-shimmer 1.4s infinite;
}
@keyframes hit-shimmer { to { transform: translateX(100%); } }

/* reflet qui suit le pointeur */
.hit-sheen { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .5), transparent 55%); opacity: 0; transition: opacity .3s; z-index: 2; border-radius: inherit; }
.hit-card:hover .hit-sheen { opacity: 1; }

.hit-card-num {
    position: absolute; top: 8px; left: 8px; z-index: 3; padding: 4px 9px; border-radius: 999px;
    background: rgba(18, 18, 18, .72); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .06em;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.hit-card-badge {
    position: absolute; left: 8px; bottom: 8px; z-index: 3; display: none; padding: 5px 10px; border-radius: 999px;
    background: var(--hit-accent); color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .04em;
    box-shadow: 0 4px 12px rgba(230, 30, 42, .45);
}
.hit-card.is-mine .hit-card-badge { display: inline-block; }

.hit-card-crown {
    position: absolute; top: 8px; right: 8px; z-index: 3; width: 30px; height: 30px; padding: 6px; border-radius: 50%;
    background: #fff; color: var(--hit-accent); box-shadow: 0 4px 12px rgba(0, 0, 0, .2); display: none; animation: hit-float 3s ease-in-out infinite;
}
.hit-card.is-leader .hit-card-crown { display: block; }

.hit-card-text { display: block; padding: 13px 4px 0; }
.hit-card-name { display: block; font-weight: 800; font-size: clamp(.9rem, 1.4vw, 1.02rem); line-height: 1.2; letter-spacing: -.01em; }
.hit-card-artist { display: block; margin-top: 4px; color: var(--hit-muted); font-size: clamp(.76rem, 1.1vw, .86rem); font-weight: 600; }

.hit-card-stat { display: none; align-items: center; gap: 10px; padding: 12px 4px 0; }
.hit-card-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--hit-gray); overflow: hidden; }
.hit-card-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--hit-accent); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.hit-card-pct { font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 46px; text-align: right; }
.hit-grid.show-stats .hit-card-stat { display: flex; }
.hit-card.is-leader .hit-card-bar i { background: linear-gradient(90deg, var(--hit-accent), #ff8a00); }

/* Sélection */
.hit-card.is-picked { --tz: 70px; z-index: 5; }
.hit-card.is-picked .hit-card-face {
    animation: hit-pick .9s cubic-bezier(.2, .9, .25, 1.1) both;
    border-color: var(--hit-accent); box-shadow: 0 0 0 2px var(--hit-accent), 0 28px 50px -14px rgba(230, 30, 42, .5);
}
@keyframes hit-pick {
    0% { transform: rotateY(0) scale(1); }
    55% { transform: rotateY(220deg) scale(1.1); }
    100% { transform: rotateY(360deg) scale(1.04); }
}
.hit-grid.has-pick .hit-card:not(.is-picked) { --tz: -70px; opacity: .4; filter: grayscale(.8); }
.hit-grid.is-locked .hit-card { cursor: default; }

/* ------------------------------ Barre de confirmation ------------------------------ */
.hit-confirm {
    position: fixed; left: 50%; bottom: 110px; z-index: 99990; width: min(580px, calc(100vw - 24px));
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px 14px 14px 22px; border-radius: 22px; color: var(--hit-dark, #121212);
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid #e5e5ea; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35);
    transform: translate(-50%, 140%) rotateX(40deg); opacity: 0; pointer-events: none;
    transition: transform .5s cubic-bezier(.2, .9, .25, 1.1), opacity .35s;
}
.hit-confirm.is-open { transform: translate(-50%, 0) rotateX(0); opacity: 1; pointer-events: auto; }
.hit-confirm b { display: block; font-size: 1rem; font-weight: 800; }
.hit-confirm small { color: #6e6e73; font-weight: 600; font-size: .78rem; }
.hit-confirm-actions { display: flex; gap: 8px; }

/* ------------------------------ Classement ------------------------------ */
.hit-results {
    margin-top: 32px; padding: clamp(16px, 3vw, 30px); border-radius: 24px; background: #fff;
    border: 1px solid var(--hit-border); box-shadow: 0 10px 40px rgba(0, 0, 0, .05); transform-origin: 50% 0;
}
.hit-results[hidden] { display: none; }
.hit-results.reveal { animation: hit-reveal 1s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes hit-reveal {
    from { opacity: 0; transform: perspective(1200px) rotateX(-30deg) translateY(40px); }
    to { opacity: 1; transform: perspective(1200px) rotateX(0) translateY(0); }
}
.hit-results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hit-results-head h3 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.hit-live { width: 9px; height: 9px; border-radius: 50%; background: #20c25a; animation: hit-pulse-green 1.8s infinite; }
@keyframes hit-pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(32, 194, 90, .6); }
    70% { box-shadow: 0 0 0 10px rgba(32, 194, 90, 0); }
    100% { box-shadow: 0 0 0 0 rgba(32, 194, 90, 0); }
}
.hit-total { font-size: .84rem; color: var(--hit-muted); font-weight: 700; }

.hit-rows { position: relative; display: flex; flex-direction: column; gap: 8px; }
.hit-row {
    display: grid; grid-template-columns: 30px 52px 1fr auto; align-items: center; gap: 14px; padding: 10px 14px 10px 10px;
    border-radius: 16px; background: var(--hit-gray); border: 1px solid transparent;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1), background .3s;
}
.hit-row.is-mine { border-color: var(--hit-dark); background: #fff; }
.hit-row.is-leader { background: #fff1f2; border-color: rgba(230, 30, 42, .45); }
.hit-row-rank { font-weight: 800; font-size: 1rem; text-align: center; color: var(--hit-muted); }
.hit-row.is-leader .hit-row-rank { color: var(--hit-accent); }
.hit-row .hit-cover { width: 52px; border-radius: 10px; box-shadow: 0 3px 10px rgba(0, 0, 0, .14); }
.hit-row .hit-cover-ph { font-size: 1.1rem; }
.hit-row-main { min-width: 0; }
.hit-row-name { display: block; font-weight: 800; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hit-row-name em { font-style: normal; font-weight: 600; color: var(--hit-muted); }
.hit-row-bar { height: 7px; border-radius: 99px; background: #e5e5ea; margin-top: 8px; overflow: hidden; }
.hit-row-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--hit-dark); transition: width 1.3s cubic-bezier(.2, .8, .2, 1); }
.hit-row.is-leader .hit-row-bar i { background: linear-gradient(90deg, var(--hit-accent), #ff8a00); }
.hit-row-val { text-align: right; font-variant-numeric: tabular-nums; line-height: 1.2; }
.hit-row-val b { display: block; font-size: 1.02rem; font-weight: 800; }
.hit-row-val small { color: var(--hit-muted); font-size: .74rem; font-weight: 700; }
@media (max-width: 520px) {
    .hit-row { grid-template-columns: 24px 44px 1fr auto; gap: 10px; padding: 9px; }
    .hit-row .hit-cover { width: 44px; }
}

/* ------------------------------ Célébration plein écran ------------------------------ */
.hit-celebrate {
    position: fixed; inset: 0; z-index: 100002; display: grid; place-items: center; perspective: 1400px; overflow: hidden;
    background:
        radial-gradient(ellipse 55% 55% at 50% 45%, rgba(230, 30, 42, .16), transparent 70%),
        rgba(255, 255, 255, .9);
    backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    color: #121212; opacity: 0; animation: hit-fade-in .45s ease forwards;
}
.hit-celebrate.is-leaving { animation: hit-fade-out .5s ease forwards; }
@keyframes hit-fade-in { to { opacity: 1; } }
@keyframes hit-fade-out { from { opacity: 1; } to { opacity: 0; } }

.hit-scene { position: relative; transform-style: preserve-3d; display: grid; place-items: center; width: 100%; height: 100%; }

.hit-big { --w: min(290px, 64vw); position: relative; width: var(--w); transform-style: preserve-3d; animation: hit-big-in 1.5s cubic-bezier(.2, .85, .25, 1) both; }
.hit-big.idle { animation: hit-big-idle 5s ease-in-out infinite; }
@keyframes hit-big-in {
    0% { transform: translate3d(var(--fx, 0), var(--fy, 0), 0) scale(var(--fs, .3)) rotateY(0); }
    55% { transform: translate3d(0, -10px, 260px) scale(1.06) rotateY(720deg) rotateX(8deg); }
    100% { transform: translate3d(0, 0, 120px) scale(1) rotateY(720deg) rotateX(0); }
}
@keyframes hit-big-idle {
    0%, 100% { transform: translate3d(0, 0, 120px) rotateY(-14deg) rotateX(5deg); }
    50% { transform: translate3d(0, -14px, 150px) rotateY(14deg) rotateX(-4deg); }
}
.hit-big-face { position: relative; display: block; padding: 12px 12px 18px; border-radius: 22px; background: #fff; box-shadow: 0 50px 80px -24px rgba(0, 0, 0, .45), 0 0 0 1px #e5e5ea, 0 0 0 5px rgba(230, 30, 42, .18); }
.hit-big-face .hit-cover { border-radius: 14px; }
.hit-big-face .hit-cover-ph { font-size: 6rem; }
.hit-big-face .hit-card-name { font-size: 1.2rem; }
.hit-big-face .hit-card-artist { font-size: .92rem; }
.hit-big::before { content: ""; position: absolute; inset: 0; border-radius: 22px; background: #d9d9de; transform: translateZ(-10px); }
.hit-big::after { content: ""; position: absolute; inset: 0; border-radius: 22px; background: #bdbdc4; transform: translateZ(-20px); }

.hit-ring {
    position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 50%;
    border: 3px solid #E61E2A; transform: rotateX(72deg) scale(.2); opacity: 0;
    animation: hit-ring 2.3s cubic-bezier(.1, .7, .3, 1) infinite;
}
.hit-ring:nth-child(2) { animation-delay: .55s; }
.hit-ring:nth-child(3) { animation-delay: 1.1s; }
@keyframes hit-ring {
    0% { transform: rotateX(72deg) scale(.2); opacity: 0; }
    12% { opacity: .85; }
    100% { transform: rotateX(72deg) scale(5.2); opacity: 0; }
}

.hit-confetti { position: absolute; left: 50%; top: 50%; width: var(--cw, 10px); height: var(--ch, 16px); background: var(--cc, #E61E2A); border-radius: 2px; opacity: 0; transform-style: preserve-3d; will-change: transform, opacity; }

.hit-celebrate-text {
    position: absolute; left: 0; right: 0; bottom: max(7vh, 40px); text-align: center; padding: 0 20px;
    opacity: 0; transform: translateY(24px); animation: hit-text-in .8s .95s cubic-bezier(.2, .9, .25, 1) forwards;
}
.hit-celebrate-text h3 { margin: 0 0 6px; font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.035em; }
.hit-celebrate-text p { margin: 0 0 18px; color: #6e6e73; font-weight: 600; }
@keyframes hit-text-in { to { opacity: 1; transform: translateY(0); } }
.hit-celebrate-text .hit-btn { opacity: 0; animation: hit-text-in .6s 2.2s ease forwards; }

.hit-toast {
    position: fixed; left: 50%; bottom: 120px; z-index: 100003; transform: translate(-50%, 20px); opacity: 0;
    padding: 12px 20px; border-radius: 14px; background: #121212; color: #fff; font-weight: 600; font-size: .9rem;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .5); transition: transform .4s cubic-bezier(.2, .9, .25, 1.1), opacity .3s;
    max-width: calc(100vw - 32px); text-align: center;
}
.hit-toast.is-open { transform: translate(-50%, 0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .hit-deco, .hit-kicker i, .hit-ring, .hit-live, .hit-winner .crown, .hit-card-crown, .hit-cover:not(.is-ready)::after { animation: none !important; }
    .hit-big { animation: none !important; transform: translate3d(0, 0, 0); }
    .hit-card.is-picked .hit-card-face { animation: none !important; }
    .hit-confetti { display: none; }
    .hit-results.reveal { animation: none; }
}