/* Prognoz — Bulletin de courses (vert / papier / bois / laiton) */

: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.28);

    --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: 'Figtree', system-ui, sans-serif;
    --font-body: 'Figtree', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 10px;
    --radius-pill: 8px;

    --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.18);
    --shadow-card: 0 1px 3px rgba(20, 12, 8, 0.14);
    --shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.06);

    --page-max: 1080px;
    --page-gutter: 1rem;
    --layout-gap: 1.05rem;
    --section-gap: 1.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;
}

:root {
    --tex-noise: none;
    --tex-felt:
        url('../img/felt.jpg'),
        linear-gradient(180deg, #142218 0%, #1a3226 55%, #15261d 100%);
    --tex-wood:
        url('../img/wood-counter.jpg'),
        linear-gradient(180deg, #5a3e2c 0%, var(--wood-bar) 45%, #3a2618 100%);
    --tex-paper: var(--paper);
}

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

html {
    scrollbar-gutter: stable;
    background: var(--bg);
    min-height: 100%;
}

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

body {
    margin: 0;
    background-color: var(--bg);
    background-image: var(--tex-felt);
    background-size: 256px 256px, auto;
    background-attachment: scroll;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
    overflow-x: clip;
}

body::before,
body::after {
    display: none;
}

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

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

/* --- Topbar comptoir --- */
.topbar {
    background-color: var(--wood-bar);
    background-image:
        linear-gradient(
            180deg,
            rgba(255, 220, 170, 0.1) 0%,
            transparent 42%,
            rgba(0, 0, 0, 0.22) 100%
        ),
        var(--tex-wood);
    background-size: auto, 100% 100%, auto;
    background-repeat: no-repeat, no-repeat, no-repeat;
    border-bottom: 2px solid var(--brass);
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 220, 170, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.28);
    padding: 0.85rem var(--page-gutter) 0.9rem;
    position: sticky;
    top: 0;
    z-index: 50;
    overflow: visible;
}

.topbar::before,
.topbar::after {
    display: none;
}

.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;
    position: relative;
    z-index: 1;
}

.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;
    min-width: 0;
    overflow: visible;
}

.topbar-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--paper);
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
    letter-spacing: 0.1em;
    line-height: 1.6;
    display: inline-block;
    text-align: center;
    text-transform: uppercase;
    padding: 0.4rem 0.25rem 0.45rem;
    overflow: visible;
}

.brand-icon { display: none; }

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

.nav-link {
    color: rgba(228, 217, 196, 0.78);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-sm);
    border: none;
    border-bottom: 2px solid transparent;
    transition:
        color var(--dur-fast) ease,
        border-color var(--dur-fast) ease,
        background var(--dur-fast) ease;
}

.nav-link:active {
    transform: none;
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.15);
    color: var(--paper);
    border-color: transparent;
    box-shadow: none;
}

.nav-link.active {
    background: transparent;
    color: var(--paper);
    border-bottom-color: var(--brass-light);
    box-shadow: none;
}

.topbar-actions { display: none; }

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--paper);
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.95;
}

.badge-admin {
    display: inline-flex;
    align-items: center;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brass);
    border: 1px solid rgba(154, 116, 32, 0.55);
    background: rgba(154, 116, 32, 0.12);
    padding: 0.12rem 0.35rem;
    border-radius: 3px;
    line-height: 1.2;
    opacity: 0.95;
}

.dash-id-title .badge-admin {
    margin-left: 0.35rem;
    vertical-align: middle;
    position: relative;
    top: -0.1em;
}

.pill-points {
    font-family: var(--font-mono);
    background: var(--brass);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.28rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: none;
}

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

button.pill-points-btn:hover {
    filter: brightness(1.08);
    transform: none;
}

button.pill-points-btn:active {
    transform: none;
}

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

.btn:active { transform: translateY(1px); }

.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; }

.btn-primary {
    background: var(--green);
    color: #fff;
    border-color: var(--green-dark);
    box-shadow: none;
}

.btn-primary:hover {
    background: var(--green-dark);
    box-shadow: none;
}

.btn-accent {
    background: var(--brass);
    color: #fff;
    border-color: #7a5a10;
    box-shadow: none;
}

.btn-accent:hover {
    background: #8a6418;
}

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

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

.btn-block { width: 100%; }

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

.panel::before {
    display: none;
}

.panel-head {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: -0.02em;
    background: var(--paper-mid);
    position: relative;
}

.panel-body { padding: 0.85rem 0.95rem; position: relative; }
.panel-spaced { margin-bottom: var(--section-gap); }
.empty-msg { color: var(--muted); text-align: center; padding: 1.15rem; }

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

.auth-wrap {
    width: 100%;
    max-width: 26rem;
}

.auth-back {
    margin-bottom: 0.65rem;
    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.55) !important;
    background: rgba(0, 0, 0, 0.28) !important;
}

.auth-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.45rem 1.35rem 1.25rem;
    width: 100%;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    display: none;
}

.auth-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.7rem;
    text-align: center;
    line-height: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    margin: 0;
    padding: 0.35rem 0.1rem 0.4rem;
    overflow: visible;
}

.auth-sub {
    text-align: center;
    color: var(--muted);
    font-size: 0.88rem;
    margin: 0.25rem 0 1rem;
    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: 1rem var(--page-gutter) 1.65rem;
    max-width: var(--page-max);
    margin: 0 auto;
    width: 100%;
}

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

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

.hero-member {
    padding: 0.45rem var(--page-gutter) 0.35rem;
}

.hero-guest {
    text-align: left;
    padding: 1.1rem var(--page-gutter) 1rem;
}

.hero-guest-grid {
    display: grid;
    grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
    gap: 1.15rem;
    align-items: center;
    max-width: 52rem;
    margin: 0 auto;
}

.hero-guest-visual {
    display: flex;
    justify-content: center;
}

.hero-scene {
    position: relative;
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(196, 160, 53, 0.45);
}

