/* === STATS ABOUT SECTION - DESIGN 2025 === */
.stats-about-section {
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative;
  isolation: isolate;
}

.stats-about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #8b5cf6 10%,
    #6366f1 30%,
    #8b5cf6 50%,
    #6366f1 70%,
    #8b5cf6 90%,
    transparent 100%
  );
  background-size: 300% auto;
  background-position: 0% center;
  animation: shimmerGradient 8s ease-in-out infinite alternate;
  filter: blur(3px) brightness(1.25);
  mix-blend-mode: screen;
  opacity: 0.7;
  z-index: 5;
  pointer-events: none;
}

@keyframes shimmerGradient {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.stats-about__container {
  max-width: min(1200px, 90vw);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  position: relative;
  z-index: 2;
}

/* === HEADER ÉPURÉ === */
.stats-about__header {
  text-align: center;
  margin-bottom: clamp(3rem, 8vw, 5rem);
  max-width: 680px;
  margin-inline: auto;
}

.stats-about__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.06);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  margin-bottom: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-about__badge:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
}

.stats-about__title {
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 600;
  line-height: 1.1;
  color: #0f172a;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
}

.stats-about__title em {
  font-style: normal;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-accent {
  display: block;
  font-weight: 400;
  color: #64748b;
  margin-top: 0.25rem;
}

.stats-about__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

.stats-about__subtitle strong {
  color: #334155;
  font-weight: 500;
}

/* === GRILLE DES STATISTIQUES === */
.stats-about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* === ITEMS STATISTIQUES === */
.stats-about__item {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
  text-align: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out var(--delay, 0s) both;
  container-type: inline-size;
}

.stats-about__item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, var(--stat-color, #8b5cf6));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stats-about__item:hover {
  transform: translateY(-8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05),
    0 25px 50px color-mix(in srgb, var(--stat-color, #8b5cf6) 20%, transparent);
  border-color: color-mix(in srgb, var(--stat-color, #8b5cf6) 20%, transparent);
}

.stats-about__item:hover::before {
  opacity: 0.4;
}

/* === ICÔNE === */
.stats-about__icon {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(70px, 15vw, 90px);
  height: clamp(70px, 15vw, 90px);
  background: color-mix(in srgb, var(--stat-color, #8b5cf6) 10%, transparent);
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  transition: all 0.3s ease;
}

.stats-about__item:hover .stats-about__icon {
  background: color-mix(in srgb, var(--stat-color, #8b5cf6) 15%, transparent);
  transform: scale(1.05);
}

/* === CONTENU === */
.stats-about__content {
  position: relative;
  z-index: 2;
}

.stats-about__number {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--stat-color, #8b5cf6);
  line-height: 1;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.stats-about__unit {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.stats-about__description {
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.stats-about__description p {
  margin: 0;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === ANIMATION COMPTEUR === */
.stats-about__number[data-counter='true'] {
  animation: countUp 0.6s ease-out;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .stats-about__grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .stats-about__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .stats-about__item {
    padding: 1.25rem 1rem;
  }

  .stats-about__title {
    font-size: clamp(1rem, 5vw, 3.3rem);
  }
}

/* === ACCESSIBILITÉ === */
@media (prefers-reduced-motion: reduce) {
  .stats-about__item {
    animation: none;
  }

  .stats-about__item:hover {
    transform: none;
  }

  .stats-about-section::before {
    animation: none;
  }
}

/* === DARK MODE === */
@media (prefers-color-scheme: dark) {
  .stats-about-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  }

  .stats-about__item {
    background: #1e293b;
    border-color: #334155;
  }

  .stats-about__title,
  .stats-about__unit {
    color: #f8fafc;
  }

  .stats-about__subtitle,
  .stats-about__description,
  .stats-about__title {
    color: #cbd5e1;
  }
}
