/* ============================================================================
   CORRECTIONS ULTIMES - Stats + Carousel Infini
   ============================================================================ */

/* ----------------------------------------------------------------------------
   FIX 1: STATS HERO - Forcer tout sur 1 ligne (10 ans, 3-5 sem.)
   ---------------------------------------------------------------------------- */

/* Forcer l'alignement et empêcher les retours à la ligne */
.stats-inner {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  max-width: var(--W) !important;
  margin: 0 auto !important;
  align-items: flex-start !important;
}

.stat {
  padding: 0 28px !important;
  text-align: center !important;
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.stat:first-child {
  padding-left: 0 !important;
}

.stat:last-child {
  border-right: none !important;
  padding-right: 0 !important;
}

/* CRITIQUE : Hauteur fixe + empêcher retour à la ligne */
.stat-n-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-height: 110px !important;
  max-height: 110px !important;
  margin-bottom: 0 !important;
  width: 100% !important;
}

/* Les chiffres - FORCER sur 1 ligne */
.stat-n {
  font-size: 88px !important;
  font-weight: 900 !important;
  color: #fff !important;
  letter-spacing: -3px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important; /* CRITIQUE : Empêcher retour à la ligne */
  flex-wrap: nowrap !important;
}

.stat-n span {
  font-size: 88px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important; /* CRITIQUE : "10 ans" sur 1 ligne */
  display: inline !important;
}

.stat-n-prefix {
  color: #fff !important;
  font-weight: 900 !important;
  font-size: 88px !important;
  line-height: 1 !important;
  letter-spacing: -3px !important;
  white-space: nowrap !important;
  display: inline !important;
}

/* Labels sous les stats */
.stat-l {
  font-size: 15px !important;
  color: rgba(255, 255, 255, 0.55) !important;
  margin-top: 14px !important;
  line-height: 1.5 !important;
  max-width: 200px !important;
  margin-bottom: 0 !important;
}

/* ----------------------------------------------------------------------------
   FIX 2: CAROUSEL INFINI - Défilement continu automatique
   ---------------------------------------------------------------------------- */

/* Désactiver le système de carousel existant */
.carousel-track-wrap {
  overflow: hidden !important;
  position: relative !important;
  width: 100% !important;
}

.carousel-track {
  display: flex !important;
  gap: 20px !important;
  animation: scroll-infinite 60s linear infinite !important;
  width: max-content !important;
}

/* Animation de défilement infini */
@keyframes scroll-infinite {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause au hover */
.carousel-track-wrap:hover .carousel-track {
  animation-play-state: paused !important;
}

/* Les cards du carousel */
.client-card {
  flex-shrink: 0 !important;
  background: #fff !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--rl) !important;
  padding: 28px 24px !important;
  transition: all 0.22s !important;
  width: 320px !important; /* Largeur fixe pour cohérence */
}

.client-card:hover {
  border-color: var(--red-bd) !important;
  box-shadow: 0 6px 24px rgba(227, 30, 36, 0.09) !important;
  transform: translateY(-3px) !important;
}

/* Masquer les contrôles (flèches et dots) car défilement automatique */
.carousel-controls {
  display: none !important;
}

/* ----------------------------------------------------------------------------
   FIX 3: RESPONSIVE STATS
   ---------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .stats {
    padding: 56px var(--PX) !important;
  }
  
  .stats-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  
  .stat {
    border-right: none !important;
    padding: 24px 16px !important;
  }
  
  .stat:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .stat:nth-child(-n+2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .stat-n,
  .stat-n-prefix,
  .stat-n span {
    font-size: 60px !important;
    letter-spacing: -1.5px !important;
    white-space: nowrap !important;
  }
  
  .stat-n-wrap {
    min-height: 90px !important;
    max-height: 90px !important;
  }
}

@media (max-width: 580px) {
  .stat-n,
  .stat-n-prefix,
  .stat-n span {
    font-size: 48px !important;
    white-space: nowrap !important;
  }
  
  .stat-n-wrap {
    min-height: 75px !important;
    max-height: 75px !important;
  }
  
  /* Carousel mobile : 1 card visible */
  .client-card {
    width: 280px !important;
  }
}

/* ----------------------------------------------------------------------------
   FIX 4: AMÉLIORATION VISUELLE CAROUSEL
   ---------------------------------------------------------------------------- */

.cc-sector {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: var(--red) !important;
  margin-bottom: 12px !important;
}

.cc-name {
  font-size: 21px !important;
  font-weight: 800 !important;
  color: var(--ink) !important;
  margin-bottom: 10px !important;
  line-height: 1.25 !important;
  letter-spacing: -0.3px !important;
}

.cc-desc {
  font-size: 16px !important;
  color: var(--g5) !important;
  line-height: 1.65 !important;
}

.cc-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 16px !important;
  background: var(--g1) !important;
  border: 1px solid var(--border) !important;
  color: var(--g5) !important;
  padding: 5px 13px !important;
  border-radius: 100px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

/* ----------------------------------------------------------------------------
   FIX 5: STATS SECTION SECTEURS (si besoin)
   ---------------------------------------------------------------------------- */

.sh-right {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  align-items: stretch !important;
}

.sh-stat {
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--rl) !important;
  padding: 20px !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 90px !important;
}

.sh-stat-n {
  font-size: 28px !important;
  font-weight: 900 !important;
  color: var(--red) !important;
  letter-spacing: -1px !important;
  line-height: 1 !important;
  margin-bottom: 8px !important;
  white-space: nowrap !important;
}

.sh-stat-l {
  font-size: 13px !important;
  color: var(--g5) !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}
