/* LeakFinder — overrides dark theme sur Bootstrap. */
:root {
    --lf-bg: #0f1115;
    --lf-card: #181b22;
    --lf-border: #2a2f3a;
    /* Variables thème portées du v2 (base.html) */
    --bg: #0e1116;
    --panel: #181b22;
    --panel2: #11141a;
    --border: #2a2f3a;
    --muted: #8a93a6;
    --text: #e6e6e6;
    --accent: #c8a85a;
    --hero: #80c4ff;
    --gto: #FAFF82;
}

body {
    /* Fond de marque 100% CSS : grain (SVG feTurbulence) + glow d'accent + profondeur. */
    background-color: var(--lf-bg);
    background-image:
        url("/assets/img/grain.png"),
        radial-gradient(90% 60% at 100% 0%, rgba(128,196,255,0.06), transparent 55%),
        radial-gradient(120% 90% at 50% -8%, #171c27 0%, var(--lf-bg) 52%);
    background-repeat: repeat, no-repeat, no-repeat;
    background-size: 256px 256px, 100% 100%, 100% 100%;
    background-attachment: fixed, fixed, fixed;
    background-blend-mode: soft-light, normal, normal;
    color: var(--text);
    /* Font système — nécessaire pour les pages standalone (explorer/viewer) qui ne chargent pas Bootstrap. */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.lf-card {
    background: linear-gradient(180deg, #1c2029 0%, var(--lf-card) 100%);
    border: 1px solid var(--lf-border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25), 0 10px 26px -16px rgba(0,0,0,0.7);
}
a.lf-card { transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
a.lf-card:hover {
    transform: translateY(-2px);
    border-color: #3a4150;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25), 0 16px 32px -14px rgba(0,0,0,0.85);
}

/* Avatar profil (initiale) */
.lf-avatar { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none;
    font-weight: 800; font-size: 18px; color: #0f1115;
    background: linear-gradient(135deg, #80c4ff, #5a86c9); box-shadow: 0 4px 12px -4px rgba(128,196,255,.5); }

/* Watermark de marque : logo en grand, fixe, coin bas-droite, derrière le contenu */
.lf-watermark {
    position: fixed; bottom: -70px; right: -50px; width: 480px; height: 480px; z-index: -1;
    background: url(/assets/img/logo.png) center/contain no-repeat;
    opacity: 0.04; pointer-events: none; user-select: none; will-change: transform;
}
@media (max-width: 900px) { .lf-watermark { width: 320px; height: 320px; opacity: 0.03; } }

/* En-tête de page de marque (partials/page_head) */
.lf-pagehead { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.lf-pagehead-bar { width: 4px; align-self: stretch; min-height: 44px; border-radius: 4px; flex: none;
    background: linear-gradient(180deg, #80c4ff, #5a86c9); box-shadow: 0 0 16px rgba(128,196,255,.45); }
.lf-pagehead-kicker { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lf-pagehead-title { font-size: 26px; font-weight: 800; letter-spacing: -.01em; margin: 2px 0 0; line-height: 1.1; color: #fff; }
.lf-pagehead-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* Hero signature (dashboard) */
.lf-hero {
    position: relative; overflow: hidden; border-radius: 18px; padding: 24px 30px;
    display: flex; flex-direction: column; justify-content: center;
    background:
        radial-gradient(130% 130% at 100% -10%, rgba(128,196,255,0.12), transparent 50%),
        linear-gradient(135deg, #1c2231 0%, #14171f 55%, #11141a 100%);
    border: 1px solid var(--lf-border);
    box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 26px 64px -34px rgba(0,0,0,.95);
}
.lf-hero::after {
    content: ''; position: absolute; right: -36px; top: 50%; transform: translateY(-50%);
    width: 400px; height: 400px; opacity: .12; pointer-events: none;
    background: url(/assets/img/ranks/diamond.png) center/contain no-repeat;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%);
    mask-image: linear-gradient(90deg, transparent, #000 45%);
}
.lf-hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.lf-hero-left { display: flex; align-items: center; gap: 16px; }
.lf-rank { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lf-rank-badge { width: 96px; height: 96px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.55)); animation: lf-rank-float 4.5s ease-in-out infinite; }
.lf-rank-name { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@keyframes lf-rank-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
/* Sélecteur report = debug, discret (atténué, se révèle au survol) */
.lf-report-debug select { width: auto; font-size: 11px; opacity: .5; transition: opacity .15s; }
.lf-report-debug select:hover, .lf-report-debug select:focus { opacity: 1; }
.lf-hero-gauge { width: 210px; }
.lf-hero-kicker { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.lf-hero-title { font-size: 30px; font-weight: 800; letter-spacing: -.01em; margin: 6px 0; line-height: 1.1; }
.lf-hero-sub { color: var(--muted); font-size: 14px; margin: 0; max-width: 560px; }
.lf-hero-sub strong { color: #ff8a72; font-weight: 700; }
.lf-hero-kpis { display: flex; gap: 26px; margin-top: 16px; flex-wrap: wrap; }
.lf-hero-kpi .v { font-size: 22px; font-weight: 800; font-family: 'Consolas', monospace; line-height: 1; color: #fff; }
.lf-hero-kpi .l { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.lf-hero-report select { width: auto; }
@media (max-width: 900px) {
    .lf-hero-grid { grid-template-columns: 1fr; text-align: center; }
    .lf-hero-left { justify-content: center; }
    .lf-hero-gauge { margin: 0 auto; }
    .lf-hero-kpis { justify-content: center; }
    .lf-hero-report { margin: 0 auto; }
}

/* Auth (login/signup) — splash + form en split */
.lf-auth { display: grid; grid-template-columns: 1.1fr 480px; min-height: 100vh; }
.lf-auth-splash { background-size: cover; background-position: center; position: relative; }
.lf-auth-splash::after { content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 55%, var(--lf-bg) 100%); }
.lf-auth-form { display: flex; align-items: center; justify-content: center; padding: 28px; }
.lf-auth-box { width: 100%; max-width: 400px; }
@media (max-width: 900px) {
    .lf-auth { grid-template-columns: 1fr; }
    .lf-auth-splash { display: none; }
}

/* Badge d'icône de catégorie (dashboard / study) */
.cat-ico {
    display: inline-grid; place-items: center; flex: none; border-radius: 9px;
    background: color-mix(in srgb, var(--c) 14%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 32%, transparent);
}

/* Légende de marque (loss distribution) : icône + barre + % + bb */
.lf-legend { display: flex; flex-direction: column; gap: 10px; }
.lf-legend-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; }
.lf-legend-main { min-width: 0; }
.lf-legend-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lf-legend-label { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lf-legend-pct { font-size: 11px; color: var(--muted); font-family: 'Consolas', monospace; flex: none; }
.lf-legend-bar { height: 4px; border-radius: 999px; background: rgba(255,255,255,0.06); margin-top: 5px; overflow: hidden; }
.lf-legend-bar span { display: block; height: 100%; border-radius: 999px; transition: width .5s ease; }
.lf-legend-bb { font-size: 12px; font-weight: 700; font-family: 'Consolas', monospace; color: #ff8a72; white-space: nowrap; }

/* Barres comparatives (perf by depth / position) — même ADN que la légende */
.lf-statbars { display: flex; flex-direction: column; gap: 11px; }
.lf-statbar { display: grid; grid-template-columns: 50px 1fr auto 30px; align-items: center; gap: 12px; }
.lf-statbar-label { font-family: 'Consolas', monospace; font-weight: 700; font-size: 13px; color: var(--text); }
.lf-statbar-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,0.05); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.45); }
.lf-statbar-track span { display: block; height: 100%; border-radius: 999px; transition: width .5s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.lf-statbar-val { font-family: 'Consolas', monospace; font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
.lf-statbar-val small { font-size: 9px; margin-left: 2px; opacity: .7; }
.lf-statbar-score { font-family: 'Consolas', monospace; font-weight: 800; font-size: 11px; text-align: center; padding: 1px 0; border-radius: 6px; border: 1px solid; background: rgba(255,255,255,0.03); }
a.lf-statbar { text-decoration: none; color: inherit; padding: 4px 7px; margin: 0 -7px; border-radius: 9px; transition: background .12s; }
a.lf-statbar:hover { background: rgba(255,255,255,0.05); }
a.lf-statbar:hover .lf-statbar-label { color: #80c4ff; }

/* Category breakdown — lignes premium (dashboard) */
.lf-catlist { display: flex; flex-direction: column; gap: 8px; }
.lf-catrow {
    display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 16px; align-items: center;
    padding: 11px 13px; border-radius: 10px; text-decoration: none; color: inherit;
    border-left: 3px solid var(--cc, var(--accent));
    background: rgba(255,255,255,0.022);
    transition: background .12s ease;
}
.lf-catrow:hover { background: rgba(255,255,255,0.055); }
.lf-catrow-main { min-width: 0; }
.lf-catrow-top { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.lf-catrow-label { font-weight: 700; font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lf-catrow-meta { font-size: 11px; color: var(--muted); white-space: nowrap; flex: none; }
/* Catégorie transverse (Blind vs Blind) : ses spots sont aussi comptés dans une autre ligne. */
.lf-catrow-tag { margin-left: 6px; padding: 1px 5px; border-radius: 4px; font-size: 9.5px; font-weight: 600;
                 letter-spacing: .02em; text-transform: uppercase; color: var(--cc, #7ee6c8);
                 border: 1px solid currentColor; opacity: .8; vertical-align: 1px; }
.lf-catrow-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; margin-top: 7px; box-shadow: inset 0 1px 2px rgba(0,0,0,.45); }
.lf-catrow-bar span { display: block; height: 100%; border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.lf-catrow-stats { text-align: right; white-space: nowrap; }
.lf-catrow-loss { font-family: 'Consolas', monospace; font-weight: 800; font-size: 16px; color: #ff8a72; line-height: 1; }
.lf-catrow-loss small { font-size: 10px; font-weight: 600; opacity: .7; margin-left: 1px; }
.lf-catrow-rate { font-family: 'Consolas', monospace; font-size: 11px; color: var(--muted); margin-top: 3px; }
.lf-catrow-score { font-family: 'Consolas', monospace; font-weight: 800; font-size: 13px; min-width: 34px; text-align: center; padding: 5px 0; border-radius: 8px; border: 1px solid; background: rgba(255,255,255,0.03); }
.lf-catrow-go { color: var(--muted); font-weight: 800; font-size: 16px; transition: transform .12s, color .12s; }
.lf-catrow:hover .lf-catrow-go { color: var(--cc, var(--accent)); transform: translateX(3px); }
@media (max-width: 575px) {
    .lf-catrow { grid-template-columns: auto 1fr auto; gap: 12px; }
    .lf-catrow-stats, .lf-catrow-go { display: none; }
}

.lf-card .list-group-item {
    border-color: #232733;
}

/* ===== Phase 7 — drill catégorie / depth / spot diff (port v2) ===== */
.crumbs { color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs strong { color: var(--text); }

/* Headers catégorie / depth — façon hero */
.cat-header, .depth-header {
    position: relative; overflow: hidden;
    background:
        radial-gradient(120% 130% at 100% -10%, rgba(128,196,255,0.10), transparent 50%),
        linear-gradient(135deg, #1c2231 0%, #14171f 60%, #11141a 100%);
    border: 1px solid var(--lf-border); border-left: 4px solid;
    border-radius: 16px; padding: 20px 24px; margin-bottom: 18px;
    display: grid; gap: 22px; align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 22px 54px -32px rgba(0,0,0,.95);
}
.cat-header { grid-template-columns: auto 1fr; }
.depth-header { grid-template-columns: auto 1fr auto; }
.score-circle { width: 110px; height: 110px; position: relative; display: flex; align-items: center; justify-content: center; }
.score-number { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; font-family: 'Consolas', monospace; }
.score-number .v { font-size: 32px; font-weight: 700; }
.score-number .max { font-size: 10px; color: var(--muted); margin-top: -2px; }
.cat-header .lbl-row, .depth-header .lbl-row { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.cat-name { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.depth-header .title { font-size: 22px; font-weight: 700; color: #fff; font-family: 'Consolas', monospace; }
.depth-header .subtitle { color: var(--accent); font-size: 13px; margin-bottom: 8px; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.kpi { background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0)); border: 1px solid var(--lf-border); padding: 9px 11px; border-radius: 9px; }
.kpi .l { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; }
.kpi .v { font-family: 'Consolas', monospace; font-size: 16px; font-weight: 700; color: #fff; margin-top: 2px; }
.kpi.danger .v { color: #ff7060; }

.section-title { color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 8px; }

/* Depth cards */
.depth-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.depth-card { background: linear-gradient(180deg,#1c2029,var(--lf-card)); border: 1px solid var(--lf-border); border-radius: 12px; padding: 13px 15px; cursor: pointer; transition: border-color .12s, transform .12s, box-shadow .12s; border-left: 3px solid var(--accent); text-decoration: none; color: inherit; display: block; box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 8px 20px -14px rgba(0,0,0,.7); }
.depth-card:hover { transform: translateY(-2px); border-color: rgba(200,168,90,0.45); box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 16px 30px -12px rgba(0,0,0,.85); }
.depth-card .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.depth-card .name { font-size: 16px; font-weight: 700; color: var(--accent); font-family: 'Consolas', monospace; }
.depth-card .name .info { font-size: 10px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.depth-card .stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.depth-card .stat { background: var(--panel2); padding: 6px 8px; border-radius: 3px; }
.depth-card .stat .l { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; }
.depth-card .stat .v { font-family: 'Consolas', monospace; font-size: 14px; font-weight: 700; color: #fff; line-height: 1.1; }
.depth-card .stat.danger .v { color: #ff7060; }
.depth-card .stat.score .v.bad { color: #ff5040; }
.depth-card .stat.score .v.mid { color: #ddc858; }
.depth-card .stat.score .v.good { color: #6cad7a; }

/* Matrix depth × position */
.matrix-wrap { background: linear-gradient(180deg,#1c2029,var(--lf-card)); border: 1px solid var(--lf-border); border-radius: 14px; padding: 16px; margin-bottom: 16px; overflow-x: auto; box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 26px -16px rgba(0,0,0,.7); }
table.cat-matrix { border-collapse: separate; border-spacing: 3px; margin: 0 auto; }
table.cat-matrix th, table.cat-matrix td { text-align: center; padding: 0; font-family: 'Consolas', monospace; }
table.cat-matrix th.col-h, table.cat-matrix th.row-h { color: var(--text); font-size: 17px; font-weight: 800; padding: 6px 10px; }
table.cat-matrix th.col-h { color: var(--accent); text-transform: uppercase; letter-spacing: 0.03em; }
table.cat-matrix th.row-h { font-size: 18px; }
table.cat-matrix th.col-sub { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0 8px 6px; color: var(--muted); }
table.cat-matrix th.col-sub .you { color: var(--hero); }
table.cat-matrix th.col-sub .gto { color: var(--gto); }
table.cat-matrix td.cell { min-width: 116px; height: 104px; background: var(--panel2); border-radius: 4px; border: 1px solid var(--border); position: relative; cursor: pointer; transition: transform 0.08s; }
table.cat-matrix td.cell:hover { transform: scale(1.04); z-index: 1; }
table.cat-matrix td.cell .top { font-size: 13px; font-weight: 700; line-height: 1; padding-top: 6px; color: #fff; }
table.cat-matrix td.cell .bot { color: var(--muted); font-size: 9px; padding: 2px 4px; line-height: 1.2; }
table.cat-matrix td.cell .score { font-size: 9px; color: var(--accent); font-weight: 700; }
table.cat-matrix td.cell .freqs { margin-top: 3px; padding: 0 4px; font-size: 9px; font-family: 'Consolas', monospace; line-height: 1.2; color: var(--text); }
table.cat-matrix td.cell .freqs .row { display: flex; justify-content: space-between; gap: 1px; }
table.cat-matrix td.cell .freqs .who { color: var(--muted); font-weight: 700; min-width: 22px; text-align: left; }
table.cat-matrix td.cell .freqs .vals .f { color: #ff8060; }
table.cat-matrix td.cell .freqs .vals .r { color: #ffd060; }
table.cat-matrix td.cell .freqs .vals .c { color: #80e080; }
table.cat-matrix td.cell .freqs .vals .diff-bad { text-decoration: underline; text-decoration-color: #ff5040; }
table.cat-matrix td.empty { background: transparent; border: 1px dashed rgba(255,255,255,0.05); color: var(--muted); font-size: 10px; }
.sev-good { background: rgba(108, 173, 122, 0.10) !important; border-color: rgba(108, 173, 122, 0.35) !important; }
.sev-mid  { background: rgba(221, 200, 88, 0.18) !important; border-color: rgba(221, 200, 88, 0.45) !important; }
.sev-high { background: rgba(240, 128, 96, 0.22) !important; border-color: rgba(240, 128, 96, 0.55) !important; }
.sev-bad  { background: rgba(255, 80, 64, 0.28) !important; border-color: rgba(255, 80, 64, 0.70) !important; }
.sev-bad .top { color: #ffaa9a !important; }
/* Teinte de cellule par DIRECTION (matrice cat) : trop agro/large = chaud, trop tight = froid (bleu),
   on point = neutre. Intensité ∝ écart. Pour que la déviation saute aux yeux. */
.dir-ok    { background: var(--panel2) !important; }
.dir-over-1 { background: rgba(255, 125, 82, 0.14) !important; border-color: rgba(255, 125, 82, 0.40) !important; }
.dir-over-2 { background: rgba(255, 125, 82, 0.30) !important; border-color: rgba(255, 125, 82, 0.70) !important; }
.dir-under-1 { background: rgba(90, 169, 230, 0.14) !important; border-color: rgba(90, 169, 230, 0.40) !important; }
.dir-under-2 { background: rgba(90, 169, 230, 0.30) !important; border-color: rgba(90, 169, 230, 0.70) !important; }
.sev-high .top { color: #ffc8a4 !important; }

/* Poker table + sièges */
.body-grid { display: grid; grid-template-columns: 1fr 360px; gap: 14px; }
.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.poker-table { position: relative; width: 100%; min-height: 480px; max-width: 760px; margin: 8px auto;
    background:
        radial-gradient(ellipse at 50% 36%, rgba(128,196,255,0.07), transparent 58%),
        radial-gradient(ellipse at center, #17533a 0%, #0e3826 60%, #0a2418 100%);
    border-radius: 50%/40%; border: 6px solid #20242e;
    box-shadow: 0 20px 54px -20px rgba(0,0,0,0.75), inset 0 0 70px rgba(0,0,0,0.5), inset 0 0 0 2px rgba(255,255,255,0.035); }
.poker-table::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 230px; height: 230px; background: url(/assets/img/logo.png) center/contain no-repeat;
    opacity: 0.22; pointer-events: none; z-index: 0; filter: drop-shadow(0 2px 8px rgba(0,0,0,.4)); }
.table-center-info { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: var(--accent); font-family: 'Consolas', monospace; font-size: 11px; line-height: 1.5; z-index: 2; text-shadow: 0 2px 6px rgba(0,0,0,0.6); }
.table-center-info .stk-big { font-size: 28px; font-weight: 700; color: var(--accent); margin: 4px 0; }
.table-center-info .cat-name { color: #fff; font-size: 13px; font-weight: 700; }
.table-center-info .loss-big { color: #ff7060; font-size: 18px; font-weight: 700; margin-top: 6px; }
.seat { position: absolute; width: 130px; transform: translate(-50%, -50%); text-align: center; }
.seat .badge { background: var(--panel); border: 2px solid var(--border); border-radius: 6px; padding: 6px 8px; font-family: 'Consolas', monospace; font-size: 11px; box-shadow: 0 2px 6px rgba(0,0,0,0.4); cursor: pointer; transition: transform 0.08s; white-space: normal; }
.seat .badge:hover { transform: translateY(-2px); border-color: rgba(200,168,90,0.6); }
.seat .badge .pos { color: var(--accent); font-weight: 700; font-size: 14px; display: block; line-height: 1; }
.seat .badge .loss { color: #ff7060; font-weight: 700; font-size: 13px; margin-top: 4px; }
.seat .badge .bb100 { color: var(--muted); font-size: 10px; margin-top: 2px; }
.seat .badge .meta { color: var(--muted); font-size: 9px; margin-top: 3px; }
.seat.empty .badge { opacity: 0.30; cursor: default; border-style: dashed; }
.seat.empty .badge:hover { transform: none; border-color: var(--border); }
.seat.empty .badge .loss { color: var(--muted); }
.seat.selected .badge { border-color: #80c4ff; box-shadow: 0 0 14px rgba(128,196,255,0.6); }
.seat.sev-bad .badge { border-color: #ff5040; }
.seat.sev-bad .badge .loss { color: #ff5040; }
.seat.sev-high .badge { border-color: #f08060; }
.seat.sev-mid .badge { border-color: #ddc858; }
.seat.sev-mid .badge .loss { color: #ddc858; }
.seat.sev-good .badge { border-color: #6cad7a; }
.seat.sev-good .badge .loss { color: #6cad7a; }

/* Side spot panel */
.spot-panel { background: linear-gradient(180deg,#1c2029,var(--lf-card)); border: 1px solid var(--lf-border); border-radius: 14px; padding: 14px 16px; align-self: start; max-height: 70vh; overflow-y: auto; box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 26px -16px rgba(0,0,0,.7); }
.spot-panel.placeholder { color: var(--muted); font-size: 12px; padding: 30px 14px; text-align: center; }
.spot-panel .panel-head { color: var(--text); font-size: 13px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.spot-panel .panel-head .pos-name { color: var(--accent); font-weight: 700; font-size: 18px; font-family: 'Consolas', monospace; margin-right: 6px; }
.spot-panel .panel-head .meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.panel-action { display: grid; gap: 4px; margin-bottom: 10px; padding: 6px 8px; background: var(--panel2); border-radius: 3px; font-size: 10px; font-family: 'Consolas', monospace; }
.panel-action .a { text-align: center; }
.panel-action .a .l { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.panel-action .a.fold .v { color: #ff8060; }
.panel-action .a.raise .v { color: #ffd060; }
.panel-action .a.call .v { color: #80e080; }
.panel-action .a .v { font-weight: 700; font-size: 13px; }
.spot-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 6px 8px; font-size: 11px; align-items: center; border-radius: 3px; border-left: 2px solid transparent; margin-bottom: 3px; }
.spot-row.bad { border-left-color: #ff5040; }
.spot-row.high { border-left-color: #f08060; }
.spot-row.mid { border-left-color: #ddc858; }
.spot-row:hover { background: rgba(255,255,255,0.03); }
.spot-row .lbl { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.spot-row .v { font-family: 'Consolas', monospace; color: var(--muted); white-space: nowrap; }
.spot-row .v.loss { color: #ff7060; font-weight: 700; }
.spot-row .actions { display: flex; gap: 4px; align-items: center; }
.btn-mini { background: var(--panel2); color: var(--muted); border: 1px solid var(--border); padding: 3px 8px; border-radius: 3px; font-size: 9px; font-weight: 700; text-decoration: none; cursor: pointer; text-transform: uppercase; letter-spacing: 0.05em; }
.btn-mini:hover { background: var(--accent); color: #000; border-color: var(--accent); }
.btn-mini.viewer { background: #80c4ff; color: #000; border-color: #80c4ff; }
.panel-actions { margin: 8px 0 12px; }
.panel-actions a.viewer-big { display: block; background: linear-gradient(135deg, #80c4ff, #5095d9); color: #000; text-decoration: none; padding: 10px 14px; border-radius: 5px; font-weight: 700; font-size: 12px; text-align: center; border: 1px solid rgba(128,196,255,0.6); }
.panel-actions a.viewer-big .sub { display: block; font-size: 9px; font-weight: 400; opacity: 0.7; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.05em; }
.viewer-cta { display: flex; flex-direction: column; gap: 6px; }
.viewer-cta .big-btn { display: block; text-decoration: none; text-align: center; min-width: 190px;
    padding: 13px 18px; border-radius: 12px; font-weight: 800; font-size: 13px; line-height: 1.2; color: #eaf4ff;
    background: linear-gradient(135deg, rgba(128,196,255,0.20), rgba(128,196,255,0.06));
    border: 1px solid rgba(128,196,255,0.35);
    box-shadow: 0 8px 22px -10px rgba(128,196,255,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
    transition: transform .12s ease, box-shadow .12s, background .12s; }
.viewer-cta .big-btn:hover { transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(128,196,255,0.28), rgba(128,196,255,0.10));
    box-shadow: 0 14px 30px -10px rgba(128,196,255,0.6), inset 0 1px 0 rgba(255,255,255,0.08); }
.viewer-cta .big-btn .icon { font-size: 20px; display: block; margin-bottom: 3px; color: #80c4ff; }
.viewer-cta .big-btn .sub { font-size: 10px; font-weight: 600; color: #8aa9c9; display: block; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.depth-nav-inline { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.depth-nav-inline a { background: var(--panel2); color: var(--muted); border: 1px solid var(--border); padding: 3px 8px; border-radius: 3px; font-family: 'Consolas', monospace; font-size: 10px; font-weight: 700; text-decoration: none; min-width: 40px; text-align: center; }
.depth-nav-inline a.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* Spot diff table */
table.diff { width: 100%; border-collapse: collapse; font-size: 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
table.diff thead th { background: var(--panel2); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 10px; text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
table.diff thead th.num { text-align: right; }
table.diff tbody td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); font-family: 'Consolas', monospace; }
table.diff tbody td.num { text-align: right; }
table.diff tbody td.hand { font-weight: 700; color: var(--accent); font-size: 14px; }
table.diff tbody tr.fold-too-much { border-left: 3px solid #80c4ff; }
table.diff tbody tr.play-too-much { border-left: 3px solid #ff7060; }
.freqbar { display: inline-flex; height: 14px; border-radius: 2px; overflow: hidden; width: 110px; vertical-align: middle; }
.freqbar .seg { height: 100%; font-size: 0; }
.freqbar .f { background: rgba(220,80,60,0.85); }
.freqbar .r { background: rgba(255,200,60,0.85); }
.freqbar .c { background: rgba(90,200,90,0.85); }
.kind-tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 3px; font-family: 'Consolas', monospace; }
.kind-tag.fold-too-much { background: rgba(128,196,255,0.15); color: #80c4ff; }
.kind-tag.play-too-much { background: rgba(255,112,96,0.15); color: #ff8070; }
.loss-cell.bad { color: #ff5040; font-weight: 700; }
.loss-cell.high { color: #f08060; font-weight: 700; }
.loss-cell.mid { color: #ddc858; }
.header-card { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 14px 18px; margin-bottom: 14px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.header-card .lbl { font-size: 18px; font-weight: 700; color: #fff; }
.header-card .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.header-card .meta .pos { color: var(--accent); font-weight: 700; padding: 1px 7px; background: rgba(200,168,90,0.10); border-radius: 3px; margin-right: 6px; font-family: 'Consolas', monospace; }
.header-card .impact { text-align: right; }
.header-card .impact .v { font-size: 26px; font-weight: 700; color: #ff7060; font-family: 'Consolas', monospace; line-height: 1; }
.header-card .impact .s { color: var(--muted); font-size: 11px; margin-top: 4px; }

@media (max-width: 1000px) {
    .body-grid { grid-template-columns: 1fr; }
    .depth-header { grid-template-columns: 1fr; }
    .cat-header { grid-template-columns: 1fr; }
}

/* Nav — items + icônes (Solar/Iconify) avec états soignés */
.nav-ico { flex: none; font-size: 20px; line-height: 1; opacity: .8; display: inline-flex; align-items: center;
    transition: transform .15s ease, opacity .12s, filter .15s; }
.nav-ico-img { width: 22px; height: 22px; object-fit: contain; flex: none; opacity: .85; transition: transform .15s ease, opacity .12s, filter .15s; }

.navbar-nav .nav-link {
    color: #99a2b2; font-weight: 600; font-size: 13.5px;
    padding: 7px 12px; margin: 0 1px; border-radius: 10px;
    transition: color .14s ease, background .14s ease;
}
.navbar-nav .nav-link:hover { color: #e6e8ee; background: rgba(255,255,255,.045); }
.navbar-nav .nav-link:hover .nav-ico,
.navbar-nav .nav-link:hover .nav-ico-img { opacity: 1; transform: translateY(-1px) scale(1.1); }

.navbar-nav .nav-link.active {
    color: #80c4ff;
    background: linear-gradient(180deg, rgba(128,196,255,.16), rgba(128,196,255,.05));
    box-shadow: inset 0 0 0 1px rgba(128,196,255,.22), 0 4px 14px -6px rgba(128,196,255,.35);
}
.navbar-nav .nav-link.active .nav-ico { opacity: 1; filter: drop-shadow(0 0 7px rgba(128,196,255,.6)); }
.navbar-nav .nav-link.active .nav-ico-img { opacity: 1; filter: drop-shadow(0 0 7px rgba(128,196,255,.6)); }
.lf-navuser { color: #99a2b2; padding: 5px 10px; border-radius: 9px; transition: color .14s, background .14s; }
.lf-navuser:hover, .lf-navuser.active { color: #80c4ff; background: rgba(128,196,255,.1); }
.lf-usermenu { background: #14171f; border: 1px solid var(--lf-border); border-radius: 12px; box-shadow: 0 18px 44px -16px rgba(0,0,0,.9); padding: 6px; min-width: 224px; margin-top: 8px; }
.lf-usermenu .dropdown-item { border-radius: 8px; font-size: 13px; padding: 8px 12px; color: #cdd3df; }
.lf-usermenu .dropdown-item:hover, .lf-usermenu .dropdown-item:focus { background: rgba(128,196,255,.1); color: #fff; }
.lf-usermenu .dropdown-item.text-danger:hover { background: rgba(255,80,64,.12); }
.lf-usermenu .dropdown-divider { border-color: var(--lf-border); margin: 4px 0; }
.lf-usermenu iconify-icon { font-size: 16px; opacity: .85; }

/* Category matrix — clean You vs GTO cell (single key action) */
table.cat-matrix td.cell .cmp { font-size: 18px; font-weight: 800; line-height: 1; padding-top: 12px;
  font-family: 'Consolas', monospace; }
table.cat-matrix td.cell .cmp .you { color: var(--hero); }
table.cat-matrix td.cell .cmp .gto { color: var(--gto); }
table.cat-matrix td.cell .cmp .sl { color: var(--muted); margin: 0 4px; font-size: 18px; font-weight: 400; }
table.cat-matrix td.cell .cmp .pct { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 1px; }
table.cat-matrix td.cell .cmp-lbl { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; color: var(--muted); }
table.cat-matrix td.cell .cmp-lbl .you { color: var(--hero); }
table.cat-matrix td.cell .cmp-lbl .gto { color: var(--gto); }
table.cat-matrix td.cell .verdict { font-size: 10px; font-weight: 800; margin-top: 6px; line-height: 1.15; padding: 0 4px; }
table.cat-matrix td.cell .verdict .d { font-family: 'Consolas', monospace; }
table.cat-matrix td.cell .verdict .w { font-weight: 700; }
table.cat-matrix td.cell .verdict.v-ok    { color: #6cad7a; }
table.cat-matrix td.cell .verdict.v-over  { color: #ff7d52; }
table.cat-matrix td.cell .verdict.v-under { color: #5aa9e6; }
table.cat-matrix td.cell .cell-loss { font-size: 10.5px; font-weight: 700; margin-top: 6px; color: #ff7060;
  font-family: 'Consolas', monospace; line-height: 1.2; }
table.cat-matrix td.cell .cell-loss .sep { color: var(--muted); font-weight: 400; }
.mx-legend2 { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 2px 0; font-size: 12px; color: var(--muted); }
.mx-legend2 .sep { opacity: 0.4; }
table.cat-matrix td.cell .limp { font-size: 10px; color: var(--muted); margin-top: 5px; font-family: 'Consolas', monospace; }
table.cat-matrix td.cell .limp .you { color: var(--hero); }
table.cat-matrix td.cell .limp .gto { color: var(--gto); }

/* Roadmap — bouton étoile tag/untag (preflop + postflop) */
.rm-star { background: none; border: none; cursor: pointer; padding: 2px 4px; line-height: 1; color: #5a6273; font-size: 15px; border-radius: 4px; transition: color .12s, transform .08s; }
.rm-star:hover { color: #ddc858; transform: scale(1.15); }
.rm-star::before { content: '\2606'; } /* étoile vide */
.rm-star.tagged { color: #ddc858; }
.rm-star.tagged::before { content: '\2605'; } /* étoile pleine */

/* ===== Loader de transition (logo) ===== */
.lf-loader {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #131a25 0%, #0c0f14 72%);
  opacity: 1; transition: opacity .35s ease;
}
.lf-loader.is-hidden { opacity: 0; pointer-events: none; }
.lf-loader-inner { position: relative; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center; }
.lf-loader-logo {
  width: 50px; height: 50px; object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(128,196,255,.55));
  animation: lf-logo-pulse 1.25s ease-in-out infinite;
}
.lf-loader-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(128,196,255,.14);
  border-top-color: #80c4ff; border-right-color: #80c4ff;
  animation: lf-spin .85s cubic-bezier(.55,.15,.45,.85) infinite;
}
@keyframes lf-spin { to { transform: rotate(360deg); } }
@keyframes lf-logo-pulse {
  0%, 100% { transform: scale(.9); opacity: .7; }
  50%      { transform: scale(1.06); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-loader-logo, .lf-loader-ring { animation: none; }
}

/* ===== Toggle métrique EV-loss (bb / bb-100) — partagé Matrice + Study ===== */
.mx-l-ev { display: none; }                       /* défaut : bb */
body.mx-ev .mx-l-bb { display: none; }
body.mx-ev .mx-l-ev { display: revert; }          /* revert → table-cell (td) ou inline (span) */
.loss-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; flex: none; vertical-align: middle; }
.loss-switch button { background: var(--panel2); color: var(--muted); border: none; font-size: 12px; font-weight: 700;
  padding: 6px 13px; cursor: pointer; font-family: inherit; transition: background .12s, color .12s; }
.loss-switch button + button { border-left: 1px solid var(--border); }
.loss-switch button.active { background: #ff7060; color: #0f1115; }
.loss-switch button:hover:not(.active) { color: var(--text); }

/* Report select relégué en footer (debug, discret) — Study & co. */
.report-foot { text-align: center; margin-top: 22px; color: var(--muted); font-size: 11px; opacity: .5; transition: opacity .15s; }
.report-foot:hover { opacity: 1; }
.report-foot label { margin-right: 6px; }

/* Étoile « Add to roadmap » (viewer + explorer) — tag du thème dans la roadmap. */
.roadmap-star { background: none; border: none; cursor: pointer; font-size: 20px; line-height: 1; color: #6b7280; padding: 0 4px; vertical-align: middle; transition: color .12s ease, transform .12s ease; }
.roadmap-star:hover { color: #ffd24a; transform: scale(1.15); }
.roadmap-star.on { color: #ffd24a; }
.roadmap-star.busy { opacity: .5; pointer-events: none; }

/* ── Wordmark Leakpok (rebranding 2026-08-17) ──────────────────────────────────
   Marque rendue en texte tant qu'aucun visuel `wordmark-leakpok.png` n'est déposé
   (l'ancien wordmark.png porte « LeakFinder » gravé). Icône = logo.png, brand-agnostique. */
.lp-wordmark { display:inline-flex; align-items:center; gap:.42em; line-height:1;
  height:var(--wm-h,46px); white-space:nowrap; }
.lp-wordmark img { height:calc(var(--wm-h,46px) * .92); width:auto; display:block; }
.lp-wm-text { font-size:calc(var(--wm-h,46px) * .58); font-weight:800; letter-spacing:-.015em;
  color:#fff; font-family:'Segoe UI',system-ui,-apple-system,sans-serif; }
.lp-wm-text span { color:#80c4ff; }
