/* =====================================================================
   MONDIAL DES POTES — Editorial theme (newsprint / cream paper)
   The foundation for every authenticated page. The public landing
   (/views/landing.php) uses a separate dark stadium theme.
   Mobile-first; single breakpoint at 760px.
   ===================================================================== */
:root {
    --paper:     #f1ece4;
    --paper-2:   #e9e2d6;
    --card:      #f8f5ef;
    --ink:       #14110d;
    --muted:     #6b6457;
    --accent:    #b1372f;
    --accent-2:  #8f2a23;
    --line:      #14110d;
    --line-soft: rgba(20, 17, 13, 0.14);
    --ok:        #1a7f1a;
    --warn:      #b08000;

    --font-display: 'Archivo Black', system-ui, sans-serif;
    --font-serif:   'DM Serif Display', Georgia, serif;
    --font-body:    'Archivo', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, monospace;

    --maxw: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

a { color: var(--ink); }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; text-transform: uppercase; }
h2 { font-size: clamp(22px, 3.5vw, 30px); margin: 28px 0 14px; }
h3 { font-size: 18px; margin: 18px 0 10px; }

p { margin: 0 0 12px; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 24px 0; }

/* hgroup pattern used by every page (h1 + tagline) — picks up the
   editorial page-head look without any class changes. */
hgroup { padding: 36px 0 20px; }
hgroup h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(34px, 7vw, 60px);
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}
hgroup p {
    margin: 14px 0 0;
    max-width: 720px;
    font-size: clamp(15px, 1.7vw, 17px);
    color: var(--muted);
    line-height: 1.5;
}
@media (min-width: 760px) { hgroup { padding: 48px 0 26px; } }

/* Generic <article> = editorial panel (used for cards / flash boxes
   on pages that haven't been individually adapted). */
article {
    background: var(--card);
    border: 1.5px solid var(--line);
    padding: 18px;
    margin-bottom: 14px;
}
article > header { margin-bottom: 10px; }

/* Flash highlight on <mark> */
mark {
    background: var(--accent);
    color: var(--paper);
    padding: 1px 6px;
    font-weight: 600;
}

/* Tables — generic <table> picks up the editorial .tbl look. */
figure { margin: 0 0 18px; }
table, table.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    background: var(--card);
    border: 1.5px solid var(--line);
}
table th, table td { padding: 12px 16px; text-align: left; }
table thead th {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
    border-bottom: 1.5px solid var(--line);
    background: var(--paper-2);
}
table tbody tr + tr td { border-top: 1px solid var(--line-soft); }
table.tbl td.num, table.tbl th.num,
table td[style*="text-align: right"], table th[style*="text-align: right"] {
    text-align: right; font-variant-numeric: tabular-nums;
}
table.tbl .pos { font-family: var(--font-display); font-size: 18px; color: var(--ink); }
table.tbl .player b { font-weight: 700; }
table.tbl .you {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--accent); margin-left: 8px;
}
table.tbl td.total { font-family: var(--font-display); font-size: 18px; color: var(--accent); }
table.tbl .phase { font-weight: 600; }
table.tbl .pts { font-family: var(--font-display); font-size: 17px; }
table.tbl .pts .u { font-family: var(--font-mono); font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.table-scroll { overflow-x: auto; }

/* Forms — editorial styling for inputs/selects/textareas/buttons.
   Pico is gone, so we provide our own. */
label { display: block; margin: 0 0 14px; }
label > small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], input[type="url"],
input[type="tel"], select, textarea {
    appearance: none;
    width: 100%;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.4;
    padding: 11px 14px;
    background: var(--card);
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 0;
    outline: none;
    margin-top: 4px;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}
