*{box-sizing:border-box}body{margin:0;background:#eef3fb;color:#102033;font-family:Arial,Helvetica,sans-serif}.page{max-width:1280px;margin:auto;padding:18px}.hero{background:linear-gradient(135deg,#003d7a,#0064c8);color:white;border-radius:22px;padding:30px;margin-bottom:16px;box-shadow:0 10px 26px rgba(0,45,100,.18)}.kicker{text-transform:uppercase;letter-spacing:.1em;font-size:13px;margin:0 0 8px;opacity:.86}h1{margin:0;font-size:38px;line-height:1.05}.subtitle{margin:10px 0 0;opacity:.9}.status{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:14px;padding:12px 14px;margin-bottom:16px}.status.ok{background:#ecfdf5;border-color:#bbf7d0;color:#047857}.status.error{background:#fef2f2;border-color:#fecaca;color:#b91c1c}.kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:14px}.kpi,.panel{background:white;border-radius:18px;box-shadow:0 8px 22px rgba(15,23,42,.08)}.kpi{padding:16px}.kpi span{display:block;color:#64748b;font-size:13px}.kpi strong{display:block;color:#004a99;font-size:30px;margin-top:5px}.grid{display:grid;gap:14px;margin-bottom:14px}.grid-2{grid-template-columns:1fr 1fr}.grid-3{grid-template-columns:repeat(3,1fr)}.panel{padding:18px}.panel-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}.panel h2{font-size:22px;margin:0}.panel h3{font-size:16px;margin:18px 0 8px}.panel-head span{font-size:13px;color:#64748b}.highlight{background:linear-gradient(135deg,#fff,#f0f7ff);border:1px solid #dbeafe}.big-label{color:#64748b;font-size:13px;text-transform:uppercase;letter-spacing:.06em}.big-name{font-size:24px;font-weight:800;color:#003d7a;margin:8px 0}.big-detail{color:#334155;line-height:1.35}.list-item,.record{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid #eef2f7}.list-item:last-child,.record:last-child{border-bottom:0}.rank{width:32px;height:32px;border-radius:999px;background:#eaf4ff;color:#004a99;font-weight:800;display:flex;align-items:center;justify-content:center}.name{font-weight:800}.meta{color:#64748b;font-size:13px;margin-top:2px}.score-pill{background:#004a99;color:white;border-radius:999px;padding:6px 10px;font-weight:800;white-space:nowrap}.bars{display:grid;gap:9px}.bar-row{display:grid;grid-template-columns:minmax(130px,1fr) 3fr auto;gap:10px;align-items:center}.bar-label{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bar-track{height:13px;border-radius:999px;background:#e5e7eb;overflow:hidden}.bar-fill{height:100%;background:#004a99;border-radius:999px}.bar-value{font-weight:800;color:#004a99;min-width:36px;text-align:right}.records{display:grid;gap:8px}.record{grid-template-columns:1fr auto}.record-title{font-weight:800}.record-value{color:#004a99;font-weight:900;text-align:right}.record-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.record-card{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:14px}.record-card span{display:block;color:#64748b;font-size:13px}.record-card strong{display:block;font-size:20px;color:#003d7a;margin:6px 0}.record-card small{color:#475569}.win{color:#047857;font-weight:800}.loss{color:#b91c1c;font-weight:800}
/* V5 corrigée : plus de place pour le nom des clubs, barres plus courtes */
#clubsList .bar-row{
  grid-template-columns:minmax(360px,3fr) minmax(90px,0.8fr) auto;
}
#clubsList .bar-label{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#clubsList .bar-track{
  max-width:190px;
  width:100%;
  justify-self:end;
}
@media(max-width:900px){.grid-2,.grid-3,.record-grid{grid-template-columns:1fr}.bar-row{grid-template-columns:1fr auto}.bar-track{grid-column:1 / -1}}

