/* ==========================================================================
   FCSM Deck — feuille de style
   Nuit de match : fond bleu-nuit, jaune Sochaux, bleu Peugeot, cartes holo.
   ========================================================================== */

:root {
    --ground: #0b0d14;
    --ground-2: #0f1220;
    --surface: #151a2b;
    --surface-2: #1c2238;
    --line: rgba(232, 236, 255, 0.09);
    --line-strong: rgba(232, 236, 255, 0.16);
    --text: #f3f1e8;
    --muted: #a7adc2;
    --faint: #7b8199;

    --yellow: #ffd21f;
    --yellow-deep: #e9b800;
    --on-yellow: #12141c;
    --blue: #2f5bff;
    --blue-soft: #8aa6ff;

    --r-base: #9aa2b6;
    --r-commune: #5fcf95;
    --r-rare: #58a0ff;
    --r-epique: #b67dff;
    --r-legendaire: #ffbe3b;
    --r-unique: #ff5a7e;

    --ok: #5fcf95;
    --danger: #ff6b6b;

    --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
    --font-body: "Barlow", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;

    --radius: 14px;
    --radius-sm: 9px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-1: 0 2px 6px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 6px 14px rgba(0, 0, 0, 0.4), 0 30px 60px rgba(0, 0, 0, 0.45);

    color-scheme: dark;
    accent-color: var(--yellow);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-color: #2a3150 var(--ground); }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(47, 91, 255, 0.16), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(255, 210, 31, 0.06), transparent 60%),
        var(--ground);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

::selection { background: var(--yellow); color: var(--on-yellow); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: #2a3150; border-radius: 99px; border: 3px solid var(--ground); }

img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--yellow); }
code { font-family: var(--font-mono); font-size: 0.85em; background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 5px; word-break: break-all; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--yellow); color: var(--on-yellow); padding: 0.5rem 1rem; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 1rem; }
.ta-r { text-align: right; }
.muted { color: var(--muted); }
.num { font-family: var(--font-mono); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.icon { flex: none; }

/* ---------- Typographie ---------- */

.page-title, .section-title, .hero__title, .closer h2 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.005em;
    line-height: 0.92;
    text-wrap: balance;
    margin: 0;
}
.page-title { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.section-title { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }

/* ---------- Boutons ---------- */

.btn {
    --bg: var(--surface-2);
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    min-height: 48px; padding: 0 1.4rem;
    border-radius: 999px; border: 1px solid transparent;
    background: var(--bg); color: var(--text);
    font: 700 1rem/1 var(--font-body);
    letter-spacing: 0.01em;
    text-decoration: none; cursor: pointer;
    transition: transform 0.25s var(--ease-out), background-color 0.2s, box-shadow 0.25s var(--ease-out), border-color 0.2s;
}
.btn:hover { color: var(--text); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn--primary { --bg: var(--yellow); color: var(--on-yellow); box-shadow: 0 6px 20px rgba(255, 210, 31, 0.22); }
.btn--primary:hover { color: var(--on-yellow); background: #ffdc4d; box-shadow: 0 10px 28px rgba(255, 210, 31, 0.32); }
.btn--ghost { background: transparent; border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn--sm { min-height: 40px; padding: 0 1.05rem; font-size: 0.9375rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.iconbtn {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 999px;
    border: 1px solid var(--line); background: transparent; color: var(--muted);
    cursor: pointer; transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.iconbtn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }

/* ---------- En-tête ---------- */

.topbar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(11, 13, 20, 0.78);
    backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand:hover { color: var(--text); }
.brand__mark { width: 34px; height: 34px; transition: transform 0.4s var(--ease-out); }
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.06); }
.brand__word { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: 0.01em; text-transform: uppercase; line-height: 1; }
.brand__word b { color: var(--yellow); font-weight: 800; }
.brand__word--sm { font-size: 1.3rem; }

.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav__link {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 0.85rem; border-radius: 999px;
    color: var(--muted); font-weight: 600; text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav__link.is-on { color: var(--text); background: var(--surface-2); }
.nav__link.is-on .icon { color: var(--yellow); }
.nav__user {
    display: inline-grid; place-items: center; width: 36px; height: 36px; margin-left: 0.4rem;
    border-radius: 999px; background: var(--blue); color: #fff;
    font: 800 0.95rem/1 var(--font-display); letter-spacing: 0.03em;
}
.nav__logout { margin: 0; }

/* ---------- Messages ---------- */

.toast {
    position: fixed; z-index: 60; left: 50%; top: 84px; translate: -50% 0;
    display: flex; align-items: center; gap: 0.6rem;
    max-width: min(560px, calc(100% - 2rem));
    padding: 0.8rem 1.1rem; border-radius: 12px;
    background: var(--surface-2); border: 1px solid var(--line-strong);
    box-shadow: var(--shadow-1); font-weight: 600;
    animation: toast-in 0.5s var(--ease-out), toast-out 0.5s ease-in 5s forwards;
}
.toast--success .icon { color: var(--ok); }
.toast--error .icon { color: var(--danger); }
.toast--info .icon { color: var(--yellow); }
@keyframes toast-in { from { opacity: 0; translate: -50% -12px; } }
@keyframes toast-out { to { opacity: 0; translate: -50% -12px; visibility: hidden; } }

/* ==========================================================================
   Accueil
   ========================================================================== */

.hero {
    overflow-x: clip;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center; gap: clamp(2rem, 5vw, 4rem);
    padding-block: clamp(3rem, 8vw, 6.5rem) clamp(3rem, 7vw, 5rem);
}
.hero__title { font-size: clamp(3.2rem, 7.4vw, 6rem); }
.hero__title::after { /* soulignement jaune, comme une bande de maillot */
    content: ""; display: block; width: 4.5rem; height: 0.4rem; margin-top: 1.4rem; border-radius: 99px;
    background: linear-gradient(90deg, var(--yellow) 0 62%, var(--blue) 62%);
}
.hero__lead { max-width: 54ch; margin: 1.5rem 0 0; color: #cfd2de; font-size: 1.15rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 0.5rem 2.75rem; margin: 2.75rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.hero__stats dt { font: 700 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); }
.hero__stats dd { margin: 0.45rem 0 0; font: 700 1.5rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }

.hero__fan { position: relative; height: clamp(420px, 44vw, 520px); }
.hero__slot { position: absolute; top: 50%; left: 50%; transition: transform 0.6s var(--ease-out); }
.hero__slot .fcard { --w: clamp(220px, 23vw, 290px); }
.hero__slot--0 { transform: translate(-108%, -50%) rotate(-11deg) translateY(16px); z-index: 1; }
.hero__slot--1 { transform: translate(-72%, -50%) rotate(-3deg); z-index: 2; }
.hero__slot--2 { transform: translate(-28%, -52%) rotate(6deg); z-index: 3; }
.hero__fan:hover .hero__slot--0 { transform: translate(-122%, -50%) rotate(-14deg) translateY(20px); }
.hero__fan:hover .hero__slot--2 { transform: translate(-16%, -54%) rotate(9deg); }
.hero__slot:only-child { transform: translate(-50%, -50%) rotate(-3deg); }

/* Étapes */
.steps { padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line); }
.steps__list { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem; margin: 2.5rem 0 0; padding: 0; }
.steps__list li { counter-increment: step; position: relative; padding-top: 3.6rem; }
.steps__list li::before {
    content: counter(step); position: absolute; top: 0; left: 0;
    display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px;
    background: var(--surface-2); border: 1px solid var(--line-strong);
    font: 800 1.35rem/1 var(--font-display); color: var(--yellow);
}
.steps__list li:not(:last-child)::after { /* le fil qui relie les étapes */
    content: ""; position: absolute; top: 1.3rem; left: 3.4rem; right: -1.7rem; height: 1px;
    background: linear-gradient(90deg, var(--line-strong), transparent);
}
.steps h3 { margin: 0 0 0.5rem; font: 800 1.55rem/1 var(--font-display); text-transform: uppercase; }
.steps p { margin: 0; color: var(--muted); }

/* Collections */
.collections { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.5rem 2rem; }
.section-head p { margin: 0; color: var(--muted); }
.collections__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; margin-top: 2.25rem; }
.collection-tile {
    grid-column: span 2;
    display: flex; flex-direction: column; gap: 1.25rem;
    padding: 1.4rem; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line);
    text-decoration: none;
    transition: border-color 0.25s, transform 0.35s var(--ease-out), background-color 0.25s;
}
.collection-tile:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-3px); }
.collection-tile__stack { position: relative; height: 112px; }
.mini {
    --rc: var(--r-base);
    position: absolute; left: calc(var(--i) * 46px); top: calc(var(--i) * 4px);
    width: 78px; height: 106px; border-radius: 1px; overflow: hidden;
    display: grid; place-items: center;
    background: repeating-linear-gradient(115deg, #1b3fc4 0 18px, #2f5bff 18px 20px, #1b3fc4 20px 36px, var(--yellow) 36px 42px);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--rc) 60%, transparent), 0 8px 18px rgba(0, 0, 0, 0.45);
    rotate: calc((var(--i) - 1) * 5deg);
    transition: rotate 0.4s var(--ease-out), translate 0.4s var(--ease-out);
}
.mini img { width: 100%; height: 100%; object-fit: cover; }
.mini b { font: 900 2.2rem/1 var(--font-display); color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.collection-tile:hover .mini { translate: calc(var(--i) * 6px) -4px; rotate: calc((var(--i) - 1) * 8deg); }
.collection-tile h3 { margin: 0; font: 800 1.9rem/1 var(--font-display); text-transform: uppercase; }
.collection-tile p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.98rem; }
.collection-tile__count { display: inline-block; margin-top: 0.9rem; font: 700 0.78rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--yellow); }