input[aria-invalid="true"] { border-color: var(--accent); background: #fbeeed; }
input[aria-invalid="true"] + small { color: var(--accent); }
input[disabled], select[disabled], textarea[disabled] {
    background: var(--paper-2); color: var(--muted); cursor: not-allowed;
}

button, [role="button"], a[role="button"], input[type="submit"] {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    padding: 13px 22px;
    background: var(--ink);
    color: var(--paper);
    border: 1.5px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, color 0.15s ease;
}
button:hover, [role="button"]:hover, a[role="button"]:hover, input[type="submit"]:hover {
    background: var(--accent); border-color: var(--accent); color: var(--paper);
}
button.secondary, [role="button"].secondary, a[role="button"].secondary {
    background: transparent; color: var(--ink); border-color: var(--line);
}
button.secondary:hover, [role="button"].secondary:hover, a[role="button"].secondary:hover {
    background: var(--ink); color: var(--paper);
}
button.outline, [role="button"].outline {
    background: transparent; color: var(--ink); border-color: var(--line);
}
button:disabled, [role="button"]:disabled { opacity: 0.5; cursor: not-allowed; }

/* ----- Layout shell ------------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; width: 100%; }
main.wrap { flex: 1; padding-bottom: 56px; }
@media (min-width: 760px) { .wrap { padding: 0 40px; } }

/* ----- Top navigation ---------------------------------------------- */
.nav {
    border-bottom: 1.5px solid var(--line);
    background: var(--paper);
}
.nav-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
    min-height: 64px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px;
}
@media (min-width: 760px) { .nav-inner { padding: 0 40px; } }

.nav-brand {
    display: inline-flex; align-items: center; gap: 9px;
    text-decoration: none; font-weight: 700;
    font-family: var(--font-mono); font-size: 12px;
    letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
    color: var(--ink);
}
.nav-brand:hover { color: var(--ink); }
.nav-brand .nb-ic { width: 18px; height: 18px; flex: none; color: var(--accent); }
.nav-brand b {
    font-family: var(--font-body); font-size: 15px; letter-spacing: -0.01em;
    text-transform: none; font-weight: 700;
}

/* Nav links — always visible. On mobile, the labels collapse and
   only the icons show, so the new "Mur des champions" item stays
   reachable from the phone. (Without this, a mobile user could only
   reach it by typing the URL.) */
.nav-links { display: flex; gap: 2px; }
.nav-links a {
    display: inline-flex; align-items: center; gap: 7px;
    text-decoration: none; padding: 8px 8px;
    font-family: var(--font-mono); font-size: 11px;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
    border-bottom: 2px solid transparent;
}
.nav-links a .ni { width: 18px; height: 18px; flex: none; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.is-active { color: var(--ink); border-bottom-color: var(--accent); }
.nav-links a .nav-label { display: none; }
@media (min-width: 760px) {
    .nav-links { gap: 4px; }
    .nav-links a { padding: 8px 12px; }
    .nav-links a .ni { width: 15px; height: 15px; }
    .nav-links a .nav-label { display: inline; }
}

.nav-right { display: flex; align-items: center; gap: 8px; }
@media (min-width: 760px) { .nav-right { gap: 12px; } }
.nav-user {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--muted);
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none;
}
.nav-user b { display: none; }
@media (min-width: 760px) { .nav-user b { display: inline; } }
.nav-user .nu-ic { width: 18px; height: 18px; flex: none; }
.nav-user .nu-flag {
    height: 18px; width: auto; vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.nav-user b {
    color: var(--ink); font-family: var(--font-body); font-weight: 700;
    text-transform: none; letter-spacing: 0;
}
.nav-user:hover b { color: var(--accent); }
@media (min-width: 760px) {
    .nav-user .nu-ic, .nav-user .nu-flag { width: 14px; height: 14px; }
}

.nav-logout, .nav-cta {
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 7px;
    border: 1.5px solid var(--line); padding: 8px 10px;
    font-family: var(--font-mono); font-size: 11px;
    letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500;
    background: transparent; color: var(--ink); cursor: pointer;
    margin: 0; min-height: 0;
}
.nav-logout:hover, .nav-cta:hover { background: var(--ink); color: var(--paper); }
.nav-logout .nl-ic, .nav-cta .nl-ic { width: 16px; height: 16px; flex: none; }
.nav-logout .nav-label, .nav-cta .nav-label { display: none; }
@media (min-width: 760px) {
    .nav-logout, .nav-cta { padding: 9px 14px; }
    .nav-logout .nl-ic, .nav-cta .nl-ic { width: 14px; height: 14px; }
    .nav-logout .nav-label, .nav-cta .nav-label { display: inline; }
}
.nav-cta-primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.nav-cta-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--paper); }
/* Public-side CTAs (login / register) always show their text — no
   icon affordance to fall back to. */
