/* ============================================================
   SWIFT PVP - feuille de style
   Un seul thème : sombre, fond #2c3237.
   ============================================================ */

:root {
    color-scheme: dark;

    /* Surfaces (dérivées de #2c3237) */
    --bg: #2c2f36;
    --bg-deep: #272a31;
    --surface: #383b47;
    --surface-2: #404350;
    --line: #4a4e5b;
    --line-soft: #414550;

    /* Texte */
    --text: #eef2f5;
    --text-dim: #a6b0b8;
    --text-muted: #8b969f;

    /* Accent SwiftPvP */
    --accent: #06b7fe;
    --accent-rgb: 6, 183, 254;
    --accent-ink: #04202c;

    /* États */
    --green: #3ecf8e;
    --red: #ef6b6b;
    --warn: #f2c45e;

    /* Couleurs des tiers (imposées) */
    --t1: #ffd04a;  --t1-rgb: 255, 208, 74;
    --t2: #90a1c8;  --t2-rgb: 144, 161, 200;
    --t3: #d57b45;  --t3-rgb: 213, 123, 69;
    --t4: #a2a8ac;  --t4-rgb: 162, 168, 172;
    --t5: #8f6b41;  --t5-rgb: 143, 107, 65;

    /* Coins modérés : moins arrondis qu'avant, jamais totalement carrés. */
    --radius-lg: 10px;
    --radius: 7px;
    --radius-sm: 4px;
    --header-h: 60px;
    --gutter: 24px;
    --page-w: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
button { font-family: inherit; }
code {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: .88em;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--bg-deep);
    border: 1px solid var(--line-soft);
    color: var(--text);
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page {
    width: 100%;
    max-width: var(--page-w);
    margin: 0 auto;
    padding: 24px var(--gutter) 56px;
    flex: 1;
}

.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0 0 4px; font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--text-dim); }

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    height: var(--header-h);
    padding: 0 var(--gutter);
    background: rgba(38, 43, 48, .95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line-soft);
}

.header-left, .header-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.header-left { gap: 18px; }
.header-right { justify-content: flex-end; }

/* Logo SwiftPvP centré dans l'en-tête (remplace le texte « SwiftPvP »). */
.brand-logo { display: flex; align-items: center; justify-content: center; justify-self: center; flex: none; }
.brand-logo img { display: block; height: 40px; width: 40px; object-fit: contain; image-rendering: auto; transition: transform .15s ease; }
.brand-logo:hover img { transform: none; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dim);
    white-space: nowrap;
    transition: color .15s, background-color .15s;
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav-link.active { color: var(--accent); background: rgba(var(--accent-rgb), .12); }

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    height: 38px;
    min-width: 250px;
    padding: 0 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 7px;
    transition: border-color .15s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-icon {
    flex: none;
    color: var(--text-muted);
    opacity: .85;
}
.search-box input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}
.search-box input::placeholder { color: var(--text-muted); }

/* Message "Pseudo Incorrect" - juste sous la barre de recherche. */
.search-feedback {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    padding: 4px 10px;
    background: rgba(239, 107, 107, .15);
    border: 1px solid rgba(239, 107, 107, .4);
    border-radius: var(--radius-sm);
    color: var(--red);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-2px);
    transition: opacity .15s, transform .15s;
}
.search-feedback.show { opacity: 1; transform: translateY(0); }

/* ============================================================
   BOUTONS / CONTRÔLES
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.btn:hover { background: #444c54; border-color: #56606a; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn-primary:hover { background: #2cc4ff; border-color: #2cc4ff; }
.header-right .btn { padding: 8px 16px; }

.seg {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--bg-deep);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    max-width: 100%;
    overflow-x: auto;
}
.seg-btn {
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: rgba(var(--accent-rgb), .16); color: var(--accent); }

/* ============================================================
   PANNEAUX
   ============================================================ */

.panel {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    min-width: 0;
}
.panel + .panel, .panel + .split, .split + .panel, .kpi-grid + .panel, .split + .split { margin-top: 18px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line-soft);
}
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.panel-head p { margin: 2px 0 0; font-size: 13px; color: var(--text-dim); }
.panel-body { padding: 20px 22px; }
.panel-body.flush { padding: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.split > .panel { margin-top: 0 !important; }

.empty-state, .loading {
    padding: 34px 20px;
    text-align: center;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
}
.panel .empty-state, .table-scroll .empty-state { background: transparent; border: 0; }

/* ============================================================
   BADGES
   ============================================================ */

.tier-tag {
    --tc: var(--text-dim);
    --tc-rgb: 255, 255, 255;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(var(--tc-rgb), .12);
    border: 1px solid rgba(var(--tc-rgb), .32);
    color: var(--tc);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.4;
}
.t-1 { --tc: var(--t1); --tc-rgb: var(--t1-rgb); }
.t-2 { --tc: var(--t2); --tc-rgb: var(--t2-rgb); }
.t-3 { --tc: var(--t3); --tc-rgb: var(--t3-rgb); }
.t-4 { --tc: var(--t4); --tc-rgb: var(--t4-rgb); }
.t-5 { --tc: var(--t5); --tc-rgb: var(--t5-rgb); }
.tier-txt { color: var(--tc, var(--text-muted)); font-weight: 800; }

.sanction-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}
.sanction-badge.small { font-size: 10.5px; padding: 2px 8px; }

.mc-avatar, .mc-avatar-fallback {
    flex: none;
    display: block;
    border-radius: 8px;
    background: var(--bg-deep);
    image-rendering: pixelated;
    object-fit: cover;
}
.mc-avatar-fallback {
    display: grid;
    place-items: center;
    color: var(--text-dim);
    font-weight: 700;
    border: 1px solid var(--line-soft);
}

/* ============================================================
   LEADERBOARD
   ============================================================ */

/* Barre unique : modes + Retired/Peak reliés dans le même bloc */
.board-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 26px;
    padding: 5px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--bg-deep);
}

.mode-tabs {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}
.mode-tabs::-webkit-scrollbar { display: none; }
.mode-tab {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s, border-color .15s, background-color .15s;
}
.mode-tab:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.mode-tab.active { color: var(--accent); border-color: rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .14); }
.mode-icon { image-rendering: pixelated; flex: none; }

.toggle-row {
    position: relative;
    display: flex;
    flex: none;
    gap: 2px;
    margin-left: 4px;
    padding-left: 9px;
}
/* Séparateur court, centré verticalement, même écart de chaque côté */
.toggle-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 20px;
    transform: translateY(-50%);
    background: var(--line);
}
.toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.toggle-btn:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.toggle-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background-color .15s; }
.toggle-btn.on { color: var(--text); border-color: rgba(var(--accent-rgb), .45); background: rgba(var(--accent-rgb), .08); }
.toggle-btn.on .dot { background: var(--accent); }

