/* ============================================================
   IGLAM — Refonte · Hero « Direction A » (photo plein écran)
   ============================================================
   Principe : la photographie des étudiants devient le FOND du
   hero. Le texte se pose par-dessus, sur un voile marine
   dégradé qui garantit le contraste. Plus de carte flottante
   inclinée, plus d'animation : un seul effet, la profondeur.

   Périmètre : UNIQUEMENT la section hero de la page d'accueil.
   La barre supérieure (topbar) n'est pas concernée.
   ============================================================ */

/* ============================================================
   1. CONTENEUR
   ============================================================ */
.hero-editorial {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(600px, 78vh, 780px);
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--color-primary);
}

/* Neutralisation des règles historiques de .hero (style.css) qui
   ajoutaient un min-height et un padding-bottom : ils créaient une
   bande marine vide sous le hero. */
.hero.hero-editorial {
  min-height: clamp(600px, 78vh, 780px);
  padding: 0;
  justify-content: center;
  align-items: stretch;
  text-align: left;
}

/* --- Photo de fond --- */
.hero-editorial__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

/* Le <picture> DOIT remplir le conteneur : sans cette règle, il prend
   la hauteur naturelle de l'image (ratio 1920/864) et laisse une bande
   marine vide sous la photo. */
.hero-editorial__bg picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-editorial__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}

/* --- Voile marine : garantit le contraste du texte --- */
.hero-editorial__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      100deg,
      rgba(27, 38, 84, .96) 0%,
      rgba(27, 38, 84, .92) 38%,
      rgba(27, 38, 84, .72) 62%,
      rgba(27, 38, 84, .48) 100%
    ),
    linear-gradient(180deg, rgba(27, 38, 84, .55) 0%, transparent 35%);
}

/* ============================================================
   2. GRILLE INTERNE
   ============================================================ */
.hero-editorial-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-10) var(--gutter);
  /* Neutralisation des règles historiques (style.css) : grille en 2
     colonnes, min-height 560px et padding-bottom 130px qui
     repoussaient la barre de preuve hors du hero. */
  display: block;
  grid-template-columns: none;
  gap: 0;
  min-height: 0;
}

.hero-editorial-content {
  max-width: 640px;
}

/* ============================================================
   3. EYEBROW — cadre l'offre avant le slogan
   ============================================================ */
.hero-editorial__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(255, 217, 102, .45);
  border-radius: var(--radius-pill);
  background: rgba(255, 217, 102, .08);
  color: var(--color-accent-bright);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  line-height: 1.4;
}

/* ============================================================
   4. SLOGAN
   ============================================================ */
.hero-editorial-title {
  font-family: var(--font-titre);
  font-weight: 600;
  font-size: clamp(3.25rem, 5.6vw, 5.25rem);
  line-height: 1.02;
  color: var(--color-text-inverse);
  margin: 0 0 var(--space-6);
  letter-spacing: -.5px;
  text-wrap: balance;
}

.hero-editorial-line2 { color: var(--color-text-inverse); }

/* Le mot accentué : italique or + soulignement doré */
.hero-editorial-accent {
  font-style: italic;
  color: var(--color-accent-bright);
  position: relative;
  white-space: nowrap;
}

.hero-editorial-accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: -3%;
  bottom: -.02em;
  height: 3px;
  background: var(--color-accent);
  transform: rotate(-1deg);
}

/* ============================================================
   5. SOUS-TITRE — une phrase, 12 mots
   ============================================================ */
.hero-editorial-sub {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: rgba(255, 255, 255, .9);
  max-width: 34em;
  margin: 0 0 var(--space-7);
}

/* ============================================================
   6. CTA — 1 principal + 1 secondaire (modèle uni.lu)
   ============================================================ */
.hero-editorial .btn-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-7);
}

/* ============================================================
   7. ACCRÉDITATIONS INSTITUTIONNELLES
   ============================================================
   Les deux sceaux (République du Mali, CAMES) sont des logos
   à fond clair : posés sur le fond marine, le sceau malien
   (bleu sur bleu) disparaît et l'emblème CAMES forme une tache
   blanche. On les monte donc sur des PASTILLES BLANCHES
   circulaires — le cercle Yamoussoukro du sceau s'inscrit
   naturellement dans un disque, et l'effet « tampon officiel »
   renforce la crédibilité institutionnelle.
   ============================================================ */
.hero-accredit {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, .16);
  max-width: 34em;
}

.hero-accredit__seals {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
}

/* La pastille : disque blanc, liseré doré discret */
.hero-accredit__seal {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 7px;
  background: var(--color-surface);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px var(--color-accent),
    0 6px 18px rgba(0, 0, 0, .28);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.hero-accredit__seal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Survol : très légère élévation */
.hero-accredit__seal:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px var(--color-accent),
    0 10px 26px rgba(0, 0, 0, .34);
}

.hero-accredit__text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.55;
  color: rgba(255, 255, 255, .84);
  max-width: 30em;
}

/* ============================================================
   8. BARRE DE PREUVE (sous le hero)
   ============================================================ */
.hero-proof {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.hero-proof__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-7) var(--gutter);
}

.hero-proof__cell {
  border-left: 1px solid var(--color-border);
  padding-left: var(--space-6);
}

.hero-proof__cell:first-child {
  border-left: none;
  padding-left: 0;
}

.hero-proof__num {
  display: block;
  font-family: var(--font-titre);
  font-size: clamp(2.25rem, 3.2vw, 2.875rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
  letter-spacing: -.5px;
}

.hero-proof__num em {
  font-style: normal;
  color: var(--color-danger);
}

.hero-proof__label {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ============================================================
   9. RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .hero-editorial {
    min-height: auto;
  }

  .hero-editorial__bg img {
    object-position: 68% center;
  }

  /* Voile plus dense sur mobile : le texte passe au-dessus
     d'une zone plus encombrée de la photo */
  .hero-editorial__veil {
    background:
      linear-gradient(
        180deg,
        rgba(27, 38, 84, .82) 0%,
        rgba(27, 38, 84, .88) 45%,
        rgba(27, 38, 84, .94) 100%
      );
  }

  .hero-editorial-inner {
    padding: var(--space-9) var(--gutter);
  }

  .hero-proof__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5) var(--space-6);
  }

  .hero-proof__cell:nth-child(3) {
    border-left: none;
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .hero-editorial__bg img {
    object-position: 62% center;
  }

  .hero-editorial-inner {
    padding: var(--space-8) var(--gutter);
  }

  .hero-editorial .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-editorial .btn-row .cta-uni {
    width: 100%;
  }

  /* Sur mobile, le bloc passe en pile : sceaux au-dessus,
     texte en dessous — sinon le texte se réduit à 4-5 lignes. */
  .hero-accredit {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    margin-top: var(--space-7);
  }

  .hero-accredit__text {
    max-width: 100%;
  }

  .hero-proof__grid {
    grid-template-columns: 1fr 1fr;
    padding: var(--space-6) var(--gutter);
  }

  .hero-proof__cell {
    padding-left: var(--space-4);
  }

  .hero-proof__num {
    font-size: 2rem;
  }

  .hero-proof__label {
    font-size: .72rem;
    letter-spacing: .04em;
  }
}

/* ============================================================
   10. ACCESSIBILITÉ
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero-editorial__bg img {
    transition: none;
  }
}