.nav-right-public .nav-logout { padding: 9px 14px; font-size: 11px; }

/* ----- Page header (editorial pattern) ----------------------------- */
.page-head { padding: 40px 0 26px; }
@media (min-width: 760px) { .page-head { padding: 56px 0 32px; } }
.eyebrow {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--accent); margin: 0 0 14px;
    display: flex; align-items: center; gap: 9px;
}
.eyebrow .tick { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.page-title {
    margin: 0; font-family: var(--font-display);
    font-size: clamp(40px, 8vw, 76px); line-height: 0.9;
    letter-spacing: -0.03em; text-transform: uppercase;
}
.page-title .it {
    font-family: var(--font-serif); font-weight: 400; font-style: italic;
    text-transform: none; color: var(--accent); letter-spacing: -0.01em;
}
.page-sub {
    margin: 16px 0 0; max-width: 720px;
    font-size: clamp(15px, 1.7vw, 17px); color: var(--muted); line-height: 1.5;
}

.section-head {
    display: flex; align-items: center; gap: 14px; margin: 8px 0 18px;
}
.section-head .ic { width: 30px; height: 30px; color: var(--accent); }
.section-head .ic svg, .section-head .ic [data-lucide] { width: 30px; height: 30px; }
.section-head h2 {
    margin: 0; font-family: var(--font-display); font-size: clamp(24px, 4vw, 34px);
    text-transform: uppercase; letter-spacing: -0.02em;
}
.section-lead { margin: 0 0 18px; color: var(--muted); max-width: 760px; }

.panel { border: 1.5px solid var(--line); background: var(--card); margin-bottom: 18px; }

.footnote { font-size: 13px; color: var(--muted); line-height: 1.5; max-width: 860px; margin: 0 0 56px; }
.footnote b { color: var(--ink); }

/* ----- Dashboard grid ---------------------------------------------- */
.dash-cards {
    display: grid; gap: 0;
    grid-template-columns: 1fr;
    border: 1.5px solid var(--line);
    margin-bottom: 56px;
}
@media (min-width: 560px) { .dash-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .dash-cards { grid-template-columns: repeat(3, 1fr); } }

.dash-card {
    position: relative;
    display: flex; flex-direction: column;
    padding: 24px 22px 26px;
    text-decoration: none; color: inherit;
    background: var(--card);
    border-right: 1.5px solid var(--line);
    border-bottom: 1.5px solid var(--line);
    transition: background 0.15s ease;
    min-height: 168px;
}
.dash-card:hover { background: var(--paper-2); color: inherit; }
.dash-card .idx {
    position: absolute; top: 16px; right: 18px;
    font-family: var(--font-mono); font-size: 11px; color: var(--muted);
    letter-spacing: 0.08em;
}
.dash-card .ic {
    width: 30px; height: 30px; color: var(--ink);
    display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.dash-card:hover .ic { color: var(--accent); }
.dash-card .ic [data-lucide], .dash-card .ic svg { width: 28px; height: 28px; }
.dash-card h3 {
    margin: 0 0 6px; font-family: var(--font-body); font-weight: 700;
    font-size: 18px; letter-spacing: -0.01em; text-transform: none;
}
.dash-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.dash-card .go {
    margin-top: auto; padding-top: 14px;
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--accent);
    opacity: 0; transform: translateX(-4px); transition: 0.15s ease;
}
.dash-card:hover .go { opacity: 1; transform: translateX(0); }
@media (min-width: 960px) { .dash-card:nth-child(3n) { border-right: none; } }
@media (min-width: 560px) and (max-width: 959px) { .dash-card:nth-child(2n) { border-right: none; } }
@media (max-width: 559px) { .dash-card { border-right: none; } }

/* ----- Tabs (predictions / others) --------------------------------- */
.tabs {
    display: flex; gap: 28px; border-bottom: 1.5px solid var(--line);
    margin-bottom: 30px;
}
.tab, .tab-btn {
    appearance: none; background: none; border: none; cursor: pointer;
    padding: 0 0 14px; margin: 0; margin-bottom: -1.5px;
    font-family: var(--font-body); font-weight: 700; font-size: 15px;
    letter-spacing: -0.01em; color: var(--muted);
    border-bottom: 3px solid transparent;
    text-transform: none; line-height: 1.2;
    min-height: auto;
}
.tab:hover, .tab-btn:hover { background: none; color: var(--ink); }
.tab .count { font-family: var(--font-mono); font-weight: 500; font-size: 12px; margin-left: 6px; }
.tab.is-active, .tab-btn[data-active] {
    color: var(--ink); border-bottom-color: var(--accent); background: none;
}

/* ----- Match list -------------------------------------------------- */
.day {
    font-family: var(--font-display); font-size: clamp(20px, 3vw, 26px);
    text-transform: uppercase; letter-spacing: -0.02em; margin: 32px 0 14px;
    display: flex; align-items: center; gap: 14px;
}
.day::after { content: ""; flex: 1; height: 1.5px; background: var(--line-soft); }
.day:first-of-type { margin-top: 0; }

.match {
    border: 1.5px solid var(--line); background: var(--card);
    margin-bottom: 12px; padding: 0;
}
.match-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 11px 18px; border-bottom: 1px solid var(--line-soft);
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--muted);
}
.match-meta .time { color: var(--ink); font-weight: 700; }
.match-meta .sep { color: var(--line-soft); }
.match-body {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: 12px; padding: 18px;
}
.team { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.team.home { justify-content: flex-start; }
.team.away { justify-content: flex-end; }
.score { display: flex; align-items: center; gap: 8px; }
.score input {
    width: 52px; height: 56px; min-height: auto; text-align: center;
    font-family: var(--font-display); font-size: 22px; color: var(--ink);
    background: var(--paper); border: 1.5px solid var(--line); border-radius: 0;
    outline: none; padding: 0; margin: 0;
}
.score input:focus { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.score .dash { font-family: var(--font-display); color: var(--muted); }
.match-footer { padding: 0 18px 14px; }
@media (max-width: 559px) {
    .team .name { font-size: 14px; }
    .score input { width: 44px; height: 48px; font-size: 18px; }
}

/* ----- Footer ------------------------------------------------------- */
.site-footer {
    border-top: 1.5px solid var(--line); background: var(--paper-2);
    padding: 16px 0; margin-top: auto;
}
.site-footer small {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--muted);
}

/* ----- Utilities (carried over from the previous theme) ------------ */
/* HTMX status fragments */
.pred-status      { font-size: 0.85em; }
.pred-status-ok   { color: var(--ok); }
.pred-status-warn { color: var(--warn); }
.pred-status-err  { color: var(--accent); }

/* HTMX loading indicator */
.htmx-indicator {
    opacity: 0; transition: opacity 200ms ease-in; display: inline-block;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }
.spinner {
    display: inline-block; width: 1em; height: 1em;
    border: 2px solid currentColor; border-right-color: transparent;
    border-radius: 50%; animation: spinner-spin 0.8s linear infinite;
    vertical-align: -0.18em; color: var(--accent);
}
@keyframes spinner-spin { to { transform: rotate(360deg); } }

/* Team flag image (used in team chips, leaderboard, chat) */
.team-flag-img {
    display: inline-block; height: 1em; width: auto;
    vertical-align: -0.12em; margin-right: 0.3em;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.user-flag-img {
    display: inline-block; height: 1.15em; width: auto;
    vertical-align: -0.18em; box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}

/* Team form badges (W/D/L) */
.team-form { display: inline-flex; gap: 2px; }
.team-form-empty { color: var(--muted); font-size: 0.85em; }
.tf-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 14px; height: 14px; font-size: 9px; line-height: 1;
    color: #fff; font-weight: 700; border-radius: 0;
}
.tf-w { background-color: var(--ok); }
.tf-l { background-color: var(--accent); }
.tf-d { background-color: #888; }

/* Lucide icon sizing (still used by some pages) */
.icon, [data-lucide] {
    width: 1.1em; height: 1.1em; vertical-align: -0.18em; stroke-width: 1.7;
}

/* ----- Page-specific small components ----------------------------- */

/* Player-page "cri de joie" — italic quote under the page title */
.cri-de-joie {
    font-style: italic;
    color: var(--muted);
    margin: -8px 0 14px;
    font-size: 16px;
}

/* Back-link above a page-head, e.g. "← Retour au calendrier" */
.back-link {
    display: inline-block;
    margin: 24px 0 0;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
}
.back-link:hover { color: var(--accent); }

/* Compact narrow input used in admin score-entry and config forms */
.input-narrow { width: 4.5rem; text-align: center; margin: 0; }
.input-narrow-num { width: 5rem; margin: 0; }
.input-narrow-points { max-width: 6rem; }

/* Inline radio/checkbox label group (used by admin and bonus bets) */
.inline-label {
    display: inline-block;
    margin-right: 1rem;
}

/* Match-meta row in admin/results form (home — score — away with flex) */
.score-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    margin-bottom: 0.5rem;
}
.score-row .side { flex: 1; min-width: 0; }
.score-row .side.away { text-align: right; }

/* Two-column "team — score — team" used in /matchs (calendar list) */
.match-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.match-row .side { flex: 1; min-width: 0; }
.match-row .side.away { text-align: right; }

/* Form-block fieldset spacing in admin pages */
.form-fieldset { margin: 0.75rem 0; border: 0; padding: 0; }

/* Tighten the admin-bet card variant */
.bet-card-tight { margin-bottom: 1rem; }
.bet-card-tight > header { margin-bottom: 0.75rem; }

/* Below-form align-right action row (HTMX status + button) */
.form-action-right {
    margin: 0.5rem 0 0;
    text-align: right;
    min-height: 1.2em;
}

/* Below-form chip row for team form badges (W/D/L) */
.form-chip-row {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
}

/* Smaller utility classes referenced from various views */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-soft  { color: #888; }
.no-underline { text-decoration: none; }
.italic { font-style: italic; }
.is-me { font-weight: 600; }
.mb-2 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 0.75rem; }
.mb-5 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.35rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }
.mt-6 { margin-top: 2rem; }
.mt-7 { margin-top: 2.5rem; }
.ml-3 { margin-left: 0.75rem; }
.my-3 { margin: 0.75rem 0; }
.tight-block { margin: 0.25rem 0 0; }

