:root{--bg:#0d1017;--panel:#161b26;--panel2:#1d2433;--line:#2a3347;--txt:#e8ecf4;--mut:#8a94aa;--acc:#ff4655;--ok:#4ade80;--bad:#f87171;--gold:#fbbf24}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--txt);font:15px/1.45 system-ui,Segoe UI,Roboto,sans-serif}
.wrap{max-width:1180px;margin:0 auto;padding:0 16px}
.top{background:linear-gradient(135deg,#1a1020,#101a2c);border-bottom:1px solid var(--line)}
.top .wrap{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:18px;padding-bottom:18px;flex-wrap:wrap}
.brand{display:flex;gap:14px;align-items:center}
.logo{width:46px;height:46px;border-radius:12px;background:var(--acc);display:grid;place-items:center;font-weight:800;letter-spacing:1px}
h1{margin:0;font-size:20px}.sub{margin:0;color:var(--mut);font-size:13px}
.status{display:flex;align-items:center;gap:8px;color:var(--mut);font-size:13px}
.dot{width:9px;height:9px;border-radius:50%;background:var(--mut)}
.dot.on{background:var(--ok);box-shadow:0 0 8px var(--ok)}.dot.live{background:var(--acc);box-shadow:0 0 8px var(--acc);animation:p 1.2s infinite}
@keyframes p{50%{opacity:.3}}
.bar{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:16px;padding-bottom:12px}
.tabs{display:flex;gap:6px 28px;flex-wrap:wrap;align-items:flex-end}
.tabs button{background:var(--panel);color:var(--mut);border:1px solid var(--line);padding:8px 16px;border-radius:999px;cursor:pointer;font:inherit}
.tabs button.on{background:var(--acc);border-color:var(--acc);color:#fff}
.filters{display:flex;gap:12px;flex-wrap:wrap}
.filters label{color:var(--mut);font-size:13px;display:flex;align-items:center;gap:6px}

main{padding-bottom:60px}
h2{font-size:17px;margin:26px 0 10px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:14px}
.grid{display:grid;gap:12px}.g2{grid-template-columns:repeat(auto-fill,minmax(340px,1fr))}.g3{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
table{width:100%;border-collapse:collapse}
th,td{padding:9px 10px;text-align:right;white-space:nowrap}
th{color:var(--mut);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.4px;border-bottom:1px solid var(--line)}
td:first-child,th:first-child,td.l,th.l{text-align:left}
tbody tr{border-bottom:1px solid #1f2637}tbody tr:hover{background:var(--panel2)}
tr.click{cursor:pointer}
th.sort{cursor:pointer}th.sort.on{color:var(--txt)}
.scroll{overflow-x:auto}
.team{display:inline-flex;align-items:center;gap:8px}
.team img,.ph{width:24px;height:24px;border-radius:6px;object-fit:contain;background:#fff1}
.pos{color:var(--mut);width:28px}
.pos.q{color:var(--ok);font-weight:700}
.pill{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;background:var(--panel2);color:var(--mut)}
.pill.live{background:var(--acc);color:#fff}.pill.done{color:var(--ok)}
.form{display:inline-flex;gap:3px}.form i{width:9px;height:9px;border-radius:2px;background:var(--line)}.form i.w{background:var(--ok)}.form i.l{background:var(--bad)}
.pos-d{color:var(--ok)}.neg-d{color:var(--bad)}
.day{color:var(--mut);font-size:13px;text-transform:capitalize;margin:22px 0 8px}
.match{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;cursor:pointer}
.match .t{display:flex;align-items:center;gap:8px;font-weight:600}.match .t.r{justify-content:flex-end}
.match .sc{font-size:20px;font-weight:800;display:flex;gap:8px;align-items:center}
.match .w{color:var(--ok)}.match .lo{color:var(--mut)}
.meta{display:flex;justify-content:space-between;color:var(--mut);font-size:12px;margin-top:8px}
.kpis{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.kpi .lab{color:var(--mut);font-size:12px;text-transform:uppercase;letter-spacing:.4px}
.kpi .who{font-weight:700;margin-top:4px}.kpi .val{font-size:26px;font-weight:800;color:var(--acc)}
.bars .row{display:grid;grid-template-columns:130px 1fr 52px;gap:10px;align-items:center;margin:6px 0;font-size:14px}
.bars .b{height:10px;border-radius:6px;background:var(--panel2);overflow:hidden}.bars .b i{display:block;height:100%;background:linear-gradient(90deg,var(--acc),#ff8a65)}
.bars .row span:last-child{text-align:right;font-variant-numeric:tabular-nums}
.modal{position:fixed;inset:0;background:#000b;display:grid;place-items:start center;padding:30px 12px;overflow:auto;z-index:10}
.modal[hidden]{display:none}
.sheet{background:var(--bg);border:1px solid var(--line);border-radius:16px;max-width:980px;width:100%;padding:22px;position:relative}
.x{position:absolute;top:12px;right:12px;background:var(--panel);color:var(--txt);border:1px solid var(--line);border-radius:8px;width:32px;height:32px;cursor:pointer}
.mapcard{margin-top:14px}.mapcard h3{margin:0 0 8px;font-size:15px}
.hero{display:flex;gap:14px;align-items:center;margin-bottom:10px}.hero img{width:56px;height:56px;object-fit:contain}
.hero h2{margin:0}
.rt{padding:2px 7px;border-radius:6px;font-weight:700;font-variant-numeric:tabular-nums}
.rt.hi{background:#4ade8028;color:var(--ok)}.rt.mid{background:#fbbf2420;color:var(--gold)}.rt.lo{background:#f8717120;color:var(--bad)}
.empty{color:var(--mut);text-align:center;padding:40px}
svg text{fill:var(--mut);font-size:11px}
@media(max-width:640px){.match{grid-template-columns:1fr;text-align:center}.match .t,.match .t.r{justify-content:center}.bars .row{grid-template-columns:90px 1fr 46px}}
a{color:inherit;text-decoration:none}
abbr.q{display:inline-grid;place-items:center;width:14px;height:14px;margin-left:3px;border-radius:50%;background:var(--panel2);color:var(--mut);font-size:10px;font-weight:700;text-decoration:none;cursor:help;border:1px solid var(--line);vertical-align:1px}
abbr.q:hover{color:var(--txt);border-color:var(--acc)}

[hidden]{display:none!important}
.picker{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:6px 0 10px}
.picker select{min-width:220px;font-size:15px;padding:9px 12px}
.quick{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.chip{display:inline-block;background:var(--panel2);color:var(--txt);border:1px solid var(--line);border-radius:999px;padding:4px 11px;font:inherit;font-size:13px;margin:3px 6px 3px 0}
button.chip{cursor:pointer}button.chip:hover{border-color:var(--acc)}
.chip.good{background:#4ade8018;border-color:#4ade8055}.chip.good b{color:var(--ok)}
.chip.bad{background:#f8717118;border-color:#f8717155}.chip.bad b{color:var(--bad)}
.vsh{display:grid;grid-template-columns:1fr auto 1fr;gap:16px;align-items:center}
.vsh .tm{display:flex;gap:14px;align-items:center}.vsh .tm:last-child{flex-direction:row-reverse;text-align:right}
.vsh .tm img,.vsh .tm .ph{width:64px;height:64px;border-radius:12px}
.vsc{text-align:center}.vsw{font-size:34px;font-weight:800;color:var(--acc)}.vsw span{color:var(--mut)}
.cmp{display:grid;grid-template-columns:1fr 190px 1fr;gap:10px;align-items:center;padding:7px 0;border-bottom:1px solid #1f2637}
.cmp:last-of-type{border-bottom:0}
.cmp .lab{text-align:center;color:var(--mut);font-size:13px}
.cmp .side{display:flex;align-items:center;gap:10px}.cmp .side.a{justify-content:flex-end}
.cmp .side b{min-width:46px;font-variant-numeric:tabular-nums}.cmp .side.a b{text-align:right}
.cmp .tr{flex:1;height:9px;background:var(--panel2);border-radius:5px;overflow:hidden;display:flex}.cmp .side.a .tr{justify-content:flex-end}
.cmp .tr i{display:block;height:100%;background:#566079;border-radius:5px}
.cmp .win .tr i{background:var(--acc)}.cmp .win b{color:var(--ok)}
table.mp td,table.mp th,table.duel td,table.duel th{text-align:center}
table.mp .mapn{text-align:center}
td.good{color:var(--ok);font-weight:700}
.vsm{color:var(--mut);font-size:12px}
table.duel td.l,table.duel th.l{text-align:left}table.duel td.r,table.duel th.r{text-align:right}
@media(max-width:700px){.vsh{grid-template-columns:1fr}.vsh .tm,.vsh .tm:last-child{flex-direction:row;text-align:left}.cmp{grid-template-columns:1fr 110px 1fr}}

.split{display:flex;height:9px;border-radius:5px;overflow:hidden;background:var(--panel2);margin-bottom:3px}
.split i{display:block;height:100%}.split .a{background:var(--acc)}.split .d{background:#4f8cff}

/* ---- tableaux compacts, sans scroll horizontal : colonnes secondaires masquées selon la largeur ---- */
.wrap{max-width:1400px}
.sheet{max-width:1100px}
table{font-size:13px}
th,td{padding:7px 6px}
th{white-space:normal;line-height:1.25;vertical-align:bottom}
td.l{white-space:normal}
td.bars{min-width:0!important}
.scroll{overflow-x:visible}
.team{min-width:0}
.t-ms td.l[style]{min-width:0!important}
@media(max-width:1320px){.t-pl th:nth-child(10),.t-pl td:nth-child(10),.t-pl th:nth-child(11),.t-pl td:nth-child(11),.t-pl th:nth-child(12),.t-pl td:nth-child(12),.t-pl th:nth-child(13),.t-pl td:nth-child(13),.t-pl th:nth-child(14),.t-pl td:nth-child(14),.t-pl th:nth-child(15),.t-pl td:nth-child(15),.t-pl th:nth-child(18),.t-pl td:nth-child(18),.t-pl th:nth-child(19),.t-pl td:nth-child(19),.t-pl th:nth-child(20),.t-pl td:nth-child(20),.t-pl th:nth-child(21),.t-pl td:nth-child(21),.t-pl th:nth-child(22),.t-pl td:nth-child(22),.t-pl th:nth-child(23),.t-pl td:nth-child(23){display:none}}
@media(max-width:1100px){.t-pi th:nth-child(3),.t-pi td:nth-child(3),.t-pi th:nth-child(4),.t-pi td:nth-child(4),.t-sd th:nth-child(3),.t-sd td:nth-child(3),.t-ms th:nth-child(10),.t-ms td:nth-child(10){display:none}}
@media(max-width:760px){.t-pl th:nth-child(7),.t-pl td:nth-child(7),.t-pl th:nth-child(9),.t-pl td:nth-child(9),.t-pl th:nth-child(16),.t-pl td:nth-child(16),.t-pl th:nth-child(17),.t-pl td:nth-child(17),.t-st th:nth-child(4),.t-st td:nth-child(4),.t-st th:nth-child(7),.t-st td:nth-child(7),.t-pi th:nth-child(8),.t-pi td:nth-child(8),.t-sd th:nth-child(6),.t-sd td:nth-child(6),.t-sd th:nth-child(7),.t-sd td:nth-child(7),.t-ms th:nth-child(4),.t-ms td:nth-child(4),.t-ms th:nth-child(6),.t-ms td:nth-child(6),.t-ms th:nth-child(8),.t-ms td:nth-child(8),.t-ms th:nth-child(9),.t-ms td:nth-child(9),.t-mt th:nth-child(7),.t-mt td:nth-child(7),.t-mt th:nth-child(8),.t-mt td:nth-child(8),.t-mt th:nth-child(10),.t-mt td:nth-child(10),.t-mt th:nth-child(11),.t-mt td:nth-child(11),.t-mt th:nth-child(12),.t-mt td:nth-child(12),.t-pm th:nth-child(5),.t-pm td:nth-child(5),.t-pm th:nth-child(7),.t-pm td:nth-child(7),.t-sq th:nth-child(5),.t-sq td:nth-child(5),.t-sq th:nth-child(7),.t-sq td:nth-child(7),.t-sq th:nth-child(8),.t-sq td:nth-child(8),.duel th:nth-child(3),.duel td:nth-child(3),.duel th:nth-child(5),.duel td:nth-child(5),.duel th:nth-child(7),.duel td:nth-child(7),.duel th:nth-child(9),.duel td:nth-child(9){display:none}.t-mt .sub{display:none}}
@media(max-width:560px){.t-pi th:nth-child(9),.t-pi td:nth-child(9),.t-pi th:nth-child(10),.t-pi td:nth-child(10){display:none}.t-pl td:nth-child(3) .team span{display:none}th,td{padding:7px 4px}}
.grid>*{min-width:0}
.meta{gap:10px;flex-wrap:wrap}
.match .t span{overflow-wrap:anywhere}
@media(max-width:1320px){.t-st th:nth-child(4),.t-st td:nth-child(4){display:none}}
.match .t img,.match .t .ph{width:28px;height:28px;object-fit:contain;flex:none}
.g-st{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){.g-st{grid-template-columns:minmax(0,1fr)}}
.team span{min-width:0;overflow-wrap:anywhere}
.mob{display:none}
@media(max-width:560px){.mob{display:inline}.t-ms th:nth-child(1),.t-ms td:nth-child(1),.t-ms th:nth-child(3),.t-ms td:nth-child(3){display:none}}

@media(max-width:760px){.t-sp th:nth-child(3),.t-sp td:nth-child(3),.t-sp th:nth-child(6),.t-sp td:nth-child(6),.t-sm th:nth-child(2),.t-sm td:nth-child(2),.t-sm th:nth-child(7),.t-sm td:nth-child(7){display:none}}
@media(max-width:560px){.t-sp th:nth-child(1),.t-sp td:nth-child(1){display:none}.t-sp .sub,.t-sm .sub{display:block}}

.ag{width:26px;height:26px;border-radius:6px;background:var(--panel2);vertical-align:middle;object-fit:cover}
.cmpi{display:inline-flex;gap:3px;vertical-align:middle}
.agc{display:inline-flex;align-items:center;gap:8px}
.cmprow{display:flex;gap:12px;align-items:center;padding:6px 0;border-top:1px solid #1f2637}.cmprow:first-of-type{border-top:0}
b.good{color:var(--ok)}b.badc{color:var(--bad)}
.t-am td,.t-am th{text-align:center;padding:6px 4px}.t-am td:first-child,.t-am th:first-child{text-align:left}
.t-am td .sub{font-size:11px}
.kpi .who{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
@media(max-width:760px){.t-ag th:nth-child(2),.t-ag td:nth-child(2),.t-ag th:nth-child(5),.t-ag td:nth-child(5),.t-cp th:nth-child(5),.t-cp td:nth-child(5),.t-tm2 th:nth-child(2),.t-tm2 td:nth-child(2),.t-tm2 th:nth-child(3),.t-tm2 td:nth-child(3){display:none}.t-am .agc b{display:none}.ag{width:22px;height:22px}}
@media(max-width:560px){.t-ty th:nth-child(4),.t-ty td:nth-child(4),.t-ag th:nth-child(7),.t-ag td:nth-child(7){display:none}.t-am th,.t-am td{padding:5px 2px;font-size:12px}.t-tm2 th:nth-child(5),.t-tm2 td:nth-child(5){display:none}}



/* ---- onglets groupés : Stats / Outils ---- */
.tabgroup{display:flex;flex-direction:column;gap:6px}
.tabgroup+.tabgroup{padding-left:28px;border-left:1px solid var(--line)}
.tglabel{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:1.2px;color:var(--mut)}
.tgbtns{display:flex;gap:6px;flex-wrap:wrap}
@media(max-width:760px){.tabgroup+.tabgroup{padding-left:0;border-left:0;border-top:1px solid var(--line);padding-top:10px;width:100%}}

/* ---- listes déroulantes stylisées ---- */
select{
  appearance:none;-webkit-appearance:none;color-scheme:dark;
  background:var(--panel) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%238a94aa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat right 12px center/12px 8px;
  color:var(--txt);border:1px solid var(--line);border-radius:10px;padding:8px 34px 8px 12px;font:inherit;font-weight:500;cursor:pointer;
  transition:border-color .15s,box-shadow .15s,background-color .15s;
}
select:hover{border-color:#3d4a68;background-color:var(--panel2)}
select:focus{outline:none}
select:focus-visible{border-color:var(--acc);box-shadow:0 0 0 3px #ff465538}
select:active{background-color:var(--panel2)}
select option{background:var(--panel);color:var(--txt)}
.filters label{background:var(--panel2);border:1px solid var(--line);border-radius:12px;padding:3px 4px 3px 12px;gap:8px}
.filters select{border-color:transparent;background-color:transparent;padding-top:6px;padding-bottom:6px}
.filters select:hover{background-color:var(--panel)}
img[src$="/no-logo.png"]{padding:3px;box-sizing:border-box;background:#fff1}

/* ---- menu déroulant personnalisé (le <select> natif reste caché dans .dd) ---- */
.dd{position:relative;display:inline-block;vertical-align:middle;max-width:100%}
.dd>select{position:absolute;inset:0;width:100%;height:100%;opacity:0;pointer-events:none}
.dd-btn{position:relative;display:flex;align-items:center;gap:8px;width:100%;text-align:left;white-space:nowrap;background:var(--panel);color:var(--txt);border:1px solid var(--line);border-radius:10px;padding:8px 34px 8px 12px;font:inherit;font-weight:500;cursor:pointer;transition:border-color .15s,box-shadow .15s,background-color .15s}
.dd-btn::after{content:"";position:absolute;right:12px;top:50%;width:12px;height:8px;margin-top:-4px;background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5l5 5 5-5' fill='none' stroke='%238a94aa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center/12px 8px;transition:transform .18s}
.dd.open .dd-btn::after{transform:rotate(180deg)}
.dd-btn:hover{border-color:#3d4a68;background-color:var(--panel2)}
.dd-btn:focus{outline:none}
.dd-btn:focus-visible,.dd.open .dd-btn{border-color:var(--acc);box-shadow:0 0 0 3px #ff465538}
.dd-lbl{overflow:hidden;text-overflow:ellipsis}
.dd-ic{width:20px;height:20px;border-radius:5px;object-fit:contain;flex:none;background:#fff1}
.dd-menu{position:absolute;z-index:30;left:0;top:calc(100% + 6px);min-width:100%;width:max-content;max-width:min(92vw,380px);max-height:min(340px,60vh);overflow-y:auto;overscroll-behavior:contain;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:6px;box-shadow:0 16px 40px #000b,0 2px 8px #0007;animation:ddin .12s ease-out;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.dd-menu.up{top:auto;bottom:calc(100% + 6px);animation-name:ddup}
.dd-menu.right{left:auto;right:0}
@keyframes ddin{from{opacity:0;transform:translateY(-4px)}}
@keyframes ddup{from{opacity:0;transform:translateY(4px)}}
.dd-item{position:relative;display:flex;align-items:center;gap:10px;padding:8px 32px 8px 10px;border-radius:9px;cursor:pointer;white-space:nowrap}
.dd-item.act{background:var(--panel2)}
.dd-item[aria-selected="true"]{color:var(--acc);font-weight:600}
.dd-item[aria-selected="true"]::after{content:"";position:absolute;right:12px;top:50%;width:9px;height:5px;margin-top:-5px;border-left:2px solid var(--acc);border-bottom:2px solid var(--acc);transform:rotate(-45deg)}
.filters .dd-btn{border-color:transparent;background-color:transparent;padding:6px 32px 6px 8px}
.filters .dd-btn:hover{background-color:var(--panel)}
.filters .dd-btn:focus-visible,.filters .dd.open .dd-btn{border-color:var(--acc)}
.picker .dd{min-width:min(260px,100%)}
.picker .dd-btn{font-size:15px;padding:9px 34px 9px 12px}

.frozen{background:#fbbf2420;border-bottom:1px solid #fbbf2455;color:var(--gold);text-align:center;font-size:13px;padding:8px 16px}
.frozen span{color:var(--mut)}
.dot.frz{background:var(--gold);box-shadow:0 0 8px var(--gold)}