.hero-scene-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 26%;
    background-color: var(--wood-bar);
    background-image:
        linear-gradient(180deg, rgba(255, 220, 170, 0.1), transparent 50%, rgba(0, 0, 0, 0.2)),
        var(--tex-wood);
    background-size: auto, 100% 100%, auto;
    background-repeat: no-repeat;
    border-bottom: 2px solid var(--brass);
}

.hero-scene-felt {
    position: absolute;
    inset: 26% 0 0;
    background-image: var(--tex-felt);
    background-size: 180px 180px, auto;
}

.hero-scene-ball {
    position: absolute;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    animation: none;
}

.hero-scene-ball--foot {
    left: 18%;
    top: 42%;
    background: #2a2a2a;
}

.hero-scene-ball--basket {
    right: 16%;
    top: 48%;
    background: #a04814;
}

.hero-scene-ball--tennis {
    left: 42%;
    bottom: 16%;
    background: #8fa018;
}

.hero-scene-chalk {
    position: absolute;
    right: 10%;
    top: 36%;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.06em;
    transform: rotate(-6deg);
}

@keyframes hero-ball-float {
    0%, 100% { transform: none; }
    50% { transform: none; }
}

.hero-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brass-light);
}

.hero-guest-copy h1 {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3.4vw, 1.85rem);
    font-weight: 800;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
    color: var(--paper);
    line-height: normal;
    padding: 0.15rem 0 0.2rem;
    text-shadow: none;
    overflow: visible;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    letter-spacing: -0.01em;
    color: var(--paper);
    line-height: normal;
    padding: 0.1rem 0 0.15rem;
    text-shadow: none;
    overflow: visible;
}

.hero-lead {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(228, 217, 196, 0.78);
    line-height: 1.55;
    max-width: 36rem;
}

.hero-guest-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.hero-cta-main {
    box-shadow: none;
}

.btn-lg {
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
}

.hero p { margin: 0; }

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

.page-head {
    grid-column: 1 / -1;
    margin-bottom: 0.15rem;
}

.page-head .page-title {
    margin-bottom: 0.15rem;
}

.page-head .page-sub {
    margin-bottom: 0.35rem;
}

.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: var(--layout-gap); }

/* --- Match cards (bulletin / ticket) --- */
.match-card.match-slip {
    background: var(--paper);
    border: 1px solid rgba(90, 75, 55, 0.32);
    border-radius: var(--radius-sm);
    padding: 0;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
    min-width: 0;
}

.match-card-body {
    position: relative;
    padding: 0.8rem 0.95rem 0.95rem;
}

.match-slip-edge {
    height: 0.4rem;
    flex-shrink: 0;
    background:
        radial-gradient(circle at 6px 0.4rem, transparent 4.5px, rgba(90, 75, 55, 0.28) 4.5px) 0 0 / 12px 100% repeat-x;
    opacity: 0.9;
}

.match-slip-edge-bottom {
    transform: rotate(180deg);
}

.match-card.match-slip::before {
    display: none;
}

.match-card.match-slip::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4rem;
    bottom: 0.4rem;
    width: 3px;
    background: var(--green);
    border-radius: 0;
    z-index: 1;
}

.match-card.match-slip:hover {
    transform: translateY(-1px);
    border-color: rgba(45, 107, 72, 0.55);
    box-shadow: 0 3px 10px rgba(20, 12, 8, 0.16);
}

.match-card.match-slip.is-picks-closed {
    opacity: 0.9;
}

.match-card.match-slip.is-result-flash,
.match-card.match-slip.is-result-flash:hover {
    animation: match-result-flash 1.2s ease 1;
}

@keyframes match-result-flash {
    0%, 100% { box-shadow: var(--shadow-card); }
    40% { box-shadow: 0 0 0 2px rgba(74, 148, 104, 0.5); }
}

.match-card.match-slip .market-block {
    border-top: 2px dashed rgba(90, 75, 55, 0.28);
    padding-top: 0.65rem;
    margin-top: 0.55rem;
}

/* Legacy alias if .match-slip absent */
.match-card:not(.match-slip) {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem 1rem;
    margin-bottom: 0.85rem;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
    transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) ease;
    min-width: 0;
}

.match-card:not(.match-slip)::before {
    display: none;
}

.match-card:not(.match-slip)::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--green);
    border-radius: 0;
}

.match-card:not(.match-slip):hover {
    transform: translateY(-1px);
    border-color: rgba(45, 107, 72, 0.55);
    box-shadow: 0 3px 10px rgba(20, 12, 8, 0.16);
}

.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: var(--section-gap);
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
    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);
}

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

.sport-cat-panel.is-stuck {
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

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

.sport-cat-panel-head {
    padding: 0.6rem 0.95rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.88rem;
    background: var(--paper-mid);
    color: var(--ink);
}

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

.sport-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition:
        background var(--dur-fast) ease,
        border-color var(--dur-fast) ease,
        color var(--dur-fast) ease;
}

.sport-cat-btn:active {
    transform: none;
}

.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: var(--green);
    border-color: var(--green-dark);
    color: #fff;
    box-shadow: none;
}

.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-sm);
}

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

.sport-section {
    margin-bottom: var(--section-gap);
    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.55rem;
    padding-bottom: 0.3rem;
    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: none;
    letter-spacing: -0.01em;
    line-height: 1.4;
    padding-bottom: 0.1em;
    overflow: visible;
}

.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.6rem;
    margin-bottom: 0.65rem;
    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-mono);
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 600;
    opacity: 0.75;
    letter-spacing: 0.04em;
}

.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: var(--green);
    color: #fff;
    padding: 0.12rem 0.4rem;
    font-size: 0.62rem;
    margin-left: 0.3rem;
    border-radius: var(--radius-sm);
    vertical-align: middle;
}

.pts-tag.pts-2 { background: var(--brass); }
.pts-tag.pts-3 { background: 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;
    justify-content: center;
    gap: 0.15rem;
    min-height: 3.15rem;
    box-shadow: none;
    transition:
        background var(--dur-fast) ease,
        border-color var(--dur-fast) ease,
        color var(--dur-fast) ease;
}

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

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

.pick-prob--empty {
    color: var(--muted);
    opacity: 0.45;
    font-weight: 600;
}