/* Écrans étroits : les toggles passent sous les modes, toujours dans la même barre */
@media (max-width: 1000px) {
    .board-toolbar { flex-wrap: wrap; }
    .toggle-row {
        width: 100%;
        margin: 2px 0 0;
        padding: 4px 0 0;
        border-top: 1px solid var(--line-soft);
    }
    .toggle-row::before { display: none; }
    .toggle-btn { flex: 1; justify-content: center; }
}

/* --- Liste (rangées standard, réutilisées aussi pour le top 3) --- */
.rank-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.rank-row {
    display: grid;
    grid-template-columns: 48px 44px minmax(0, auto) 1fr;
    align-items: center;
    gap: 14px;
    min-height: 70px;
    padding: 10px 16px 10px 0;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .15s, background-color .15s;
}
.rank-row:hover { background: var(--surface-2); border-color: var(--line); }
.rank-num {
    align-self: stretch;
    display: grid;
    place-items: center;
    border-right: 1px solid var(--line-soft);
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* --- Top 3 : mêmes rangées que le reste du classement, empilées en
   pleine largeur et teintées or / argent / bronze entre le numéro et
   le skin --- */
.rank-row.top-1,
.rank-row.top-2,
.rank-row.top-3 {
    grid-column: 1 / -1;
}
.rank-row.top-1 {
    background: var(--surface);
    border-color: rgba(var(--t1-rgb), .45);
}
.rank-row.top-1:hover { background: var(--surface-2); }
.rank-row.top-2 {
    background: var(--surface);
    border-color: rgba(var(--t2-rgb), .4);
}
.rank-row.top-2:hover { background: var(--surface-2); }
.rank-row.top-3 {
    background: var(--surface);
    border-color: rgba(var(--t3-rgb), .42);
}
.rank-row.top-3:hover { background: var(--surface-2); }
.rank-row.top-1 .rank-num { color: var(--t1); border-right-color: rgba(var(--t1-rgb), .35); }
.rank-row.top-2 .rank-num { color: var(--t2); border-right-color: rgba(var(--t2-rgb), .35); }
.rank-row.top-3 .rank-num { color: var(--t3); border-right-color: rgba(var(--t3-rgb), .35); }

/* --- Bloc nom : pseudo + points en sous-titre --- */
.rank-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.rank-name-block { min-width: 0; max-width: 180px; }
.rank-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rank-name .name { font-size: 15.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-sub { margin-top: 3px; font-size: 11.5px; color: var(--text-muted); line-height: 1; }
.rank-sub strong { color: var(--text); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; margin-right: 3px; }


/* --- Grille de tiers : icône au-dessus, code coloré en dessous --- */
.mode-tiers { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: center; gap: 10px 14px; min-width: 0; }
.mode-tier { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 34px; flex: none; }
.mode-tier.retired { opacity: .45; }
.mode-tier .icon-wrap {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line-soft);
}
.mode-tier .tier-txt { font-size: 10px; letter-spacing: .01em; line-height: 1; }

/* --- Classement par mode --- */
.tier-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tier-col {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-top: 3px solid var(--tc);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.tier-col-head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--tc);
    font-size: 15px;
    font-weight: 800;
}
.tier-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line-soft);
    transition: background-color .15s;
}
.tier-row:last-child { border-bottom: 0; }
.tier-row:hover { background: var(--surface-2); }
.tier-row.retired .tier-player-name { opacity: .55; }
.tier-player-name { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.tier-player-name .pseudo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-retired { flex: none; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, .08); color: var(--text-dim); font-size: 10px; font-weight: 700; }
.tier-value { flex: none; }
.tier-empty { padding: 18px 16px; color: var(--text-muted); font-size: 13.5px; }

/* ============================================================
   STATISTIQUES
   ============================================================ */

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi {
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    min-width: 0;
}
.kpi-label { font-size: 13.5px; font-weight: 600; color: var(--text-dim); }
.kpi-value { margin: 6px 0 4px; font-size: 36px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--text-muted); }