/* Raretés */
.rarities {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start;
    padding-block: clamp(3.5rem, 8vw, 6rem); border-top: 1px solid var(--line);
}
.rarities__intro p { color: var(--muted); max-width: 46ch; margin: 1.25rem 0 0; }
.rarities__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rarities__table th, .rarities__table td { padding: 0.95rem 0.25rem; border-bottom: 1px solid var(--line); text-align: left; }
.rarities__table thead th { font: 700 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); padding-top: 0; }
.rarities__table tbody th { font: 800 1.45rem/1 var(--font-display); text-transform: uppercase; color: var(--rc); }
.rarities__table td { font-family: var(--font-mono); font-size: 0.95rem; color: #d6d8e2; }
.rarities__table td:last-child, .rarities__table thead th:last-child { text-align: right; }
.dot { display: inline-block; width: 0.55em; height: 0.55em; border-radius: 99px; background: var(--rc); margin-right: 0.6em; vertical-align: 0.12em; box-shadow: 0 0 10px var(--rc); }
.r-unique .dot { background: conic-gradient(#ff6ad5, #ffd21f, #5ef2ff, #78ffa0, #ff6ad5); }

/* Bandeau de fin */
.closer { padding-block: 1rem clamp(4rem, 9vw, 7rem); }
.closer__inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem;
    padding: clamp(1.75rem, 4vw, 3rem);
    border-radius: calc(var(--radius) + 6px);
    background:
        repeating-linear-gradient(115deg, transparent 0 46px, rgba(11, 13, 20, 0.07) 46px 50px),
        var(--yellow);
    color: var(--on-yellow);
}
.closer h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); max-width: 20ch; }
.closer .countdown { font-family: var(--font-mono); font-weight: 700; font-size: 0.8em; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.closer .btn--primary { --bg: var(--on-yellow); background: var(--on-yellow); color: var(--yellow); box-shadow: none; }
.closer .btn--primary:hover { background: #22263a; color: var(--yellow); }

/* ==========================================================================
   Booster
   ========================================================================== */

.opening { padding-block: clamp(2.25rem, 5vw, 3.5rem) 5rem; text-align: center; }
.opening__head { max-width: 640px; margin-inline: auto; }
.opening__sub { color: var(--muted); margin: 0.9rem 0 0; font-size: 1.1rem; }
.opening__progress { display: inline-flex; align-items: center; gap: 0.45rem; margin: 1rem 0 0; font: 600 0.8rem/1 var(--font-mono); color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.opening__error { margin: 2rem auto 0; max-width: 520px; padding: 0.9rem 1.2rem; border-radius: 12px; background: rgba(255, 107, 107, 0.1); border: 1px solid rgba(255, 107, 107, 0.4); color: #ffc9c9; }

.pack-stage { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; margin-top: clamp(2rem, 5vw, 3rem); }
.pack-stage__hint { margin: 0; font: 600 0.8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }

.pack {
    --pw: clamp(230px, 30vw, 280px);
    position: relative; display: block; width: var(--pw); aspect-ratio: 5 / 8;
    padding: 0; border: 0; background: none; cursor: pointer; color: var(--text);
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 60px rgba(255, 210, 31, 0.12));
    animation: pack-float 4.5s ease-in-out infinite;
    transition: scale 0.4s var(--ease-out);
}
.pack:hover { scale: 1.03; }
.pack:focus-visible { outline-offset: 10px; }
.pack--static { animation: none; cursor: default; }
@keyframes pack-float { 50% { transform: translateY(-10px) rotate(0.6deg); } }

.pack__face {
    position: absolute; inset: 7% 0; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
    background: linear-gradient(170deg, #1d2cff 0%, #1a37c9 45%, #10207a 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.18); border-right: 1px solid rgba(0, 0, 0, 0.3);
}
.pack__stripes {
    position: absolute; inset: -20%;
    background: repeating-linear-gradient(115deg, transparent 0 34px, rgba(255, 210, 31, 0.95) 34px 46px, transparent 46px 120px);
    opacity: 0.9;
}
.pack__brand, .pack__title, .pack__count, .pack__date { position: relative; }
.pack__brand { font: 800 1.25rem/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; background: var(--ground); padding: 0.4rem 0.7rem; border-radius: 6px; }
.pack__brand b { color: var(--yellow); }
.pack__title { font: 900 clamp(2.9rem, 4.6vw, 3.5rem)/0.86 var(--font-display); text-transform: uppercase; color: #fff; text-shadow: 0 4px 0 rgba(11, 13, 20, 0.6), 0 10px 30px rgba(0, 0, 0, 0.5); }
.pack__count { font: 700 0.8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.14em; background: var(--yellow); color: var(--on-yellow); padding: 0.45rem 0.7rem; border-radius: 99px; }
.pack__date { font: 600 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.75); }

/* Soudures crantées haut et bas (dents dessinées en dégradé conique répété) */
.pack__crimp { position: absolute; left: 0; right: 0; height: 7.5%; background: linear-gradient(180deg, #c8ccd8, #8b92a6); }
.pack__crimp::after {
    content: ""; position: absolute; left: 0; right: 0; height: 9px;
    background: conic-gradient(from 135deg at 50% 0, #8b92a6 90deg, transparent 0) 0 0 / 14px 9px repeat-x;
}
.pack__crimp--top { top: 0; border-radius: 4px 4px 0 0; }
.pack__crimp--top::before { content: ""; position: absolute; inset: 30% 6%; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 6px); }
.pack__crimp--top::after { top: 0; transform: scaleY(-1); translate: 0 -100%; background: conic-gradient(from -45deg at 50% 100%, #c8ccd8 90deg, transparent 0) 0 0 / 14px 9px repeat-x; }
.pack__crimp--bottom { bottom: 0; border-radius: 0 0 4px 4px; background: linear-gradient(0deg, #c8ccd8, #8b92a6); }
.pack__crimp--bottom::before { content: ""; position: absolute; inset: 30% 6%; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 6px); }
.pack__crimp--bottom::after { bottom: 0; translate: 0 100%; background: conic-gradient(from 135deg at 50% 0, #c8ccd8 90deg, transparent 0) 0 0 / 14px 9px repeat-x; }

.pack__shine {
    position: absolute; inset: 7% 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 45%, transparent 60%);
    background-size: 250% 100%; animation: shine 3.8s ease-in-out infinite; mix-blend-mode: overlay;
}
@keyframes shine { 0%, 30% { background-position: 120% 0; } 70%, 100% { background-position: -40% 0; } }

/* La bande déchirée (le haut du paquet) */
.pack__tear { position: absolute; left: 0; right: 0; top: 0; height: 14%; overflow: hidden; z-index: 2; pointer-events: none; opacity: 0; }
.pack__tear .pack__crimp--top { height: 54%; }

/* Animation d'ouverture */
.pack.is-shaking { animation: shake 0.55s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake {
    10%, 90% { transform: translateX(-1px) rotate(-0.5deg); }
    20%, 80% { transform: translateX(3px) rotate(1deg); }
    30%, 50%, 70% { transform: translateX(-5px) rotate(-1.5deg); }
    40%, 60% { transform: translateX(5px) rotate(1.5deg); }
}
.pack.is-torn { animation: none; }
.pack.is-torn > .pack__crimp--top { animation: tear-off 0.7s var(--ease-out) forwards; transform-origin: 0 100%; }
.pack.is-torn .pack__face, .pack.is-torn .pack__crimp--bottom, .pack.is-torn .pack__shine { animation: pack-drop 0.7s 0.35s cubic-bezier(.55,0,.75,.3) forwards; }
@keyframes tear-off { to { transform: translate(60%, -160%) rotate(28deg); opacity: 0; } }
@keyframes pack-drop { to { transform: translateY(70%); opacity: 0; } }
.pack-stage.is-busy .pack-stage__hint::after { content: "…"; }

/* Révélation carte par carte */
.reveal { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.reveal__stage { position: relative; display: grid; place-items: center; min-height: clamp(470px, 60vw, 520px); perspective: 1400px; }
.reveal__controls { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 1.25rem; }
.reveal__counter { font: 700 0.85rem/1 var(--font-mono); color: var(--muted); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

.flip {
    position: absolute; width: 290px; aspect-ratio: 63 / 88;
    background: none; border: 0; padding: 0; color: inherit; cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.75s var(--ease-out), translate 0.5s var(--ease-out), opacity 0.4s;
    translate: calc(var(--depth) * 3px) calc(var(--depth) * -3px);
}
.flip__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip__face--front { transform: rotateY(180deg); }
.flip__face--front .fcard { --w: 290px; }
.flip.is-revealed { transform: rotateY(180deg); cursor: default; }
.flip.is-gone { translate: 0 -40px; opacity: 0; pointer-events: none; transition: translate 0.45s var(--ease-out), opacity 0.35s; }
.flip:focus-visible { outline: none; }
.flip:focus-visible .card-back { outline: 2px solid var(--yellow); outline-offset: 4px; }

/* Dos de carte */
.card-back {
    position: absolute; inset: 0; border-radius: 1px; overflow: hidden;
    display: grid; place-items: center;
    background:
        radial-gradient(circle at 50% 50%, rgba(11, 13, 20, 0) 0 30%, rgba(11, 13, 20, 0.5) 75%),
        repeating-linear-gradient(115deg, #1b3fc4 0 20px, #2448e0 20px 22px, #1b3fc4 22px 40px, var(--yellow) 40px 48px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), inset 0 0 0 8px var(--ground), inset 0 0 0 9px rgba(255, 210, 31, 0.6), var(--shadow-2);
}
.card-back span { font: 800 2.2rem/0.9 var(--font-display); text-transform: uppercase; text-align: center; background: var(--ground); padding: 0.8rem 1rem; border-radius: 10px; letter-spacing: 0.02em; }
.card-back span b { color: var(--yellow); display: block; }
.flip:not(.is-revealed):hover .card-back { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), inset 0 0 0 8px var(--ground), inset 0 0 0 9px var(--yellow), 0 0 50px rgba(255, 210, 31, 0.25), var(--shadow-2); }

/* Signal de rareté : le dos annonce la couleur avant le retournement */
.flip[data-rarity="epique"] .card-back, .flip[data-rarity="legendaire"] .card-back, .flip[data-rarity="unique"] .card-back, .flip[data-holo="1"] .card-back {
    animation: tease 1.6s ease-in-out infinite;
}
.flip[data-rarity="epique"] { --tease: var(--r-epique); }
.flip[data-rarity="legendaire"] { --tease: var(--r-legendaire); }
.flip[data-rarity="unique"] { --tease: var(--r-unique); }
.flip[data-holo="1"]:not([data-rarity="epique"]):not([data-rarity="legendaire"]):not([data-rarity="unique"]) { --tease: #5ef2ff; }
@keyframes tease { 50% { box-shadow: 0 0 0 1px var(--tease), inset 0 0 0 8px var(--ground), inset 0 0 0 9px var(--tease), 0 0 60px var(--tease), var(--shadow-2); } }

.burst { position: absolute; inset: 50% auto auto 50%; width: 10px; height: 10px; pointer-events: none; }
.burst i {
    position: absolute; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--yellow));
    animation: burst 0.9s var(--ease-out) forwards;
}
@keyframes burst { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

.new-badge {
    position: absolute; z-index: 5; top: -12px; right: -12px;
    font: 800 0.95rem/1 var(--font-display); text-transform: uppercase; letter-spacing: 0.06em;
    background: var(--yellow); color: var(--on-yellow); padding: 0.45rem 0.65rem; border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); rotate: 6deg;
}

/* Récapitulatif */
.summary { margin-top: 2rem; }
.summary__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.1rem; max-width: 1100px; margin-inline: auto; }
.summary__grid > div { position: relative; animation: deal 0.6s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
@keyframes deal { from { opacity: 0; transform: translateY(24px) scale(0.96); } }
.summary__grid .fcard { --w: 100%; }
.summary__grid .new-badge { top: -8px; right: -8px; font-size: 0.8rem; padding: 0.35rem 0.5rem; }
.summary__actions { display: flex; justify-content: center; gap: 0.75rem; margin-top: 2.5rem; }

/* Attente */
.waiting { display: flex; align-items: center; justify-content: center; gap: clamp(2rem, 6vw, 5rem); flex-wrap: wrap; margin-top: clamp(2rem, 5vw, 3.5rem); }
.waiting__pack { position: relative; }
.waiting__pack .pack { --pw: 210px; filter: grayscale(0.55) brightness(0.6) drop-shadow(0 24px 30px rgba(0, 0, 0, 0.5)); }
.waiting__lock { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.waiting__lock .icon { width: 54px; height: 54px; padding: 14px; box-sizing: content-box; border-radius: 99px; background: rgba(11, 13, 20, 0.8); border: 1px solid var(--line-strong); }
.waiting__text { text-align: left; }
.waiting__label { display: flex; align-items: center; gap: 0.5rem; margin: 0; font: 700 0.8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.waiting__time { margin: 0.6rem 0 1.6rem; font: 700 clamp(3.2rem, 9vw, 5.2rem)/1 var(--font-mono); letter-spacing: -0.04em; color: var(--yellow); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Collection
   ========================================================================== */

.album { padding-block: clamp(2.25rem, 5vw, 3.5rem) 5rem; }
.album__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; }
.album__lead { margin: 0.75rem 0 0; color: var(--muted); font-size: 1.1rem; }
.album__totals { display: flex; gap: 2.5rem; margin: 0; }
.album__totals dt { font: 700 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); }
.album__totals dd { margin: 0.4rem 0 0; font: 700 1.6rem/1 var(--font-mono); font-variant-numeric: tabular-nums; }

.meter { height: 8px; margin-top: 1.75rem; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; min-width: 8px; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--yellow)); transition: width 1s var(--ease-out); }

.tabs { display: flex; gap: 0.4rem; margin-top: 2rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
.tab {
    flex: none; display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.6rem 1rem; border-radius: 999px; border: 1px solid var(--line);
    font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.tab small { font: 600 0.75rem/1 var(--font-mono); color: var(--faint); }
.tab:hover { color: var(--text); border-color: var(--line-strong); }
.tab.is-on { background: var(--text); color: var(--ground); border-color: var(--text); }
.tab.is-on small { color: #4a4f63; }

.segmented { display: inline-flex; margin-top: 1rem; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.segmented a { padding: 0.45rem 0.95rem; border-radius: 999px; font-size: 0.92rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.segmented a:hover { color: var(--text); }
.segmented a.is-on { background: var(--surface-2); color: var(--text); }

.album__grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.5rem 1.25rem; margin: 2rem 0 0; padding: 0; }
.album__slot { position: relative; }
.album__copies {
    position: absolute; z-index: 5; top: -8px; right: -8px;
    font: 700 0.8rem/1 var(--font-mono); padding: 0.4rem 0.5rem; border-radius: 8px;
    background: var(--text); color: var(--ground); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
a.fcard:hover:not(.is-tilting) { box-shadow: 0 0 0 1px var(--rc), 0 18px 40px -12px color-mix(in srgb, var(--rc) 60%, transparent), var(--shadow-1); }

.empty { margin-top: 3rem; padding: 3rem 1.5rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty h2 { margin: 0; font: 800 2rem/1 var(--font-display); text-transform: uppercase; }
.empty p { color: var(--muted); margin: 0.75rem auto 1.5rem; max-width: 46ch; }

/* Fiche carte */
.detail { padding-block: 2rem 5rem; }
.backlink { display: inline-block; color: var(--muted); text-decoration: none; font-weight: 600; margin-bottom: 1.75rem; }
.detail__grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.detail__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.1rem 0 0; }
.pill { --rc: var(--muted); display: inline-flex; align-items: center; padding: 0.4rem 0.75rem; border-radius: 99px; background: var(--surface-2); font: 700 0.78rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.pill[class*="r-"] { color: var(--rc); background: color-mix(in srgb, var(--rc) 12%, transparent); }
.pill--sm { padding: 0.28rem 0.55rem; font-size: 0.68rem; margin-left: 0.35rem; }
.pill--holo { color: var(--ground); background: linear-gradient(90deg, #ff9be3, #ffe47a, #8ef7ff); }
.detail__flavor { font-style: italic; font-size: 1.2rem; color: #d8d9e3; margin: 1.5rem 0 0; max-width: 46ch; }
.detail__facts { display: flex; flex-wrap: wrap; gap: 2.5rem; margin: 2rem 0 0; padding: 1.4rem 0; border-block: 1px solid var(--line); }
.detail__facts dt { font: 700 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); }
.detail__facts dd { margin: 0.45rem 0 0; font: 700 1.6rem/1 var(--font-mono); }
.detail__facts dd span { color: var(--faint); font-size: 1rem; }
.detail__h2 { font: 800 1.6rem/1 var(--font-display); text-transform: uppercase; margin: 2.25rem 0 1rem; }
.copies { list-style: none; margin: 0; padding: 0; }
.copies li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.copies__serial { font: 700 1.05rem/1 var(--font-mono); font-variant-numeric: tabular-nums; min-width: 8.5rem; }
.copies__date { color: var(--muted); font-size: 0.95rem; }

/* ==========================================================================
   Formulaires
   ========================================================================== */

.auth { display: grid; place-items: center; padding-block: clamp(2.5rem, 7vw, 5rem); }
.auth__panel {
    width: min(460px, 100%); padding: clamp(1.75rem, 4vw, 2.5rem);
    border-radius: calc(var(--radius) + 4px); background: var(--surface); border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    position: relative; overflow: hidden;
}
.auth__panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--yellow) 0 62%, var(--blue) 62%); }
.auth__lead { color: var(--muted); margin: 0.75rem 0 1.75rem; }
.auth__switch { margin: 1.5rem 0 0; color: var(--muted); text-align: center; }
.auth__switch a { color: var(--yellow); font-weight: 700; }

.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.45rem; }
.field > span { font-weight: 600; font-size: 0.95rem; }
.field small { color: var(--faint); font-size: 0.85rem; }
.field input, .field select {
    width: 100%; min-height: 48px; padding: 0 0.95rem;
    border-radius: 10px; border: 1px solid var(--line-strong);
    background: var(--ground-2); color: var(--text); font: 500 1rem var(--font-body);
    caret-color: var(--yellow);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field input[type="file"] { padding: 0.7rem; min-height: 0; }
.field input::file-selector-button { margin-right: 0.8rem; padding: 0.45rem 0.85rem; border-radius: 99px; border: 0; background: var(--surface-2); color: var(--text); font: 600 0.9rem var(--font-body); cursor: pointer; }
.field input:hover, .field select:hover { border-color: rgba(232, 236, 255, 0.28); }
.field input:focus, .field select:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 210, 31, 0.18); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 0.2rem; }
.form .btn--primary { margin-top: 0.5rem; }

.form-errors { margin: 0 0 1.25rem; padding: 0.85rem 1.1rem; border-radius: 10px; background: rgba(255, 107, 107, 0.09); border: 1px solid rgba(255, 107, 107, 0.35); color: #ffd0d0; }
.form-errors ul { margin: 0; padding-left: 1.1rem; }

/* ==========================================================================
   Admin
   ========================================================================== */

.admin { padding-block: clamp(2rem, 5vw, 3rem) 5rem; }
.admin__head .muted { margin: 0.6rem 0 0; }
.admin__import {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 2rem;
    margin: 2rem 0; padding: 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.admin__import > div:first-child { flex: 1 1 520px; }
.admin__import h2 { margin: 0 0 0.5rem; font: 800 1.6rem/1 var(--font-display); text-transform: uppercase; }
.admin__import p { margin: 0; color: var(--muted); }
.admin__rules { margin: 0.9rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.95rem; display: grid; gap: 0.3rem; }
.admin__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
.admin__actions form { margin: 0; }
.warn { color: var(--danger); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.admin__table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin__table th, .admin__table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin__table thead th { font: 700 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); background: var(--surface); }
.admin__table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.admin__table tr:last-child td { border-bottom: 0; }
.admin__table tr.is-off td { opacity: 0.5; }
.admin__table td:first-child { display: flex; align-items: center; gap: 0.85rem; }
.admin__table th.ta-r, .admin__table td.ta-r { text-align: right; }
.admin__thumb {
    --rc: var(--r-base); flex: none; width: 40px; height: 56px; border-radius: 6px; overflow: hidden;
    display: grid; place-items: center; background: repeating-linear-gradient(115deg, #1b3fc4 0 10px, var(--yellow) 10px 13px);
    box-shadow: 0 0 0 1px var(--rc);
}
.admin__thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin__thumb b { font: 900 1.1rem/1 var(--font-display); color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.admin__name { font-weight: 600; }

.admin__edit { display: grid; grid-template-columns: auto minmax(0, 620px); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.admin__preview { position: sticky; top: 100px; }
.form--admin .page-title { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.5rem; }
.form--admin .btn--primary { justify-self: start; }

/* ---------- Pied de page ---------- */

.footer { border-top: 1px solid var(--line); padding-block: 2rem; color: var(--faint); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; }
.footer p { margin: 0; font-size: 0.95rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
    .summary__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; }
    .hero__fan { height: 400px; order: -1; margin-bottom: -1rem; }
    .hero__slot .fcard { --w: 220px; }
    .steps__list { grid-template-columns: 1fr 1fr; }
    .steps__list li:nth-child(2)::after { display: none; }
    .collections__grid { grid-template-columns: 1fr 1fr; }
    .collection-tile { grid-column: span 1; }
    .collection-tile:last-child:nth-child(odd) { grid-column: span 2; }
    .rarities { grid-template-columns: 1fr; }
    .detail__grid, .admin__edit { grid-template-columns: 1fr; justify-items: center; }
    .detail__info, .form--admin { width: 100%; }
    .admin__preview { position: static; }
    .summary__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    body { font-size: 1rem; }
    .wrap { width: calc(100% - 2rem); }
    .topbar__inner { min-height: 60px; }
    .brand__word { font-size: 1.35rem; }
    .nav__link span, .nav__cta { display: none; }
    .nav__link { padding: 0.55rem; }
    .nav__user { display: none; }
    .hero { padding-top: 1.5rem; }
    .hero__fan { height: 330px; }
    .hero__slot .fcard { --w: 180px; }
    .hero__stats { gap: 1rem 1.75rem; }
    .hero__stats dd { font-size: 1.25rem; }
    .steps__list { grid-template-columns: 1fr; gap: 1.75rem; }
    .steps__list li { padding: 0 0 0 3.6rem; }
    .steps__list li::after { display: none; }
    .collections__grid { grid-template-columns: 1fr; }
    .collection-tile, .collection-tile:last-child:nth-child(odd) { grid-column: span 1; }
    .album__totals { gap: 1.5rem; }
    .album__totals dd { font-size: 1.3rem; }
    .album__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 0.75rem; }
    .summary__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
    .flip, .flip__face--front .fcard { width: 260px; --w: 260px; }
    .reveal__stage { min-height: 420px; }
    .waiting__text { text-align: center; }
    .waiting__label { justify-content: center; }
    .form__row { grid-template-columns: 1fr; }
    .closer__inner { flex-direction: column; align-items: flex-start; }
    .admin__actions { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Classement
   ========================================================================== */

.ranking { padding-block: clamp(2.25rem, 5vw, 3.5rem) 5rem; }
.ranking__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.25rem 2rem; }
.ranking__lead { margin: 0.75rem 0 0; color: var(--muted); font-size: 1.1rem; max-width: 60ch; }
.ranking__head .segmented { margin-top: 0; }

/* Podium : trois marches, la première au centre */
.podium {
    --gold: #ffd21f; --silver: #c9d1e3; --bronze: #d99a62;
    list-style: none; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 240px)); justify-content: center; align-items: end;
    gap: clamp(0.5rem, 2vw, 1.25rem); max-width: 760px; margin: clamp(2.5rem, 6vw, 4rem) auto 0; padding: 0;
}
.podium__step { --c: var(--bronze); --h: 92px; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.podium__step--gold { --c: var(--gold); --h: 150px; }
.podium__step--silver { --c: var(--silver); --h: 118px; }
.podium__avatar {
    display: grid; place-items: center; width: clamp(56px, 8vw, 72px); aspect-ratio: 1; border-radius: 50%;
    background: var(--surface-2); color: var(--c); border: 2px solid var(--c);
    font: 800 clamp(1.3rem, 2.4vw, 1.7rem)/1 var(--font-display); letter-spacing: 0.02em;
    box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--c) 60%, transparent);
}
.podium__step--gold .podium__avatar { width: clamp(68px, 10vw, 88px); background: var(--gold); color: var(--on-yellow); }
.podium__name { margin-top: 0.7rem; max-width: 100%; font: 800 clamp(1.15rem, 2.2vw, 1.5rem)/1.05 var(--font-display); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__value { margin-top: 0.3rem; font: 700 0.95rem/1 var(--font-mono); color: var(--c); font-variant-numeric: tabular-nums; }
.podium__value small { color: var(--faint); font-size: 0.75rem; }
.podium__block {
    display: grid; place-items: start center; width: 100%; height: var(--h); margin-top: 0.9rem; padding-top: 0.6rem;
    border-radius: 3px 3px 0 0;
    background:
        repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, 0.035) 22px 26px),
        linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, var(--surface-2)), var(--surface));
    border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-bottom: 0;
    animation: podium-rise 0.8s var(--ease-out) both;
}
.podium__step--gold .podium__block { animation-delay: 0.15s; }
.podium__step--bronze .podium__block { animation-delay: 0.3s; }
@keyframes podium-rise { from { height: 0; opacity: 0; } }
.podium__rank { font: 900 clamp(2.4rem, 5vw, 3.4rem)/1 var(--font-display); color: var(--c); }
.podium__step.is-me .podium__name::after { content: " · toi"; color: var(--yellow); }

/* Tableau */
.board { margin-top: 0; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; background: var(--surface); }
.board__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 520px; }
.board__table th, .board__table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.board__table thead th { font: 700 0.72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); background: var(--ground-2); }
.board__table thead th.is-sorted { color: var(--yellow); }
.board__table th.ta-r, .board__table td.ta-r { text-align: right; }
.board__table tbody tr:last-child td { border-bottom: 0; }
.board__table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.board__table td.is-sorted { color: var(--text); font-weight: 700; }
.board__table td.num:not(.is-sorted) { color: var(--muted); }
.board__table tr.is-me { background: color-mix(in srgb, var(--yellow) 8%, transparent); }
.board__table tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--yellow); }
.board__rank { width: 4.5rem; }
.board__who { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; }
.board__bar { display: block; height: 3px; margin-top: 0.45rem; max-width: 220px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.board__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--yellow)); }
.board__of { color: var(--faint); font-weight: 400; }

.rank-chip {
    display: inline-grid; place-items: center; min-width: 2.1rem; height: 2.1rem; padding: 0 0.4rem; border-radius: 4px;
    font: 800 1.15rem/1 var(--font-display); background: var(--surface-2); color: var(--muted);
}
.rank-chip--1 { background: #ffd21f; color: var(--on-yellow); }
.rank-chip--2 { background: #c9d1e3; color: var(--on-yellow); }
.rank-chip--3 { background: #d99a62; color: var(--on-yellow); }

.my-rank {
    position: sticky; bottom: 1rem; z-index: 5;
    display: flex; align-items: center; gap: 0.9rem; margin-top: 1rem; padding: 0.8rem 1.1rem;
    border-radius: 6px; background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--yellow) 45%, transparent);
    box-shadow: var(--shadow-2);
}
.ranking__note { margin-top: 1.25rem; color: var(--muted); }
.ranking__note a { color: var(--yellow); font-weight: 700; }

.ranking__rules { margin-top: 2rem; color: var(--muted); }
.ranking__rules summary { cursor: pointer; font-weight: 600; color: var(--text); width: fit-content; }
.ranking__rules summary:hover { color: var(--yellow); }
.ranking__rules p { max-width: 70ch; }
.ranking__rules ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin: 0; padding: 0; }
.ranking__rules li { color: var(--rc); font-weight: 600; }
.ranking__rules li b { color: var(--text); font-family: var(--font-mono); font-size: 0.9rem; margin-left: 0.3rem; }

@media (max-width: 640px) {
    .board__hide-sm { display: none; }
    .board__table { min-width: 0; }
    .board__table th, .board__table td { padding: 0.7rem 0.6rem; }
    .board__rank { width: 3rem; }
    .board__of { display: none; }
    .podium__block { --h: 70px; }
    .podium__step--gold .podium__block { height: 110px; }
    .podium__step--silver .podium__block { height: 86px; }
}

/* Dos de carte d'une Gold édition : il annonce l'or avant le retournement */
.flip[data-gold="1"] { --tease: #f3d27a; }
.flip[data-gold="1"] .card-back { animation: tease 1.6s ease-in-out infinite; }
.segmented a.segmented__gold { color: #e8c25a; }
.segmented a.segmented__gold.is-on { background: linear-gradient(135deg, #8a6514, #e8c25a 55%, #b8862a); color: #16120a; }
.pill--gold { color: #16120a; background: linear-gradient(135deg, #8a6514, #e8c25a 55%, #b8862a); }