/* Block-styled links: "<a>" wrapping a card so the whole tile is clickable
   (used in /matchs to link a match row to its detail page). */
.block-link {
    display: block;
    text-decoration: none;
    color: inherit;
}
.block-link:hover { color: inherit; }

/* Pre-wrapped chat message body (preserves user line breaks) */
.chat-body {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Compact chat-author header inside each message <article> */
.chat-author-header {
    margin: 0 0 0.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.45em;
    flex-wrap: wrap;
}
.chat-message {
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.8rem;
}

/* Leaderboard "player" cell: inline flex group (flag + name + "(vous)") */
.player-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}

/* Predictions match-article: muted state when locked */
.match.is-locked { opacity: 0.85; }
.match-form { margin: 0; }
.inline-spinner { margin-right: 0.35em; }

/* "Voir les pronostics de tous →" link at the bottom of a locked
   match card on /pronostics — mono / muted / right-aligned, same
   visual weight as the "Détails du match" link convention. */
.all-predictions-link {
    text-align: right;
    padding-top: 0;
}
.all-predictions-link a {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px dashed var(--line-soft);
    padding-bottom: 2px;
    transition: color 0.12s ease, border-color 0.12s ease;
}
.all-predictions-link a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Form with no top/bottom margin (admin backup button etc.) */
.form-flush { margin: 0; }