.chart-box { position: relative; padding: 14px 14px 10px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 8px 8px; font-size: 13px; color: var(--text-dim); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-tip {
    position: absolute;
    z-index: 5;
    min-width: 130px;
    padding: 9px 11px;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 12.5px;
    pointer-events: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.chart-tip b { display: block; margin-bottom: 4px; font-weight: 700; }
.chart-tip div { display: flex; align-items: center; gap: 7px; color: var(--text-dim); }
.chart-tip div strong { margin-left: auto; padding-left: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-empty { padding: 40px 0; text-align: center; color: var(--text-muted); }

.legend-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-dim); }
.legend-stats .legend-item strong { color: var(--text); }

/* Donut + légende */
.donut-wrap { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: center; gap: 26px; padding: 22px; }
.donut-svg { width: 100%; height: auto; display: block; }
.donut-total { fill: var(--text); font-size: 30px; font-weight: 800; }
.donut-caption { fill: var(--text-muted); font-size: 11px; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.donut-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 13.5px; }
.donut-legend .lbl { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .val { font-weight: 700; font-variant-numeric: tabular-nums; }
.donut-legend .pct { min-width: 46px; text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* Vue d'ensemble */
.metric-list { display: grid; gap: 8px; padding: 18px 22px 22px; }
.metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
}
.metric-row span { color: var(--text-dim); font-size: 14px; }
.metric-row strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.metric-row small { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-muted); }

/* Joueurs classés par mode */
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 20px 22px 22px; }
.mode-card { padding: 12px 14px; background: var(--bg-deep); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.mode-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.mode-card-top b { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mode-card-top strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

/* Top testeurs */
.tester-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 20px 22px 22px; }
.tester-card {
    display: grid;
    grid-template-columns: 32px 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
}
.rank-chip {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 800;
}
.rank-chip.r1 { background: rgba(var(--t1-rgb), .16); color: var(--t1); }
.rank-chip.r2 { background: rgba(var(--t2-rgb), .18); color: var(--t2); }
.rank-chip.r3 { background: rgba(var(--t3-rgb), .18); color: var(--t3); }
.tester-info { min-width: 0; }
.tester-info b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tester-info small { color: var(--text-muted); font-size: 12px; }
.tester-bar { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.tester-bar .bar { flex: 1; }
.tester-bar strong { min-width: 34px; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.tester-card > .tester-info { grid-column: 3; }
.tester-body { width: auto; max-width: 48px; height: 60px; object-fit: contain; justify-self: center; filter: drop-shadow(0 4px 5px rgba(0,0,0,.35)); }

/* Tableaux */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
    padding: 12px 16px;
    text-align: left;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 1px solid var(--line-soft);
}
.data-table td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .strong { font-weight: 700; }
.data-table .rank { color: var(--text-muted); font-weight: 700; width: 44px; }
.who { display: flex; align-items: center; gap: 10px; }
.status-pill { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.status-pill.on { color: var(--green); border-color: rgba(62, 207, 142, .4); background: rgba(62, 207, 142, .1); }

.note { margin: 12px 8px 4px; font-size: 12.5px; color: var(--text-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 20px 22px 22px; }
.stat-card { padding: 16px 18px; background: var(--bg-deep); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.stat-card .n { font-size: 26px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-card .l { margin-top: 4px; color: var(--text-dim); font-size: 13.5px; }
.stat-card .s { margin-top: 2px; color: var(--text-muted); font-size: 12px; }

/* ============================================================
   INFORMATIONS (documentation)
   ============================================================ */

.docs { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 36px; align-items: start; }
.docs-nav {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    padding: 6px 0;
}
.docs-nav-title { margin: 20px 0 6px; padding: 0 14px; font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.docs-nav-title:first-child { margin-top: 0; }
.docs-link {
    display: block;
    width: 100%;
    padding: 7px 14px;
    border: 0;
    border-left: 2px solid var(--line-soft);
    background: none;
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.docs-link:hover { color: var(--text); border-left-color: var(--line); }
.docs-link.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

.docs-main { min-width: 0; max-width: 860px; }
.crumbs { margin-bottom: 8px; font-size: 13px; color: var(--text-muted); }
.crumbs span + span::before { content: "/"; margin: 0 7px; color: var(--line); }
.doc-title { margin: 0 0 22px; font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.doc-title + .doc-lead { margin-top: -12px; }
.doc-lead { margin: 0 0 24px; max-width: 68ch; font-size: 16.5px; color: var(--text-dim); }

.doc-panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); }
.doc-panel + .doc-panel, .doc-panel + .callout, .callout + .doc-panel, .doc-panel + .doc-grid, .doc-grid + .doc-panel { margin-top: 18px; }
.doc-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 26px; border-bottom: 1px solid var(--line-soft); }
.doc-panel-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.doc-panel-head a { color: var(--accent); font-size: 14px; font-weight: 600; }
.doc-panel-head a:hover { text-decoration: underline; }
.doc-panel-body { padding: 24px 26px; }
.doc-panel-body > p { max-width: 68ch; margin-bottom: 14px; }
.doc-panel-body > :last-child { margin-bottom: 0; }
.doc-sep { height: 1px; margin: 22px 0; background: var(--line-soft); border: 0; }
.doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 22px; }

.callout {
    padding: 14px 18px;
    background: rgba(0, 0, 0, .14);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    color: var(--text);
}
.callout p { margin: 0; }
.callout p + p { margin-top: 6px; }
.callout + .callout { margin-top: 10px; }
.callout.warn { border-left-color: var(--warn); }
.callout-title { display: block; margin-bottom: 4px; font-weight: 700; }

.steps { list-style: none; margin: 0; padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding-bottom: 24px; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--line); }
.step-num {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
}
.step-body { padding-top: 4px; }
.step-body h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.step-body p { margin: 0; color: var(--text-dim); }
.step-body strong { color: var(--text); }

.qa { display: grid; }
.qa-item { padding: 20px 26px; border-bottom: 1px solid var(--line-soft); }
.qa-item:last-child { border-bottom: 0; }
.qa-item h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 700; }
.qa-item p { margin: 0; max-width: 68ch; color: var(--text-dim); }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; }
.doc-grid > .doc-panel { margin-top: 0 !important; }

.strike-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.strike-table th { padding: 11px 20px; text-align: left; color: var(--text-muted); font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.strike-table td { padding: 11px 20px; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.strike-table tr:last-child td { border-bottom: 0; }
.strike-table .num { text-align: right; }
.strike-table td:first-child { font-weight: 600; }
.strike-table td:nth-child(2) { color: var(--text-dim); }
.strike-table .pos { color: var(--green); font-weight: 800; }
.strike-table .neg { color: var(--red); font-weight: 800; }
.strike-table .zero { color: var(--text-dim); font-weight: 800; }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 22px 26px 26px; }
.link-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--bg-deep); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.link-card b { font-size: 15px; }
.link-card small { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12.5px; }
.link-card .btn { margin-top: auto; }

/* Rubriques / accordéons */
.rubric-accordion { border-bottom: 1px solid var(--line-soft); }
.rubric-accordion:last-child { border-bottom: 0; }
.rubric-accordion-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 16px 26px;
    border: 0;
    background: none;
    color: var(--text);
    font-size: 15.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.rubric-accordion-btn:hover { background: rgba(255, 255, 255, .03); }
.rubric-chevron { flex: none; width: 9px; height: 9px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; }
.rubric-accordion.open .rubric-chevron { transform: rotate(-135deg) translate(-2px, -2px); }
.rubric-accordion-content { padding: 4px 26px 24px; }

.mode-pill-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 26px 0; }
.mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    background: var(--bg-deep);
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.mode-pill:hover { color: var(--text); border-color: var(--line); }
.mode-pill.active { color: var(--accent); border-color: rgba(var(--accent-rgb), .55); background: rgba(var(--accent-rgb), .1); }
.mode-rubric-panel { margin: 16px 26px 26px; }

/* Texte riche (règlement, rubriques, info) */
.prose h2 { margin: 26px 0 10px; font-size: 20px; font-weight: 700; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 20px 0 8px; font-size: 16.5px; font-weight: 700; }
.prose p { margin: 0 0 12px; max-width: 72ch; color: var(--text-dim); }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }
.prose blockquote { margin: 0 0 10px; padding: 10px 16px; background: rgba(0, 0, 0, .14); border-left: 3px solid var(--line); border-radius: 0 8px 8px 0; color: var(--text-dim); }
.prose ul { margin: 0 0 12px; padding-left: 22px; color: var(--text-dim); }
.prose li { margin-bottom: 4px; }
.rubric-note { font-size: 13px; color: var(--text-muted) !important; }
.rubric-image { margin: 14px 0; }
.rubric-image img { display: block; border-radius: var(--radius); border: 1px solid var(--line-soft); }
.rubric-mode-icon { vertical-align: -3px; }

