/* Prognoz — comptoir de bar, billard vert, textures */

:root {
    --bg: #0f1a14;
    --felt: #1a3226;
    --felt-light: #234432;
    --paper: #e4d9c4;
    --paper-mid: #d9cdb4;
    --paper-dark: #cfc0a4;
    --ink: #1a1612;
    --muted: #5c5345;
    --line: rgba(90, 75, 55, 0.35);

    --green: #2d6b48;
    --green-dark: #1e5035;
    --green-light: #4a9468;

    --brass: #9a7420;
    --brass-light: #c4a035;
    --brass-shine: #e8d078;

    --wood: #3d2a1a;
    --wood-bar: #4a3424;
    --wood-light: #6b4d36;

    --font-display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.22);
    --shadow-card: 0 2px 12px rgba(20, 12, 8, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    --shadow-inset: inset 0 2px 6px rgba(0, 0, 0, 0.12);

    --page-max: 1040px;
    --page-gutter: 1rem;
    --sport-section-head-space: calc(1.15rem * 1.5 + 0.35rem + 0.65rem + 2px);

    --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
    --ease-spring: cubic-bezier(0.34, 1.15, 0.64, 1);
    --dur-fast: 0.18s;
    --dur-med: 0.28s;
    --dur-slow: 0.38s;
}

/* Textures réutilisables */
:root {
    --tex-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    --tex-felt: radial-gradient(ellipse 120% 80% at 50% 20%, rgba(74, 148, 104, 0.18) 0%, transparent 55%),
                radial-gradient(ellipse 80% 50% at 80% 100%, rgba(0, 0, 0, 0.35) 0%, transparent 50%),
                linear-gradient(165deg, #0f1a14 0%, #142218 40%, #1a2e22 100%);
    --tex-wood: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 12%),
                repeating-linear-gradient(92deg, transparent 0px, transparent 3px, rgba(0,0,0,0.04) 3px, rgba(0,0,0,0.04) 5px),
                linear-gradient(180deg, #5c4030 0%, var(--wood-bar) 35%, #2e2018 100%);
    --tex-paper: linear-gradient(145deg, #ede4d0 0%, var(--paper) 45%, #d2c4a8 100%);
}

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

html {
    scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
    html { overflow-y: scroll; }
}

body {
    margin: 0;
    background: var(--tex-felt);
    background-attachment: fixed;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--tex-noise);
    background-size: 180px 180px;
    opacity: 0.045;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

a { color: var(--green-dark); transition: color 0.15s ease; }
a:hover { color: var(--green-light); }

/* --- Topbar bois --- */
.topbar {
    background: var(--tex-wood);
    border-bottom: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 -2px 0 var(--brass);
    padding: 0.55rem var(--page-gutter) 0.65rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--brass-light), var(--brass-shine), var(--brass-light), transparent);
    opacity: 0.7;
}

.topbar-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
}

.topbar-side {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.topbar-side-left { justify-content: flex-start; }
.topbar-side-right { justify-content: flex-end; flex-wrap: wrap; }

.topbar-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
}

.topbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.65rem;
    color: var(--paper);
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    letter-spacing: 0.06em;
    line-height: 1.1;
    display: block;
    text-align: center;
}

.brand-icon { display: none; }

.topbar-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    color: rgba(228, 217, 196, 0.92);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    transition:
        background var(--dur-fast) var(--ease-out),
        border-color var(--dur-fast) ease,
        box-shadow var(--dur-fast) ease,
        transform var(--dur-fast) var(--ease-out),
        color var(--dur-fast) ease;
}

.nav-link:active {
    transform: scale(0.97);
}

.nav-link:hover, .nav-link.active {
    background: rgba(0, 0, 0, 0.22);
    border-color: rgba(196, 160, 53, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar-actions { display: none; }

.topbar-user { color: var(--paper); font-size: 0.82rem; font-weight: 600; opacity: 0.9; }

.pill-points {
    font-family: var(--font-mono);
    background: linear-gradient(145deg, var(--brass-light), var(--brass));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

button.pill-points-btn {
    cursor: pointer;
    font-family: var(--font-mono);
    transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button.pill-points-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

button.pill-points-btn:active {
    transform: translateY(0);
}

/* --- Boutons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-sm { padding: 0.38rem 0.75rem; font-size: 0.78rem; }

.btn-primary {
    background: linear-gradient(160deg, var(--green-light), var(--green));
    color: #fff;
    border-color: var(--green-dark);
    box-shadow: 0 3px 10px rgba(30, 80, 53, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(160deg, var(--green), var(--green-dark));
    box-shadow: 0 4px 14px rgba(30, 80, 53, 0.45);
}

.btn-accent {
    background: linear-gradient(160deg, var(--brass-light), var(--brass));
    color: #fff;
    border-color: #7a5a10;
    box-shadow: 0 3px 10px rgba(120, 90, 20, 0.3);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(221, 211, 188, 0.25);
    color: var(--paper);
    backdrop-filter: blur(4px);
}

.panel .btn-ghost, .auth-card .btn-ghost {
    background: rgba(255, 255, 255, 0.5);
    border-color: var(--line);
    color: var(--ink);
}

.btn-block { width: 100%; }

/* --- Panels parchemin --- */
.panel {
    background: var(--tex-paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
}

.panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--tex-noise);
    background-size: 120px 120px;
    opacity: 0.04;
    pointer-events: none;
    border-radius: inherit;
}

.panel-head {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.25) 0%, var(--paper-dark) 100%);
    position: relative;
}

.panel-body { padding: 0.9rem 1rem; position: relative; }
.empty-msg { color: var(--muted); text-align: center; padding: 1.5rem; }

/* --- Auth --- */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-back {
    margin-bottom: 0.75rem;
    color: rgba(228, 217, 196, 0.9) !important;
    border-color: rgba(228, 217, 196, 0.25) !important;
    background: rgba(0, 0, 0, 0.18) !important;
}

.auth-back:hover {
    color: var(--paper) !important;
    border-color: rgba(196, 160, 53, 0.45) !important;
    background: rgba(0, 0, 0, 0.28) !important;
}

.auth-card {
    background: var(--tex-paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--tex-noise);
    background-size: 100px;
    opacity: 0.05;
    pointer-events: none;
}

.auth-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.85rem;
    text-align: center;
    position: relative;
}