/* Version smartphone compacte */
@media(max-width:700px){
  body{background:#f1f5fb}
  .page{padding:10px}
  .hero{padding:14px 16px;border-radius:16px;margin-bottom:10px;box-shadow:0 6px 16px rgba(0,45,100,.14)}
  .kicker{font-size:10px;letter-spacing:.08em;margin-bottom:4px}
  h1{font-size:24px;line-height:1.08}
  .subtitle{display:none}
  .status{font-size:14px;line-height:1.25;padding:9px 10px;margin-bottom:10px;border-radius:12px}
  .kpis{grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:10px}
  .kpi{padding:10px 12px;border-radius:13px;box-shadow:0 5px 14px rgba(15,23,42,.06);min-height:74px}
  .kpi span{font-size:12px;line-height:1.15}
  .kpi strong{font-size:23px;margin-top:4px;line-height:1.1}
  .kpi:last-child{grid-column:1 / -1;min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:8px}
  .kpi:last-child span{font-size:13px}
  .kpi:last-child strong{margin-top:0;font-size:24px}
  .grid{gap:10px;margin-bottom:10px}
  .panel{padding:13px;border-radius:15px;box-shadow:0 5px 14px rgba(15,23,42,.06)}
  .panel-head{margin-bottom:8px}
  .panel h2{font-size:18px}
  .panel h3{font-size:14px;margin:12px 0 7px}
  .big-label{font-size:11px}
  .big-name{font-size:19px;margin:5px 0}
  .big-detail{font-size:13px}
  .list-item,.record{padding:8px 0;gap:8px}
  .rank{width:28px;height:28px;font-size:13px}
  .score-pill{padding:5px 8px;font-size:13px}
  .meta{font-size:12px;line-height:1.3}
  .name,.record-title{font-size:14px}
  .record-value{font-size:15px}
  .record-grid{gap:8px}
  .record-card{padding:10px;border-radius:12px}
  .record-card strong{font-size:16px;margin:4px 0}
  .bar-row{gap:7px;font-size:13px}
  .bar-track{height:10px}
}

.meta strong{color:#004a99;font-weight:900}
.kpi strong small{display:block;font-size:14px;line-height:1.15;color:#64748b;margin-top:3px;font-weight:800}
@media(max-width:900px){.kpi:last-child strong small{font-size:13px}.kpi:last-child strong{font-size:18px}}

@media(max-width:900px){
  #clubsList .bar-row{grid-template-columns:1fr auto;}
  #clubsList .bar-track{grid-column:1 / -1;max-width:none;justify-self:stretch;}
}

/* Séparation tableau principal / consolantes */
.conso-panel{border:1px solid #fde68a;background:linear-gradient(135deg,#fff,#fffbeb)}
.conso-summary{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:12px;padding:10px 12px;margin-bottom:10px}
.conso-item .score-pill{background:#b45309}

.filters-panel{margin-bottom:14px}
.period-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.period-btn{border:1px solid #bfdbfe;background:#f8fbff;color:#004a99;border-radius:999px;padding:8px 12px;font-weight:700;cursor:pointer}
.period-btn.active,.period-btn:hover{background:#0058b8;color:#fff}
.period-controls label{font-size:13px;color:#475569;display:flex;align-items:center;gap:5px}
.period-controls input{border:1px solid #cbd5e1;border-radius:10px;padding:7px 9px}
.mini-kpis{grid-template-columns:repeat(5,1fr)}
.kpi.mini strong{font-size:21px}
.player-link{border:0;background:transparent;color:#003f82;font:inherit;font-weight:800;padding:0;margin:0;text-align:left;cursor:pointer}
.player-link:hover{text-decoration:underline}
.record-name{font-size:inherit;line-height:1.05;text-transform:none}
.modal[hidden]{display:none}
.modal{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;z-index:9999;padding:18px}
.modal-box{background:#fff;border-radius:20px;max-width:720px;width:100%;max-height:86vh;overflow:auto;padding:22px;box-shadow:0 20px 60px rgba(0,0,0,.25);position:relative}
.modal-close{position:absolute;top:10px;right:14px;border:0;background:#eef3fb;border-radius:50%;width:34px;height:34px;font-size:26px;line-height:30px;cursor:pointer}
.modal-box h2{margin:0 40px 4px 0;color:#004a99}
.modal-meta{margin:0 0 14px;color:#64748b}
.modal-match{border:1px solid #e2e8f0;border-radius:14px;padding:10px 12px;margin-bottom:8px;background:#f8fafc}
@media(max-width:780px){
  .mini-kpis{grid-template-columns:1fr 1fr}
  .period-controls{align-items:stretch}
  .period-btn,.period-controls label{width:100%;justify-content:center}
  .panel{padding:14px}
}


/* v5.1 : filtres compacts, meilleure ergonomie mobile */
.filters-compact{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 14px;
}
.filter-toggle{
  border:0;
  background:#0058b8;
  color:#fff;
  border-radius:999px;
  padding:10px 16px;
  font-weight:800;
  font-size:15px;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(0,80,170,.18);
}
.period-badge{
  color:#0058b8;
  background:#eef7ff;
  border:1px solid #bfdbfe;
  border-radius:999px;
  padding:8px 12px;
  font-weight:700;
  font-size:14px;
}
.period-panel{
  width:100%;
  background:#fff;
  border-radius:18px;
  padding:14px;
  box-shadow:0 8px 22px rgba(15,23,42,.08);
}
@media(max-width:780px){
  .filters-compact{
    margin-top:-4px;
    margin-bottom:10px;
  }
  .filter-toggle{
    flex:1;
    padding:10px 12px;
  }
  .period-badge{
    flex:1;
    text-align:center;
    font-size:13px;
  }
  .period-panel{
    padding:12px;
  }
  .hero{
    padding:22px;
    border-radius:18px;
  }
  h1{
    font-size:32px;
  }
  .status{
    font-size:15px;
    line-height:1.35;
  }
}


/* Open 2026 v6 test : favoris stats */
.secondary-filter{
  background:#fff8e1;
  color:#8a5a00;
  border:1px solid #ffd166;
  box-shadow:none;
}
.secondary-filter.active{
  background:#ffb300;
  color:#fff;
}
.favStar{
  border:0;
  background:transparent;
  color:#9aa6b2;
  font-size:21px;
  line-height:1;
  padding:0 5px 0 0;
  cursor:pointer;
}
.favStar.active{color:#ffb300}
.list-item .favStar,
.record-card .favStar{
  vertical-align:middle;
}
@media(max-width:780px){
  .secondary-filter{flex:1 1 100%}
}


/* v6.1 : favoris uniquement dans les listes, affichage plus propre */
.filters-compact .secondary-filter{
  min-height:42px;
}
.record-card .record-name{
  border:0;
  background:transparent;
  color:#004a99;
  font:inherit;
  font-weight:900;
  padding:0;
  text-align:left;
  cursor:pointer;
}
@media(max-width:780px){
  .filters-compact{
    gap:8px;
  }
  .filters-compact .secondary-filter{
    flex:1 1 100%;
  }
}


/* v6.2 : filtre favoris fiable sur mobile */
.favorite-switch-stats{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid #ffd166;
  background:#fff8e1;
  color:#8a5a00;
  border-radius:999px;
  padding:10px 16px;
  font-weight:900;
  cursor:pointer;
  min-height:42px;
}
.favorite-switch-stats input{
  width:18px;
  height:18px;
  accent-color:#ffb300;
}
.favorite-switch-stats:has(input:checked){
  background:#ffb300;
  color:white;
  border-color:#ffb300;
}
.favorite-list-note{
  margin:0 0 10px;
  padding:8px 10px;
  border-radius:12px;
  background:#fff8e1;
  color:#8a5a00;
  font-weight:800;
  font-size:13px;
}
body.favoritesOnlyMode .favorite-switch-stats{
  box-shadow:0 0 0 3px rgba(255,179,0,.18);
}
@media(max-width:780px){
  .favorite-switch-stats{
    flex:1 1 100%;
  }
}


/* v6.9 : stats Mes favoris */
.favorite-stats-panel.hidden{display:none}
.favorite-stats-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}
.favorite-stat-card{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:16px;
  padding:12px;
}
.favorite-stat-name{
  display:flex;
  align-items:center;
  gap:4px;
  font-weight:900;
}
.favorite-stat-numbers{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:8px 0;
}
.favorite-stat-numbers b,.favorite-stat-numbers span{
  background:#eef7ff;
  color:#004a99;
  border-radius:999px;
  padding:4px 8px;
  font-size:12px;
}
.favorite-stat-perf{
  color:#475569;
  font-size:13px;
}
@media(max-width:900px){.favorite-stats-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.favorite-stats-grid{grid-template-columns:1fr}}