/* Serveurs de test */
.server-tier-list-wrap { display: grid; gap: 20px; }
.server-tier-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 700; font-size: 15.5px; }
.server-tier-title img { width: 22px; height: 22px; image-rendering: pixelated; }
.server-tier-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.server-tier-row {
    display: grid;
    grid-template-columns: 20px minmax(0, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s;
}
.server-tier-row:hover { border-color: var(--line); }
.server-tier-row.copied { border-color: var(--green); }
.server-tier-row img { width: 18px; height: 18px; image-rendering: pixelated; }
.server-tier-row .host { font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.server-tier-row .modes { color: var(--text-muted); font-size: 12.5px; }
.server-tier-row .copy-status { color: var(--accent); font-size: 12px; font-weight: 600; }
.server-tier-rules { display: grid; gap: 8px; margin-top: 22px; }
.server-tier-rules > div { display: grid; grid-template-columns: 22px auto minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 12px 14px; background: rgba(0, 0, 0, .14); border-radius: var(--radius); font-size: 13.5px; }
.server-tier-rules img { width: 20px; height: 20px; margin-top: 2px; image-rendering: pixelated; }
.server-tier-rules span { color: var(--text-dim); }

/* Sanctions */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px; background: var(--bg-deep); border: 1px solid var(--line-soft); border-radius: 9px; font-size: 14px; }
.sanction-list { display: grid; gap: 8px; }
.sanction-row {
    display: grid;
    grid-template-columns: 96px minmax(120px, 190px) minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
}
.sanction-row .sanction-badge { justify-content: center; }
.sanction-row .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sanction-row .name:hover { color: var(--accent); }
.sanction-row .reason { color: var(--text-dim); font-size: 14px; }
.sanction-when { color: var(--text-muted); font-size: 13px; white-space: nowrap; }

/* ============================================================
   PROFIL JOUEUR
   ============================================================ */

.back-link { display: inline-block; margin-bottom: 16px; color: var(--text-dim); font-size: 14px; font-weight: 600; }
.back-link:hover { color: var(--text); }

.sanction-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sanction-banner-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sanction-banner-text span { color: var(--text-dim); font-size: 13px; }

.player-hero {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    padding: 26px 30px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
}
/* Dégradé aux couleurs du meilleur tier du joueur (classe t-1..t-5 posée par player.js) */
.player-hero.t-1, .player-hero.t-2, .player-hero.t-3, .player-hero.t-4, .player-hero.t-5 {
    background: var(--surface);
    border-color: rgba(var(--tc-rgb), .38);
}
.player-body { display: block; width: 100%; max-height: 240px; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .4)); }
.player-body-placeholder { width: 100%; aspect-ratio: 1 / 1.6; border-radius: var(--radius); background: var(--bg-deep); }
.player-identity h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 4px; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.player-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-dim); font-size: 14px; }
.player-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.fact { padding: 14px 16px; background: var(--bg-deep); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.fact strong { display: block; font-size: 24px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.fact span { font-size: 12.5px; color: var(--text-muted); }

.profile-section-title { margin: 30px 0 12px; font-size: 18px; font-weight: 700; }
.profile-tier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.profile-tier-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 16px 14px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-top: 3px solid var(--tc, var(--line));
    border-radius: var(--radius);
    transition: border-color .15s, background-color .15s;
}
.profile-tier-card:hover { background: var(--surface-2); border-color: var(--line); border-top-color: var(--tc, var(--line)); }
.profile-tier-card.retired { opacity: .65; }
.profile-tier-head { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 13.5px; font-weight: 600; }
.profile-tier-value { margin: 6px 0 2px; color: var(--tc, var(--text)); font-size: 30px; font-weight: 800; line-height: 1.1; }
.profile-tier-points { color: var(--text-muted); font-size: 12.5px; }

.tier-split { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--bg-deep); gap: 2px; }
.tier-split i { display: block; background: var(--tc); min-width: 6px; }
.tier-split-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 14px; font-size: 13.5px; color: var(--text-dim); }
.tier-split-legend b { color: var(--tc); }

.player-extra-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.player-extra-grid .fact { background: var(--surface); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    padding: 24px var(--gutter);
    border-top: 1px solid var(--line-soft);
    background: var(--bg-deep);
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}
.site-footer span { margin: 0 6px; opacity: .6; }


/* ============================================================
   MOTION - volontairement discret
   ============================================================ */
.rank-row {
    transition: border-color .15s ease, background-color .15s ease;
}

/* ============================================================
   FOOTER - réseaux
   ============================================================ */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    text-align: left;
}
.footer-socials {
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-dim);
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.footer-social img, .footer-social svg {
    width: 18px;
    height: 18px;
    display: block;
}
.footer-social svg {
    fill: currentColor;
}
.footer-social:hover {
    color: var(--text);
    border-color: var(--line);
    background: var(--surface-2);
}
.footer-copy {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1080px) {
    .tier-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: minmax(0, 1fr); }
    .rank-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
    .docs { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .docs-nav { position: static; display: flex; gap: 6px; overflow-x: auto; padding: 0 0 6px; }
    .docs-nav-title { display: none; }
    .docs-link { width: auto; flex: none; padding: 7px 14px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface); white-space: nowrap; }
    .docs-link.active { border-color: rgba(var(--accent-rgb), .55); background: rgba(var(--accent-rgb), .1); }
    .docs-link:hover { border-color: var(--line); }
    .player-hero { grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 22px; }
    .player-facts, .player-extra-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tester-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
    .site-header { position: static; grid-template-columns: minmax(0, 1fr); justify-items: stretch; height: auto; padding: 12px 16px; }
    .brand-logo { order: -1; }
    .header-left { width: 100%; }
    .nav-links { flex: 1; min-width: 0; overflow-x: auto; }
    .header-right { width: 100%; }
    .search-box { flex: 1; min-width: 0; }
    .tier-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    :root { --gutter: 16px; }
    .page { padding-top: 16px; }
    .page-head h1, .doc-title { font-size: 26px; }
    .rank-row { grid-template-columns: 40px 40px minmax(0, 1fr); grid-template-areas: "num avatar main" "num avatar tiers"; row-gap: 6px; gap: 10px; padding: 10px 12px 10px 0; }
    .rank-num { grid-area: num; font-size: 16px; }
    .rank-row .mc-avatar, .rank-row .mc-avatar-fallback { grid-area: avatar; }
    .rank-main { grid-area: main; flex-wrap: wrap; }
    .mode-tiers { grid-area: tiers; justify-content: flex-start; width: 100%; }
    .kpi-grid { gap: 10px; }
    .kpi { padding: 16px; }
    .kpi-value { font-size: 28px; }
    .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 18px; }
    .donut-svg { max-width: 200px; }
    .donut-legend { width: 100%; }
    .panel-head, .doc-panel-head { padding: 16px 18px; }
    .panel-body, .doc-panel-body { padding: 18px; }
    .qa-item { padding: 18px; }
    .rubric-accordion-btn { padding: 15px 18px; }
    .rubric-accordion-content { padding: 4px 18px 20px; }
    .mode-pill-row { padding: 16px 18px 0; }
    .mode-rubric-panel { margin: 14px 18px 20px; }
    .link-grid { padding: 18px; }
    .metric-list, .mode-grid, .tester-grid, .stat-grid { padding-left: 16px; padding-right: 16px; }
    .sanction-row { grid-template-columns: minmax(0, 1fr) auto; }
    .sanction-row .reason { grid-column: 1 / -1; order: 3; }
    .server-tier-row { grid-template-columns: 20px minmax(0, 1fr) auto; }
    .server-tier-row .modes { grid-column: 2 / -1; }
    .player-hero { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
    .player-body { max-height: 190px; }
    .player-identity h1 { justify-content: center; font-size: 28px; }
    .player-sub { justify-content: center; }
    .player-facts { text-align: left; }
    .strike-table th, .strike-table td { padding: 10px 14px; }
}

