:root {
  --bg: #1d1f23;
  --bg2: #2a2d33;
  --bg3: #33373e;
  --line: #3a3e45;
  --txt: #e8eaed;
  --txt-dim: #9aa0a8;
  --accent: #d50000;
  --green: #2ecc71;
  --red: #e74c3c;
  --grey: #95a5a6;
  --yellow: #f1c40f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
}

/* ---- Barre du haut ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: #16171a;
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 18px; cursor: pointer; white-space: nowrap; }
#recherche {
  flex: 1;
  max-width: 360px;
  padding: 8px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--txt);
  outline: none;
}
#recherche:focus { border-color: var(--accent); }
.tabs { display: flex; gap: 6px; margin-left: auto; }
.tab {
  padding: 7px 14px;
  border: none;
  border-radius: 16px;
  background: var(--bg2);
  color: var(--txt-dim);
  cursor: pointer;
  font-weight: 600;
}
.tab.actif { background: var(--accent); color: #fff; }
.tab-live { display: inline-flex; align-items: center; gap: 6px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; animation: pulse 1.4s infinite; }
.tab-live.actif { background: var(--red); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.live-barre { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.live-auto { display: inline-flex; align-items: center; gap: 6px; color: var(--txt-dim); font-size: 13px; cursor: pointer; }
.live-meta { color: var(--txt-dim); font-size: 12px; }
.match-live .live-min { color: var(--red); font-weight: 700; }
.match-live .scores .s { color: var(--red); }
.badge-pari { font-size: 10px; color: var(--green); border: 1px solid var(--green); border-radius: 4px; padding: 0 4px; margin-left: 6px; white-space: nowrap; }

.btn-maj {
  padding: 7px 14px; border: none; border-radius: 16px;
  background: var(--green); color: #06270f; cursor: pointer;
  font-weight: 700; white-space: nowrap;
}
.btn-maj:hover { filter: brightness(1.08); }
.btn-maj:disabled { opacity: .6; cursor: default; }

/* ---- Overlay mise à jour ---- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 20px;
}
.overlay[hidden] { display: none; }
.modal {
  width: 100%; max-width: 560px; background: var(--bg2);
  border: 1px solid var(--line); border-radius: 12px; padding: 20px;
  max-height: 88vh; overflow: auto;
}
.modal-tete { display: flex; align-items: center; justify-content: space-between; }
.modal-tete h2 { margin: 0; font-size: 18px; }
.fermer { background: none; border: none; color: var(--txt-dim); font-size: 18px; cursor: pointer; }
.modal-sous { color: var(--txt-dim); font-size: 13px; margin: 6px 0 16px; }
.maj-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg3); color: var(--txt); cursor: pointer; font-weight: 700;
  font-size: 14px; text-align: left;
}
.act small { font-weight: 400; color: var(--txt-dim); font-size: 11px; }
.act:hover { border-color: var(--green); }
.act:disabled { opacity: .5; cursor: default; }
.act-demain:hover { border-color: var(--green); }
.maj-statut { margin-top: 14px; font-size: 13px; min-height: 18px; }
.maj-statut .en-cours { color: var(--yellow); }
.maj-statut .ok { color: var(--green); }
.maj-statut .ko { color: var(--red); }
.spin { display: inline-block; animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.maj-progress { margin-top: 12px; }
.maj-progress[hidden] { display: none; }
.maj-progress-bar { height: 12px; border-radius: 6px; background: var(--bg3); overflow: hidden; border: 1px solid var(--line); }
.maj-progress-bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--green), #3498db); transition: width .4s ease; }
.maj-progress-bar.indet > div { width: 40% !important; animation: glisse 1.2s infinite ease-in-out; }
@keyframes glisse { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.maj-progress-txt { margin-top: 6px; font-size: 12px; color: var(--txt-dim); font-variant-numeric: tabular-nums; }
.maj-log {
  margin-top: 12px; background: #111317; border: 1px solid var(--line);
  border-radius: 8px; padding: 12px; max-height: 280px; overflow: auto;
  font-size: 11px; line-height: 1.5; white-space: pre-wrap; color: #b9c0c8;
}
@media (max-width: 520px) { .maj-actions { grid-template-columns: 1fr; } }

/* ---- Conteneur ---- */
#app { max-width: 760px; margin: 0 auto; padding: 16px 12px 60px; }