.pick-btn--no-prob .pick-val {
    letter-spacing: 0.02em;
}

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

.pick-btn:hover, .score-btn:hover {
    border-color: var(--green-light);
    background: rgba(238, 245, 240, 0.9);
    box-shadow: none;
    transform: none;
}

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

.pick-btn.selected, .score-btn.selected {
    background: var(--green);
    border-color: var(--green-dark);
    color: #fff;
    box-shadow: none;
}

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

.score-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem 0.7rem;
    align-items: start;
}

.score-col-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0 0 0.4rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score-col--draw .score-col-label {
    text-align: center;
}

.score-col-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.score-picker .score-btn {
    width: 100%;
    font-size: 0.78rem;
    padding: 0.42rem 0.2rem;
    border-radius: var(--radius-sm);
}

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

.match-markets-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    margin-top: 0.6rem;
    padding: 0.58rem 0.7rem;
    border: 1px dashed rgba(90, 75, 55, 0.38);
    border-radius: var(--radius-sm);
    background: rgba(255, 252, 244, 0.72);
    color: var(--ink);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: left;
    box-shadow: none;
    transition:
        background var(--dur-fast) ease,
        border-color var(--dur-fast) ease;
}

.match-markets-toggle:hover {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(45, 107, 72, 0.45);
    box-shadow: none;
}

.match-markets-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    flex: 1;
    min-width: 0;
}

.match-markets-toggle-label {
    font-weight: 700;
    color: var(--green-dark);
}

.match-markets-toggle-hint {
    font-size: 0.68rem;
    color: var(--muted);
}

.match-markets-toggle-pts {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--brass);
    white-space: nowrap;
}

.match-markets-chevron {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--muted);
    transition: transform var(--dur-med) var(--ease-out);
}

.match-card.is-markets-open .match-markets-chevron {
    transform: rotate(180deg);
}

.match-markets-extra {
    margin-top: 0.15rem;
}

.match-markets-extra[hidden] {
    display: none !important;
}

.market-block-extra {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
}

.market-block-extra:first-child {
    margin-top: 0.35rem;
}

.market-unavailable {
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px dashed rgba(90, 75, 55, 0.28);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.45);
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.45;
    text-align: center;
}

.scorer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    max-height: 10.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.1rem;
}

.scorer-btn {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.72rem;
    line-height: 1.25;
    padding: 0.48rem 0.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    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);
}

.scorer-btn:hover {
    border-color: var(--brass-light);
    background: rgba(255, 248, 232, 0.95);
    box-shadow: none;
    transform: none;
}

.scorer-btn.selected {
    background: var(--brass);
    border-color: #8a6830;
    color: #fff;
    box-shadow: none;
}

.scorer-btn:active:not(:disabled) {
    transform: none;
}

.scorer-btn.pick-locked,
.scorer-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.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.65rem;
    width: 100%;
    max-width: 272px;
    justify-self: stretch;
    align-self: start;
}

.ticket-slip {
    background: var(--paper);
    border: 1px solid rgba(90, 75, 55, 0.38);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    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 {
    display: none;
}

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

.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.6rem 0.85rem 0.5rem;
    border-bottom: 2px dashed rgba(90, 75, 55, 0.32);
    background: var(--paper-mid);
    position: relative;
}

.ticket-slip-header-saved {
    background: rgba(154, 116, 32, 0.12);
}

.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: var(--green);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    box-shadow: none;
    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 solid rgba(90, 75, 55, 0.28);
    border-left: 3px solid var(--green);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.55rem;
    font-size: 0.82rem;
    box-shadow: none;
    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-sm);
}

.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: var(--layout-gap);
    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.65rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-bottom: 0.45rem;
    text-decoration: none;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.45);
    box-shadow: none;
    transition:
        border-color var(--dur-fast) ease,
        background var(--dur-fast) ease;
}

.community-card:hover {
    border-color: var(--green-light);
    box-shadow: none;
    transform: none;
    background: rgba(255, 255, 255, 0.7);
}

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

.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: transparent;
}

.leaderboard-row--self {
    background: rgba(45, 107, 72, 0.06);
    border-radius: var(--radius-sm);
}

.leaderboard-row--self.leaderboard-row--podium {
    background: rgba(45, 107, 72, 0.06);
}

.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: nowrap;
    align-items: center;
    gap: 0.45rem;
}

.leaderboard-name-text {
    min-width: 0;
    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.62rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.05rem 0.32rem;
    border-radius: 3px;
    line-height: 1.25;
    white-space: nowrap;
    border: 1px solid transparent;
}

.lb-pill-gold {
    background: rgba(196, 160, 53, 0.12);
    border-color: rgba(196, 160, 53, 0.28);
    color: #7a6418;
}

.lb-pill-silver {
    background: rgba(120, 120, 120, 0.1);
    border-color: rgba(120, 120, 120, 0.22);
    color: #5a5a5a;
}

.lb-pill-bronze {
    background: rgba(184, 115, 51, 0.1);
    border-color: rgba(184, 115, 51, 0.25);
    color: #8a5520;
}

.lb-pill-fire {
    background: rgba(160, 90, 40, 0.08);
    border-color: rgba(160, 90, 40, 0.22);
    color: #8a4a18;
    box-shadow: none;
    text-transform: none;
}

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

/* Démos d’aide : même style discret que le classement (pas de dégradé flashy). */

.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 {
    margin-bottom: 0.75rem;
    max-width: 92%;
}

.chat-msg.mine {
    margin-left: auto;
}

.chat-msg-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
}

.chat-msg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.45rem;
    min-width: 0;
}

.chat-msg .author {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ink);
}

.chat-msg.mine .author {
    color: var(--green-dark);
}

.chat-time {
    font-size: 0.65rem;
    color: var(--muted);
}

.chat-avatar {
    flex-shrink: 0;
}

.chat-msg .bubble {
    background: var(--paper-dark);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius) var(--radius) var(--radius) 4px;
    font-size: 0.88rem;
    box-shadow: none;
}