.auth-sub { text-align: center; color: var(--muted); font-size: 0.88rem; margin-bottom: 1.25rem; position: relative; }

.field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.3rem;
}

.field-input, .field-select, .field-textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow-inset);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.field-input:focus, .field-select:focus, .field-textarea:focus {
    outline: none;
    border-color: var(--green-light);
    box-shadow: var(--shadow-inset), 0 0 0 3px rgba(74, 148, 104, 0.2);
}

.field-group { margin-bottom: 0.9rem; }

.alert {
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    font-size: 0.85rem;
    margin-bottom: 0.9rem;
    border: 1px solid;
    position: relative;
}

.alert-error   { background: #f5e8e4; border-color: rgba(192, 128, 112, 0.5); color: #6a3028; }
.alert-success { background: #e4f0e8; border-color: rgba(106, 154, 120, 0.5); color: #1a4a32; }
.alert-info    { background: #e8eef4; border-color: rgba(128, 154, 176, 0.5); }
.alert-warning { background: #f4eed8; border-color: rgba(176, 160, 96, 0.5); }

/* --- Layout --- */
.site-shell {
    max-width: var(--page-max);
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--page-gutter);
}

.app-main {
    padding: 1.25rem var(--page-gutter) 2rem;
    max-width: var(--page-max);
    margin: 0 auto;
    width: 100%;
}

.app-main-wide { max-width: var(--page-max); }

.hero {
    text-align: center;
    padding: 1.15rem var(--page-gutter) 1rem;
    color: var(--paper);
    max-width: var(--page-max);
    margin: 0 auto;
    width: 100%;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.45rem;
    letter-spacing: 0.01em;
    color: rgba(228, 217, 196, 0.95);
    line-height: 1.35;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.hero-lead {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(228, 217, 196, 0.72);
    line-height: 1.5;
}

.hero p { margin: 0; }

.pronos-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 1.25rem;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.sport-cat-sticky-sentinel,
.sport-cat-panel {
    grid-column: 1 / -1;
}

.pronos-matches {
    grid-column: 1;
    min-width: 0;
}

.pronos-ticket {
    grid-column: 2;
    min-width: 0;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.25rem; }

/* --- Match cards --- */
.match-card {
    background: var(--tex-paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1rem 1rem;
    margin-bottom: 0.85rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    min-width: 0;
}

.match-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--tex-noise);
    background-size: 140px;
    opacity: 0.035;
    pointer-events: none;
}

.match-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--green-light), var(--green-dark));
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.match-card:hover {
    box-shadow: 0 6px 24px rgba(20, 12, 8, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.match-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 0.5rem;
    position: relative;
}

.match-comp { color: var(--green-dark); }
.match-cat-tennis { color: #6a8a20; }
.match-cat-basketball { color: #a05818; }
.match-cat-soccer { color: var(--green-dark); }

/* --- Catégories sport (Foot / Basket / Tennis) --- */
.sport-cat-panel {
    margin-bottom: 1.1rem;
    background: var(--tex-paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(90, 75, 55, 0.28);
    overflow: hidden;
    position: sticky;
    top: var(--sport-cat-sticky-top, 0);
    z-index: 45;
    transition:
        box-shadow var(--dur-med) var(--ease-out),
        border-radius var(--dur-med) var(--ease-out),
        transform var(--dur-med) var(--ease-out);
}

.sport-cat-sticky-sentinel {
    height: 1px;
    margin: 0;
    pointer-events: none;
}

.sport-cat-panel.is-stuck {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    transform: translateY(0);
}

.sport-cat-panel.is-stuck .sport-cat-panel-head {
    display: none;
}

.sport-cat-panel-head {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.88rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.28) 0%, var(--paper-dark) 100%);
    color: var(--ink);
}

.sport-cat-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
}

.sport-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition:
        background var(--dur-fast) ease,
        border-color var(--dur-fast) ease,
        color var(--dur-fast) ease,
        box-shadow var(--dur-med) var(--ease-out),
        transform var(--dur-fast) var(--ease-spring);
}

.sport-cat-btn:active {
    transform: scale(0.96);
}

.sport-cat-btn:hover {
    background: rgba(45, 107, 72, 0.08);
    border-color: rgba(45, 107, 72, 0.25);
    color: var(--green-dark);
}

.sport-cat-btn.is-active {
    background: linear-gradient(160deg, var(--green-light), var(--green-dark));
    border-color: rgba(0, 0, 0, 0.12);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 8px rgba(30, 80, 53, 0.25);
}

.sport-cat-count {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.08rem 0.35rem;
    border-radius: var(--radius-pill);
}

.sport-cat-btn.is-active .sport-cat-count {
    background: rgba(255, 255, 255, 0.18);
}

.sport-section {
    margin-bottom: 1.35rem;
    transition:
        opacity var(--dur-med) var(--ease-out),
        transform var(--dur-med) var(--ease-out);
}

.sport-section.is-filtered-out {
    opacity: 0;
    transform: translateY(0.45rem);
    pointer-events: none;
}

.sport-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.65rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid rgba(228, 217, 196, 0.16);
}