/* ---- Groupe ligue ---- */
.ligue {
  background: var(--bg2);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.ligue-titre {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--bg3);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.ligue-titre .pays { color: var(--txt-dim); }
.ligue-titre .nom { color: var(--txt); }

/* ---- Ligne de match ---- */
.match {
  display: grid;
  grid-template-columns: 52px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.match:hover { background: var(--bg3); }
.match .quand { font-size: 12px; color: var(--txt-dim); line-height: 1.4; }
.match .quand .d { font-size: 11px; }
.match .quand .h { color: var(--txt); font-weight: 600; }
.match .quand .live { color: var(--accent); font-weight: 700; }
.match .equipes { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.match .equipe { display: flex; align-items: center; gap: 8px; overflow: hidden; }
.match .equipe .nom {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.match .equipe .nom:hover { color: #fff; text-decoration: underline; }
.match .gagnant .nom { font-weight: 700; }
.match .scores { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.match .scores .s { font-weight: 700; font-variant-numeric: tabular-nums; }
.match .scores .s.perd { color: var(--txt-dim); font-weight: 400; }
.badge-cotes { font-size: 10px; color: var(--green); border: 1px solid var(--green); border-radius: 4px; padding: 1px 4px; margin-left: 6px; white-space: nowrap; }
.cotes-ligne { display: flex; gap: 10px; padding: 14px 16px; }
.cote-case { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; }
.cote-case .lbl { font-size: 11px; color: var(--txt-dim); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cote-case .val { font-size: 20px; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; }
.marche { border-top: 1px solid var(--line); padding: 12px 16px; }
.marche-titre { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--txt-dim); font-weight: 700; margin-bottom: 8px; }
.marche-outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.marche-outcomes .cote-case { padding: 8px 6px; }
.marche-outcomes .cote-case .val { font-size: 15px; }
.badge-detail {
  font-size: 10px; color: var(--txt-dim);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 4px; margin-left: 6px;
}

/* ---- Vue équipe ---- */
.retour {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 14px; font-weight: 600; padding: 0;
  margin-bottom: 14px;
}
.entete-equipe {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; padding: 18px; margin-bottom: 16px;
}
.entete-equipe .logo {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg3); display: grid; place-items: center;
  font-size: 20px; font-weight: 800;
}
.entete-equipe h1 { margin: 0; font-size: 22px; }
.entete-equipe .sous { color: var(--txt-dim); font-size: 13px; }
.btn-stats {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 16px; border: 1px solid var(--green); border-radius: 10px;
  background: rgba(46,204,113,.12); color: var(--green);
  cursor: pointer; font-weight: 700; white-space: nowrap;
}
.btn-stats small { font-weight: 400; color: var(--txt-dim); font-size: 11px; }
.btn-stats:hover { background: rgba(46,204,113,.22); }
.forme { display: flex; gap: 4px; margin-top: 6px; }
.forme span {
  width: 18px; height: 18px; border-radius: 4px;
  font-size: 11px; font-weight: 700; color: #fff;
  display: grid; place-items: center;
}
.forme .V { background: var(--green); }
.forme .N { background: var(--grey); }
.forme .D { background: var(--red); }

.section-titre {
  font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--txt-dim); font-weight: 700; margin: 18px 4px 8px;
}

.res {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; margin-bottom: 6px; cursor: pointer;
}
.res:hover { background: var(--bg3); }
.res .pastille { width: 10px; height: 10px; border-radius: 50%; }
.res .pastille.V { background: var(--green); }
.res .pastille.N { background: var(--grey); }
.res .pastille.D { background: var(--red); }
.res .affiche { min-width: 0; }
.res .affiche .l { display: flex; justify-content: space-between; gap: 8px; }
.res .affiche .l .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res .affiche .l .sc { font-weight: 700; font-variant-numeric: tabular-nums; }
.res .affiche .l.gagne .n { font-weight: 700; }
.res .cote { font-size: 11px; color: var(--txt-dim); white-space: nowrap; }

/* ---- Vue match détaillé ---- */
.matchhead {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 8px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 8px; padding: 22px 16px; margin-bottom: 16px; text-align: center;
}
.matchhead .c { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.matchhead .c .nom { font-size: 16px; font-weight: 700; cursor: pointer; }
.matchhead .c .nom:hover { text-decoration: underline; }
.matchhead .c .logo {
  width: 44px; height: 44px; border-radius: 50%; background: var(--bg3);
  display: grid; place-items: center; font-weight: 800;
}
.matchhead .score { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.matchhead .statut { font-size: 12px; color: var(--txt-dim); }

.panneau { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.panneau h3 {
  margin: 0; padding: 11px 16px; font-size: 13px; background: var(--bg3);
  text-transform: uppercase; letter-spacing: .4px;
}

/* événements */
.evt { display: grid; grid-template-columns: 1fr 46px 1fr; align-items: center; gap: 6px; padding: 7px 16px; border-top: 1px solid var(--line); }
.evt .min { text-align: center; color: var(--txt-dim); font-size: 12px; }
.evt .dom { text-align: right; }
.evt .ext { text-align: left; }
.evt .ico { font-size: 13px; }
.evt .pass { color: var(--txt-dim); font-size: 12px; }
.evt-periode { padding: 6px 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--txt-dim); background: #25282d; text-transform: uppercase; }

/* stats barres */
.stat { padding: 8px 16px; border-top: 1px solid var(--line); }
.stat .vals { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.stat .vals .cat { color: var(--txt-dim); font-size: 12px; }
.stat .barre { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--bg3); }
.stat .barre .d { background: #3498db; }
.stat .barre .e { background: var(--accent); }

/* compositions / joueurs */
.tabjoueurs { width: 100%; border-collapse: collapse; }
.tabjoueurs td, .tabjoueurs th { padding: 7px 16px; border-top: 1px solid var(--line); text-align: left; }
.tabjoueurs th { color: var(--txt-dim); font-size: 11px; text-transform: uppercase; }
.tabjoueurs .note { font-weight: 700; color: #fff; background: var(--bg3); border-radius: 4px; padding: 1px 6px; font-variant-numeric: tabular-nums; }
.tabjoueurs .num { color: var(--txt-dim); width: 26px; }

/* table stats joueurs (large, défilement horizontal, 1re colonne figée) */
.tablewrap { overflow-x: auto; }
.tabstats { min-width: max-content; }
.tabstats th, .tabstats td { white-space: nowrap; text-align: center; }
.tabstats thead th { position: sticky; top: 0; background: var(--bg3); z-index: 1; font-size: 10px; max-width: 92px; white-space: normal; line-height: 1.2; vertical-align: bottom; }
.tabstats .sticky-col { position: sticky; left: 0; background: var(--bg2); text-align: left; z-index: 2; }
.tabstats thead .sticky-col { z-index: 3; background: var(--bg3); }
.tabstats tbody tr:hover td { background: var(--bg3); }
.tabstats tbody tr:hover .sticky-col { background: var(--bg3); }
.vide-cell { color: var(--line); }

.sous-onglets { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.sous-onglets button { padding: 6px 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--txt-dim); border-radius: 14px; cursor: pointer; font-weight: 600; }
.sous-onglets button.actif { background: var(--accent); color: #fff; border-color: var(--accent); }

.vide { text-align: center; color: var(--txt-dim); padding: 40px 0; }
.pied { text-align: center; color: var(--txt-dim); font-size: 11px; padding: 14px; }
a.ext { color: var(--txt-dim); font-size: 12px; }

/* ===== Analyse paris ===== */
.tab-analyse.actif { background: #7c4dff; }
.btn-analyse { padding: 9px 16px; border: none; border-radius: 16px; background: #7c4dff; color: #fff; font-weight: 700; cursor: pointer; }
.btn-analyse:hover { filter: brightness(1.1); }
.btn-analyse:disabled { opacity: .6; cursor: default; }

.ana-synth { margin: 0 16px 12px; background: var(--bg3); border: 1px solid var(--line); border-radius: 8px; }
.ana-synth summary { padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: 13px; }
.ana-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 4px 14px 14px; font-size: 12px; }
.ana-grid b { color: var(--txt-dim); font-weight: 600; font-size: 11px; }

.ana-section { margin: 0 16px 14px; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.ana-section h4 { margin: 0; padding: 10px 14px; font-size: 13px; }
.ana-s1 { background: rgba(52, 152, 219, .08); } .ana-s1 h4 { background: rgba(52, 152, 219, .18); }
.ana-s2 { background: rgba(46, 204, 113, .08); } .ana-s2 h4 { background: rgba(46, 204, 113, .18); }
.ana-s3 { background: rgba(243, 156, 18, .08); } .ana-s3 h4 { background: rgba(243, 156, 18, .18); }

.ana-row { padding: 10px 14px; border-top: 1px solid var(--line); }
.ana-lbl { font-size: 13px; }
.ana-mar { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .3px; color: var(--txt-dim); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-right: 6px; }
.ana-bar { height: 7px; border-radius: 4px; background: var(--bg3); overflow: hidden; margin: 6px 0; }
.ana-bar > div { height: 100%; background: linear-gradient(90deg, var(--green), #3498db); }
.ana-meta { font-size: 12px; color: var(--txt-dim); font-variant-numeric: tabular-nums; }
.ana-acc { font-size: 11px; color: var(--txt-dim); margin-top: 4px; }
.ana-edge { background: var(--green); color: #06270f; font-weight: 800; border-radius: 4px; padding: 1px 6px; font-size: 12px; }
.ana-ev { color: var(--green); font-weight: 700; font-size: 12px; margin-left: 6px; }
.ana-mise { color: var(--txt); font-size: 12px; margin-left: 6px; }
.ana-cotefun { color: var(--yellow); font-weight: 800; font-size: 15px; }

.ana-jour .section-titre { font-size: 16px; }
.ana-table { width: 100%; border-collapse: collapse; }
.ana-table th, .ana-table td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 13px; }
.ana-table th { color: var(--txt-dim); font-size: 11px; text-transform: uppercase; }
.ana-row-rec { cursor: pointer; }
.ana-row-rec:hover td { background: var(--bg3); }
.ana-conf { color: var(--yellow); white-space: nowrap; }
.ana-vide-row td { color: var(--txt-dim); opacity: .6; }

/* Badges de fiabilité des value bets (validation backtest) */
.ana-fiable { color: var(--green, #2ecc71); font-size: 11px; font-weight: 700; margin-left: 6px; }
.ana-nonfiable { color: #e0a030; font-size: 11px; font-weight: 700; margin-left: 6px; }

/* ============ BANKROLL ============ */
.tab-bankroll.actif { background:#1e8e4e; color:#fff; }
.btn-parier { background:#7c4dff; color:#fff; border:0; border-radius:6px; padding:3px 9px;
  font-size:12px; font-weight:700; cursor:pointer; margin-left:8px; }
.btn-parier:hover { filter:brightness(1.1); }

/* cartes résumé */
.bk-page { padding:8px 4px 40px; }
.bk-cards { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:14px 0 22px; }
.bk-card { background:var(--card,#1b1b1f); border:1px solid rgba(255,255,255,.06);
  border-radius:12px; padding:14px 16px; display:flex; flex-direction:column; gap:2px; }
.bk-card span { color:var(--txt-dim,#9a9aa2); font-size:12px; }
.bk-card b { font-size:22px; }
.bk-card small { color:var(--txt-dim,#9a9aa2); font-size:11px; }
.bk-card b.pos { color:#2ecc71; } .bk-card b.neg { color:#e0555a; }
@media (max-width:720px){ .bk-cards { grid-template-columns:repeat(2,1fr); } }

/* onglet 📈 Performance du modèle */
.perf-page { padding:8px 4px 40px; }
.perf-sub { color:var(--txt-dim); font-size:12px; margin:0 4px 10px; line-height:1.5; max-width:820px; }
.perf-genere { margin-top:18px; opacity:.7; }
.perf-note { background:var(--bg2); border:1px solid var(--line); border-radius:12px;
  padding:14px 16px; color:var(--txt-dim); font-size:13px; margin:14px 0 22px; }
/* Verdict : lit les chiffres à la place de l'utilisateur. Bordure latérale
   colorée plutôt qu'un fond plein — l'encart est permanent, pas une alerte. */
.perf-verdict { border-radius:10px; padding:13px 16px; margin:0 0 22px;
  font-size:13px; line-height:1.55; border:1px solid var(--line);
  border-left-width:4px; background:var(--bg2); }
.perf-verdict small { display:block; margin-top:6px; color:var(--txt-dim); font-size:12px; }
.perf-verdict.pos { border-left-color:#2ecc71; }
.perf-verdict.neutre { border-left-color:#e6aa3c; }
.perf-verdict.neg { border-left-color:#e05561; }

.perf-insuff { color:var(--txt-dim); font-style:italic; font-size:12px; }
.perf-dim { color:var(--txt-dim); }
.perf-num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.perf-chart-wrap { position:relative; height:300px; background:var(--bg2);
  border:1px solid var(--line); border-radius:12px; padding:12px; margin-bottom:8px; }
.perf-scroll { overflow-x:auto; }
.perf-table { min-width:520px; }
.perf-table th.perf-num, .perf-table td.perf-num { text-align:right; }
.perf-table td.pos, .perf-table .pos { color:#2ecc71; }
.perf-table td.neg, .perf-table .neg { color:#e0555a; }

/* tableau paris */
.bk-table { width:100%; border-collapse:collapse; font-size:14px; }
.bk-table th { text-align:left; color:var(--txt-dim,#9a9aa2); font-size:11px; text-transform:uppercase;
  padding:8px 10px; border-bottom:1px solid rgba(255,255,255,.08); }
.bk-table td { padding:10px; border-bottom:1px solid rgba(255,255,255,.05); vertical-align:middle; }
.bk-row.bk-gagne { background:rgba(46,204,113,.06); }
.bk-row.bk-perdu { background:rgba(224,85,90,.06); }
.bk-b { font-weight:700; font-size:13px; white-space:nowrap; }
.bk-b.bk-g { color:#2ecc71; } .bk-b.bk-p { color:#e0555a; } .bk-b.bk-e { color:#e0a030; }
.bk-act { white-space:nowrap; }
.bk-mini { background:#2a2a30; border:0; border-radius:6px; padding:4px 8px; margin:0 2px;
  cursor:pointer; font-size:13px; }
.bk-mini:hover { filter:brightness(1.3); }
.bk-mini-gagne:hover { background:#1e8e4e; } .bk-mini-perdu:hover { background:#a83236; }

/* modal */
.bk-overlay { position:fixed; inset:0; background:rgba(0,0,0,.55); display:flex;
  align-items:center; justify-content:center; z-index:1000; }
.bk-modal { background:var(--card,#1b1b1f); border:1px solid rgba(255,255,255,.1);
  border-radius:14px; width:min(420px,92vw); overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.5); }
.bk-modal-h { display:flex; justify-content:space-between; align-items:center; padding:14px 18px;
  font-size:17px; font-weight:800; border-bottom:1px solid rgba(255,255,255,.08); }
.bk-x { background:none; border:0; color:var(--txt-dim,#9a9aa2); font-size:22px; cursor:pointer; }
.bk-modal-b { padding:16px 18px; }
.bk-champ { display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:7px 0; border-bottom:1px solid rgba(255,255,255,.05); }
.bk-champ span { color:var(--txt-dim,#9a9aa2); font-size:13px; }
.bk-ev { color:#2ecc71; font-size:12px; margin-left:8px; }
.bk-mise { display:block; margin:14px 0 6px; color:var(--txt-dim,#9a9aa2); font-size:13px; }
.bk-mise input { width:100%; margin-top:6px; padding:10px; font-size:18px; border-radius:8px;
  border:1px solid rgba(255,255,255,.15); background:#111; color:#fff; }
.bk-gain { color:#2ecc71; font-size:13px; min-height:18px; margin-bottom:12px; }
.bk-valider { width:100%; padding:11px; font-size:15px; }
.bk-msg { color:#e0555a; font-size:13px; margin-top:8px; min-height:16px; }

/* toast */
.bk-toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%) translateY(20px);
  background:#1e8e4e; color:#fff; padding:12px 20px; border-radius:10px; font-weight:600;
  opacity:0; transition:.25s; z-index:1100; box-shadow:0 8px 24px rgba(0,0,0,.4); }
.bk-toast.show { opacity:1; transform:translateX(-50%) translateY(0); }
.bk-toast-err { background:#a83236; }

/* Bankroll : règlement auto */
.bk-notif { background:linear-gradient(90deg,#2a5a3a,#1e8e4e); color:#fff; border-radius:10px;
  padding:11px 16px; margin:6px 0 16px; font-size:14px; display:flex; align-items:center;
  gap:10px; flex-wrap:wrap; }
.bk-notif .bk-vu { margin-left:auto; background:rgba(255,255,255,.18); color:#fff; border:0;
  border-radius:6px; padding:5px 12px; cursor:pointer; font-weight:700; }
.bk-notif .bk-vu:hover { background:rgba(255,255,255,.3); }
/* Bandeau "mode papier" : ton neutre-avertissement, pas alarmiste — l'info est
   permanente, elle ne doit pas crier comme une erreur à chaque affichage. */
.bk-papier { background:rgba(230,170,60,.10); border:1px solid rgba(230,170,60,.35);
  color:#e8c07a; border-radius:10px; padding:11px 16px; margin:6px 0 16px;
  font-size:13px; line-height:1.5; }
.bk-papier b { color:#f2d9a8; }
.bk-papier small { color:#b9986a; }

.bk-auto { font-size:11px; color:#9ecbff; font-weight:700; margin-left:4px; }
.bk-row.bk-neuf { animation:bk-pulse 1.6s ease-in-out 2; }
@keyframes bk-pulse { 0%,100%{ background:transparent; } 50%{ background:rgba(46,204,113,.18); } }

/* Bankroll : KPIs auto-ajustés + conteneur du graphique */
.bk-cards { grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); }
.bk-chart-wrap { height:240px; background:var(--card,#1b1b1f); border:1px solid rgba(255,255,255,.06);
  border-radius:12px; padding:12px 14px; margin:0 0 22px; display:flex; align-items:center; justify-content:center; }
.bk-chart-wrap canvas { max-height:216px; }

/* ============ ANALYSE LIVE ============ */
.liv-panneau h3 { display:flex; align-items:center; gap:10px; }
.liv-panneau h3 .liv-min { background:#c0392b; color:#fff; font-size:12px; padding:2px 9px;
  border-radius:20px; font-weight:700; }
.liv-body { padding:6px 16px 16px; }
.liv-meta { font-size:13px; color:var(--txt-dim,#9a9aa2); margin-bottom:12px; line-height:1.5; }
.liv-meta b { color:var(--txt,#eee); }
.liv-sec { margin:14px 0; }
.liv-sec h4 { margin:0 0 8px; font-size:13px; text-transform:uppercase; letter-spacing:.4px;
  color:var(--txt-dim,#9a9aa2); }
.liv-row { display:grid; grid-template-columns:150px 1fr 52px; align-items:center; gap:10px; margin:5px 0; }
.liv-lbl { font-size:13px; }
.liv-bar { background:rgba(255,255,255,.06); border-radius:6px; height:14px; overflow:hidden; }
.liv-bar > div { height:100%; border-radius:6px; }
.liv-fill1 { background:linear-gradient(90deg,#3498db,#2ecc71); }
.liv-fill2 { background:linear-gradient(90deg,#9b59b6,#c0392b); }
.liv-fill3 { background:linear-gradient(90deg,#f39c12,#e67e22); }
.liv-p { text-align:right; font-size:13px; }
.liv-note { font-size:12px; color:var(--txt-dim,#9a9aa2); margin-top:10px; font-style:italic; }
@media (max-width:560px){ .liv-row { grid-template-columns:110px 1fr 46px; } }

/* Analyse live : value bets */
.liv-age { font-size:11px; color:var(--txt-dim,#9a9aa2); font-weight:400; text-transform:none; letter-spacing:0; }
.liv-refresh { background:#2a2a30; border:0; color:#ddd; border-radius:5px; cursor:pointer; padding:1px 7px; margin-left:6px; }
.liv-refresh:hover { filter:brightness(1.3); }
.liv-vrow { padding:9px 0; border-bottom:1px solid rgba(255,255,255,.05); }
.liv-mar { color:var(--txt-dim,#9a9aa2); font-size:12px; text-transform:uppercase; letter-spacing:.3px; }
.liv-vmeta { font-size:13px; color:var(--txt-dim,#9a9aa2); margin-top:3px; }
.liv-vmeta b { color:var(--txt,#eee); }
.liv-edge { color:#2ecc71; font-weight:700; }

/* Analyse live : 3 cartes (probable / value / fun) */
.liv-picks { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.liv-pick { background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.07);
  border-radius:10px; padding:10px 12px; display:flex; flex-direction:column; gap:6px; }
.liv-pick-h { font-size:10.5px; letter-spacing:.5px; color:var(--txt-dim,#9a9aa2); font-weight:700; }
.liv-pick:nth-child(1) .liv-pick-h { color:#3498db; }
.liv-pick:nth-child(2) .liv-pick-h { color:#2ecc71; }
.liv-pick:nth-child(3) .liv-pick-h { color:#f39c12; }
.liv-pick-b { font-size:14px; line-height:1.35; }
.liv-pick-m { font-size:12.5px; color:var(--txt-dim,#9a9aa2); }
.liv-pick-m b { color:var(--txt,#eee); }
.liv-pick .btn-parier { align-self:flex-start; margin-left:0; margin-top:2px; }
.liv-pick-vide { color:var(--txt-dim,#9a9aa2); }
@media (max-width:640px){ .liv-picks { grid-template-columns:1fr; } }

/* Modale pari : indice Kelly + bouton value bet plus visible */
.bk-kelly { display:block; margin-top:4px; font-size:11.5px; color:#2ecc71; font-weight:600; }
.ana-s2 .btn-parier { margin-left:0; margin-top:4px; padding:6px 12px; }

/* Bankroll : Closing Line Value */
.bk-clv { font-size:11px; font-weight:700; }
.bk-clv.pos { color:#2ecc71; } .bk-clv.neg { color:#e0555a; }

/* Bouton pari en mode confirmation (2e clic pour valider) */
.btn-parier.btn-confirm { background:#e67e22; animation:bk-confirmpulse 1s ease-in-out infinite; }
@keyframes bk-confirmpulse { 0%,100%{ filter:brightness(1); } 50%{ filter:brightness(1.25); } }

/* Bouton d'arrêt du scraping */
.btn-stop { display:block; width:100%; margin:10px 0 4px; padding:11px; border:0; border-radius:10px;
  background:#c0392b; color:#fff; font-size:15px; font-weight:700; cursor:pointer; }
.btn-stop:hover:not(:disabled) { filter:brightness(1.12); }
.btn-stop:disabled { opacity:.6; cursor:default; }

/* ============================================================================
   RESPONSIVE MOBILE — navigation burger/drawer + grilles/tables/graphiques
   (front-end uniquement ; aucun impact desktop grâce à .drawer{display:contents})
   ========================================================================== */

/* Base : burger caché sur desktop, drawer transparent (nav + Mettre à jour inline) */
.burger { display: none; background: none; border: 0; color: var(--txt); font-size: 24px;
  line-height: 1; padding: 4px 8px; cursor: pointer; }
.drawer { display: contents; }
.menu-backdrop { display: none; }

@media (max-width: 768px) {
  /* --- En-tête : on montre le burger, le reste passe en drawer --- */
  .topbar { gap: 10px; padding: 10px 14px; }
  #recherche { max-width: none; }
  .burger { display: block; margin-left: auto; position: relative; z-index: 11; }

  .drawer {
    display: flex; flex-direction: column; gap: 8px;
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(82vw, 300px);
    padding: 64px 14px 20px;
    background: #16171a; border-left: 1px solid var(--line);
    z-index: 10; overflow-y: auto;
    transform: translateX(100%); transition: transform .25s ease;
  }
  .drawer.open { transform: translateX(0); box-shadow: -10px 0 30px rgba(0,0,0,.5); }
  .tabs { flex-direction: column; align-items: stretch; gap: 8px; margin-left: 0; }
  .tab { width: 100%; text-align: left; padding: 12px 14px; font-size: 15px; border-radius: 12px; }
  .drawer .btn-maj { width: 100%; margin-top: 8px; padding: 12px 14px; text-align: left; }

  .menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 5; }
  .menu-backdrop.show { display: block; }

  /* --- Tables : défilement horizontal propre, paddings/police réduits --- */
  .tablewrap, .perf-scroll { max-width: 100%; }
  .bk-table th, .bk-table td { padding: 8px 6px; font-size: 13px; }
  .perf-table { font-size: 13px; }
  .perf-num { font-size: 12px; }
  body { overflow-x: clip; }   /* pas de scroll horizontal de page (clip = ne casse pas le sticky) */

  /* --- Graphiques : 100% de la largeur du conteneur, hauteur réduite --- */
  canvas { max-width: 100%; }
  .bk-chart-wrap, .perf-chart-wrap { max-width: 100%; }
  .perf-chart-wrap { height: 230px; }
  .bk-chart-wrap { height: 200px; }
  .bk-chart-wrap canvas { max-height: 176px; }

  /* --- Marges de contenu resserrées --- */
  .ana-section { margin: 0 8px 12px; }
}

/* Cartes Bankroll / Modèle : 1 seule colonne sur smartphone */
@media (max-width: 560px) {
  .bk-cards { grid-template-columns: 1fr; }
}
