/* ============================================================
   IGLAM — Refonte · Section « Pourquoi nous choisir »
   ============================================================
   Composition « 2 + 2 + 1 » :
   - 2 cartes larges (les raisons fortes) sur 1 rangée
   - 3 cartes étroites (les preuves) sur 1 rangée
   Hiérarchie réelle, aucune carte à moitié vide, hauteurs
   alignées par rangée.

   Simplicité : pas de pastille, pas de numéro romain, pas de
   ligne de progression, icône discrète. Le fond est aligné
   sur --color-surface-alt, comme les autres sections de la home.
   ============================================================ */

.why-section {
  position: relative;
  padding: var(--section-y) 0;
  background: var(--color-surface-alt);
  overflow: hidden;
}

.why-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 420px at 88% -10%, rgba(185, 137, 0, .08), transparent 62%),
    radial-gradient(800px 340px at -8% 108%, rgba(35, 49, 108, .05), transparent 60%);
}

/* La ligne de progression est supprimée : effet sans fonction. */
.why-progress { display: none; }

/* ============================================================
   1. EN-TÊTE
   ============================================================ */
.why-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-9);
  position: relative;
}

.why-kicker {
  display: inline-block;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
  border: 1px solid rgba(185, 137, 0, .24);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-5);
}

.why-title {
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: var(--text-2xl);
  color: var(--color-primary);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin: 0 0 var(--space-4);
}

.why-lead {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  margin: 0 auto;
  max-width: 60ch;
  line-height: var(--leading-relaxed);
}

/* ============================================================
   2. GRILLE « 2 + 2 + 1 »
   ============================================================
   Grille de 6 colonnes : les 2 cartes larges occupent 3 colonnes
   chacune (la moitié), les 3 cartes étroites 2 colonnes chacune
   (un tiers). 3 + 3 = 6 sur la 1re rangée, puis 2 + 2 + 2 = 6
   sur la 2e. Aucune carte à moitié vide.
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-5);
  position: relative;
}

/* Cartes étroites (les preuves) : 2 colonnes sur 6 = un tiers */
.why-card { grid-column: span 2; }

/* Cartes larges (les raisons fortes) : 3 colonnes sur 6 = la moitié */
.why-card--wide { grid-column: span 3; }

/* ============================================================
   3. CARTE
   ============================================================ */
.why-card {
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .6s var(--ease-out),
    transform .6s var(--ease-out);
}

.why-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.why-card-inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--space-7);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-base);
}

.why-card-inner:hover {
  transform: translateY(-3px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

/* Contour or discret au survol (fine, pas de dégradé) */
.why-card-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--color-accent);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.why-card-inner:hover::after { opacity: .5; }

/* ============================================================
   4. NUMÉRO — repère de lecture discret
   ============================================================ */
.why-card__num {
  position: absolute;
  top: var(--space-5);
  right: var(--space-6);
  z-index: 2;
  font-family: var(--font-titre);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(35, 49, 108, .16);
  pointer-events: none;
  transition: color var(--transition-base);
}

.why-card:hover .why-card__num {
  color: rgba(185, 137, 0, .38);
}

/* ============================================================
   5. ICÔNE — sobre, 28px, marine
   ============================================================
   Neutralisation du carré or de style.css (56px, dégradé) :
   on garde l'icône, on retire le cadre.
   ============================================================ */
.why-icon,
.why-icon.why-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--color-primary);
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: color var(--transition-base);
}

.why-icon svg,
.why-icon svg.svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.why-card:hover .why-icon { color: var(--color-accent-dark); }

/* ============================================================
   6. CONTENU
   ============================================================ */
.why-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.why-card h3 {
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin: 0 0 var(--space-3);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

/* Les cartes étroites : titre légèrement réduit pour tenir
   sur 2 lignes maximum (colonne de 359px) */
.why-card:not(.why-card--wide) h3 { font-size: var(--text-lg); }

/* Les cartes larges ont un titre plus généreux */
.why-card--wide h3 { font-size: var(--text-2xl); }

.why-card p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 46ch;
}

/* ============================================================
   7. CTA FINAL
   ============================================================ */
.why-cta {
  margin-top: var(--section-y);
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity .7s var(--ease-out) .1s,
    transform .7s var(--ease-out) .1s;
}

.why-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.why-cta::before {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin: 0 auto var(--space-7);
  background: var(--color-accent);
  border-radius: var(--radius-pill);
}

.why-cta-text {
  font-family: var(--font-titre);
  font-style: normal;
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin: 0 0 var(--space-6);
  line-height: var(--leading-snug);
  text-wrap: balance;
}

/* ============================================================
   8. RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Les 2 cartes larges passent sur 1 colonne chacune (1re rangée) */
  .why-card--wide { grid-column: span 1; }

  /* Les 3 preuves : 2 sur la 2e rangée, la 3e en pleine largeur */
  .why-card { grid-column: span 1; }

  .why-card:nth-child(5) { grid-column: span 2; }
}

@media (max-width: 640px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .why-card,
  .why-card--wide,
  .why-card:nth-child(5) {
    grid-column: span 1;
  }

  .why-card-inner { padding: var(--space-6); }

  .why-card--wide h3 { font-size: var(--text-xl); }
}

/* ============================================================
   9. ACCESSIBILITÉ
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .why-card,
  .why-cta {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