.chat-msg.mine .bubble {
    background: var(--green);
    color: #fff;
    border-radius: var(--radius) var(--radius) 4px var(--radius);
}

.chat-typing {
    min-height: 1.25rem;
    padding: 0.15rem 0.85rem 0.35rem;
    font-size: 0.78rem;
    color: var(--muted);
    font-style: italic;
    border-top: 1px solid transparent;
    background: rgba(255, 255, 255, 0.35);
}

.chat-typing:not([hidden]) {
    border-top-color: var(--line);
}

.chat-send-error {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    color: #8b1e1e;
    background: rgba(180, 40, 40, 0.08);
    border-top: 1px solid rgba(180, 40, 40, 0.25);
}

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

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

.chat-form button {
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green-dark);
    padding: 0 1rem;
    cursor: pointer;
    font-weight: 700;
    border-radius: var(--radius-sm);
}

.page-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--paper);
    margin: 0 auto 0.65rem;
    text-shadow: none;
    letter-spacing: -0.015em;
    line-height: 1.6;
    padding: 0.35rem 0.15rem 0.45rem;
    text-align: center;
    max-width: var(--page-max);
    overflow: visible;
}

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

.streak-banner {
    position: relative;
    max-width: 22rem;
    margin: 0 auto 0.75rem;
    padding: 0.48rem 0.7rem 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--brass);
    border: 1px solid #7a5a10;
    color: #fff;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform-origin: center top;
}

.streak-banner.is-popping {
    animation: streak-pop-in 0.58s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.streak-banner.is-boost {
    animation: streak-pop-in 0.62s cubic-bezier(0.34, 1.55, 0.64, 1) both,
               streak-glow-pulse 0.75s ease 0.42s 2;
}

.streak-banner-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.95rem;
    line-height: 1;
    transform-origin: center;
}

.streak-banner.is-boost .streak-banner-icon {
    animation: streak-fire-pop 0.55s cubic-bezier(0.34, 1.5, 0.64, 1) 0.28s both;
}

.streak-banner-body {
    min-width: 0;
    flex: 1;
}

.streak-banner-line {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: none;
}

.streak-banner-num {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-right: 0.2rem;
}

.streak-banner-msg {
    margin: 0.12rem 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    opacity: 0.92;
}

.streak-banner--unlocked {
    box-shadow:
        0 4px 16px rgba(120, 90, 20, 0.36),
        0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

@keyframes streak-pop-in {
    0% {
        opacity: 0;
        transform: scale(0.55) translateY(0.65rem);
    }
    58% {
        opacity: 1;
        transform: scale(1.07) translateY(0);
    }
    78% {
        transform: scale(0.96);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes streak-fire-pop {
    0% {
        transform: scale(0.4) rotate(-12deg);
    }
    65% {
        transform: scale(1.18) rotate(4deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes streak-glow-pulse {
    0%, 100% {
        box-shadow:
            0 3px 12px rgba(120, 90, 20, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.28);
    }
    50% {
        box-shadow:
            0 6px 22px rgba(200, 140, 30, 0.48),
            0 0 0 2px rgba(255, 240, 180, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.35);
    }
}

.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: var(--green);
    border-color: 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 & liens légaux --- */
.site-footer {
    margin-top: 1.75rem;
    padding: 1.35rem 1rem 1.65rem;
    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-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.82rem;
    color: rgba(228, 217, 196, 0.65);
    text-align: center;
}

.site-footer-nav,
.settings-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.85rem 2rem;
}

.site-footer-nav a,
.settings-legal a {
    display: inline-block;
    padding: 0.4rem 0.2rem;
    line-height: 1.5;
    white-space: nowrap;
}

.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 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.45rem;
    text-align: center;
    margin: 0.85rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(90, 75, 55, 0.14);
    font-size: 0.78rem;
    line-height: 1.3;
    position: relative;
}

.auth-footer a {
    color: var(--muted);
    text-decoration: none;
    padding: 0.1rem 0;
}

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

.auth-footer-sep {
    color: rgba(90, 75, 55, 0.45);
    user-select: none;
}

.auth-links {
    text-align: center;
    margin: 0.85rem 0 0;
    font-size: 0.86rem;
    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.4rem 0 0;
    text-align: right;
    font-size: 0.8rem;
}

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

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

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

.legal-page .page-sub {
    margin-bottom: 1.65rem;
}

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

.legal-panel .panel-body {
    padding: 1.45rem 1.5rem 1.75rem;
}

.legal-body h2 {
    font-family: var(--font-display);
    font-size: 1.08rem;
    margin: 2.35rem 0 0.9rem;
    color: var(--green-dark);
}

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

.legal-body p {
    font-size: 0.94rem;
    line-height: 1.7;
    color: var(--ink);
    margin: 0 0 1.25rem;
}

.legal-body p:last-child {
    margin-bottom: 0;
}

.legal-body li {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.legal-body li:last-child {
    margin-bottom: 0;
}

.legal-body ul {
    margin: 0.5rem 0 1.35rem;
    padding-left: 1.4rem;
}

.legal-body ul:last-child {
    margin-bottom: 0.5rem;
}

.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: 120;
        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));
    }

    @keyframes ticket-count-pulse {
        0%, 100% { transform: translateY(calc(100% - 2.85rem)); }
        40% { transform: translateY(calc(100% - 3.05rem)); }
    }

    .pronos-ticket.is-collapsed.is-count-pulse {
        animation: ticket-count-pulse 0.52s var(--ease-spring) 1;
    }

    .pronos-ticket.is-collapsed.is-count-pulse .ticket-count {
        animation: ticket-badge-pop 0.52s var(--ease-spring) 1;
    }

    @keyframes ticket-badge-pop {
        0%, 100% { transform: scale(1); }
        45% { transform: scale(1.12); }
    }

    .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(52vh, calc(100dvh - env(safe-area-inset-bottom, 0px) - 1.25rem));
    }

    .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; }
    .scorer-grid {
        grid-template-columns: 1fr;
    }

    .score-picker { gap: 0.45rem 0.5rem; }
    .score-picker .score-btn { font-size: 0.74rem; min-height: 2.45rem; padding: 0.45rem 0.2rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .match-card { border-radius: var(--radius); }

    .pick-btn { min-height: 2.75rem; }
    .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 {
    overflow: visible;
}

.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; }

