/* =========================================================
   MRDIGIFOOT · Prédictions EPL — page statique GitHub Pages
   Thème officiel Marron Bordeaux & Or (mrdigifoot.com)
   ========================================================= */

:root {
    --primary: #c09d3c;
    --primary-light: #f0d78c;
    --gold-soft: #f0d78c;
    --bg-dark: #0d0607;
    --bg-light: #3a151b;
    --card-bg: #500c17;
    --card-sheen:
        linear-gradient(165deg,
            rgba(240, 215, 140, 0.13) 0%,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0) 55%);
    --card-border: rgba(192, 157, 60, 0.32);
    --red: #e11d2e;
    --text-muted: #cbd5e1;
    --text: #ffffff;
    --font: 'Plus Jakarta Sans', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-brand: 'Bowlby One SC', Impact, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: radial-gradient(circle at center, var(--bg-light) 15%, var(--bg-dark) 100%);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Fond enrichi — identique à la webapp (dégradés marron bordeaux & noir profond) */
.app-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(1200px 700px at 15% -10%, rgba(58, 21, 27, 0.65), transparent 70%),
        radial-gradient(1000px 600px at 85% 15%, rgba(58, 21, 27, 0.45), transparent 60%),
        radial-gradient(800px 500px at 50% 100%, rgba(192, 157, 60, 0.08), transparent 60%),
        linear-gradient(180deg, #0d0607 0%, #060203 60%, #020101 100%);
}

/* --- FOND ARTISTIQUE --- */
.aurora-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
}
.aurora {
    position: absolute;
    width: 80vw; height: 80vw;
    border-radius: 50%;
    background: var(--bg-light);
    filter: blur(120px);
    opacity: 0.4;
    pointer-events: none;
}
.aurora-2 {
    background: var(--primary);
    right: -10vw; bottom: -10vw;
    opacity: 0.15;
}
.grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
}

