/**
 * Compteur d'impact Fondation IÉSEG.
 * Styles dédiés (indépendants du build Tailwind du thème).
 * Charte reprise de la maquette de référence.
 */

.impact-counter {
  --ic-orange: #e84810;
  --ic-yellow: #f9b000;
  --ic-grey: #f4f4f4;
  --ic-track: #ededed;
  --ic-sep: #e6e1dc;
  --ic-ink: #3d3a38;
  z-index: 0;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  color: var(--ic-orange);
  padding: clamp(28px, 4vw, 60px) clamp(20px, 4vw, 64px) clamp(40px, 5vw, 72px);
  font-family: "Source", "Source Sans 3", sans-serif;
}

.impact-counter *,
.impact-counter *::before,
.impact-counter *::after {
  box-sizing: border-box;
}

.impact-counter__inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- En-tête : montant ---------- */
.impact-counter__kicker {
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.045em;
  font-size: clamp(18px, 2.3vw, 33px);
  line-height: 1.15;
}

.impact-counter__amount {
  margin: clamp(4px, 1vw, 12px) 0 0;
  text-align: center;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 0.92;
  font-size: clamp(52px, 12vw, 150px);
  white-space: nowrap;
}

.impact-counter__collected {
  margin: clamp(2px, 0.6vw, 8px) 0 0;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: clamp(24px, 4vw, 52px);
  line-height: 1;
}

/* ---------- Barre de progression ---------- */
.impact-counter__progress-head {
  margin: clamp(22px, 3vw, 40px) 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  font-size: clamp(16px, 1.9vw, 27px);
}

.impact-counter__track {
  margin: clamp(8px, 1vw, 14px) 0 0;
  height: clamp(16px, 1.7vw, 24px);
  border-radius: 999px;
  background: var(--ic-track);
  overflow: hidden;
}

.impact-counter__bar {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #e84810 0%, #ea5b28 42%, #ed6d05 72%, #f9b000 100%);
}

/* ---------- Stats ---------- */
.impact-counter__stats {
  margin: clamp(26px, 3.4vw, 46px) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 72px);
}

.impact-counter__stat {
  text-align: center;
}

.impact-counter__stat-num {
  font-weight: 900;
  line-height: 1;
  font-size: clamp(30px, 4vw, 52px);
}

.impact-counter__stat-label {
  margin-top: 6px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.09em;
  font-size: clamp(12px, 1.4vw, 20px);
}

.impact-counter__sep {
  width: 2px;
  height: clamp(40px, 4vw, 60px);
  background: var(--ic-sep);
}

/* ---------- Parcours 5 étapes ---------- */
.impact-counter__journey {
  margin: clamp(30px, 4vw, 56px) 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(2px, 0.6vw, 8px);
}

.impact-counter__step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 clamp(2px, 0.5vw, 8px);
}

.impact-counter__circle {
  position: relative;
  width: clamp(84px, 9vw, 120px);
  height: clamp(84px, 9vw, 120px);
  border-radius: 50%;
  background: var(--ic-grey);
  display: flex;
  align-items: center;
  justify-content: center;
}

.impact-counter__icon {
  width: 58%;
  height: 58%;
  object-fit: contain;
  border-radius: 0!important;
}

.impact-counter__icon-placeholder {
  width: 58%;
  height: 58%;
  border: 2px dashed rgba(232, 72, 16, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: clamp(8px, 0.9vw, 11px);
  color: rgba(232, 72, 16, 0.48);
  line-height: 1.1;
}

.impact-counter__badge {
  position: absolute;
  top: -2px;
  left: -2px;
  width: clamp(24px, 2.4vw, 32px);
  height: clamp(24px, 2.4vw, 32px);
  border-radius: 50%;
  background: var(--ic-yellow);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: clamp(13px, 1.4vw, 18px);
  box-shadow: 0 0 0 4px #fff;
}

.impact-counter__arrow {
  position: absolute;
  right: 0;
  top: clamp(42px, 4.5vw, 60px);
  transform: translate(50%, -50%);
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.impact-counter__arrow i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ic-yellow);
}

.impact-counter__arrow b {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--ic-yellow);
  margin-left: 1px;
}

.impact-counter__step-title {
  margin-top: clamp(12px, 1.4vw, 18px);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: clamp(13px, 1.45vw, 21px);
  line-height: 1.12;
}

.impact-counter__step-sub {
  margin-top: clamp(8px, 1vw, 14px);
  font-weight: 600;
  color: var(--ic-ink);
  font-size: clamp(16px, 1.25vw, 17px);
  line-height: 1.28;
  text-wrap: pretty;
  max-width: 15ch;
}

/* ---------- Bandeau ---------- */
.impact-counter__banner {
  margin: clamp(28px, 3.6vw, 52px) 0 0;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 22px);
  background: var(--ic-grey);
  border-radius: 16px;
  padding: clamp(12px, 1.5vw, 20px) clamp(18px, 2.4vw, 34px);
}

.impact-counter__banner-icon {
  flex: none;
  width: clamp(30px, 3vw, 42px);
  height: clamp(30px, 3vw, 42px);
  object-fit: contain;
}

.impact-counter__banner-icon--placeholder {
  border-radius: 10px;
  background: rgba(249, 176, 0, 0.16);
  border: 2px dashed rgba(249, 176, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  font-size: clamp(6px, 0.7vw, 8px);
  color: #c98a00;
  text-align: center;
  line-height: 1;
}

.impact-counter__banner-text {
  margin: 0;
  color: var(--ic-ink);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
  font-size: clamp(12px, 1.35vw, 19px);
  line-height: 1.3;
  padding-bottom: 0!important;
}

.impact-counter__banner-text strong {
  font-weight: 800;
  color: var(--ic-orange);
}


/* ---------- Responsive : parcours en grille sur mobile ---------- */
@media (max-width: 768px) {
  .impact-counter__banner-icon {
    display: none;
  }
  .impact-counter__journey {
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(18px, 5vw, 28px) 0;
  }

  .impact-counter__step {
    flex: 0 0 33.3333%;
  }

  .impact-counter__arrow {
    display: none;
  }
}

@media (max-width: 480px) {
  .impact-counter__step {
    flex: 0 0 50%;
  }
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .impact-counter__bar {
    transition: none !important;
  }
}