.ticket-slip {
    animation: ui-fade-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;
    }

    .pronos-ticket.is-collapsed {
        transform: none !important;
    }

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

    .streak-banner.is-popping,
    .streak-banner.is-boost {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .streak-banner.is-boost .streak-banner-icon {
        animation: none;
    }

    .point-toast--pop,
    .point-toast--out {
        animation: none;
    }
}

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

    .score-col-label { font-size: 0.6rem; letter-spacing: 0.02em; }
    .score-picker .score-btn { font-size: 0.7rem; min-height: 2.3rem; }
    .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;
    }

    .site-footer-nav,
    .settings-legal {
        flex-direction: column;
        gap: 0.75rem;
    }

    .site-footer-nav a,
    .settings-legal a {
        padding: 0.35rem 0.5rem;
    }
}

/* --- Toasts points / historique / amis / howto --- */
.notify-prompt {
    position: fixed;
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0));
    left: 50%;
    transform: translateX(-50%);
    z-index: 640;
    width: min(28rem, calc(100vw - 1.3rem));
}

.notify-prompt-inner {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f8f4e8 0%, #efe8d8 100%);
    border: 1px solid rgba(120, 90, 40, 0.28);
    box-shadow: 0 10px 32px rgba(20, 12, 8, 0.2);
}

.notify-prompt-text {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--ink);
}

.notify-prompt-text i {
    color: var(--accent);
    margin-right: 0.35rem;
}

.notify-prompt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.point-toast-stack {
    position: fixed;
    top: calc(var(--sport-cat-sticky-top, 3.5rem) + 0.65rem);
    right: max(0.65rem, env(safe-area-inset-right, 0));
    z-index: 650;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-width: min(22rem, calc(100vw - 1.3rem));
    pointer-events: none;
}

.point-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f0faf4 0%, #e2f2e8 100%);
    border: 1px solid rgba(45, 107, 72, 0.35);
    box-shadow: 0 8px 28px rgba(20, 12, 8, 0.22);
}

.point-toast--summary {
    background: linear-gradient(135deg, #f8f0dc, #efe3c8);
    border-color: rgba(160, 120, 48, 0.4);
}

.point-toast--pop {
    animation: point-toast-pop 0.55s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.point-toast--out {
    animation: point-toast-out 0.28s ease forwards;
}

.point-toast-icon {
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--green-light), var(--green));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.point-toast-body { min-width: 0; flex: 1; }

.point-toast-title {
    margin: 0;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--green-dark);
}

.point-toast-match {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
}

.point-toast-detail {
    margin: 0.12rem 0 0;
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.35;
}

.point-toast-link {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
}

.point-toast-link a {
    color: var(--green-dark);
    text-decoration: none;
}

.point-toast-link a:hover {
    text-decoration: underline;
}

.point-toast-close {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

@keyframes point-toast-pop {
    0% { opacity: 0; transform: scale(0.7) translateX(1rem); }
    65% { opacity: 1; transform: scale(1.04) translateX(0); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes point-toast-out {
    to { opacity: 0; transform: translateX(0.75rem); }
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    max-width: 640px;
    margin: 0 auto 0.9rem;
}

.stats-chip {
    text-align: center;
    padding: 0.55rem 0.35rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
}

.stats-val {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--green-dark);
}

.stats-lbl {
    display: block;
    font-size: 0.62rem;
    color: var(--muted);
    line-height: 1.25;
    margin-top: 0.1rem;
}

.history-panel { margin-top: 0.9rem; }

.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Profil : history-list = panel-body — le padding:0 ci-dessus annulait les marges. */
.panel-body.history-list {
    padding: 0.85rem 1.2rem;
}

.history-item {
    padding: 0.65rem 0;
    border-bottom: 1px dashed rgba(90, 75, 55, 0.25);
}

.history-item:last-child { border-bottom: none; }

.history-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.history-match {
    font-weight: 600;
    font-size: 0.85rem;
}

.history-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.history-badge--win {
    background: rgba(45, 107, 72, 0.15);
    color: var(--green-dark);
}

.history-badge--loss {
    background: rgba(120, 80, 80, 0.12);
    color: #8a4040;
}

.history-badge--void {
    background: rgba(100, 100, 100, 0.12);
    color: var(--muted);
}

.history-badge--postponed {
    background: rgba(160, 110, 40, 0.14);
    color: #7a5420;
}

.history-item--void {
    opacity: 0.85;
}

.history-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.history-result { font-weight: 600; }

.history-time {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.68rem;
    color: var(--muted);
}

.friends-page {
    max-width: 42rem;
    margin: 0 auto;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.friends-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(45, 107, 72, 0.14);
    color: var(--green-dark);
    vertical-align: middle;
}

.friend-add-form {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.friend-add-form .field-input { flex: 1; min-width: 0; }

.friend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed rgba(90, 75, 55, 0.2);
}

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

.friend-row--card {
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(90, 75, 55, 0.16);
    border-bottom: 1px solid rgba(90, 75, 55, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.friend-row--card:last-child {
    border-bottom: 1px solid rgba(90, 75, 55, 0.16);
}

.friend-row-muted { opacity: 0.78; }

.friend-row-text {
    min-width: 0;
}

.friend-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
}

.friend-pts {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--green-dark);
}

.friend-streak {
    color: #8a4a18;
    font-weight: 600;
}

.friend-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.friend-pending-title {
    margin: 0.35rem 0 0;
    padding-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem 1rem;
    padding: 0.65rem 0.15rem;
    border-bottom: 1px dashed rgba(90, 75, 55, 0.22);
}

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

.history-main {
    min-width: 0;
    flex: 1 1 auto;
}

.history-main strong {
    display: block;
    font-size: 0.88rem;
    line-height: 1.3;
}

.history-meta {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.history-list .history-badge {
    flex-shrink: 0;
    align-self: center;
}

.inline-form { display: inline; }

.auth-legal {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.75rem 0 0.95rem;
    padding: 0.6rem 0.7rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.32);
    border: 1px solid rgba(90, 75, 55, 0.14);
}

.auth-legal .field-check {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.35;
    gap: 0.5rem;
}

.field-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 1rem 0;
    font-size: 0.85rem;
    line-height: 1.45;
    cursor: pointer;
}

.field-check input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.12rem;
    flex-shrink: 0;
    accent-color: var(--green-dark);
}

