/* CoronaMax — VARIANTE C "Néon moderne"
   Bleu nuit profond, accent cyan néon, touches magenta et vert citron.
   Style gaming / streaming type Twitch. */

:root {
    --bg: #0a0e1a;
    --surface: #131829;
    --surface-2: #1c2238;
    --surface-3: #283050;
    --border: #2e3654;
    --border-soft: rgba(34, 211, 238, 0.15);

    --text: #e0e7ff;
    --text-dim: #94a3b8;
    --text-faint: #64748b;
    --text-on-gold: #0a1f2c;

    /* Accent principal = cyan néon */
    --gold: #22d3ee;
    --gold-soft: #67e8f9;
    --gold-deep: #0891b2;

    --green: #84cc16;
    --green-soft: #bef264;
    --green-bright: #d9f99d;
    --red: #f43f5e;
    --red-soft: #fda4af;
    --red-deep: #be123c;
    --orange: #f97316;
    --orange-soft: #fdba74;

    --link: #67e8f9;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background:
        radial-gradient(circle at 5% -5%, rgba(34, 211, 238, 0.10), transparent 35%),
        radial-gradient(circle at 100% 100%, rgba(232, 121, 249, 0.10), transparent 40%),
        radial-gradient(circle at 100% 0%, rgba(132, 204, 22, 0.05), transparent 45%),
        var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px; line-height: 1.5; min-height: 100vh;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px 60px; }