/* Bet card spacing (used both on /pronostics-bonus and the embedded tab) */
.bet-card { margin-bottom: 0.75rem; }
.bet-card.is-locked { opacity: 0.9; }

/* Inline form wrapping the logout button in the top nav */
.nav-logout-form { margin: 0; display: inline; }

/* Fixed-width table columns (replaces inline width="…" styles) */
.col-w-rank { width: 64px; }
.col-w-year { width: 90px; }

/* Team chip wrapped in an <a href="/equipe?code=XYZ"> — emitted by
   TeamDisplay when linking is enabled. Inherits surrounding color and
   underline state so it looks identical to a non-linked chip until
   hovered, when it lights up in the editorial red accent. */
.team-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.12s ease, border-color 0.12s ease;
}
.team-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Polymarket probability bar (emitted by App\Support\OddsBar::render).
   Slim 3-segment SVG bar + a label row under it. Widths come from the
   SVG's viewBox-relative width attributes so no inline CSS is needed —
   strict CSP stays happy. Three segment colours, chosen for visual
   distinctness AND red/green-colour-blind friendliness (navy ≠ red
   under deuteranopia; the amber middle gives a clear pivot):
     - home: editorial navy
     - draw: editorial amber (the muted "warning" yellow)
     - away: editorial red accent */