.field-check-text {
    color: var(--ink);
}

.field-check a {
    color: var(--green-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.field-check a:hover {
    color: var(--green);
}

.field-hint {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.howto-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    max-width: 720px;
    margin: 0 auto 1.25rem;
}

.howto-card {
    background: var(--tex-paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1rem 1rem 0.95rem;
    box-shadow: var(--shadow-card);
}

.howto-num {
    display: inline-flex;
    width: 1.65rem;
    height: 1.65rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(160deg, var(--green-light), var(--green));
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 0.45rem;
}

.howto-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.howto-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
}

.howto-cta {
    text-align: center;
    display: flex;
    gap: 0.65rem;
    justify-content: center;
    flex-wrap: wrap;
}

.panel-danger {
    border-color: rgba(160, 64, 48, 0.35);
}

.settings-warning {
    font-size: 0.85rem;
    color: #8a4040;
    line-height: 1.45;
}

.settings-hint {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
    margin: 0 0 0.85rem;
}

.settings-cooldown {
    font-size: 0.85rem;
    color: #7a5a20;
    background: rgba(180, 140, 40, 0.12);
    border: 1px solid rgba(180, 140, 40, 0.25);
    border-radius: var(--radius);
    padding: 0.65rem 0.85rem;
    margin: 0;
}

.settings-notify-status {
    font-size: 0.85rem;
    color: var(--ink);
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

.settings-notify-options {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.settings-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    cursor: pointer;
}

.settings-notify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.settings-notify-diag {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.settings-hint-sm {
    font-size: 0.82rem;
    margin-top: 0.65rem;
}

.settings-push-checklist {
    margin: 0.5rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--ink);
}

.settings-push-checklist code {
    font-size: 0.8rem;
}

.community-admin-form {
    margin-bottom: 1.1rem;
}

.community-members-admin {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 0.95rem;
}

.community-members-title {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0 0 0.65rem;
    color: var(--ink);
}

.community-members-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.community-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.45rem 0.5rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.45);
}

.community-member-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.community-member-name {
    font-size: 0.88rem;
    font-weight: 500;
}

.community-member-badge {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brass);
    background: rgba(180, 140, 40, 0.12);
    border-radius: var(--radius-sm);
    padding: 0.12rem 0.45rem;
}

.community-kick-form {
    flex-shrink: 0;
}

.panel-head-split {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
}

.season-select-form {
    margin: 0;
}

.field-input-sm {
    font-size: 0.82rem;
    padding: 0.35rem 0.55rem;
    min-width: 11rem;
}

.season-archive-label {
    color: var(--muted);
    font-style: italic;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn-danger-text {
    color: #a83232;
}

.btn-danger-text:hover {
    color: #8a2020;
    background: rgba(168, 50, 50, 0.08);
}

.season-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    margin: 0 0 var(--section-gap, 1rem);
    padding: 0.75rem 0.95rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #f8f4e8 0%, #efe8d8 100%);
    border: 1px solid rgba(120, 90, 40, 0.28);
    box-shadow: 0 2px 12px rgba(20, 12, 8, 0.08);
    color: #2a2218;
}

.season-banner--urgent {
    border-color: rgba(180, 100, 30, 0.45);
    background: linear-gradient(135deg, #fff6e8 0%, #f5e8c8 100%);
}

.season-banner-icon {
    color: #6a5018;
    font-size: 1.1rem;
}

.season-banner-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.9rem;
    color: #2a2218;
}

.season-banner-body strong {
    color: #1a140e;
    font-size: 0.95rem;
}

.season-banner-meta {
    font-size: 0.82rem;
    color: #5a5040;
}

.season-rewards-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.88rem;
}

.season-reward-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0;
}

.season-reward-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
    line-height: 1.25;
}

.season-reward-meta strong {
    font-size: 0.9rem;
}

.season-reward-meta span {
    font-size: 0.72rem;
    color: var(--muted);
}

.season-reward-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 4.6rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    overflow: hidden;
    isolation: isolate;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 0 rgba(0, 0, 0, 0.18);
}

.season-reward-badge__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.55) 38%,
        transparent 52%,
        transparent 100%
    );
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.season-reward-badge__label {
    position: relative;
    z-index: 1;
}

.season-reward-badge__streak {
    position: relative;
    z-index: 1;
    margin-left: 0.28rem;
    padding: 0.05rem 0.28rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: rgba(0, 0, 0, 0.18);
    color: inherit;
}

.season-reward-badge--or {
    color: #4a3408;
    border: 1px solid rgba(140, 100, 20, 0.55);
    background:
        linear-gradient(165deg, #f3e2a0 0%, #d4a824 42%, #a67c12 72%, #e8c85a 100%);
    text-shadow: 0 1px 0 rgba(255, 240, 180, 0.45);
}

.season-reward-badge--argent {
    color: #2a3038;
    border: 1px solid rgba(90, 100, 110, 0.5);
    background:
        linear-gradient(165deg, #f4f6f8 0%, #c5ccd4 40%, #8e98a4 70%, #dde3ea 100%);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.season-reward-badge--bronze {
    color: #3a2210;
    border: 1px solid rgba(120, 70, 30, 0.55);
    background:
        linear-gradient(165deg, #e8b88a 0%, #c07840 42%, #8a4a22 72%, #d4925a 100%);
    text-shadow: 0 1px 0 rgba(255, 220, 180, 0.4);
}

.points-help-foot {
    margin: 0.85rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
}

.settings-delete-form,
.settings-password-form,
.settings-pseudo-form { max-width: 22rem; }

.settings-sync-form-inline {
    display: inline-block;
    margin: 0 0.5rem 0.5rem 0;
    max-width: none;
}

.manual-score-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.75rem;
}

.manual-score-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    padding: 0.7rem 0;
    border-top: 1px solid rgba(90, 75, 55, 0.12);
}

.manual-score-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.manual-score-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    min-width: 0;
    flex: 1 1 14rem;
}