.sport-section-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(228, 217, 196, 0.94);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
}

.sport-section-title.match-cat-soccer { color: #a8e0bc; }
.sport-section-title.match-cat-basketball { color: #f2c082; }
.sport-section-title.match-cat-tennis { color: #d4e888; }

.sport-section-meta {
    font-size: 0.75rem;
    color: rgba(228, 217, 196, 0.58);
    white-space: nowrap;
}

.sport-section-empty {
    margin-bottom: 0.75rem;
}

.pick-row-2 .pick-btn .pick-val {
    font-size: 0.78rem;
    line-height: 1.2;
}

.match-teams {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.7rem;
    font-weight: 700;
    font-size: 0.95rem;
    position: relative;
}

.team { flex: 1; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.team.home { text-align: right; }
.team.away { text-align: left; }
.vs {
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-style: italic;
    opacity: 0.7;
}

.market-block {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px dashed rgba(90, 75, 55, 0.3);
    position: relative;
}

.market-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.pts-tag {
    font-family: var(--font-mono);
    background: linear-gradient(160deg, var(--green-light), var(--green));
    color: #fff;
    padding: 0.12rem 0.4rem;
    font-size: 0.62rem;
    margin-left: 0.3rem;
    border-radius: var(--radius-pill);
    vertical-align: middle;
}

.pts-tag.pts-2 { background: linear-gradient(160deg, var(--brass-light), var(--brass)); }
.pts-tag.pts-3 { background: linear-gradient(160deg, var(--wood-light), var(--wood-bar)); }

.pick-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.45rem;
}

.pick-row-2 { grid-template-columns: 1fr 1fr; }

.pick-btn, .score-btn {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem 0.3rem 0.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition:
        background var(--dur-fast) ease,
        border-color var(--dur-fast) ease,
        color var(--dur-fast) ease,
        box-shadow var(--dur-med) var(--ease-out),
        transform var(--dur-fast) var(--ease-spring);
}

.pick-val { font-size: 1.05rem; line-height: 1; }

.pick-prob {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--green-light);
    line-height: 1;
}

.pick-btn.selected .pick-prob { color: rgba(255, 255, 255, 0.88); }

.pick-btn:hover, .score-btn:hover {
    border-color: var(--green-light);
    background: rgba(238, 245, 240, 0.9);
    box-shadow: 0 2px 8px rgba(45, 107, 72, 0.15);
    transform: translateY(-1px);
}

.pick-btn:active:not(:disabled),
.score-btn:active:not(:disabled) {
    transform: scale(0.96);
}

.pick-btn.selected, .score-btn.selected {
    background: linear-gradient(165deg, var(--green-light), var(--green));
    border-color: var(--green-dark);
    color: #fff;
    box-shadow: 0 3px 10px rgba(30, 80, 53, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.35rem;
}

.score-btn { font-size: 0.72rem; padding: 0.38rem 0.15rem; border-radius: var(--radius-sm); }

.pick-select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-inset);
    cursor: pointer;
}

.pick-select:focus {
    outline: none;
    border-color: var(--green-light);
}

/* --- Aide points --- */
.points-help {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.points-help[hidden] {
    display: none !important;
}

.points-help-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 11, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity var(--dur-med) ease;
}

.points-help.is-open .points-help-backdrop {
    opacity: 1;
}

.points-help-card {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: var(--tex-paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.35rem 1.25rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(0.75rem) scale(0.97);
    transition:
        opacity var(--dur-med) var(--ease-out),
        transform var(--dur-med) var(--ease-out);
}

.points-help.is-open .points-help-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.points-help-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    border: none;
    background: transparent;
    font-size: 1.45rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.points-help-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0 0 0.45rem;
    color: var(--ink);
}

.points-help-lead {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.points-help-subtitle {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--green-dark);
}

.points-help-list-compact {
    margin-bottom: 0.65rem;
}

.points-help-list {
    margin: 0 0 0.85rem;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink);
}

.points-help-list strong {
    color: var(--green-dark);
    font-family: var(--font-mono);
}

.points-help-note {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--muted);
}

.pick-select option {
    font-size: 0.85rem;
}

.match-locked {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
    font-style: italic;
    position: relative;
}

/* --- Ticket (style ticket de caisse) --- */
.pronos-ticket {
    position: sticky;
    top: 0.75rem;
    width: 100%;
    max-width: 280px;
    justify-self: stretch;
    align-self: start;
}

