/* ActiveFoot — Phase 2Z — statistiques détaillées + lecture simplifiée équipes/site/jour */
#global-stats.stats-bar {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  align-items: stretch;
}
#global-stats .stat {
  min-width: 0;
  overflow: hidden;
}
#global-stats .stat-val {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1;
  letter-spacing: -.4px;
  white-space: nowrap;
  max-width: 100%;
}
#global-stats .stat.af-stat-wide .stat-val,
#global-stats .stat .af-stat-ratio {
  font-size: clamp(18px, 1.9vw, 25px);
}

#af-config-match-stats-detail { margin-top: 16px; }

#af-config-match-stats-detail.af-ms-host-card {
  margin-top:16px;
  border-left:3px solid var(--green);
}
#af-config-match-stats-detail.af-ms-host-card .section-title {
  margin-bottom:0;
}
.af-ms-root { margin-top: 18px; }
#af-config-match-stats-detail .af-ms-root { margin-top: 0; }
.af-ms-intro {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.af-ms-intro .section-title { margin:0; }
.af-ms-tag {
  border:1px solid rgba(34,197,94,.28);
  background:rgba(34,197,94,.08);
  color:var(--green);
  border-radius:999px;
  padding:5px 9px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.2px;
  white-space:nowrap;
}
.af-ms-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap:10px;
  margin:10px 0 16px;
}
.af-ms-card {
  background:linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
  border:1px solid var(--bd);
  border-radius:var(--r);
  padding:12px 13px;
  min-width:0;
}
.af-ms-card strong {
  display:block;
  font-family:var(--fh);
  font-size:clamp(20px,2vw,28px);
  color:var(--green);
  line-height:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.af-ms-card span {
  display:block;
  margin-top:5px;
  color:var(--tm);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.45px;
}
.af-ms-card.warn strong { color:var(--gold); }
.af-ms-card.bad strong { color:var(--red); }
.af-ms-block {
  margin-top:16px;
}
.af-ms-block-title {
  font-family:var(--fh);
  color:var(--tx);
  font-size:15px;
  font-weight:700;
  margin:0 0 8px;
  display:flex;
  align-items:center;
  gap:7px;
}
.af-ms-mini-note {
  color:var(--ts);
  font-size:12px;
  margin:-3px 0 8px;
}
.af-ms-table table { min-width:760px; }
.af-ms-table th,
.af-ms-table td { vertical-align:middle; }
.af-ms-table .num { font-family:var(--fh); font-weight:700; }
.af-ms-empty {
  border:1px dashed var(--bd);
  border-radius:var(--r);
  padding:12px;
  color:var(--ts);
  font-size:13px;
}
.af-ms-pill {
  display:inline-flex;
  align-items:center;
  gap:4px;
  border:1px solid var(--bd);
  background:rgba(255,255,255,.03);
  border-radius:999px;
  padding:3px 7px;
  margin:2px 3px 2px 0;
  font-size:11px;
  color:var(--tm);
  white-space:nowrap;
}
.af-ms-ok { color:var(--green); font-weight:700; }
.af-ms-warn { color:var(--gold); font-weight:700; }
.af-ms-bad { color:var(--red); font-weight:700; }
@media (max-width: 720px) {
  #global-stats.stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #global-stats .stat { padding:12px 11px; }
  .af-ms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .af-ms-card { padding:11px; }
}
@media (max-width: 430px) {
  #global-stats.stats-bar { grid-template-columns: 1fr; }
  .af-ms-grid { grid-template-columns: 1fr; }
}

.af-ms-team-count { color: var(--blue); font-weight: 800; }

/* Phase 2Z — lecture simple du tableau présence équipes/site/jour */
.af-ms-table table.af-ms-site-day-teams { min-width: 820px; }
.af-ms-site-day-teams th,
.af-ms-site-day-teams td { white-space: nowrap; }
.af-ms-site-day-teams th:nth-child(3) { color: var(--blue); }
.af-ms-site-day-teams th:nth-child(4),
.af-ms-site-day-teams th:nth-child(5) { color: var(--green); }
.af-ms-match-detail { color: var(--tm); font-size: 12px; }
.af-ms-help-line {
  margin-top: 8px;
  border: 1px solid rgba(59,130,246,.20);
  background: rgba(59,130,246,.055);
  color: var(--tm);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
}