.manual-score-info {
    flex: 1 1 100%;
    font-size: 0.78rem;
    color: var(--muted);
}

.manual-score-inputs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.manual-score-score-form {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.manual-score-inputs .field-input-sm {
    width: 3.25rem;
    text-align: center;
}

.settings-legal {
    text-align: center;
    font-size: 0.88rem;
    margin-top: 1.75rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(90, 75, 55, 0.15);
    line-height: 1.55;
}

.btn-danger {
    background: linear-gradient(160deg, #c06050, #8a3020);
    border-color: #6a2018;
    color: #fff;
}

.btn-danger:hover {
    filter: brightness(1.05);
}

.dashboard-quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.chat-empty-hint {
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
    padding: 1.25rem 0.75rem;
    margin: 0;
}

@media (max-width: 768px) {
    .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .howto-grid { grid-template-columns: 1fr; }
    .point-toast-stack {
        top: auto;
        bottom: calc(var(--ticket-mobile-space, 4rem) + 0.65rem);
        right: 0.65rem;
        left: 0.65rem;
        max-width: none;
    }
    .friend-add-form { flex-direction: column; }
    .hero-guest-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-guest-copy .hero-lead { margin: 0 auto; }
    .hero-guest-cta { justify-content: center; }
    .hero-guest-visual { order: -1; }
    .page-title-with-avatar { flex-direction: column; text-align: center; }
}

/* --- Refonte v2 : avatars, badge nav, thème soir, flash résultats --- */

.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--avatar-bg, var(--green-dark));
    color: #fff;
    font-family: var(--font-mono);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    box-shadow: none;
    border: 2px solid rgba(255, 255, 255, 0.28);
    overflow: hidden;
}

.user-avatar.has-photo {
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
}

.user-avatar.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: inherit;
    text-decoration: none;
}

.user-link:hover .user-link-pseudo,
.leaderboard-pseudo--link:hover,
.friend-name-link:hover,
.community-member-name:hover,
.author-link:hover {
    text-decoration: underline;
}

.leaderboard-pseudo--link,
.friend-name-link,
.community-member-name,
.author-link,
.chat-avatar-link {
    color: inherit;
    text-decoration: none;
}

.chat-avatar-link {
    display: inline-flex;
    flex-shrink: 0;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0 0 1.1rem;
}

.profile-friend-status {
    font-size: 0.9rem;
    color: var(--muted);
}

.user-avatar-sm {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.58rem;
}

.user-avatar-md {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 0.72rem;
}

.user-avatar-lg {
    width: 2.65rem;
    height: 2.65rem;
    font-size: 0.88rem;
}

.nav-link-badge-wrap {
    position: relative;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.28rem;
    margin-left: 0.25rem;
    border-radius: var(--radius-pill);
    background: #c04040;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(90, 55, 55, 0.5);
    vertical-align: middle;
    animation: nav-badge-pulse 2.2s ease-in-out infinite;
}

@keyframes nav-badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.page-title-with-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    overflow: visible;
}

.page-title-with-avatar > span {
    line-height: 1.6;
    padding: 0.2rem 0;
    overflow: visible;
    display: inline-block;
}

.friend-row-main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.friend-row-main strong {
    display: block;
    line-height: 1.25;
}

.history-item.is-flashing {
    animation: history-result-flash 1.4s ease 1;
}

@keyframes history-result-flash {
    0%, 100% { background: transparent; }
    30% { background: rgba(74, 148, 104, 0.14); border-radius: var(--radius-sm); }
}

html.theme-match-day body {
    background: var(--tex-felt);
}

html.theme-match-day body::after {
    display: none;
}

html.theme-match-night {
    --tex-felt:
        url('../img/felt.jpg'),
        linear-gradient(180deg, #0a1210 0%, #101c16 55%, #0c1612 100%);
}

html.theme-match-night body::before,
html.theme-match-night body::after {
    display: none;
}

html.theme-match-night .hero h1,
html.theme-match-night .hero-guest-copy h1 {
    color: rgba(228, 217, 196, 0.92);
}

html.theme-match-night .topbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

html.theme-match-day .hero-guest-copy h1 {
    text-shadow: none;
}

.confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Language switcher */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-right: 0.35rem;
    border: 1px solid rgba(232, 220, 180, 0.22);
    border-radius: var(--radius-sm);
    padding: 0.12rem;
    background: rgba(15, 26, 20, 0.45);
}
.lang-switch-btn {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(228, 217, 196, 0.7);
    text-decoration: none;
    padding: 0.22rem 0.45rem;
    border-radius: 4px;
    line-height: 1;
}
.lang-switch-btn:hover { color: var(--paper); }
.lang-switch-btn.is-active {
    background: rgba(232, 220, 180, 0.18);
    color: var(--paper);
}
.auth-lang-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}
@media (max-width: 768px) {
    .lang-switch { margin-right: 0; }
}