.ticket-slip {
    background: linear-gradient(180deg, #f8f0dc 0%, #efe3c8 48%, #e8dcc0 100%);
    border: 1px solid rgba(90, 75, 55, 0.42);
    border-radius: 6px;
    box-shadow:
        0 6px 22px rgba(20, 12, 8, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 1.5rem);
}

.ticket-slip-header,
.ticket-mobile-handle,
.ticket-slip-edge {
    flex-shrink: 0;
}

.ticket-mobile-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ticket-slip::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--tex-noise);
    background-size: 120px;
    opacity: 0.04;
    pointer-events: none;
}

.ticket-slip-edge {
    height: 0.45rem;
    background:
        radial-gradient(circle at 6px 0.45rem, transparent 5px, rgba(90, 75, 55, 0.35) 5px) 0 0 / 12px 100% repeat-x;
    opacity: 0.85;
}

.ticket-slip-edge-top {
    margin-bottom: -1px;
}

.ticket-slip-edge-bottom {
    transform: rotate(180deg);
    margin-top: -1px;
}

.ticket-slip-header {
    text-align: center;
    padding: 0.65rem 0.85rem 0.55rem;
    border-bottom: 2px dashed rgba(90, 75, 55, 0.38);
    background: linear-gradient(180deg, rgba(45, 107, 72, 0.14) 0%, rgba(45, 107, 72, 0.04) 100%);
    position: relative;
}

.ticket-slip-header-saved {
    background: linear-gradient(180deg, rgba(154, 116, 32, 0.16) 0%, rgba(154, 116, 32, 0.04) 100%);
}

.ticket-slip-brand {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    color: var(--green-dark);
    opacity: 0.85;
    margin-bottom: 0.25rem;
}

.ticket-slip-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.ticket-slip-sub {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.ticket-mobile-handle,
.ticket-head-summary {
    display: none;
}

.ticket-head-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
}

.ticket-count {
    font-family: var(--font-mono);
    background: linear-gradient(160deg, var(--green-light), var(--green));
    color: #fff;
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 6px rgba(30, 80, 53, 0.3);
    min-width: 1.35rem;
    text-align: center;
}

.ticket-body {
    padding: 0.75rem 0.85rem 0.85rem;
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ticket-empty {
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.55;
    margin: 0;
}

.ticket-empty-hint {
    display: block;
    margin-top: 0.55rem;
    font-size: 0.75rem;
}

.ticket-empty-hint a {
    font-weight: 600;
}

.saved-ticket-empty a {
    font-weight: 600;
}

.ticket-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.saved-ticket-list {
    max-height: none;
}

.ticket-item {
    position: relative;
    background: rgba(255, 252, 244, 0.92);
    border: 1px dashed rgba(90, 75, 55, 0.42);
    border-left: 3px solid var(--green);
    border-radius: 4px;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
    box-shadow: 0 1px 3px rgba(20, 12, 8, 0.08);
    animation: ui-rise-in var(--dur-med) var(--ease-out) both;
}

.ticket-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.ticket-item-top .ticket-sport {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-date {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--green-dark);
    text-transform: none;
    letter-spacing: 0;
}

.ticket-pts,
.ticket-badge-validated {
    flex-shrink: 0;
}

.ticket-pts {
    color: var(--green-dark);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
}

.ticket-match {
    font-weight: 700;
    margin: 0.25rem 0 0.15rem;
    line-height: 1.3;
    font-size: 0.84rem;
}

.ticket-pick {
    line-height: 1.35;
}

.ticket-type {
    font-size: 0.62rem;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 0.2rem;
    letter-spacing: 0.04em;
}

.ticket-item-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px dotted rgba(90, 75, 55, 0.25);
}

.ticket-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    width: 1.65rem;
    height: 1.65rem;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    z-index: 2;
    padding: 0;
}

.ticket-remove:hover {
    background: rgba(160, 64, 48, 0.12);
    border-color: rgba(160, 64, 48, 0.45);
    color: #a04030;
}

.ticket-slip-tear {
    height: 0.55rem;
    margin: 0 0 0.65rem;
    background:
        linear-gradient(135deg, transparent 33.33%, rgba(90, 75, 55, 0.22) 33.33%, rgba(90, 75, 55, 0.22) 66.66%, transparent 66.66%) 0 0 / 8px 100% repeat-x;
    opacity: 0.75;
}

.ticket-footer {
    margin-top: 0.15rem;
    padding-top: 0.15rem;
    flex-shrink: 0;
}

.saved-ticket-footer {
    margin-top: 0.5rem;
}

.ticket-gain {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 0.5rem;
}

.ticket-gain span {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.68rem;
    color: var(--muted);
}

.ticket-gain strong {
    font-family: var(--font-mono);
    color: var(--green-dark);
    font-size: 1.05rem;
}

.ticket-validate-btn {
    margin-top: 0.65rem;
    max-height: 3rem;
    overflow: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, max-height 0.28s ease, margin 0.28s ease, padding 0.28s ease;
}

.ticket-validate-btn.is-hidden {
    opacity: 0;
    transform: translateY(0.35rem);
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
    visibility: hidden;
}

#ticketValidateNote.is-hidden {
    display: none;
}

.ticket-item-draft {
    border-left-color: var(--brass);
    border-style: dashed;
    padding-right: 2.45rem;
}

.ticket-item-saved {
    border-left-color: var(--green);
    border-style: solid;
    background: rgba(255, 255, 255, 0.78);
}

.ticket-badge-validated {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--green-dark);
    background: rgba(45, 107, 72, 0.12);
    padding: 0.12rem 0.4rem;
    border-radius: var(--radius-pill);
}