header.topbar {
    background: linear-gradient(180deg, #06091a 0%, var(--surface) 100%);
    border-bottom: 1px solid var(--border-soft);
    padding: 14px 24px; margin-bottom: 28px;
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
    box-shadow: 0 2px 18px rgba(34, 211, 238, 0.10);
}

.brand {
    font-size: 24px; font-weight: 800; color: var(--gold);
    text-decoration: none; letter-spacing: 0.8px;
    text-shadow: 0 0 12px rgba(34, 211, 238, 0.5);
}
.brand:hover { text-decoration: none; color: var(--gold-soft); }

nav.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav.main-nav a {
    color: var(--text-dim); padding: 8px 16px; border-radius: 6px;
    font-weight: 500; transition: background 0.15s, color 0.15s;
}
nav.main-nav a:hover { background: var(--surface-2); color: var(--gold-soft); text-decoration: none; }
nav.main-nav a.active { background: var(--gold); color: var(--text-on-gold); font-weight: 600; box-shadow: 0 0 12px rgba(34, 211, 238, 0.4); }

h1, h2, h3 { color: var(--text); margin-top: 0; font-weight: 700; }
h1 { font-size: 32px; margin-bottom: 18px; color: var(--gold); letter-spacing: 0.3px; text-shadow: 0 0 14px rgba(34, 211, 238, 0.3); }
h2 { font-size: 22px; margin-top: 36px; margin-bottom: 14px; color: var(--text); }
h3 { font-size: 17px; margin-top: 22px; margin-bottom: 12px; color: var(--gold-soft); }

.caption { color: var(--text-dim); font-size: 13px; margin: 6px 0 16px; }

.toolbar {
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    margin-bottom: 18px; padding: 12px 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.toolbar label { color: var(--text-dim); font-size: 14px; }
.toolbar select, .toolbar input {
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
    padding: 6px 12px; border-radius: 6px; font-size: 14px; cursor: pointer;
}
.toolbar select:focus, .toolbar input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 8px rgba(34, 211, 238, 0.3); }

.table-wrap {
    overflow-x: auto; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
table.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
table.standings thead th {
    background: linear-gradient(180deg, #1d2a4a 0%, #131829 100%);
    color: var(--gold); font-weight: 700; padding: 11px 12px; text-align: center;
    border-bottom: 2px solid var(--gold-deep); cursor: pointer; user-select: none;
    white-space: nowrap; letter-spacing: 0.3px;
}
table.standings thead th::after { content: ""; margin-left: 6px; opacity: 0.3; }
table.standings thead th.sort-asc::after { content: "▲"; opacity: 1; color: var(--gold); }
table.standings thead th.sort-desc::after { content: "▼"; opacity: 1; color: var(--gold); }
table.standings thead th:hover { background: #243259; }

table.standings tbody td {
    padding: 9px 11px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: var(--surface); color: var(--text);
}
table.standings tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
table.standings tbody tr:hover td { background: var(--surface-2); }

.is-hidden { display: none; }

table.standings tbody tr td.pseudo,
table.standings tbody tr:nth-child(even) td.pseudo {
    background: var(--gold); color: var(--text-on-gold); font-weight: 700;
    text-align: center; padding: 0;
}
table.standings tbody tr td.pseudo a {
    display: block; width: 100%; height: 100%; padding: 9px 11px;
    color: inherit; text-decoration: none; transition: background 0.12s;
}
table.standings tbody tr td.pseudo a:hover { background: var(--gold-soft); text-decoration: none; }
table.standings tbody tr.is-winamax td.pseudo,
table.standings tbody tr.is-winamax:nth-child(even) td.pseudo {
    background: #e879f9; color: #2a0a3a; font-weight: 900;
    text-transform: uppercase; font-family: "League Gothic", Impact, sans-serif;
    letter-spacing: 0.6px; padding: 9px 11px;
}
table.standings tbody tr.is-winamax { border-bottom: 3px double #e879f9 !important; }
table.standings tbody tr.is-winamax + tr td { border-top: 3px double #e879f9; }

table.standings tbody td.parties-low { color: var(--red-soft); font-weight: 600; }
table.standings tbody td.parties-ok  { color: var(--green-soft); font-weight: 600; }
table.standings tbody td.benef, table.standings tbody td.points { font-weight: 700; color: #111; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi {
    background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
    padding: 16px 18px; text-align: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s, box-shadow 0.15s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 4px 18px rgba(34, 211, 238, 0.15); }
.kpi .label { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; font-weight: 600; }
.kpi .value { color: var(--gold); font-size: 26px; font-weight: 800; line-height: 1.15; }
.kpi .sub { color: var(--text-dim); font-size: 12px; margin-top: 4px; }

.kpi.k-victoires .value { color: var(--green); }
.kpi.k-itm .value       { color: var(--green-soft); }
.kpi.k-bulles .value    { color: var(--orange); }
.kpi.k-gains-cash .value, .kpi.k-bounty .value, .kpi.k-gains-tot .value { color: var(--green-soft); }
.kpi.k-recaves-nb .value, .kpi.k-recaves-eur .value { color: var(--red-soft); }
.kpi.k-frais .value     { color: var(--red); }
.kpi.k-points .value    { color: var(--gold); }
.kpi.k-roi .value       { color: var(--gold-soft); }

@media (max-width: 1000px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .kpi-grid { grid-template-columns: 1fr; } }

.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 18px; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3); }
.chart-card h3 { margin-top: 0; }
.chart-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.chart-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
@media (max-width: 900px) { .chart-grid-2, .chart-grid-3 { grid-template-columns: 1fr; } }
.chart-canvas-wrap { position: relative; height: 220px; }

.donut-card { position: relative; }
.donut-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -10%); text-align: center; pointer-events: none; }
.donut-center .big { font-size: 28px; font-weight: 800; color: var(--gold); }
.donut-center .small { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }

.heatmap-wrap { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.heatmap-cell { flex: 0 0 auto; width: 64px; height: 56px; border-radius: 6px; padding: 6px 8px; text-align: center; color: #111; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); transition: transform 0.12s; cursor: default; }
.heatmap-cell:hover { transform: scale(1.08); z-index: 1; }
.heatmap-cell .hm-month { font-size: 11px; font-weight: 700; opacity: 0.85; }
.heatmap-cell .hm-val { font-size: 13px; font-weight: 800; margin-top: 2px; }
.heatmap-cell.neutral { background: var(--surface-2); color: var(--text-dim); }

.archive-list { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 16px; }
.archive-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; transition: border-color 0.15s, transform 0.12s; }
.archive-row:hover { border-color: var(--gold-deep); transform: translateX(2px); box-shadow: 0 0 12px rgba(34, 211, 238, 0.15); }
.archive-row .name { color: var(--text); font-weight: 600; word-break: break-word; }
.archive-row .date { color: var(--text-dim); font-size: 13px; }
.btn-dl { background: var(--gold); color: var(--text-on-gold); padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; box-shadow: 0 2px 10px rgba(34, 211, 238, 0.3); transition: background 0.15s, transform 0.1s; }
.btn-dl:hover { background: var(--gold-soft); text-decoration: none; transform: translateY(-1px); }

footer.foot { margin-top: 60px; padding: 22px 0; border-top: 1px solid var(--border-soft); color: var(--text-faint); font-size: 12px; text-align: center; letter-spacing: 0.3px; }

.export-clone { position: fixed; top: -10000px; left: 0; background: #ffffff; padding: 20px; color: #000; font-family: "Inter", "Segoe UI", sans-serif; }
.export-clone .export-title { font-size: 20px; font-weight: 800; color: #0a1f2c; margin-bottom: 8px; }
.export-clone .export-meta { color: #555; font-size: 12px; margin-bottom: 14px; }
.export-clone table.standings { background: #fff; border: 1px solid #999; }
.export-clone table.standings thead th { background: linear-gradient(180deg, #22d3ee 0%, #0891b2 100%); color: #0a1f2c; border: 1px solid #999; cursor: default; padding: 8px 10px; }
.export-clone table.standings tbody td { background: #fafafa; color: #111; border: 1px solid #ccc; }
.export-clone table.standings tbody tr:nth-child(even) td { background: #e8f5f8; }
.export-clone table.standings tbody tr td.pseudo, .export-clone table.standings tbody tr:nth-child(even) td.pseudo { background: #22d3ee; color: #0a1f2c; padding: 8px 10px; }
.export-clone table.standings tbody tr td.pseudo a { color: #0a1f2c; padding: 0; text-decoration: none; display: inline; }
.export-clone table.standings tbody tr.is-winamax td.pseudo { background: #e879f9; color: #2a0a3a; }
.export-clone table.standings tbody tr.is-winamax, .export-clone table.standings tbody tr.is-winamax + tr td { border-bottom: 3px double #e879f9 !important; border-top: 3px double #e879f9; }
.export-clone table.standings tbody td.parties-low { color: #b00 !important; }
.export-clone table.standings tbody td.parties-ok  { color: #4d7c0f !important; }

.export-btns { display: flex; gap: 8px; margin-top: 12px; }
.btn-export { background: var(--surface-2); color: var(--gold); border: 1px solid var(--gold-deep); padding: 7px 14px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.btn-export:hover { background: var(--gold); color: var(--text-on-gold); }
.btn-export:disabled { opacity: 0.5; cursor: wait; }

.actions-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn-secondary { background: transparent; color: var(--gold); border: 1px solid var(--gold-deep); padding: 8px 16px; border-radius: 6px; font-size: 13px; text-decoration: none; transition: background 0.15s, border-color 0.15s; font-weight: 500; }
.btn-secondary:hover { background: rgba(34, 211, 238, 0.1); border-color: var(--gold); text-decoration: none; color: var(--gold-soft); }