/* Push notifications status */
.settings-push-howto {
    margin: 0.75rem 0 1rem;
    padding-left: 1.2rem;
    color: var(--muted, #a8b5a4);
    font-size: 0.88rem;
    line-height: 1.45;
}
.settings-push-howto li + li { margin-top: 0.25rem; }
.settings-push-server {
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.4;
}
.settings-push-server.is-ok {
    background: rgba(70, 160, 100, 0.15);
    border: 1px solid rgba(70, 160, 100, 0.35);
    color: #c8e6d0;
}
.settings-push-server.is-ko {
    background: rgba(180, 70, 60, 0.15);
    border: 1px solid rgba(180, 70, 60, 0.4);
    color: #f0c4c0;
}
.settings-push-server code {
    font-size: 0.82em;
}

/* --- Onboarding checklist --- */
.onboard-card {
    margin: 0 0 var(--section-gap);
    padding: 1rem 1.1rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-card);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.onboard-card.is-hidden {
    opacity: 0;
    transform: translateY(-6px);
}
.onboard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}
.onboard-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.onboard-lead {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
}
.onboard-dismiss {
    border: 0;
    background: transparent;
    color: var(--muted);
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-shrink: 0;
}
.onboard-dismiss:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--ink);
}
.onboard-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}
.onboard-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.7rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.45);
}
.onboard-step.is-done {
    opacity: 0.72;
}
.onboard-check {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(45, 107, 72, 0.12);
    color: var(--green-dark);
    flex-shrink: 0;
    font-size: 0.85rem;
}
.onboard-step.is-done .onboard-check {
    background: var(--green);
    color: #fff;
}
.onboard-step-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-start;
}
.onboard-step-label {
    font-weight: 650;
    font-size: 0.92rem;
}
.onboard-step-hint {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}
.onboard-step-done {
    font-size: 0.78rem;
    color: var(--green-dark);
    font-weight: 600;
}
.onboard-step-cta {
    margin-top: 0.35rem;
}

/* --- Invite share actions --- */
.invite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.invite-share-btn.is-copied {
    background: var(--green);
    border-color: var(--green-dark);
}

/* --- Activity feed --- */
.activity-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.activity-item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
}
.activity-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.activity-icon {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.72rem;
    background: rgba(0, 0, 0, 0.05);
    color: var(--muted);
}
.activity-item--win .activity-icon {
    background: rgba(45, 107, 72, 0.14);
    color: var(--green-dark);
}
.activity-item--miss .activity-icon {
    background: rgba(180, 70, 60, 0.12);
    color: #a0453c;
}
.activity-item--pick .activity-icon {
    background: rgba(60, 100, 140, 0.12);
    color: #3a6280;
}
.activity-body {
    min-width: 0;
}
.activity-text {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.4;
}
.activity-time {
    display: block;
    margin-top: 0.15rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--muted);
}

@media (max-width: 640px) {
    .onboard-card { padding: 0.9rem; }
    .invite-actions { flex-direction: column; }
    .invite-actions .btn { width: 100%; justify-content: center; }
    .hero-guest-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        text-align: center;
    }
    .hero-guest-visual { order: -1; }
    .hero-guest-cta { justify-content: center; }
    .hero-lead { margin-left: auto; margin-right: auto; }
    .dash-head {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }
    .dash-id { justify-content: flex-start; }
    .dash-links {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* --- Mon espace / profil : aéré, large --- */
.app-main--espace {
    max-width: 1180px;
}

.dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin: 0 0 1.15rem;
}

.dash-id {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
    flex: 1 1 auto;
}

.dash-id-photo {
    position: relative;
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
}

.dash-id-photo .user-avatar-lg {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.05rem;
}

.dash-avatar-form,
.dash-avatar-remove-form {
    margin: 0;
}

.dash-avatar-cam,
.dash-avatar-remove {
    position: absolute;
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    cursor: pointer;
    font-size: 0.58rem;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    padding: 0;
}

.dash-avatar-cam {
    right: -0.12rem;
    bottom: -0.12rem;
    background: var(--green-dark);
    color: #fff;
}

.dash-avatar-cam:hover {
    filter: brightness(1.08);
}

.dash-avatar-remove {
    right: -0.12rem;
    top: -0.12rem;
    background: rgba(72, 42, 36, 0.92);
    color: #f3e6d8;
}

.dash-avatar-remove:hover {
    background: #8a3a32;
    color: #fff;
}

.dash-avatar-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.dash-id-title {
    text-align: left;
    margin: 0 0 0.2rem;
    max-width: none;
    font-size: clamp(1.4rem, 2.8vw, 1.85rem);
}

.dash-id-sub {
    text-align: left;
    margin: 0 0 0.3rem;
    max-width: 36rem;
}

.dash-photo-tools,
.profile-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
    margin-top: 0.35rem;
}

.profile-head-actions .btn {
    font-size: 0.88rem;
    line-height: 1.25;
}

.dash-photo-link {
    color: rgba(232, 224, 206, 0.88);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    opacity: 0.9;
}

.dash-photo-link:hover {
    color: #fff;
    text-decoration: underline;
    opacity: 1;
}

.dash-photo-sep {
    color: var(--muted);
    opacity: 0.7;
}

.dash-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}

.dash-stats-panel {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1.15rem 0.95rem;
}

.dash-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.15rem 0;
}

.dash-stats--perf {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--line);
}

.dash-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-width: 6.5rem;
    flex: 1 1 6.5rem;
    padding: 0.35rem 1rem 0.35rem 0;
    margin-right: 0.85rem;
    border-right: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
}

.dash-stat:last-child {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
}

a.dash-stat:hover .dash-stat-val {
    color: var(--green);
}

.dash-stat-val {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--green-dark);
    line-height: 1.15;
}

.dash-stat-lbl {
    font-size: 0.68rem;
    color: var(--muted);
    line-height: 1.3;
}

.profile-head-actions .inline-form {
    display: inline-flex;
    margin: 0;
}

.profile-empty {
    margin: 0.55rem 0 0;
    text-align: left;
}

.app-main--espace .dashboard-grid {
    margin-top: 0.15rem;
}

.app-main--espace .history-panel {
    margin-top: 1.15rem;
}

.app-main--espace .panel-spaced {
    margin-bottom: 1.15rem;
}

@media (max-width: 720px) {
    .dash-stat {
        min-width: calc(50% - 0.85rem);
        flex: 1 1 calc(50% - 0.85rem);
    }
    .dash-stat:nth-child(2n) {
        border-right: 0;
        margin-right: 0;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .dash-stat {
        min-width: 100%;
        flex: 1 1 100%;
        border-right: 0;
        margin-right: 0;
        padding: 0.55rem 0;
        border-bottom: 1px solid var(--line);
    }
    .dash-stat:last-child {
        border-bottom: 0;
        padding-bottom: 0.2rem;
    }
}