.ticket-flash-ok { color: var(--green-dark) !important; font-weight: 700; }
.ticket-flash-err { color: #8a3020 !important; font-weight: 600; }

.ticket-note { font-size: 0.68rem; color: var(--muted); text-align: center; margin: 0.4rem 0 0; line-height: 1.45; }

.ticket-slip-wide {
    max-width: none;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.pick-btn.pick-locked,
.score-btn.pick-locked,
.pick-select.pick-locked {
    cursor: not-allowed;
    opacity: 0.85;
}

.pick-btn.selected.pick-locked,
.score-btn.selected.pick-locked {
    box-shadow: inset 0 0 0 2px rgba(45, 107, 72, 0.35);
}

.ticket-flash-ok { color: var(--green-dark) !important; font-weight: 700; }
.ticket-flash-err { color: #8a3020 !important; font-weight: 600; }

.ticket-note { font-size: 0.68rem; color: var(--muted); text-align: center; margin: 0.4rem 0 0; }
.ticket-flush-ok { color: var(--green-dark); font-weight: 700; }

/* --- Communautés / chat / misc --- */
.community-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 0.6rem;
    text-decoration: none;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition:
        box-shadow var(--dur-fast) ease,
        border-color var(--dur-fast) ease,
        transform var(--dur-fast) var(--ease-out),
        background var(--dur-fast) ease;
}

.community-card:hover {
    border-color: var(--green-light);
    box-shadow: 0 4px 14px rgba(45, 107, 72, 0.12);
    transform: translateY(-2px);
}

.community-badge-generale {
    font-size: 0.62rem;
    background: var(--paper-dark);
    padding: 0.15rem 0.45rem;
    margin-left: 0.35rem;
    border-radius: var(--radius-pill);
}

.leaderboard-row {
    position: relative;
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.2rem;
    padding: 0.55rem 0.45rem;
    margin: 0 -0.45rem;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.leaderboard-row--ribbon {
    padding-right: 1.85rem;
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row--podium {
    background: linear-gradient(90deg, rgba(196, 160, 53, 0.07) 0%, transparent 72%);
    border-radius: var(--radius-sm);
}

.leaderboard-row--self {
    background: linear-gradient(90deg, rgba(45, 107, 72, 0.1) 0%, transparent 72%);
    border-radius: var(--radius-sm);
}

.leaderboard-row--self.leaderboard-row--podium {
    background: linear-gradient(90deg, rgba(45, 107, 72, 0.12) 0%, rgba(196, 160, 53, 0.06) 48%, transparent 100%);
}

.panel-body-leaderboard {
    padding-top: 0.55rem;
}

.leaderboard-hint {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.4;
}

.leaderboard-rank {
    font-family: var(--font-display);
    font-weight: 700;
    width: 24px;
    flex-shrink: 0;
    color: var(--muted);
    grid-row: 1;
}

.leaderboard-rank.rank-1 { color: var(--brass-light); }
.leaderboard-rank.rank-2 { color: #9a9a9a; }
.leaderboard-rank.rank-3 { color: #b87333; }

.leaderboard-name {
    min-width: 0;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.4rem;
}

.leaderboard-pseudo {
    font-weight: 600;
    line-height: 1.3;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.leaderboard-you {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.82em;
    white-space: nowrap;
}

.leaderboard-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex-shrink: 0;
}

.leaderboard-points {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--green-dark);
    white-space: nowrap;
    text-align: right;
    position: relative;
    z-index: 2;
    grid-row: 1;
    padding-left: 0.25rem;
    min-width: 3.25rem;
}

/* Ruban diagonal (podium) — coin uniquement, ne chevauche pas les pts */
.lb-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.lb-ribbon-text {
    position: absolute;
    top: 8px;
    right: -16px;
    width: 64px;
    padding: 0.16rem 0;
    text-align: center;
    transform: rotate(45deg);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.46rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.lb-ribbon-gold .lb-ribbon-text {
    background: linear-gradient(160deg, #e8d078, var(--brass));
}

.lb-ribbon-silver .lb-ribbon-text {
    background: linear-gradient(160deg, #d8d8d8, #9a9a9a);
}

.lb-ribbon-bronze .lb-ribbon-text {
    background: linear-gradient(160deg, #d4a574, #b87333);
}

.lb-pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.12rem 0.38rem;
    border-radius: var(--radius-pill);
    line-height: 1.2;
    white-space: nowrap;
}

.lb-pill-fire {
    background: linear-gradient(160deg, #f0a060, #c05818);
    color: #fff;
    box-shadow: 0 1px 4px rgba(192, 88, 24, 0.35);
}

.points-help-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: -0.15rem 0 0.85rem;
}

.lb-pill-demo.lb-pill-gold {
    background: linear-gradient(160deg, #e8d078, var(--brass));
    color: #fff;
}

.lb-pill-demo.lb-pill-silver {
    background: linear-gradient(160deg, #d8d8d8, #9a9a9a);
    color: #fff;
}

.lb-pill-demo.lb-pill-bronze {
    background: linear-gradient(160deg, #d4a574, #b87333);
    color: #fff;
}

.lb-pill-demo.lb-pill-fire {
    background: linear-gradient(160deg, #f0a060, #c05818);
    color: #fff;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    height: 420px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.4);
}

.chat-msg .bubble {
    background: var(--paper-dark);
    padding: 0.5rem 0.75rem;
    border-radius: 14px 14px 14px 4px;
    font-size: 0.88rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chat-msg.mine .bubble {
    background: linear-gradient(160deg, var(--green-light), var(--green));
    color: #fff;
    border-radius: 14px 14px 4px 14px;
}

.chat-form {
    display: flex;
    gap: 0.45rem;
    padding: 0.65rem;
    border-top: 1px solid var(--line);
    background: var(--paper-dark);
}

.chat-form input {
    flex: 1;
    border: 1px solid var(--line);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.6);
}

.chat-form button {
    background: linear-gradient(160deg, var(--green-light), var(--green));
    color: #fff;
    border: none;
    padding: 0 1rem;
    cursor: pointer;
    font-weight: 700;
    border-radius: var(--radius-pill);
}

.page-title {
    font-family: var(--font-display);
    color: var(--paper);
    margin: 0 auto 0.2rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 1040px;
}

.page-sub {
    color: rgba(228, 217, 196, 0.75);
    margin: 0 auto 1.25rem;
    font-size: 0.88rem;
    text-align: center;
    max-width: 640px;
}

.streak-banner {
    background: linear-gradient(135deg, var(--brass-light), var(--brass));
    color: #fff;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(120, 90, 20, 0.3);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.streak-banner .num { font-family: var(--font-display); font-size: 1.65rem; font-weight: 700; }

.invite-intro {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

.invite-box {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.invite-url-wrap {
    flex: 1;
    min-width: 0;
}

.invite-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.invite-url {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--ink);
    word-break: break-all;
    background: transparent;
}

.invite-copy-btn {
    flex-shrink: 0;
    align-self: center;
    white-space: nowrap;
    min-width: 5.5rem;
}

.invite-copy-btn.is-copied {
    background: linear-gradient(160deg, #5a9868, var(--green-dark));
}

/* --- Modal bienvenue bêta --- */
.beta-welcome {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.beta-welcome[hidden] {
    display: none !important;
}

.beta-welcome-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 14, 11, 0.62);
    backdrop-filter: blur(3px);
}

.beta-welcome-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--tex-paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem 1.35rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    text-align: center;
    animation: betaWelcomeIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes betaWelcomeIn {
    from {
        opacity: 0;
        transform: translateY(1rem) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.beta-welcome-close {
    position: absolute;
    top: 0.55rem;
    right: 0.65rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
}

.beta-welcome-close:hover {
    color: var(--ink);
    background: rgba(0, 0, 0, 0.06);
}

.beta-welcome-tag {
    margin: 0 0 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brass);
}

.beta-welcome-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin: 0 0 0.65rem;
    color: var(--ink);
    line-height: 1.3;
}

.beta-welcome-text {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--muted);
}

.beta-welcome-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green-dark);
}

.beta-welcome-link:hover {
    text-decoration: underline;
}

/* --- Ruban bêta diagonal (coin haut-droit) --- */
.beta-ribbon {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 200;
    width: 96px;
    height: 96px;
    overflow: hidden;
    text-decoration: none;
}

.beta-ribbon-text {
    position: absolute;
    top: 20px;
    right: -34px;
    width: 140px;
    padding: 0.32rem 0;
    text-align: center;
    transform: rotate(45deg);
    background: linear-gradient(160deg, #e0c050, var(--brass));
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.beta-ribbon:hover .beta-ribbon-text {
    filter: brightness(1.08);
    color: #fff;
}

/* --- Pied de page --- */
.site-footer {
    margin-top: 2rem;
    padding: 1.25rem 1rem 1.75rem;
    border-top: 1px solid rgba(221, 211, 188, 0.12);
}

.site-footer-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 1.25rem;
    font-size: 0.78rem;
    color: rgba(228, 217, 196, 0.65);
    text-align: center;
}

.site-footer-nav a {
    color: rgba(228, 217, 196, 0.85);
    text-decoration: none;
}

.site-footer-nav a:hover {
    color: var(--paper);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin: 1.25rem 0 0;
    font-size: 0.78rem;
    position: relative;
}

.auth-links {
    text-align: center;
    margin: 1.2rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    position: relative;
}

.auth-links a {
    color: var(--muted);
    text-decoration: none;
}

.auth-links a:hover {
    color: var(--green-dark);
    text-decoration: underline;
}

.auth-links-strong {
    color: var(--green-dark) !important;
    font-weight: 600;
}

.auth-forgot {
    margin: 0.45rem 0 0;
    text-align: right;
    font-size: 0.82rem;
}

.auth-forgot a {
    color: var(--muted);
    text-decoration: none;
}

.auth-forgot a:hover {
    color: var(--green-dark);
    text-decoration: underline;
}

.auth-footer a {
    color: var(--muted);
}

/* --- Page légale --- */
.legal-page { padding-bottom: 0.5rem; }

.legal-panel { margin-bottom: 1rem; }

.legal-body h2 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin: 1.35rem 0 0.5rem;
    color: var(--green-dark);
}

.legal-body h2:first-of-type { margin-top: 0.5rem; }

.legal-body p, .legal-body li {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--ink);
}

.legal-body ul {
    margin: 0.35rem 0 0.85rem;
    padding-left: 1.25rem;
}

.legal-body a {
    color: var(--green-dark);
    font-weight: 600;
}

/* --- Pages statut (404, maintenance) --- */
.status-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(70vh, 560px);
    padding: 1.5rem 0;
}

.status-page-standalone {
    min-height: 100vh;
    background: var(--tex-felt);
}

.status-card {
    max-width: 28rem;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.75rem;
    text-align: center;
    background: var(--tex-paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(90, 75, 55, 0.28);
}

.status-ball {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, #444 0%, #0a0a0a 70%);
    border: 3px solid var(--brass-light);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-ball span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #f5f0e6;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--ink);
}

.status-tag {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brass);
}

.status-title {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: 1.55rem;
    color: var(--ink);
}

.status-lead {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.status-meta {
    margin: -0.5rem 0 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* --- Desktop ticket (sidebar) --- */
@media (min-width: 769px) {
    .pronos-ticket {
        position: sticky;
        top: 0.75rem;
        transform: none;
        width: 100%;
        max-width: 280px;
        justify-self: stretch;
        margin-top: var(--sport-section-head-space);
    }

    .pronos-page:not(:has(.sport-section-head)) .pronos-ticket {
        margin-top: 0;
    }

    .pronos-ticket.is-collapsed,
    .pronos-ticket.is-dragging {
        transform: none;
    }

    .ticket-mobile-handle,
    .ticket-head-summary {
        display: none !important;
    }

    .ticket-mobile-body {
        max-height: none !important;
        opacity: 1 !important;
    }

    .pronos-ticket.is-collapsed .ticket-mobile-body {
        max-height: none !important;
        opacity: 1 !important;
    }

    .ticket-slip-header {
        cursor: default;
    }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    :root {
        --ticket-mobile-space: 4rem;
        --page-gutter: 0.65rem;
        --sport-cat-mobile-height: 3.1rem;
    }

    html {
        scroll-padding-bottom: calc(var(--ticket-mobile-space) + 0.5rem);
    }

    .topbar-inner {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .topbar-center { order: 1; }
    .topbar-side-left { order: 2; justify-content: center; }
    .topbar-side-right { order: 3; justify-content: center; }

    .beta-ribbon {
        width: 84px;
        height: 84px;
    }

    .beta-ribbon-text {
        top: 16px;
        right: -36px;
        width: 130px;
        font-size: 0.58rem;
    }

    .pronos-page {
        grid-template-columns: 1fr;
    }

    .sport-cat-sticky-sentinel,
    .sport-cat-panel,
    .pronos-matches,
    .pronos-ticket {
        grid-column: 1;
    }

    .pronos-matches {
        padding-bottom: calc(var(--ticket-mobile-space) + 0.75rem);
        transition: padding-bottom 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    }

    .app-main {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
    }

    .pronos-ticket {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        z-index: 50;
        margin: 0;
        max-width: none;
        width: auto;
        justify-self: auto;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border: none;
        border-top: 3px solid var(--brass-light);
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
        overflow: hidden;
        padding-bottom: env(safe-area-inset-bottom, 0);
        transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
        will-change: transform;
    }

    .pronos-ticket.is-collapsed {
        transform: translateY(calc(100% - 2.85rem));
    }

    .ticket-mobile-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0.55rem 0 0.2rem;
        border: none;
        background: transparent;
        cursor: pointer;
        touch-action: none;
    }

    .ticket-handle-bar {
        width: 2.75rem;
        height: 0.28rem;
        border-radius: var(--radius-pill);
        background: rgba(90, 75, 55, 0.38);
        transition: width 0.2s ease, background 0.2s ease;
    }

    .ticket-mobile-handle:active .ticket-handle-bar,
    .pronos-ticket.is-dragging .ticket-handle-bar {
        width: 3.25rem;
        background: rgba(90, 75, 55, 0.55);
    }

    .ticket-slip-header {
        cursor: pointer;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        padding-top: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .ticket-head-summary {
        display: none;
        flex: 1;
        min-width: 0;
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: right;
        padding-right: 0.35rem;
    }

    .pronos-ticket.is-collapsed .ticket-slip-sub,
    .pronos-ticket.is-collapsed .ticket-slip-brand {
        display: none;
    }

    .pronos-ticket.is-collapsed .ticket-head-summary:not([hidden]) {
        display: block;
    }

    .pronos-ticket:not(.is-collapsed) {
        max-height: min(72vh, calc(100dvh - env(safe-area-inset-bottom, 0px) - 0.5rem));
    }

    .ticket-mobile-body {
        transition: max-height 0.38s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.28s ease;
        opacity: 1;
    }

    .pronos-ticket.is-collapsed .ticket-mobile-body {
        max-height: 0;
        flex: none;
        opacity: 0;
    }

    .pronos-ticket.is-collapsed .ticket-count {
        box-shadow: 0 2px 8px rgba(30, 80, 53, 0.45);
    }

    .topbar-nav { width: 100%; }
    .hero h1 { font-size: 1.2rem; }
    .match-teams { flex-direction: column; text-align: center; gap: 0.2rem; }
    .team.home, .team.away { text-align: center; flex: none; }
    .score-grid { grid-template-columns: repeat(4, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .match-card { border-radius: var(--radius); }

    .pick-btn { min-height: 2.75rem; }
    .score-btn { min-height: 2.45rem; padding: 0.45rem 0.25rem; }
    .ticket-remove { width: 2rem; height: 2rem; }

    .ticket-item-draft {
        padding-right: 2.85rem;
    }

    .invite-box {
        flex-direction: column;
        align-items: stretch;
    }

    .invite-copy-btn {
        width: 100%;
        min-width: 0;
    }

    .leaderboard-row {
        column-gap: 0.5rem;
    }

    .leaderboard-row--ribbon {
        padding-right: 1.65rem;
    }

    .leaderboard-points {
        min-width: 2.75rem;
        font-size: 0.8rem;
    }

    .lb-ribbon {
        width: 38px;
        height: 38px;
    }

    .lb-ribbon-text {
        top: 7px;
        right: -14px;
        width: 56px;
        font-size: 0.42rem;
    }

    /* Catégories sport — compactes pour laisser de la place aux matchs */
    .sport-cat-panel {
        margin-bottom: 0.75rem;
        border-radius: var(--radius);
    }

    .sport-cat-panel-head {
        display: none;
    }

    .sport-cat-nav {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.3rem;
        padding: 0.4rem;
    }

    .sport-cat-btn {
        flex-direction: column;
        justify-content: center;
        gap: 0.12rem;
        width: 100%;
        min-height: var(--sport-cat-mobile-height);
        padding: 0.35rem 0.2rem;
        font-size: 0.68rem;
        line-height: 1.1;
        text-align: center;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .sport-cat-btn .fa-solid {
        font-size: 0.95rem;
        line-height: 1;
    }

    .sport-cat-count {
        font-size: 0.58rem;
        padding: 0.05rem 0.28rem;
    }

    .sport-cat-panel.is-stuck {
        border-radius: 0 0 var(--radius) var(--radius);
    }

    .sport-cat-panel.is-stuck .sport-cat-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.2rem;
        padding: 0.3rem 0.4rem;
    }

    .sport-cat-panel.is-stuck .sport-cat-btn {
        flex-direction: row;
        justify-content: center;
        min-height: 2.35rem;
        padding: 0.3rem 0.15rem;
        font-size: 0.64rem;
        gap: 0.2rem;
    }

    .sport-cat-panel.is-stuck .sport-cat-btn .fa-solid {
        font-size: 0.82rem;
    }

    .sport-cat-panel.is-stuck .sport-cat-count {
        font-size: 0.55rem;
    }

    .pronos-page {
        gap: 0.5rem;
    }

    .sport-section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .sport-section-title {
        font-size: 1.05rem;
    }

    .sport-section-meta {
        white-space: normal;
        font-size: 0.7rem;
    }
}

/* --- Animations UI --- */
@keyframes ui-rise-in {
    from {
        opacity: 0;
        transform: translateY(0.65rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ui-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.app-main {
    animation: ui-fade-in var(--dur-slow) var(--ease-out) both;
}

.hero {
    animation: ui-rise-in var(--dur-slow) var(--ease-out) 0.05s both;
}

.pronos-page,
.dashboard-grid,
.grid-2 {
    animation: ui-rise-in var(--dur-slow) var(--ease-out) 0.08s both;
}

.match-card {
    animation: ui-rise-in var(--dur-med) var(--ease-out) both;
}

.match-card:nth-child(1) { animation-delay: 0.04s; }
.match-card:nth-child(2) { animation-delay: 0.07s; }
.match-card:nth-child(3) { animation-delay: 0.1s; }
.match-card:nth-child(4) { animation-delay: 0.13s; }
.match-card:nth-child(n+5) { animation-delay: 0.15s; }

.panel {
    animation: ui-rise-in var(--dur-med) var(--ease-out) 0.06s both;
}

.ticket-slip {
    animation: ui-rise-in var(--dur-slow) var(--ease-out) 0.1s both;
}

.leaderboard-row {
    animation: ui-rise-in var(--dur-med) var(--ease-out) both;
}

.leaderboard-row:nth-child(2) { animation-delay: 0.03s; }
.leaderboard-row:nth-child(3) { animation-delay: 0.06s; }
.leaderboard-row:nth-child(4) { animation-delay: 0.09s; }
.leaderboard-row:nth-child(5) { animation-delay: 0.12s; }
.leaderboard-row:nth-child(n+6) { animation-delay: 0.14s; }

.alert {
    animation: ui-rise-in var(--dur-med) var(--ease-out) both;
}

.ticket-flash:not([hidden]) {
    animation: ui-rise-in var(--dur-fast) var(--ease-out) both;
}

.btn {
    transition:
        background var(--dur-fast) ease,
        border-color var(--dur-fast) ease,
        color var(--dur-fast) ease,
        box-shadow var(--dur-fast) ease,
        transform var(--dur-fast) var(--ease-out),
        filter var(--dur-fast) ease;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
    .pronos-ticket,
    .ticket-mobile-body,
    .pronos-matches,
    .ticket-validate-btn,
    .sport-section,
    .sport-cat-panel,
    .sport-cat-btn,
    .nav-link,
    .points-help-backdrop,
    .points-help-card,
    .ticket-item,
    .community-card,
    .leaderboard-row,
    .app-main,
    .hero,
    .match-card,
    .panel,
    .ticket-slip {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }

    .beta-welcome-card {
        animation: none;
    }
}

@media (max-width: 400px) {
    :root {
        --sport-cat-mobile-height: 2.85rem;
    }

    .score-grid { grid-template-columns: repeat(3, 1fr); }
    .pick-row { gap: 0.3rem; }

    .sport-cat-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sport-cat-panel.is-stuck .sport-cat-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-lead {
        font-size: 0.82rem;
        line-height: 1.45;
    }
}