@media (max-width: 480px) {
    .site-footer { flex-direction: column; align-items: flex-start; }
    .footer-copy { margin-left: 0; text-align: left; }
    .tier-board { grid-template-columns: minmax(0, 1fr); }
    .mode-grid { grid-template-columns: minmax(0, 1fr); }
    .kpi-grid { grid-template-columns: minmax(0, 1fr); }
    .toggle-row { width: 100%; }
    .toggle-btn { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Panneaux - en-têtes de la page Statistiques
   ============================================================ */
:root { --swift-line: #4a4e5b; }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 18px; border-bottom:1px solid var(--swift-line); }
.panel-head h2 { margin:0 0 2px; font-size:17px; }
.panel-head p { margin:0; color:var(--text-muted); font-size:12px; }


/* ============================================================
   SwiftPvP refinement - surfaces et mouvement
   ============================================================ */
:root {
    --bg: #252831;
    --bg-deep: #202229;
    --surface: #383b47;
    --surface-2: #414450;
    --line: #4c5060;
    --line-soft: #434754;
}
.panel {
    box-shadow: 0 8px 26px rgba(0,0,0,.12);
}
.btn, .mode-tab, .toggle-btn {
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease, opacity .16s ease;
}
.btn:hover { transform: none; }
.btn:active { transform: translateY(0); }
@media (prefers-reduced-motion:reduce) {
    .btn, .mode-tab { transition:none !important; }
}
/* Ajustements demandés: boutons non-pill, mouvements discrets, liens de pied de page. */
.btn, .mode-tab, .toggle-btn { border-radius: 6px !important; transform: none !important; }
.footer-links { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; }
.footer-links a, .site-footer a { color:var(--text-dim); text-decoration:none; text-underline-offset:3px; }
.footer-links a:hover, .site-footer a:hover { color:var(--text); text-decoration:underline; }
.footer-copy { white-space:normal; }
@media (max-width: 720px) { .site-footer { flex-direction:column; align-items:flex-start; } .footer-links { gap:10px 14px; } .footer-copy { margin-left:0; text-align:left; } }

.legal-content { max-width:850px; margin:0 auto; }
.legal-content h1 { font-size:clamp(26px,4vw,36px); margin-bottom:8px; }
.legal-content h2 { margin-top:28px; font-size:20px; }
.legal-content p, .legal-content li { color:var(--text-dim); line-height:1.75; }
.legal-notice { padding:14px 16px; border:1px solid var(--warn); border-radius:6px; background:var(--bg-deep); color:var(--text); margin:18px 0 24px; }

.tier-load-sentinel { min-height: 1px; padding: 8px 10px; color: var(--text-muted); text-align: center; font-size: 12px; }


/* ============================================================
   THEME MODERNE v2 (étape 1) — sobre, sombre, accent cyan
   Ce bloc est volontairement en fin de fichier : il redéfinit les
   variables et affine les composants sans casser la structure.
   ============================================================ */
:root {
    --bg: #0c0e13;
    --bg-deep: #090b0f;
    --surface: #13161d;
    --surface-2: #191d26;
    --line: #2a303c;
    --line-soft: #1e232d;
    --text: #f2f4f8;
    --text-dim: #aab2c0;
    --text-muted: #7c8595;
    --accent: #06b7fe;
    --accent-rgb: 6, 183, 254;
    --accent-ink: #031722;
    --radius-lg: 16px;
    --radius: 12px;
    --radius-sm: 8px;
    --header-h: 64px;
    --page-w: 1200px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
    --shadow-md: 0 10px 30px rgba(0,0,0,.28);
}
body {
    background: var(--bg);
    background-image: radial-gradient(900px 380px at 50% -140px, rgba(var(--accent-rgb), .10), transparent 70%);
    background-repeat: no-repeat;
    letter-spacing: -.003em;
}
::selection { background: rgba(var(--accent-rgb), .35); }
.page { padding-top: 32px; }
.page-head h1, .doc-title { letter-spacing: -.03em; }

/* --- En-tête : logo à gauche, navigation, actions à droite --- */
.site-header {
    display: flex;
    gap: 28px;
    background: rgba(12, 14, 19, .78);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.header-brand { display: flex; align-items: center; gap: 28px; min-width: 0; }
.header-right { margin-left: auto; }
.brand-logo { justify-self: auto; }
.brand-logo img { height: 34px; width: 34px; }
.nav-links { gap: 2px; }
.nav-link { padding: 8px 14px; border-radius: 10px; font-weight: 500; }
.nav-link:hover { background: rgba(255,255,255,.05); }
.nav-link.active { color: var(--text); background: rgba(255,255,255,.07); }
.search-box {
    height: 38px; min-width: 240px;
    background: var(--surface);
    border-radius: 10px;
}
.search-box:focus-within { border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15); }

/* --- Boutons --- */
.btn, .mode-tab, .toggle-btn { border-radius: 10px !important; }
.btn {
    background: var(--surface-2);
    border-color: var(--line);
    font-weight: 600;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: #1f2430; border-color: #3a4151; }
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), .25);
}
.btn-primary:hover { background: #3cc8ff; border-color: #3cc8ff; box-shadow: 0 6px 18px rgba(var(--accent-rgb), .32); }

/* --- Cartes, panneaux --- */
.panel, .kpi, .tier-col, .doc-panel, .player-hero, .stat-card, .mode-card,
.tester-card, .fact, .profile-tier-card, .sanction-row, .server-tier-row, .link-card {
    background: var(--surface);
    border-color: var(--line-soft);
    box-shadow: var(--shadow-sm);
}
.panel { box-shadow: var(--shadow-sm); }
.stat-card, .mode-card, .fact, .link-card, .server-tier-row { background: var(--bg-deep); box-shadow: none; }
.panel-head { padding: 18px 24px; }
.empty-state, .loading { background: transparent; border-color: var(--line); }

/* --- Barre de modes --- */
.board-toolbar {
    padding: 6px;
    margin-bottom: 24px;
    border-radius: 14px;
    background: var(--surface);
    border-color: var(--line-soft);
}
.mode-tab { padding: 8px 14px; font-weight: 500; }
.mode-tab:hover { background: rgba(255,255,255,.05); }
.mode-tab.active, .toggle-btn.on {
    color: var(--text);
    background: rgba(var(--accent-rgb), .14);
    border-color: rgba(var(--accent-rgb), .4);
}
.toggle-btn { font-weight: 500; }

/* --- Classement --- */
.rank-list { gap: 8px; }
.rank-row {
    min-height: 68px;
    border-radius: 14px;
    background: var(--surface);
    border-color: var(--line-soft);
    transition: border-color .15s, background-color .15s, transform .15s;
}
.rank-row:hover { background: var(--surface-2); border-color: var(--line); }
.rank-num { font-weight: 600; border-right-color: var(--line-soft); }
.rank-row.top-1, .rank-row.top-2, .rank-row.top-3 { background: var(--surface); }
.rank-row.top-1 { box-shadow: inset 3px 0 0 var(--t1); }
.rank-row.top-2 { box-shadow: inset 3px 0 0 var(--t2); }
.rank-row.top-3 { box-shadow: inset 3px 0 0 var(--t3); }
.rank-row.top-1:hover, .rank-row.top-2:hover, .rank-row.top-3:hover { background: var(--surface-2); }
.tier-col { border-top-width: 2px; }
.tier-row:hover { background: rgba(255,255,255,.03); }
.profile-tier-card { border-radius: 14px; }

/* --- Documentation / informations --- */
.docs-link { border-radius: 0 10px 10px 0; }
.docs-link.active { background: rgba(var(--accent-rgb), .08); }
.callout { border-radius: 12px; background: var(--surface); }
.rubric-accordion-btn:hover { background: rgba(255,255,255,.03); }

/* --- Détails --- */
.tier-tag, .sanction-badge, .status-pill { border-radius: 8px; }
.data-table th { color: var(--text-muted); font-weight: 500; letter-spacing: .02em; }
.data-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.bar { background: rgba(255,255,255,.06); }
.site-footer { background: transparent; border-top: 1px solid var(--line-soft); padding: 28px var(--gutter); }
.footer-links a:hover, .site-footer a:hover { color: var(--text); text-decoration: none; }
.legal-notice { border-radius: 12px; border-color: rgba(242,196,94,.4); background: var(--surface); }
.back-link:hover { color: var(--accent); }

/* --- Mobile --- */
@media (max-width: 820px) {
    .site-header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; background: rgba(12,14,19,.95); }
    .header-brand { width: 100%; gap: 14px; }
    .header-right { margin-left: 0; }
}
@media (max-width: 640px) { .page { padding-top: 20px; } }

/* --- Boutique + connexion Microsoft --- */
.header-right { gap: 10px; }
.header-right .btn-shop { background: var(--surface); border-color: var(--line); color: var(--text); }
.header-right .btn-shop:hover { background: var(--surface-2); border-color: rgba(var(--accent-rgb), .6); }
.auth-slot { position: relative; display: flex; align-items: center; min-height: 38px; }
.header-right .btn-login {
    background: linear-gradient(135deg, #2cc4ff 0%, var(--accent) 55%, #0590d6 100%);
    border-color: transparent;
    color: var(--accent-ink);
    font-weight: 800;
    padding: 8px 20px;
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .35), 0 6px 22px rgba(var(--accent-rgb), .35);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.header-right .btn-login:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .6), 0 8px 28px rgba(var(--accent-rgb), .5); }
.user-chip {
    display: inline-flex; align-items: center; gap: 9px;
    height: 38px; padding: 4px 12px 4px 5px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.user-chip:hover, .user-chip[aria-expanded="true"] { background: var(--surface-2); border-color: rgba(var(--accent-rgb), .6); }
.user-chip .mc-avatar, .user-chip .mc-avatar-fallback { border-radius: 6px !important; image-rendering: pixelated; }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45); padding: 6px;
}
.user-menu[hidden] { display: none; }
.user-menu-head { padding: 9px 12px; font-size: 12.5px; color: var(--text-muted); border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.user-menu-head strong { color: var(--text); }
.user-menu-item { width: 100%; text-align: left; padding: 9px 12px; background: none; border: 0; border-radius: 7px; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.user-menu-item:hover { background: rgba(var(--accent-rgb), .12); color: var(--accent); }
.toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 100; max-width: min(92vw, 460px);
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    padding: 12px 18px; border-radius: 10px; background: var(--surface-2);
    border: 1px solid rgba(var(--accent-rgb), .5); box-shadow: 0 12px 34px rgba(0,0,0,.5);
    font-size: 14px; font-weight: 600; text-align: center; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 820px) {
    .header-right { flex-wrap: wrap; }
    .header-right .search-box { flex: 1 1 100%; }
    .auth-slot { margin-left: auto; }
}


/* === Swift PvP UI corrections === */
.site-header { position: sticky; }
.header-wordmark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    color: #66d1ff;
    font-family: "Arial Black", "Segoe UI", system-ui, sans-serif;
    font-size: clamp(23px, 2vw, 30px);
    font-weight: 950;
    letter-spacing: .12em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    text-shadow: none;
}
.header-wordmark:hover { color: #66d1ff; text-decoration: none; }
.site-header .brand-logo { position: relative; z-index: 2; }
.site-header .header-brand, .site-header .header-right { position: relative; z-index: 2; }

/* Flat controls: remove the blue reflection/glow and animated shine layers everywhere. */
button, .btn, [role="button"], .btn-login, .btn-primary, .btn-shop, .auth-slot a,
input[type="submit"], input[type="button"], .seg-btn, .toggle-btn {
    background-image: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}
button::before, button::after, .btn::before, .btn::after,
[role="button"]::before, [role="button"]::after,
.btn-login::before, .btn-login::after, .btn-primary::before, .btn-primary::after,
.btn-shop::before, .btn-shop::after {
    content: none !important;
    display: none !important;
    animation: none !important;
}
.btn-login, .btn-primary {
    background-color: #159bd2 !important;
    border-color: #159bd2 !important;
    color: #071923 !important;
}
.btn-login:hover, .btn-primary:hover {
    background-color: #159bd2 !important;
    border-color: #159bd2 !important;
    box-shadow: none !important;
}
button:hover, .btn:hover, [role="button"]:hover {
    box-shadow: none !important;
    filter: none !important;
}

/* Footer Swift PvP : identité propre, inspirée de la référence sans la copier. */
.site-footer {
    padding: 18px clamp(16px, 3vw, 40px) !important;
    background: #20212c !important;
    border-top: 0 !important;
    text-align: left !important;
    color: #85889e !important;
}
.footer-inner {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 24px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #347dff !important;
    font-family: "Arial Black", "Segoe UI", system-ui, sans-serif;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: .08em;
    white-space: nowrap;
}
.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 0;
}
.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: #777b96 !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .025em;
    white-space: nowrap;
    padding: 7px 12px;
    transition: color .18s ease, transform .18s ease;
}
.footer-links a + a::before {
    content: "—";
    color: #4e536b;
    font-weight: 500;
    margin-right: 24px;
}
.footer-links a:hover { color: #66d1ff !important; transform: translateY(-1px); }
.external-mark { margin-left: 3px; color: #c9ccda; }
.footer-credit {
    color: #777b96;
    font-size: 11px;
    line-height: 1.65;
    text-align: right;
    white-space: nowrap;
}
.footer-credit strong { color: #eceef6; }
.footer-wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.footer-wordmark > span { color: #3987ff; }
.footer-wordmark > strong { color: #f04454; }
.footer-wordmark small { display: block; margin-top: 6px; color: #727790; font-size: 8px; letter-spacing: .09em; font-weight: 700; }
@media (max-width: 980px) {
    .footer-inner { grid-template-columns: 1fr; justify-items: center; gap: 13px; }
    .footer-links { gap: 4px 0; }
    .footer-links a { padding: 6px 8px; }
    .footer-links a + a::before { margin-right: 12px; }
    .footer-credit { text-align: center; }
    .header-wordmark { font-size: 21px; }
}
@media (max-width: 700px) {
    .site-header { height: auto; min-height: var(--header-h); padding-top: 8px; padding-bottom: 8px; }
    .header-wordmark { position: static; transform: none; order: -1; width: 100%; text-align: center; }
    .site-header .header-brand { grid-column: 1 / -1; justify-content: center; }
    .site-header .header-right { grid-column: 1 / -1; justify-content: center; flex-wrap: wrap; }
}


/* Legal pages inspired by the supplied reference: dark background, blue section labels, thin dividers. */
.legal-document {
    width: min(100% - 32px, 760px);
    margin: 28px auto 64px;
    color: var(--text, #e5e7ef);
    line-height: 1.7;
    font-size: 14px;
}
.legal-document h1 {
    margin: 0 0 2px;
    font-size: clamp(27px, 3vw, 38px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: .035em;
}
.legal-document .legal-subtitle {
    color: #858aa5;
    margin: 4px 0;
}
.legal-document .legal-updated {
    color: #737894;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    margin: 8px 0 26px;
}
.legal-document section {
    padding: 18px 0 20px;
    border-bottom: 1px solid rgba(130, 139, 171, .22);
}
.legal-document section:last-child { border-bottom: 0; }
.legal-document h2 {
    margin: 0 0 8px;
    color: #687bff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
}
.legal-document p { margin: 7px 0; }
.legal-document ul { padding-left: 20px; margin: 8px 0; }
.legal-document li { margin: 5px 0; }
.legal-document a { color: #7186ff; text-decoration: underline; text-underline-offset: 2px; }


/* Swift PvP — footer éditorial, calé sur la teinte de l’en-tête */
.site-footer {
    --footer-bg: #20212c;
    box-sizing: border-box;
    width: 100%;
    margin-top: 54px;
    padding: 22px clamp(20px, 4.2vw, 64px) !important;
    background: var(--footer-bg) !important;
    border-top: 1px solid rgba(130, 151, 210, .12) !important;
    color: #7d819b !important;
    text-align: left !important;
}
.site-footer .footer-inner {
    width: min(100%, 1540px);
    min-height: 40px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 290px) minmax(0, 1fr) minmax(145px, 190px);
    align-items: center;
    gap: 28px;
}
.site-footer .footer-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #e9edff !important;
    text-decoration: none !important;
}
.site-footer .footer-brand img { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.site-footer .footer-wordmark { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 3px; line-height: 1; }
.site-footer .footer-wordmark > span, .site-footer .footer-wordmark > strong {
    font-family: "Arial Black", "Segoe UI", system-ui, sans-serif;
    font-size: clamp(16px, 1.25vw, 21px);
    font-weight: 950;
    letter-spacing: .075em;
}
.site-footer .footer-wordmark > span { color: #3982ff; }
.site-footer .footer-wordmark > strong { color: #f04455; }
.site-footer .footer-wordmark small {
    grid-column: 1 / -1;
    margin-top: 5px;
    color: #747992;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
    white-space: nowrap;
}
.site-footer .footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
}
.site-footer .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 clamp(9px, 1.05vw, 17px);
    border-right: 1px solid rgba(123, 132, 169, .22);
    color: #777c98 !important;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .025em;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none !important;
    transition: color .18s ease;
}
.site-footer .footer-links a:first-child { padding-left: 0; }
.site-footer .footer-links a:last-child { padding-right: 0; border-right: 0; }
.site-footer .footer-links a:hover, .site-footer .footer-links a:focus-visible { color: #f2f4ff !important; }
.site-footer .footer-external { margin-left: 5px; color: #c7cce0; font-size: 12px; }
.site-footer .footer-credit { color: #777c98; font-size: 10px; line-height: 1.65; text-align: right; white-space: nowrap; }
.site-footer .footer-credit strong { color: #e4e7f3; font-weight: 800; }
@media (max-width: 1120px) {
    .site-footer .footer-inner { grid-template-columns: 1fr; justify-items: center; gap: 17px; }
    .site-footer .footer-links { flex-wrap: wrap; row-gap: 8px; }
    .site-footer .footer-links a:first-child { padding-left: 10px; }
    .site-footer .footer-credit { text-align: center; }
}
@media (max-width: 560px) {
    .site-footer { margin-top: 36px; padding: 25px 16px !important; }
    .site-footer .footer-links { gap: 5px 0; }
    .site-footer .footer-links a { padding: 5px 9px; font-size: 9px; }
    .site-footer .footer-links a:nth-child(3) { border-right: 0; }
    .site-footer .footer-wordmark > span, .site-footer .footer-wordmark > strong { font-size: 18px; }
}

/* Footer Swift PvP — version bleue monochrome, navigation séparée par des tirets */
.site-footer { background: #202230 !important; color: #777c98; border-top: 1px solid rgba(133, 145, 190, .08); }
.site-footer .footer-inner { display: grid; grid-template-columns: minmax(190px, 1fr) auto minmax(150px, 1fr); align-items: center; gap: 22px; max-width: 1320px; margin: 0 auto; }
.site-footer .footer-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none !important; }
.site-footer .footer-brand img { object-fit: contain; flex: 0 0 auto; }
.site-footer .footer-wordmark { display: grid; grid-template-columns: auto; align-items: baseline; line-height: 1; }
.site-footer .footer-wordmark > span { color: #8bbaff !important; font-family: "Arial Black", "Segoe UI", system-ui, sans-serif; font-size: clamp(16px, 1.25vw, 21px); font-weight: 950; letter-spacing: .075em; }
.site-footer .footer-wordmark small { grid-column: 1; margin-top: 5px; color: #747992; font-size: 8px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.site-footer .footer-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; min-width: 0; gap: 0; }
.site-footer .footer-links a { display: inline-flex; align-items: center; min-height: 24px; padding: 0 clamp(7px, .8vw, 13px); border: 0 !important; color: #777c98 !important; font-size: 10px; font-weight: 850; letter-spacing: .025em; line-height: 1.4; white-space: nowrap; text-decoration: none !important; transition: color .18s ease; }
.site-footer .footer-links a + a::before { content: "—"; color: #464b63; margin-right: clamp(12px, 1.1vw, 18px); }
.site-footer .footer-links a:hover, .site-footer .footer-links a:focus-visible { color: #8bbaff !important; }
.site-footer .footer-external { margin-left: 5px; color: #8bbaff; font-size: 12px; }
.site-footer .footer-credit { color: #777c98; font-size: 10px; line-height: 1.65; text-align: right; white-space: nowrap; }
.site-footer .footer-credit strong { color: #c4d9ff; font-weight: 800; }
@media (max-width: 1120px) {
 .site-footer .footer-inner { grid-template-columns: 1fr; justify-items: center; gap: 17px; }
 .site-footer .footer-links { flex-wrap: wrap; row-gap: 8px; }
 .site-footer .footer-credit { text-align: center; }
}
@media (max-width: 560px) {
 .site-footer { margin-top: 36px; padding: 25px 16px !important; }
 .site-footer .footer-links { gap: 5px 0; }
 .site-footer .footer-links a { padding: 5px 7px; font-size: 9px; }
 .site-footer .footer-links a + a::before { margin-right: 10px; }
 .site-footer .footer-wordmark > span { font-size: 18px; }
}


/* Footer harmonisé avec la couleur réelle de l’en-tête */
.site-footer {
    --footer-bg: rgba(12, 14, 19, .95);
    background: var(--footer-bg) !important;
    color: #aeb5c0 !important;
    border-top: 1px solid var(--line-soft) !important;
    padding: 16px clamp(16px, 3vw, 40px) !important;
    margin-top: 54px;
}
.site-footer .footer-inner {
    width: min(100%, 1540px);
    min-height: 30px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(20px, 4vw, 56px);
}
.site-footer .footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    min-width: 0;
}
.site-footer .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 clamp(8px, 1vw, 15px);
    border: 0 !important;
    color: #aeb5c0 !important;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none !important;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none !important;
    transition: color .18s ease;
}
.site-footer .footer-links a + a::before {
    content: "|";
    color: rgba(174, 181, 192, .35);
    margin-right: clamp(10px, 1vw, 15px);
}
.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible { color: #fff !important; }
.site-footer .footer-credit {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #aeb5c0;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
    text-align: right;
}
.site-footer .footer-credit strong { color: #dce8ff; font-weight: 600; }
.site-footer .footer-year {
    padding-left: 14px;
    border-left: 1px solid rgba(174, 181, 192, .28);
    color: #aeb5c0;
}
@media (max-width: 900px) {
    .site-footer .footer-inner { flex-direction: column; gap: 10px; }
    .site-footer .footer-credit { justify-content: center; }
}
@media (max-width: 560px) {
    .site-footer { margin-top: 36px; padding: 18px 12px !important; }
    .site-footer .footer-links a { padding: 5px 7px; font-size: 10px; }
    .site-footer .footer-links a + a::before { margin-right: 8px; }
}


/* Correction ciblée du footer : couleur de l'en-tête et casse normale de Tier Tagger */
.site-footer { background: #0c0e13 !important; }
.site-footer .footer-links a:first-child { text-transform: none !important; font-variant: normal !important; }


/* Footer final : libellés en casse normale, tirets et centrage équilibré */
.site-footer { background: #0c0e13 !important; }
.site-footer .footer-inner {
  width: 100%; max-width: 1540px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 18px 28px;
}
.site-footer .footer-links {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0;
}
.site-footer .footer-links a {
  text-transform: none !important; font-variant: normal !important;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 11px; font-weight: 500; letter-spacing: 0;
  padding: 0 12px;
}
.site-footer .footer-links a + a::before {
  content: "-" !important; display: inline-block;
  color: rgba(174,181,192,.5); margin-right: 24px;
}
.site-footer .footer-credit { text-align: center; }
@media (max-width: 900px) {
  .site-footer .footer-inner { flex-direction: column; gap: 10px; }
  .site-footer .footer-links { justify-content: center; }
}


/* Refonte des pages légales : présentation claire, sans titres criards ni bleu foncé. */
.legal-document {
  width: min(100% - 36px, 900px);
  margin: clamp(28px, 5vw, 64px) auto 72px;
  color: #d7dbe3;
  font-size: 15px;
  line-height: 1.8;
}
.legal-document .legal-heading {
  padding: 0 0 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(220,225,235,.16);
}
.legal-document .legal-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #a8b0bd;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
}
.legal-document h1 {
  margin: 0;
  color: #f0f2f5;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -.035em;
  text-transform: none;
}
.legal-document .legal-subtitle { color: #b4bbc6; margin: 10px 0 4px; }
.legal-document .legal-updated { color: #929ba8; font-size: 12px; font-weight: 500; letter-spacing: 0; margin: 8px 0 28px; text-transform: none; }
.legal-document section {
  padding: 20px 24px;
  margin: 0 0 14px;
  border: 1px solid rgba(220,225,235,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
.legal-document section:last-child { border-bottom: 1px solid rgba(220,225,235,.12); }
.legal-document h2 {
  margin: 0 0 10px;
  color: #e1e5eb;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.015em;
  text-transform: none;
}
.legal-document p { margin: 9px 0; }
.legal-document ul { padding-left: 22px; margin: 10px 0; }
.legal-document li { margin: 6px 0; }
.legal-document a { color: #d5dbe4; text-decoration: underline; text-decoration-color: #7f8998; text-underline-offset: 3px; }
@media (max-width: 600px) { .legal-document section { padding: 16px; } }


/* footer-v2 : pied de page organisé en colonnes par catégories */
.site-footer { display: block; }
.site-footer .footer-v2 { width: min(100%, 1240px); margin: 0 auto; }
.site-footer .footer-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 40px;
    padding-bottom: 28px;
}
.site-footer .footer-col-title {
    margin: 0 0 14px;
    padding: 0;
    color: #eef2f5;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}
.site-footer .footer-col ul { list-style: none; margin: 0; padding: 0; }
.site-footer .footer-col li { margin: 0; padding: 0; }
.site-footer .footer-col a {
    display: inline-block;
    padding: 5px 0;
    color: #98a0b8 !important;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none !important;
    transition: color .15s ease;
}
.site-footer .footer-col a:hover,
.site-footer .footer-col a:focus-visible { color: var(--accent) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.site-footer .footer-ext::after { content: " \2197"; font-size: 11px; opacity: .7; }
.site-footer .footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(130, 151, 210, .14);
}
.site-footer .footer-brandmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #eef2f5 !important;
    text-decoration: none !important;
}
.site-footer .footer-brandmark strong { font-size: 15px; font-weight: 900; letter-spacing: .08em; }
.site-footer .footer-bottom p { margin: 0; color: #777c98; font-size: 12px; text-align: right; }
@media (max-width: 900px) {
    .site-footer .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
}
@media (max-width: 480px) {
    .site-footer .footer-columns { grid-template-columns: 1fr; }
    .site-footer .footer-bottom { flex-direction: column; align-items: flex-start; }
    .site-footer .footer-bottom p { text-align: left; }
}
