/* ============================================================
   STAT ITEM — [compteur]
   ============================================================ */
.cp-stat-item { text-align: center; }
.cp-stat-item__number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--cp-color-primary, #20467B);
  font-family: inherit;
}
.cp-stat-item__label {
  margin-top: .5rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--cp-color-text, #334155);
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .04em;
}



/* ============================================================
   BANDE DES STATISTIQUES & IMPACT (MODERNE & CAPTIVANTE)
   Les chiffres et les sous-titres utilisent rigoureusement la police
   des titres déclarée par l'utilisateur.
   ============================================================ */
.cp-stats-section {
  background: #FFFFFF;
  border-bottom: 1px solid var(--cp-color-border, #E2E8F0);
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  position: relative;
  z-index: 10;
}

.cp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .cp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .cp-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .cp-stat-box {
    padding: 1.35rem 0.75rem 1.2rem;
    border-radius: 16px;
  }
  .cp-stat-icon-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
  }
  .cp-stat-number {
    font-size: clamp(1.45rem, 4.5vw, 1.85rem) !important;
  }
  .cp-stat-label {
    font-size: 0.85rem !important;
    margin-bottom: 0.25rem !important;
  }
  .cp-stat-sub {
    font-size: 0.82rem !important;
    line-height: 1.35;
  }
}

/* CARTE STATISTIQUE FLOTTANTE */
.cp-stat-box {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 2.25rem 1.25rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease;
}

/* Ligne supérieure décorative colorée au survol */
.cp-stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cp-stat-box--blue::before { background: var(--cp-color-primary, #20467B); }
.cp-stat-box--orange::before { background: var(--cp-color-secondary, #EB7630); }
.cp-stat-box--indigo::before { background: #3B82F6; }
.cp-stat-box--emerald::before { background: #10B981; }

.cp-stat-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 35px -6px rgba(15, 23, 42, 0.1);
}

.cp-stat-box:hover::before {
  opacity: 1;
}

.cp-stat-box--blue:hover { border-color: rgba(32, 70, 123, 0.35); }
.cp-stat-box--orange:hover { border-color: rgba(235, 118, 48, 0.4); }
.cp-stat-box--indigo:hover { border-color: rgba(59, 130, 246, 0.35); }
.cp-stat-box--emerald:hover { border-color: rgba(16, 185, 129, 0.35); }

/* BADGES D'ICÔNES THÉMATIQUES */
.cp-stat-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cp-stat-icon-badge--blue {
  background: rgba(32, 70, 123, 0.08);
  color: var(--cp-color-primary, #20467B);
}

.cp-stat-icon-badge--orange {
  background: rgba(235, 118, 48, 0.1);
  color: var(--cp-color-secondary, #EB7630);
}

.cp-stat-icon-badge--indigo {
  background: rgba(59, 130, 246, 0.1);
  color: #2563EB;
}

.cp-stat-icon-badge--emerald {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.cp-stat-box:hover .cp-stat-icon-badge {
  transform: scale(1.15);
}

/* ENVELOPPE CHIFFRE */
.cp-stat-number-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
}

/* CHIFFRES CLÉS : simples éléments de texte (pas des titres), toujours
   plus petits que les titres de section H2 pour respecter la pyramide. */
.cp-stat-number {
  font-size: clamp(1.6rem, 2.2vw, 2rem) !important;
  font-weight: 800 !important;
  color: var(--cp-color-primary, #20467B);
  line-height: 1.1 !important;
  letter-spacing: -0.01em;
  margin: 0 !important;
}

.cp-stat-accent { color: var(--cp-color-secondary, #EB7630) !important; }
.cp-stat-indigo { color: #2563EB !important; }
.cp-stat-success { color: #059669 !important; }

/* LIBELLÉ DU CHIFFRE (texte, pas un titre) */
.cp-stat-label {
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #0F172A;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin: 0 0 0.45rem !important;
}

/* SOUS-TITRE DESCRIPTIF (ÉCOLES, RÉSEAU AFRICA, TAUX D'IMPACT) : MINIMUM 16px */
.cp-stat-sub {
  font-size: 1rem !important; /* 16px standard obligatoire */
  color: #475569;
  margin: 0;
  font-weight: 600;
  line-height: 1.5;
}