/* --- TOPBAR (style webapp — sticky full-width) --- */
.site-nav {
    --wine-rgb: 88, 28, 36;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E"),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01)),
        linear-gradient(180deg, rgba(var(--wine-rgb), 0.14), rgba(var(--wine-rgb), 0.06)),
        rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-bottom: 1px solid rgba(var(--wine-rgb), 0.25);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    min-height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
}
.site-nav-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-nav-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    user-select: none;
    margin-right: 8px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.site-nav-brand-link:active {
    animation: emojiPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.site-nav-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    object-fit: cover;
    background: #000;
}
.site-nav-title {
    font-family: var(--font-brand);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    line-height: 1;
    color: #fff;
}
.site-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.site-nav-link {
    font-family: var(--font-brand);
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
}
.site-nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}
.site-nav-link.is-current {
    color: var(--text);
    background: linear-gradient(180deg, rgba(var(--wine-rgb), 0.22) 0%, rgba(var(--wine-rgb), 0.06) 100%);
    border: 1px solid rgba(var(--wine-rgb), 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 15px rgba(var(--wine-rgb), 0.2);
}
.site-nav-link--cta {
    color: #fff;
    background: linear-gradient(180deg, rgba(var(--wine-rgb), 0.22), rgba(var(--wine-rgb), 0.06));
    border: 1px solid rgba(var(--wine-rgb), 0.45);
}
.site-nav-link--cta:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(var(--wine-rgb), 0.30), rgba(var(--wine-rgb), 0.10));
    box-shadow: 0 0 16px rgba(var(--wine-rgb), 0.35);
}
.site-nav-link--cta.is-current {
    color: #fff;
    background: linear-gradient(180deg, rgba(var(--wine-rgb), 0.35), rgba(var(--wine-rgb), 0.12));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 15px rgba(var(--wine-rgb), 0.25);
}
.site-nav-link .btn-emoji {
    display: inline-block;
    vertical-align: middle;
    transform-origin: center center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.site-nav-link:hover .btn-emoji {
    transform: scale(1.15);
}
.site-nav-link:active .btn-emoji {
    animation: emojiPop 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes emojiPop {
    0%   { transform: scale(1) rotate(0deg); }
    25%  { transform: scale(1.45) rotate(-12deg); }
    50%  { transform: scale(0.88) rotate(8deg); }
    75%  { transform: scale(1.18) rotate(-4deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@media (max-width: 640px) {
    .site-nav { padding: 0 12px; min-height: 52px; }
    .site-nav-inner { gap: 10px; }
    .site-nav-title { display: none; }
    .site-nav-brand-link { gap: 8px; }
    .site-nav-logo { width: 34px; height: 34px; }
    .site-nav-link { padding: 8px 12px; font-size: 0.85rem; }
}

/* --- EN-TÊTE --- */
.page-head {
    width: 100%;
    max-width: 1200px;
    padding: 88px 20px 16px;
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
}
.page-sub {
    max-width: 760px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6;
    text-align: center;
}
.page-sub--notice {
    max-width: 620px;
    font-size: 0.88rem;
    font-style: italic;
    color: rgba(192, 157, 60, 0.9);
    background: rgba(192, 157, 60, 0.08);
    border: 1px solid rgba(192, 157, 60, 0.25);
    border-radius: 999px;
    padding: 8px 18px;
}

/* --- GRILLE & CARTES --- */
.canvas {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px 48px;
    margin: 0 auto;
    box-sizing: border-box;
}
/* Cadre page-panel (comme la webapp) : fond + liseret doré autour du contenu */
.canvas.page-panel {
    padding: 20px 22px 28px;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.015'/%3E%3C/svg%3E"),
        rgba(20, 20, 24, 0.72);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border: 1px solid rgba(192, 157, 60, 0.28);
    border-radius: 20px;
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
#predictions-app {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    box-sizing: border-box;
}
.loading,
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 60px 0;
    font-size: 1.1rem;
}

/* Badge résultat / en direct */
.card-result-badge {
    display: inline-block;
    align-self: center;
    margin: 0 auto 8px;
    z-index: 4;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(46, 204, 113, 0.18);
    border: 1px solid rgba(46, 204, 113, 0.6);
    color: #7dffb8;
    white-space: nowrap;
}
.card-result-badge--live {
    background: rgba(225, 29, 46, 0.2);
    border-color: rgba(225, 29, 46, 0.65);
    color: #ff8b96;
}

/* Équipes : gagnante (légende) / perdante (atténué) */
.result-win .club-logo-box { box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(46, 204, 113, 0.7), 0 6px 16px rgba(0, 0, 0, 0.45); }
.result-loss { opacity: 0.5; }

/* Verdict de la comparaison */
.fx-prediction-verdict {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
}
.verdict-chip {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    padding: 7px 12px;
    border-radius: 999px;
    line-height: 1.35;
}
.verdict-chip--pending {
    background: rgba(59, 158, 255, 0.14);
    border: 1px solid rgba(59, 158, 255, 0.4);
    color: #8ecae6;
}
.verdict-chip--winner {
    background: rgba(240, 215, 140, 0.16);
    border: 1px solid rgba(240, 215, 140, 0.5);
    color: var(--gold-soft);
}
.verdict-chip--good {
    background: rgba(46, 204, 113, 0.14);
    border: 1px solid rgba(46, 204, 113, 0.45);
    color: #7dffb8;
}
.verdict-chip--bad {
    background: rgba(225, 29, 46, 0.16);
    border: 1px solid rgba(225, 29, 46, 0.45);
    color: #ff8b96;
}

/* --- Zone de saisie du pronostic + emoji --- */
.vote-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.pred-input-title {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pred-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.pred-input {
    width: 64px;
    padding: 8px 6px;
    text-align: center;
    font-family: var(--font-brand);
    font-size: 1.2rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(192, 157, 60, 0.4);
    border-radius: 10px;
    outline: none;
}
.pred-input:focus { border-color: var(--gold-soft); box-shadow: 0 0 0 2px rgba(192, 157, 60, 0.2); }
.pred-input-sep {
    font-family: var(--font-brand);
    font-size: 1.4rem;
    color: var(--gold-soft);
}
.pred-save-btn {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(192, 157, 60, 0.6);
    background: linear-gradient(135deg, rgba(192, 157, 60, 0.35), rgba(88, 28, 36, 0.5));
    color: var(--gold-soft);
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pred-save-btn:hover { box-shadow: 0 0 16px rgba(192, 157, 60, 0.35); }
.pred-save-btn:disabled { opacity: 0.5; }

.pred-line {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pred-emoji {
    font-size: 1.9rem;
    line-height: 1;
}
.pred-emoji--exact { filter: drop-shadow(0 0 8px rgba(46, 204, 113, 0.7)); }
.pred-emoji--winner { filter: drop-shadow(0 0 8px rgba(240, 215, 140, 0.6)); }
.pred-emoji--wrong { filter: grayscale(0.3) drop-shadow(0 0 6px rgba(225, 29, 46, 0.5)); }
.pred-emoji--pending { filter: grayscale(0.4); opacity: 0.8; }

.pred-score {
    font-family: var(--font-brand);
    font-size: 1.7rem;
    color: var(--gold-soft);
    font-variant-numeric: tabular-nums;
}
.pred-status {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
}
.pred-edit-btn {
    padding: 7px 16px;
    border: 1px solid rgba(192, 157, 60, 0.35);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pred-edit-btn:hover { color: #fff; border-color: var(--gold-soft); }
.pred-real {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* --- SECTIONS PAR JOURNÉE --- */
.day-bar {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: none;
    box-sizing: border-box;
}
.bar-label {
    flex-shrink: 0;
    font-family: var(--font-brand);
    font-size: 1rem;
    letter-spacing: 0.04em;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
}
.bar-label-season {
    display: inline-block;
    color: var(--primary-light);
    background: rgba(192, 157, 60, 0.15);
    border: 1px solid rgba(192, 157, 60, 0.35);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 0.85rem;
}
.day-chips-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 4px;
}
.day-chips-container .day-chip {
    scroll-snap-align: start;
    flex-shrink: 0;
}
.day-chip {
    flex-shrink: 0;
    padding: 12px 20px;
    border: 1px solid rgba(192, 157, 60, 0.3);
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-muted);
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.day-chip:hover {
    color: #fff;
    border-color: var(--primary-light);
    background: rgba(192, 157, 60, 0.22);
}
.day-chip.active {
    color: #fff;
    background: var(--red);
    border-color: var(--red);
    box-shadow: 0 0 14px rgba(225, 29, 46, 0.4);
}
.test-clear-btn {
    border-color: rgba(225, 29, 46, 0.4);
    color: #ff8b96;
}
.test-clear-btn:hover {
    color: #fff;
    border-color: #ff8b96;
    background: rgba(225, 29, 46, 0.25);
}

/* Carte ratio 4:5 */
.ratio-4-5-card {
    width: 100%;
    aspect-ratio: 4 / 5;
    container-type: inline-size;
    background: var(--card-sheen), var(--card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.65),
        0 0 20px rgba(192, 157, 60, 0.08),
        inset 0 1px 0 rgba(240, 215, 140, 0.2);
    transition: box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.25s ease, background 0.25s ease;
    --x: 50%;
    --y: 50%;
    box-sizing: border-box;
}

.card-tilt-wrap {
    perspective: 1000px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.card-tilt-wrap > .ratio-4-5-card {
    max-width: none;
    margin: 0;
}

.ratio-4-5-card.tilt-ready {
    transition: box-shadow 0.25s ease, border-color 0.2s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

.ratio-4-5-card.is-tilting {
    transition: box-shadow 0.2s ease;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Reflet souris */
.ratio-4-5-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 5;
    background: radial-gradient(
        circle at var(--x) var(--y),
        rgba(240, 215, 140, 0.14) 0%,
        rgba(255, 255, 255, 0.08) 20%,
        transparent 45%
    );
    opacity: 0;
    transition: opacity 0.2s ease;
}
.ratio-4-5-card.is-tilting::before,
.ratio-4-5-card:hover::before {
    opacity: 1;
}

/* Liseret intérieur or */
.ratio-4-5-card::after {
    content: '';
    position: absolute;
    inset: 7px;
    border: 1px solid rgba(192, 157, 60, 0.16);
    border-radius: inherit;
    pointer-events: none;
    z-index: 3;
}

.ratio-4-5-card > * {
    position: relative;
    z-index: 1;
}

.ratio-4-5-card:hover {
    border-color: rgba(240, 215, 140, 0.85);
    box-shadow:
        0 22px 50px rgba(0, 0, 0, 0.75),
        0 0 40px rgba(192, 157, 60, 0.35),
        inset 0 1px 0 rgba(240, 215, 140, 0.45);
}

/* Coque interne */
.fx-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    padding: 16px;
    gap: 0;
    border-radius: 14px;
    overflow: hidden;
    transform-style: preserve-3d;
    box-sizing: border-box;
}

.fx-card-inner > * {
    position: relative;
    z-index: 1;
}

/* Badges haut de carte */
/* Badges haut de carte — identiques webapp */
.card-date-top {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    color: var(--text-muted);
    white-space: nowrap;
}
.card-round-top {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    color: var(--gold-soft);
    white-space: nowrap;
}
.card-badge-top {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}
.card-badge-top--epl {
    border-color: rgba(192, 90, 255, 0.4);
    color: #c084fc;
}
.card-badge-top ~ .fx-arena {
    margin-top: 20px;
}

/* Séparateur */
.card-sep {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(192, 157, 60, 0.35), transparent);
    margin: 8px 0 8px;
}

/* Arena scoreboard */
.fx-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 18px 4px 12px;
    position: relative;
    overflow: visible;
}
.fx-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
    text-align: center;
    position: relative;
    z-index: 1;
}
.fx-team-name {
    font-family: var(--font-brand);
    font-size: 2.8cqw;
    font-weight: 400;
    line-height: 1.2;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    min-height: calc(2 * 1.2em);
}

/* Carte prédiction : VS aligné au niveau du bas des logos pour libérer de l'espace aux noms */
.prediction-card .fx-arena {
    align-items: flex-start;
    min-height: 96px;
    padding-top: 8px;
}
.prediction-card .fx-team {
    gap: 12px;
    transform: translateY(14px);
}
.prediction-card .fx-scoreboard {
    align-self: flex-start;
    height: 15cqw;
    justify-content: flex-end;
    min-width: 0;
    transform: translateY(14px);
}
.prediction-card .fx-team-name {
    min-height: calc(2 * 1.2em);
}
.fx-scoreboard {
    align-self: center;
    min-width: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 2;
}
.fx-score-nums {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-brand);
    font-weight: 400;
    line-height: 1;
    height: 80px;
}
/* Carte prédiction : hauteur scoreboard proportionnelle */
.prediction-card .fx-score-nums {
    height: 10cqw;
}
.fx-score-n {
    font-size: 3rem;
    font-variant-numeric: tabular-nums;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    font-family: var(--font-brand);
    font-weight: 400;
    line-height: 80px;
}
.fx-score-n.vs-unplayed {
    color: #fff;
    font-size: 2.6rem;
}
.fx-score-sep {
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    font-family: var(--font-brand);
    line-height: 80px;
}
/* Carte prédiction : scoreboard proportionnel à la carte */
.prediction-card .fx-score-n {
    font-size: 8cqw;
    line-height: 1;
}
.prediction-card .fx-score-n.vs-unplayed {
    font-size: 2cqw;
}
.prediction-card .fx-score-sep {
    font-size: 5cqw;
    line-height: 1;
}
.fx-meta-line {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Logos club */
.club-logo-box {
    width: 80px;
    height: 80px;
    min-width: 80px;
    min-height: 80px;
    border-radius: 14px;
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(192, 157, 60, 0.55), 0 6px 16px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background-color: #333;
}
.club-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    display: block;
}
/* Carte prédiction : tout en unités fluides (relatives à la largeur de la carte) */
.prediction-card .club-logo-box {
    width: 15cqw;
    height: 15cqw;
    min-width: 15cqw;
    min-height: 15cqw;
}
.prediction-card .logo-ball {
    width: 52%;
    height: 52%;
}
.prediction-card .logo-abbr {
    font-size: 4.2cqw;
}
.logo-ball {
    object-fit: contain;
    border: none !important;
    background: transparent !important;
    display: block;
    opacity: 0.85;
}
.logo-abbr {
    font-family: 'FMUniverse', sans-serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    color: #fff;
    margin-top: 2px;
}

/* Pied de carte */
.fx-card-bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}
/* Carte prédiction : watermark centré */
.prediction-card .fx-card-bottom {
    justify-content: center;
}
.canvas-watermark {
    font-family: var(--font-brand);
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
    letter-spacing: 0.04em;
}

/* Barres de résultat des votes */
.vote-stats {
    display: none;
    margin-top: 10px;
    flex-direction: column;
    gap: 6px;
}
.vote-stats.visible { display: flex; }
.vote-stat-row {
    display: grid;
    grid-template-columns: 72px 1fr 40px;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-muted);
}
.vote-stat-bar {
    height: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.vote-stat-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s ease;
}
.vote-stat-fill--home { background: var(--gold-soft); }
.vote-stat-fill--draw { background: #8ecae6; }
.vote-stat-fill--away { background: var(--red); }
.vote-stat-pct {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.vote-count {
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: center;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 12px 22px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Pied de page */
.foot-hub {
    width: 100%;
    max-width: 1400px;
    padding: 40px 24px 48px;
    text-align: center;
}
.hero-bio {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1rem;
}
.legal {
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.8;
}
.legal a { color: inherit; }

/* =========================================================
   PRÉDICTION — boutons 1/N/2 + verdict + stats
   ========================================================= */
.pred-choice-caption {
    grid-column: 1 / -1;
    font-family: var(--font-display, inherit);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted, #9aa0a6);
    text-align: center;
    margin: 12px 0 4px;
}
.pred-choice-caption.is-locked {
    color: rgba(154, 160, 166, 0.55);
}
.pred-choices {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
}
.pred-choice-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px 6px;
    border: 1px solid rgba(192, 157, 60, 0.45);
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pred-choice-btn:hover {
    border-color: var(--gold-soft);
    background: rgba(192, 157, 60, 0.22);
    box-shadow: 0 0 14px rgba(192, 157, 60, 0.25);
    transform: translateY(-2px);
}
.pred-choice-btn.is-mychoice {
    border-color: var(--gold-soft);
    background: linear-gradient(135deg, rgba(192, 157, 60, 0.45), rgba(88, 28, 36, 0.55));
    box-shadow: 0 0 22px rgba(192, 157, 60, 0.5);
}
.pred-choice-btn.is-mychoice .pred-choice-val {
    color: #fff;
    text-shadow: 0 0 12px rgba(240, 215, 140, 0.9);
}
.pred-choice-val {
    font-family: var(--font-brand);
    font-size: 11cqw;
    line-height: 1;
    color: var(--gold-soft);
}
.pred-choice-sub {
    font-family: var(--font-display);
    font-size: 2.4cqw;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.2em;
    max-width: 100%;
}
.pred-choice-btn.is-dim {
    cursor: default;
    pointer-events: none;
    border-color: rgba(192, 157, 60, 0.18);
    background: rgba(255, 255, 255, 0.04);
    opacity: 0.55;
    filter: grayscale(0.6);
    transform: none !important;
    box-shadow: none !important;
}
.pred-choice-btn.is-dim .pred-choice-val { color: rgba(255, 255, 255, 0.55); }
.pred-choice-btn.is-dim.is-mychoice {
    cursor: default;
    pointer-events: none;
    opacity: 1;
    filter: none;
}
.pred-choice-pct {
    font-family: var(--font-display);
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 0;
    min-width: 0;
}
.pct-num {
    font-size: 10cqw;
    line-height: 1;
}
.pct-num.is-locked {
    font-size: 7cqw;
    filter: grayscale(0.5);
    opacity: 0.75;
}
.pct-sym {
    font-size: 4.2cqw;
    font-weight: 700;
    color: var(--text-muted, #9aa0a6);
    margin-top: 0.6em;
}
.pct-sym.is-locked {
    opacity: 0.6;
}
.pred-choice-btn.is-mychoice .pred-choice-pct { color: var(--gold-soft); }
    cursor: default;
    pointer-events: none;
    opacity: 1;
    filter: none;
}

.pred-myline {
    margin-top: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    text-align: center;
}
.pred-myline b { color: var(--gold-soft); }

.pred-verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    font-family: var(--font-brand);
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.pred-verdict-badge.good {
    background: rgba(46, 204, 113, 0.18);
    border: 1px solid rgba(46, 204, 113, 0.6);
    color: #7dffb8;
    box-shadow: 0 0 18px rgba(46, 204, 113, 0.25);
}
.pred-verdict-badge.bad {
    background: rgba(225, 29, 46, 0.18);
    border: 1px solid rgba(225, 29, 46, 0.6);
    color: #ff8b96;
    box-shadow: 0 0 18px rgba(225, 29, 46, 0.25);
}
.pred-verdict-symbol { font-size: 1.4rem; font-weight: 900; line-height: 1; }

.pred-status-text {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.pred-status-text--muted { color: var(--text-muted); opacity: 0.7; }

/* Prediction zone */
.prediction-card .fx-card-inner {
    justify-content: flex-start;
}
.prediction-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px 6px;
    flex: 1;
    min-height: 0;
    justify-content: flex-start;
}
.pred-status {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-soft);
}
.pred-status--muted { color: var(--text-muted); opacity: 0.7; }
.pred-status--good { color: #7dffb8; }
.pred-status--bad { color: #ff8b96; }

.pred-choice-btn.is-dim.is-mychoice {
    cursor: default;
    pointer-events: none;
    opacity: 1;
    filter: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .page-head {
        padding: 72px 16px 14px;
    }
    .page-sub {
        font-size: 0.88rem;
    }
    .canvas {
        padding: 0 12px 32px;
    }
    .day-bar {
        padding: 12px 14px;
        margin-bottom: 20px;
        border-radius: 14px;
        gap: 8px;
    }
    .day-chips-container {
        justify-content: center;
    }
    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .ratio-4-5-card {
        aspect-ratio: auto;
        min-height: 480px;
        padding: 14px;
    }
    .club-logo-box {
        width: 68px;
        height: 68px;
        min-width: 68px;
        min-height: 68px;
    }
    .fx-score-n {
        font-size: 2.5rem;
    }
    .fx-team-name {
        font-size: 0.68rem;
        line-height: 1.15;
        min-height: calc(2 * 1.15em);
    }
    .prediction-card .fx-arena {
        min-height: 108px;
    }
}