/* Statistiques / Statistics page only. Loaded after theme.css. */
.stats-page h2 {
  margin: 36px 0 6px;
}
.stats-page h2#compteur {
  margin-top: 8px;
}
.stats-page .sub {
  margin-bottom: 10px;
}
.stats-page .page-jump {
  margin: 0 0 22px;
}
.stats-page .stats-live {
  margin: 14px 0 0;
}
.stats-h3 {
  margin: 22px 0 6px;
  font-size: 1rem;
  color: var(--ink);
}

/* Live counters: four cards, two per row on desktop, one per row on phones. */
.stats-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.stats-kpis .kpi {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.stats-kpis .kpi-call {
  border-color: var(--bleu);
  background: var(--bleu-pale);
}
.stats-kpis h3 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.stats-kpis .stats-num,
.stats-kpis .objectif-num .n {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}
.stats-kpis .objectif-num .sur {
  font-size: 0.8rem;
  margin-left: 4px;
}
.stats-kpis .objectif-track {
  margin: 10px 0 6px;
  max-width: none;
}
.stats-kpis .objectif-note,
.stats-kpis .field-note {
  margin: 4px 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
}
.stats-kpis .kpi-btn {
  margin-top: 10px;
  min-height: 42px;
  padding: 9px 18px;
}
.stats-kpis .support-status {
  margin: 6px 0 0;
  font-size: 0.84rem;
}
.stats-live .etat-vide {
  margin: 10px 0 0;
  font-size: 0.9rem;
}
.stats-page .bars {
  margin-top: 10px;
}

/* Method, data, transparency: compact folds. */
.stats-page .method-fold {
  margin-top: 10px;
  padding: 2px 16px 6px;
}
.stats-page .method-fold > summary {
  padding: 10px 0;
}
.stats-page .method-fold p,
.stats-page .method-fold li {
  font-size: 0.93rem;
}
.stats-page .method-fold ol,
.stats-page .method-fold ul {
  padding-left: 20px;
  margin: 6px 0 10px;
  display: grid;
  gap: 4px;
}
.stats-page .method-fold code {
  background: var(--bleu-pale);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

/* One line of links instead of the old closing blocks. */
.stats-links {
  margin-top: 28px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 2;
}
.stats-links a,
.stats-links button {
  white-space: nowrap;
}
.stats-links .copy-home {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--bleu);
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 560px) {
  .stats-kpis {
    grid-template-columns: 1fr;
  }
}