.odds-row {
    padding: 10px 18px 14px;
    border-top: 1px solid var(--line-soft);
}
.odds-bar {
    display: block;
    width: 100%;
    height: 6px;
}
.odds-seg-home { fill: #1f4e79; }
.odds-seg-draw { fill: var(--warn); }
.odds-seg-away { fill: var(--accent); }
.odds-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.odds-labels .odds-lbl-home { color: #1f4e79;       font-weight: 600; }
.odds-labels .odds-lbl-draw { color: var(--warn);   font-weight: 600; }
.odds-labels .odds-lbl-away { color: var(--accent); font-weight: 600; }

/* Match-detail page: the odds bar sits in its own panel so it doesn't
   feel cramped against the result line. */
main.wrap > .odds-row {
    border: 1.5px solid var(--line);
    background: var(--card);
    padding: 14px 18px 16px;
    margin-bottom: 18px;
}

/* "Probabilités des matchs au 31 mai" line — one per matches-list page,
   directly under the page-head, in mono + muted so it reads as a small
   contextual note without competing with the page title. */
.odds-fetched-at {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: -10px 0 18px;
}
.odds-fetched-at small { font-size: inherit; }

/* Tooltip cursor: SVG <title> shows on hover. Hint with a help cursor
   over each segment so users discover the tooltip. */
.odds-bar rect { cursor: help; }

/* Lock-reminder banner on the dashboard. Heavier border + the same
   amber palette as <mark> highlights, so the banner reads as a
   contextual warning without screaming. */
.lock-reminder {
    border-color: var(--warn);
    border-left-width: 6px;
    margin-bottom: 20px;
}
.lock-reminder p { margin: 0; line-height: 1.6; }
.lock-reminder a { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

/* Groups page (/groupes): one section per group letter, with the four
   teams listed under the heading and the 6 matches below. */
.group-section { margin-bottom: 40px; }
.group-section:last-of-type { margin-bottom: 0; }
.group-teams {
    margin: 0 0 12px;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.8;
    color: var(--ink);
}
/* The "Classement du groupe à venir" placeholder — dashed-border
   article so it visually reads as "not yet wired in" without looking
   like an error. Sits between the team list and the match list. */
.group-standings-placeholder {
    border-style: dashed;
    border-color: var(--line-soft);
    background: var(--paper-2);
    padding: 12px 18px;
    margin-bottom: 18px;
}
.group-standings-placeholder p { margin: 0; color: var(--muted); }

/* Chat: messages panel + send form */
.chat-panel {
    max-height: 60vh; overflow-y: auto;
    padding: 0.75rem;
    background: var(--card);
    border: 1.5px solid var(--line);
    margin-bottom: 1rem;
}
.chat-input { margin: 0 0 0.5rem; width: 100%; }
.chat-send-row { display: flex; align-items: center; gap: 0.5rem; }
.chat-send-spinner { color: var(--muted); }
.chat-meta-time { color: #888; }

/* Match detail: large prominent result line */
.match-result-large { font-size: 1.2rem; margin: 0; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
