/* ===========================================================
   MINAGRI — SURCOUCHE DESIGN PREMIUM 2025
   Vert MINAGRI (#0B2E1E) / Jaune doré (#F2900C) / Blanc
   À charger APRÈS css/style.css — ne modifie aucune classe
   HTML, uniquement leur apparence visuelle.
   =========================================================== */

:root {
  /* Identité MINAGRI 2026 : nuit végétale / émeraude / sarcelle / ambre */
  --vert-fonce: #0B2E1E;       /* nuit végétale — fond institutionnel */
  --vert-minagri: #12A454;     /* émeraude — vert d'action principal */
  --or: #F2900C;                /* ambre signal */
  --or-texte: #B36400;          /* ambre foncé — lisible en texte sur fond blanc */
  --rouge: #D7263D;              /* rouge drapeau — touche congolaise */
  --rouge-texte: #A11A2B;        /* rouge foncé — lisible en texte sur fond blanc */
  --vert-clair: #F3F7F1;        /* brume — fond clair neutre */
  --terre: #0891B2;             /* sarcelle — accent secondaire */
  --ombre-premium: 0 20px 50px rgba(11, 46, 30, 0.18);
  --ombre-premium-douce: 0 8px 24px rgba(11, 46, 30, 0.10);
  --duree-anim: 600ms;
}

/* ===========================================================
   NAVBAR INTELLIGENTE — transparente puis solide au scroll
   =========================================================== */
#entete-commun {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background-color: #0B2E1E;
  transition: box-shadow 420ms ease, background-color 420ms ease;
}

/* Sur la page d'accueil, avant le scroll, le header doit laisser voir le
   hero derrière lui : le conteneur entier doit donc rester transparent
   à ce moment précis, et redevenir opaque une fois "scrolled". */
body.a-un-hero #entete-commun {
  background-color: transparent;
}

body.a-un-hero #entete-commun.scrolled {
  background-color: #ffffff;
}

/* Bande supérieure (coordonnées + Partenaires) : vert thème, texte blanc.
   max-height pilote sa disparition au scroll : elle se réduit dans le
   flux normal du document, ce qui fait remonter le header naturellement. */
.topbar {
  background-color: var(--vert-fonce) !important;
  color: #ffffff !important;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--vert-minagri) 0 33%, var(--or) 33% 66%, var(--rouge) 66% 100%) 1;
  max-height: 200px;
  overflow: hidden;
  opacity: 1;
  /* Pas de transition CSS : le JS pilote max-height et opacity
     frame par frame pour une réduction proportionnelle au scroll */
}

.topbar a,
.topbar-btn-connexion {
  color: #ffffff !important;
}

.topbar a:hover,
.topbar-btn-connexion:hover {
  color: var(--or) !important;
}

.header {
  position: relative;
  width: 100%;
  background-color: #0B2E1E;
  box-shadow: none !important;
  border-bottom: none !important;
  padding: 6px 0;
  transition: background-color 420ms ease;
}

body.a-un-hero .header {
  background-color: transparent;
}

.header .container {
  min-height: 84px;
}

body {
  --topbar-h: 40px; /* valeur de repli, écrasée par JS avec la hauteur réelle de la topbar */
}

/* Etat scrolled : la topbar (ci-dessous) se réduit et disparaît du flux
   normal du document. Le header, simple frère qui suit la topbar dans
   le DOM, remonte alors NATURELLEMENT pour occuper l'espace libéré —
   un seul mouvement physique au lieu de deux animations séparées à
   synchroniser, ce qui supprime tout risque de décalage visuel entre
   les deux éléments pendant la transition. */
.header.scrolled {
  background-color: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(242, 144, 12, 0.55) !important;
}

/* Le fond passe au blanc au scroll : les textes/icônes du header,
   pensés pour un fond vert foncé, doivent donc devenir foncés pour
   rester lisibles. */
.header.scrolled .logo-texte strong {
  color: var(--vert-fonce);
}

.header.scrolled .logo-texte span {
  color: var(--gris-texte);
}

.header.scrolled .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(11,46,30,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.header.scrolled .hamburger-barre {
  background-color: rgba(11, 46, 30, 0.9);
}

@media (min-width: 992px) {
  .header.scrolled .nav-link {
    color: var(--vert-fonce);
  }

  .header.scrolled .nav-link:hover,
  .header.scrolled .nav-link:focus,
  .header.scrolled .nav-item.actif > .nav-link {
    color: var(--or-texte);
  }
}

#entete-commun.scrolled {
  box-shadow: var(--ombre-premium-douce);
}

.header.scrolled .container {
  min-height: 84px;
}

/* La topbar est réduite progressivement par JS (max-height + opacity inline),
   donc aucune règle CSS scrolled n'est nécessaire ici. */

/* Pousse tout le contenu de page sous le bandeau fixe (topbar + header).
   --hauteur-header est la hauteur fixe du header seul (hors topbar) ;
   --topbar-h est mesurée dynamiquement par JS pour correspondre exactement
   au déplacement réel du header pendant la transition (mêmes valeurs,
   donc plus aucun écart possible entre contenu et header). */
main,
.entete-page {
  --hauteur-header: 96px;
  margin-top: calc(var(--topbar-h) + var(--hauteur-header));
  /* Pas de transition : --topbar-h évolue en direct avec le scroll (JS) */
}

body.scrolled main,
body.scrolled .entete-page {
  margin-top: var(--hauteur-header);
}

/* Le Hero gère sa propre image plein écran ; pas de marge dessus, sinon
   il ne touche plus le haut visuel de la fenêtre */
.hero {
  margin-top: calc(-1 * (var(--topbar-h) + var(--hauteur-header)));
  padding-top: calc(var(--topbar-h) + var(--hauteur-header));
  /* Pas de transition : --topbar-h évolue en direct avec le scroll (JS) */
  box-sizing: border-box;
}

body.scrolled .hero {
  margin-top: calc(-1 * var(--hauteur-header));
  padding-top: var(--hauteur-header);
}

/* ===========================================================
   HERO — plein écran, image de fond, overlay, zoom parallax léger
   =========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: none;
  overflow: hidden;
}

/* Fond dégradé émeraude → sarcelle, halo ambre — identité 2026 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--degrade, linear-gradient(135deg, var(--vert-minagri) 0%, var(--terre) 100%));
  z-index: 0;
}

@keyframes zoomLentHero {
  0%   { transform: scale(1); }
  100% { transform: scale(1.08); }
}

.hero-motif {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 15%, rgba(242, 144, 12, 0.35) 0, transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(255, 255, 255, 0.05) 0, transparent 40%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  padding: 120px 24px;
  text-align: left;
}

.hero h1,
.hero p {
  margin-left: 0;
  margin-right: auto;
}


.hero-eyebrow {
  background-color: rgba(242, 144, 12, 0.22);
  border: 1px solid rgba(242, 144, 12, 0.4);
  color: #d7fce9;
  font-family: var(--police-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  color: #ffffff;
  font-family: var(--police-titre);
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  max-width: 820px;
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.12rem;
  max-width: 600px;
}

.bouton-principal {
  background-color: var(--or);
  color: #0B2E1E;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(242, 144, 12, 0.32);
  position: relative;
  overflow: hidden;
  transition: transform 320ms ease, box-shadow 320ms ease;
}

.bouton-principal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: translateX(-120%);
  transition: transform 600ms ease;
}

.bouton-principal:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(242, 144, 12, 0.42);
}

.bouton-principal:hover::after {
  transform: translateX(120%);
}

.bouton-secondaire {
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  transition: transform 320ms ease, background-color 320ms ease;
}

.bouton-secondaire:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.14);
}

/* ===========================================================
   HERO — disposition deux colonnes (texte + carte stats)
   =========================================================== */
.hero-grille {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
}

.hero-texte {
  flex: 1 1 480px;
  min-width: 0;
}

/* ===========================================================
   CARTE "POURQUOI NOUS CHOISIR" — intégrée au hero
   Pas de fond propre : transparente sur le dégradé du hero
   Animations dynamiques type "spot publicitaire"
   =========================================================== */
.hero-carte-stats {
  flex: 1 1 460px;
  max-width: 520px;
  width: 100%;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 32px 34px 36px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(36px) scale(0.96);
  animation:
    heroCarteEntree 0.85s cubic-bezier(0.22, 0.9, 0.3, 1.1) 0.15s forwards,
    heroCarteHalo 4.5s ease-in-out 1.2s infinite;
}

@keyframes heroCarteEntree {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Halo respirant autour de la carte, façon mise en avant publicitaire */
@keyframes heroCarteHalo {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 199, 92, 0);
  }
  50% {
    box-shadow: 0 0 32px 4px rgba(255, 199, 92, 0.16);
  }
}

/* Balayage de brillance qui traverse périodiquement la carte */
.hero-carte-stats::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.12) 55%,
    transparent 100%
  );
  transform: skewX(-18deg);
  pointer-events: none;
  animation: heroCarteBrillance 4.5s ease-in-out 1.3s infinite;
}

@keyframes heroCarteBrillance {
  0% { left: -60%; }
  18% { left: 130%; }
  100% { left: 130%; }
}

.hero-carte-titre {
  text-align: center;
  margin-bottom: 24px;
}

.hero-carte-titre h2 {
  color: #ffffff;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  letter-spacing: 0.2px;
}

.hero-carte-underline {
  width: 0;
  height: 3px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, var(--or), #F7B23B);
  border-radius: 4px;
  animation: heroUnderlineEtirement 0.7s ease-out 0.85s forwards;
}

@keyframes heroUnderlineEtirement {
  to { width: 46px; }
}

.hero-carte-grille {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 28px;
  row-gap: 20px;
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 10px;
  padding: 4px 6px;
  opacity: 0;
  transform: translateX(-14px);
  animation: heroStatEntree 0.55s ease-out forwards;
  transition: background 0.25s ease, transform 0.25s ease;
}

/* Entrée en cascade : chaque stat apparaît juste après la précédente */
.hero-stat-item:nth-child(1) { animation-delay: 0.55s; }
.hero-stat-item:nth-child(2) { animation-delay: 0.68s; }
.hero-stat-item:nth-child(3) { animation-delay: 0.81s; }
.hero-stat-item:nth-child(4) { animation-delay: 0.94s; }
.hero-stat-item:nth-child(5) { animation-delay: 1.07s; }
.hero-stat-item:nth-child(6) { animation-delay: 1.20s; }

@keyframes heroStatEntree {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-stat-item:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px) !important;
}

.hero-stat-icone {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: linear-gradient(145deg, #F7B23B, var(--or));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 14px rgba(242, 144, 12, 0.32);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.35s ease;
  animation: heroIconeFlotte 3.2s ease-in-out infinite;
}

/* Flottement idle léger, décalé pour chaque icône (effet vivant) */
.hero-stat-item:nth-child(1) .hero-stat-icone { animation-delay: 1.8s; }
.hero-stat-item:nth-child(2) .hero-stat-icone { animation-delay: 2.1s; }
.hero-stat-item:nth-child(3) .hero-stat-icone { animation-delay: 2.4s; }
.hero-stat-item:nth-child(4) .hero-stat-icone { animation-delay: 1.95s; }
.hero-stat-item:nth-child(5) .hero-stat-icone { animation-delay: 2.25s; }
.hero-stat-item:nth-child(6) .hero-stat-icone { animation-delay: 2.55s; }

@keyframes heroIconeFlotte {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hero-stat-icone i {
  color: #ffffff;
  font-size: 1.12rem;
  transition: transform 0.35s ease;
}

.hero-stat-item:hover .hero-stat-icone {
  transform: scale(1.1) rotate(-3deg) !important;
  box-shadow: 0 8px 20px rgba(242, 144, 12, 0.5);
  animation-play-state: paused;
}

.hero-stat-item:hover .hero-stat-icone i {
  transform: scale(1.12);
}

.hero-stat-texte {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.hero-stat-texte .valeur {
  display: inline-block;
  color: #ffffff;
  font-family: var(--police-mono);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.2;
}

.hero-stat-texte .libelle {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
  font-size: 0.82rem;
  margin-top: 1px;
}

.hero-stat-texte .hero-libelle-seul {
  color: #ffffff;
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 0;
  line-height: 1.3;
}

@media (max-width: 1139px) {
  .hero-grille {
    flex-direction: column;
    align-items: stretch;
    gap: 0px;
  }

  .hero-carte-stats {
    margin-top: -260px;
  }

  .hero-carte-stats {
    max-width: 100%;
  }

  .hero-actions {
    gap: 10px;
  }

  .bouton {
    min-height: 44px;
    padding: 11px 20px;
    font-size: 0.82rem;
    border-radius: 10px;
  }
}

@media (max-width: 560px) {
  .hero-carte-stats {
    padding: 26px 22px 28px;
  }

  .hero-carte-grille {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }
}

/* Respect des préférences d'accessibilité : on coupe les animations
   continues (mais pas l'apparition simple) si demandé par le système */
@media (prefers-reduced-motion: reduce) {
  .hero-carte-stats,
  .hero-carte-stats::after,
  .hero-carte-underline,
  .hero-stat-item,
  .hero-stat-icone {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    width: 46px;
  }
}

/* ===========================================================
   (Bloc historique conservé — la carte flottante hero est
   désormais gérée par .hero-grille / .hero-carte-stats ci-dessus)
   =========================================================== */
@media (min-width: 1140px) {
  .hero .container {
    display: block;
  }
}

.piliers {
  background-color: #F3F7F1;
  position: relative;
}

.piliers .grille-cartes {
  gap: 22px;
}

.carte {
  position: relative;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(11, 46, 30, 0.08);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: var(--ombre-premium-douce);
  transition: transform 300ms ease, box-shadow 300ms ease;
  overflow: hidden;
}

.carte::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--degrade);
}

.carte:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombre-premium);
}

.carte .icone {
  background-color: rgba(242, 144, 12, 0.16);
  color: var(--or-texte);
  border-radius: 10px;
  font-weight: 800;
}

.carte a.lien-carte {
  color: #0B2E1E;
  font-weight: 700;
}

/* ===========================================================
   SECTIONS — typographie et accents repris en bleu marine / doré
   =========================================================== */
h1, h2, h3, h4 {
  color: #0B2E1E;
}

.section-titre .label {
  color: #12A454;
  font-family: var(--police-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contenu h2,
.entete-page,
.entete-page h1,
.entete-page p {
  /* harmonise les bannières de page interne avec la nouvelle palette */
}

.entete-page {
  background: linear-gradient(135deg, #0B2E1E, #0F7A3D) !important;
}

.contenu h2 {
  border-bottom: 2px solid rgba(242, 144, 12, 0.5);
}

.encadre {
  border-left: 4px solid var(--or);
  border-radius: 10px;
}

.portrait-ministre img {
  border-radius: 10px;
  box-shadow: var(--ombre-premium-douce);
  background-color: #F3F7F1;
  min-height: 280px;
  object-fit: cover;
  color: transparent;
  font-size: 0;
}

.carte-actu {
  border-radius: 12px;
  border: 1px solid rgba(11, 46, 30, 0.08);
}

.carte-actu .date {
  color: var(--rouge-texte);
  font-family: var(--police-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.carte-actu a.lire-plus {
  color: #0B2E1E;
}

.fil-ariane a {
  color: #0B2E1E;
}

/* Menu : flèches et survol en doré sur fond bleu marine, cohérent navbar fixe */
.menu > li > a:hover,
.menu > li.actif > a {
  color: var(--or) !important;
}

/* ===========================================================
   PIED DE PAGE — harmonisation bleu marine / doré
   =========================================================== */
.pied-de-page {
  background-color: #0B2E1E;
}


.pied-de-page a:hover {
  color: var(--or);
}

.pied-reseaux a {
  background-color: rgba(255, 255, 255, 0.08);
  transition: background-color 320ms ease, transform 320ms ease;
}

.pied-reseaux a:hover {
  background-color: var(--or);
  color: #0B2E1E;
  transform: translateY(-3px);
}

.formulaire-diffusion button {
  background-color: var(--or);
  color: #0B2E1E;
  font-weight: 700;
  transition: background-color 320ms ease;
}

.formulaire-diffusion button:hover {
  background-color: #ffffff;
}

.formulaire-diffusion input:focus {
  outline: 2px solid var(--or);
  outline-offset: 1px;
}

.bas-de-pied {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--vert-minagri) 0 33%, var(--or) 33% 66%, var(--rouge) 66% 100%) 1;
}

/* ===========================================================
   ANIMATIONS D'APPARITION AU SCROLL (IntersectionObserver, voir JS)
   =========================================================== */
.au-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity var(--duree-anim) cubic-bezier(0.16, 1, 0.3, 1),
              transform var(--duree-anim) cubic-bezier(0.16, 1, 0.3, 1);
}

.au-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.au-scroll-zoom {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity var(--duree-anim) ease, transform var(--duree-anim) ease;
}

.au-scroll-zoom.visible {
  opacity: 1;
  transform: scale(1);
}

/* Révélation progressive, élément par élément (titres, paragraphes,
   listes, images...) : fondu + légère translation + flou qui se
   dissipe, pour un rendu moderne, plus doux qu'une simple apparition
   en bloc. Chaque élément se déclenche indépendamment à son entrée
   dans le viewport (voir premium.js → initApparitionProgressiveContenu). */
.au-scroll-fin {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
              filter 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.au-scroll-fin.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Décalage progressif pour les grilles de cartes (effet cascade) */
.grille-cartes.au-scroll-groupe .carte,
.grille-actus.au-scroll-groupe .carte-actu {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 550ms ease, transform 550ms ease;
}

.grille-cartes.au-scroll-groupe.visible .carte,
.grille-actus.au-scroll-groupe.visible .carte-actu {
  opacity: 1;
  transform: translateY(0);
}

.grille-cartes.au-scroll-groupe.visible .carte:nth-child(1),
.grille-actus.au-scroll-groupe.visible .carte-actu:nth-child(1) { transition-delay: 0ms; }
.grille-cartes.au-scroll-groupe.visible .carte:nth-child(2),
.grille-actus.au-scroll-groupe.visible .carte-actu:nth-child(2) { transition-delay: 120ms; }
.grille-cartes.au-scroll-groupe.visible .carte:nth-child(3),
.grille-actus.au-scroll-groupe.visible .carte-actu:nth-child(3) { transition-delay: 240ms; }

/* Décalage progressif : missions (mvv) et atouts (avantages) de l'accueil */
.mvv-container.au-scroll-groupe .mvv-card,
.avantages-grid.au-scroll-groupe .avantage-item {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 550ms ease, transform 550ms ease;
}

.mvv-container.au-scroll-groupe.visible .mvv-card,
.avantages-grid.au-scroll-groupe.visible .avantage-item {
  opacity: 1;
  transform: translateY(0);
}

.mvv-container.au-scroll-groupe.visible .mvv-card:nth-child(1),
.avantages-grid.au-scroll-groupe.visible .avantage-item:nth-child(1) { transition-delay: 0ms; }
.mvv-container.au-scroll-groupe.visible .mvv-card:nth-child(2),
.avantages-grid.au-scroll-groupe.visible .avantage-item:nth-child(2) { transition-delay: 120ms; }
.mvv-container.au-scroll-groupe.visible .mvv-card:nth-child(3),
.avantages-grid.au-scroll-groupe.visible .avantage-item:nth-child(3) { transition-delay: 240ms; }
.avantages-grid.au-scroll-groupe.visible .avantage-item:nth-child(4) { transition-delay: 360ms; }

/* Décalage progressif : les 4 colonnes du pied de page, sur chaque page du site */
.pied-grille.au-scroll-groupe > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 550ms ease, transform 550ms ease;
}

.pied-grille.au-scroll-groupe.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.pied-grille.au-scroll-groupe.visible > *:nth-child(1) { transition-delay: 0ms; }
.pied-grille.au-scroll-groupe.visible > *:nth-child(2) { transition-delay: 100ms; }
.pied-grille.au-scroll-groupe.visible > *:nth-child(3) { transition-delay: 200ms; }
.pied-grille.au-scroll-groupe.visible > *:nth-child(4) { transition-delay: 300ms; }

/* ===========================================================
   BOUTON RETOUR EN HAUT
   =========================================================== */
.retour-haut {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #0B2E1E;
  color: var(--or);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--ombre-premium-douce);
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms ease, background-color 320ms ease;
  z-index: 200;
}

.retour-haut.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.retour-haut:hover {
  background-color: var(--or);
  color: #0B2E1E;
}

/* ===========================================================
   RUBAN D'ANNONCE — bandeau plein largeur en défilement continu
   =========================================================== */
.ruban-annonce {
  position: relative;
  background-color: var(--or);
  overflow: hidden;
  padding: 16px 0;
}

.ruban-defilement {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.ruban-piste {
  display: flex;
  width: max-content;
  animation: rubanDefilement 32s linear infinite;
}

.ruban-annonce:hover .ruban-piste {
  animation-play-state: paused;
}

.ruban-accroche {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  margin: 0;
  padding: 0 40px;
  color: #ffffff;
  font-family: var(--police-mono);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.ruban-accroche::after {
  content: "•";
  margin-left: 40px;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes rubanDefilement {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 600px) {
  .ruban-accroche {
    font-size: 0.82rem;
    padding: 0 24px;
  }

  .ruban-accroche::after {
    margin-left: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ruban-piste {
    animation: none;
  }

  .ruban-accroche:nth-child(2) {
    display: none;
  }
}

/* ===========================================================
   RESPONSIVE — ajustements pour mobile/tablette
   =========================================================== */
@media (max-width: 860px) {
  .header.scrolled {
    background-color: rgba(255, 255, 255, 0.97) !important;
  }

  .hero {
    min-height: auto;
  }

  .hero .container {
    padding: 100px 24px 80px;
  }

  .entete-page {
    padding-top: calc(40px + 96px);
  }
}

@media (max-width: 480px) {
  .hero .container {
    padding: 88px 18px 56px;
  }

  .hero-grille {
    gap: 0px;
  }

  .hero-carte-stats {
    margin-top: -280px;
  }

  .hero-carte-stats {
    padding: 22px 18px 24px;
  }

  .bouton {
    min-height: 40px;
    padding: 9px 16px;
    font-size: 0.78rem;
  }
}

@media (max-width: 600px) {
  .retour-haut {
    bottom: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
  }
}

/* Respecte les préférences d'accessibilité : pas d'animation si demandé */
@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }

  .au-scroll,
  .au-scroll-zoom,
  .au-scroll-fin,
  .grille-cartes.au-scroll-groupe .carte,
  .grille-actus.au-scroll-groupe .carte-actu,
  .mvv-container.au-scroll-groupe .mvv-card,
  .avantages-grid.au-scroll-groupe .avantage-item,
  .pied-grille.au-scroll-groupe > *,
  .retour-haut {
    transition: none;
    filter: none;
  }
}

/* ===========================================================
   SECTION MVV — Direction Générale Agriculture / Élevage / Centre de formation
   Remplace l'ancien bloc "Nos missions / Trois piliers"
   =========================================================== */
.mvv-section {
  position: relative;
  padding: 72px 0;
  overflow: hidden;
  background-color: var(--gris-clair);
}

.mvv-blob {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(242, 144, 12, 0.10), rgba(11, 46, 30, 0.05) 70%, transparent 80%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.mvv-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 1024px) {
  .mvv-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .mvv-container {
    grid-template-columns: 1fr;
  }
}

.mvv-card {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: 0 8px 24px rgba(11, 46, 30, 0.07);

  opacity: 0;
  transform: translateY(50px);

  transition:
    opacity 0.9s ease,
    transform 0.4s cubic-bezier(0.22, 0.8, 0.25, 1),
    box-shadow 0.4s cubic-bezier(0.22, 0.8, 0.25, 1);
}

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

.mvv-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 45px rgba(11, 46, 30, 0.16);
}

.mvv-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: #FDF1DD;
  color: #F2900C;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: transform 0.45s ease;
}

.mvv-icon-circle svg {
  width: 26px;
  height: 26px;
}

.mvv-card:hover .mvv-icon-circle {
  transform: scale(1.12) rotate(8deg);
}

.mvv-title {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: #0B2E1E;
  margin-bottom: 12px;
}

.mvv-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #4f5862;
  margin-bottom: 16px;
}

.mvv-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: #0B2E1E;
  text-decoration: none;
  transition: gap 0.3s ease, color 0.3s ease;
}

.mvv-link .mvv-arrow {
  transition: transform 0.35s ease;
}

.mvv-link:hover {
  color: #F2900C;
  gap: 10px;
}

.mvv-link:hover .mvv-arrow {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .mvv-card,
  .mvv-icon-circle,
  .mvv-blob {
    transition: none !important;
    animation: none !important;
  }
  .mvv-card {
    opacity: 1;
    transform: none;
  }
}


/* ===========================================================
   SECTION GFAC — Grande Foire Agricole du Congo
   Insérée juste après la section MVV ("Trois piliers, un seul objectif")
   Styles alignés sur les variables du site
   (police-titre, police-texte, vert-fonce, vert-clair, gris-texte...)
   =========================================================== */
.gfac-section {
  padding: 72px 0;
  background-color: #ffffff;
}

.gfac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 24px;
}

/* Colonne image */
.gfac-image-wrapper {
  width: 100%;
  height: 320px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(11, 46, 30, 0.10);
  transition: box-shadow 0.35s ease;
}

.gfac-image-wrapper img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gfac-image-wrapper:hover img {
  transform: scale(1.04);
}

.gfac-image-wrapper:hover {
  box-shadow: 0 12px 32px rgba(11, 46, 30, 0.16);
}

/* Colonne contenu */
.gfac-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.gfac-highlight {
  display: inline-block;
  font-family: var(--police-titre);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--vert-fonce);
  background-color: var(--vert-clair);
  padding: 4px 12px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.gfac-text {
  font-family: var(--police-texte);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--gris-texte);
  max-width: 560px;
  margin-bottom: 26px;
}

.gfac-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 28px;
  background-color: var(--vert-fonce);
  color: #ffffff;
  font-family: var(--police-texte);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(11, 46, 30, 0.25);
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition), gap 0.3s ease;
}

.gfac-content .gfac-btn {
  height: 44px;
  padding: 0 22px;
  font-size: 0.85rem;
}

.gfac-btn .mvv-arrow {
  transition: transform 0.35s ease;
}

.gfac-btn:hover {
  background-color: var(--vert-minagri);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -6px rgba(11, 46, 30, 0.4);
  gap: 12px;
}

.gfac-btn:hover .mvv-arrow {
  transform: translateX(4px);
}

.gfac-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(11, 46, 30, 0.25);
}

/* Responsive — mêmes paliers que le reste du site */
@media (max-width: 1024px) {
  .gfac-section {
    padding: 56px 0;
  }

  .gfac-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .gfac-image-wrapper {
    height: 280px;
  }

  .gfac-text {
    max-width: 100%;
  }
}

@media (max-width: 680px) {
  .gfac-section {
    padding: 44px 0;
  }

  .gfac-image-wrapper {
    height: 200px;
    border-radius: 10px;
  }

  .gfac-highlight {
    font-size: 1.1rem;
  }

  .gfac-text {
    font-size: 0.98rem;
  }

  .gfac-btn {
    width: 100%;
    height: 48px;
    justify-content: center;
    white-space: normal;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gfac-image-wrapper img,
  .gfac-btn {
    transition: none !important;
  }
}

/* ===========================================================
   NOS ENGAGEMENTS — bande d'atouts + services du Ministère
   Insérée juste après la section GFAC ("Grand événement")
   Réutilise .section-titre, .mvv-container, .mvv-card et .bouton
   déjà définis dans le site pour garantir la cohérence typographique
   (police-titre, police-texte, vert-fonce, gris-texte...)
   =========================================================== */

/* ===========================================================
   PAGE "PARTENAIRES" — grille de cartes (logo + nom + description)
   =========================================================== */
.section-partenaires {
  background-color: var(--gris-clair);
}

.partenaires-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.partenaire-carte {
  background-color: #ffffff;
  border: 1px solid var(--bordure);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.partenaire-carte:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(11, 46, 30, 0.1);
}

.partenaire-logo {
  height: 40px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
}

.partenaire-logo img {
  max-height: 100%;
  max-width: 120px;
  object-fit: contain;
}

.partenaire-carte h3 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--vert-fonce);
  margin-bottom: 8px;
}

.partenaire-carte p {
  color: var(--gris-texte);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0;
}

/* Bande d'atouts (4 colonnes) */
.avantages-section {
  background-color: var(--vert-clair);
  padding: 40px 0;
}

.avantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.avantage-item {
  text-align: center;
  padding: 20px 20px;
  position: relative;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease;
}

.avantage-item:hover {
  transform: translateY(-6px);
  background-color: #ffffff;
  box-shadow: 0 14px 30px rgba(11, 46, 30, 0.12);
}

.avantage-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: rgba(11, 46, 30, 0.15);
  transition: opacity 0.35s ease;
}

.avantage-item:hover:not(:last-child)::after {
  opacity: 0;
}

.avantage-item svg {
  width: 32px;
  height: 32px;
  color: var(--vert-fonce);
  display: block;
  margin: 0 auto 10px;
  transition: transform 0.4s ease, color 0.35s ease;
}

.avantage-item:hover svg {
  transform: scale(1.15) rotate(-6deg);
  color: var(--vert-minagri, var(--vert-fonce));
}

.avantage-item h4 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--vert-fonce);
  margin-bottom: 6px;
  transition: color 0.35s ease;
}

.avantage-item p {
  font-family: var(--police-texte);
  font-size: 0.88rem;
  color: var(--gris-texte);
  line-height: 1.55;
  max-width: 250px;
  margin: 0 auto;
}

/* Section "services" (titre centré + cartes + bouton) */
.services-section {
  background-color: #ffffff;
  padding: 72px 0;
}

.section-soustitre {
  font-family: var(--police-texte);
  font-size: 1.05rem;
  color: var(--gris-texte);
  line-height: 1.6;
  max-width: 720px;
  margin: 14px auto 0;
}

.services-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

/* Le fond de ce bouton reprend celui du bouton GFAC (.gfac-btn), mais
   en une teinte plus douce (couleur pleine, pas de transparence, pour
   garder des contours nets). */
.services-btn-wrapper .gfac-btn {
  background-color: #0F7A3D;
  height: 44px;
  padding: 0 22px;
  font-size: 0.85rem;
}

.services-btn-wrapper .gfac-btn:hover {
  background-color: #12A454;
}

@media (max-width: 1024px) {
  .avantages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 0;
  }

  .avantage-item:not(:last-child)::after {
    display: none;
  }

  .avantage-item {
    border-bottom: 1px solid rgba(11, 46, 30, 0.10);
    padding-bottom: 16px;
  }

  .avantage-item:nth-last-child(-n+2) {
    border-bottom: none;
    padding-bottom: 4px;
  }

  .avantage-item p {
    max-width: 100%;
  }
}

@media (max-width: 680px) {
  .avantages-section {
    padding: 20px 0;
  }

  .avantages-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .avantage-item {
    border-bottom: 1px solid rgba(11, 46, 30, 0.08);
    padding: 12px 8px 14px;
  }

  .avantage-item:last-child {
    border-bottom: none;
  }

  .services-section {
    padding: 44px 0;
  }

  .section-soustitre {
    font-size: 0.95rem;
    padding: 0 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .avantage-item svg {
    transition: none !important;
  }
}

/* ===========================================================
   PARTENAIRES (carrousel) & ÉVÉNEMENTS RÉCENTS
   Préfixe "pe-" pour éviter tout conflit de classes.
   Styles de texte alignés sur les variables du site
   (police-titre, police-texte, vert-fonce, gris-texte...)
   =========================================================== */
.pe-section-header {
  text-align: center;
  margin-bottom: 40px;
}

.pe-section-header h2 {
  font-family: var(--police-titre);
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  font-weight: 700;
  color: var(--vert-fonce);
  margin-bottom: 10px;
  letter-spacing: -0.2px;
}

.pe-section-header p {
  font-family: var(--police-texte);
  font-size: 0.98rem;
  color: var(--gris-texte);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Carrousel partenaires --- */
.pe-carousel-wrapper {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.pe-carousel-track {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  animation: pe-scroll-logos 28s linear infinite;
}

.pe-carousel-track:hover { animation-play-state: paused; }

@keyframes pe-scroll-logos {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.pe-partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 12px;
  padding: 18px 32px;
  height: 90px;
  min-width: 180px;
  flex-shrink: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 12px rgba(11, 46, 30, 0.06);
}

.pe-partner-logo:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 30px rgba(11, 46, 30, 0.13);
}

.pe-partner-logo img {
  max-height: 56px;
  max-width: 140px;
  object-fit: contain;
}

/* --- Section Événements --- */
.pe-events-section {
  padding: 72px 0;
  background-color: var(--blanc);
}

/* Conteneur élargi pour rapprocher les cartes des bords de l'écran,
   uniquement pour cette section */
.pe-events-container {
  max-width: 1600px;
  padding: 0 32px;
}

.pe-events-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.pe-event-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 340px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(11, 46, 30, 0.12);
  transition: transform 0.38s cubic-bezier(.25,.8,.25,1),
              box-shadow 0.38s cubic-bezier(.25,.8,.25,1);
  opacity: 0;
  transform: translateY(40px);
}

.pe-event-card.pe-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s ease, transform 0.55s ease,
              box-shadow 0.38s cubic-bezier(.25,.8,.25,1);
}

.pe-event-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 24px 50px rgba(11, 46, 30, 0.22);
}

.pe-event-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.pe-event-card:hover .pe-event-card-img {
  transform: scale(1.08);
}

.pe-event-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,46,30,0.88) 0%, rgba(11,46,30,0.40) 50%, rgba(11,46,30,0.10) 100%);
  z-index: 1;
}

.pe-event-date {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: var(--vert-fonce);
  color: var(--blanc);
  font-family: var(--police-texte);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 30px;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(11, 46, 30, 0.35);
}

.pe-event-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 26px 20px 22px;
  z-index: 2;
}

.pe-event-content h3 {
  font-family: var(--police-titre);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blanc);
  line-height: 1.35;
  margin-bottom: 8px;
}

.pe-event-content p {
  font-family: var(--police-texte);
  font-size: 0.83rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .pe-events-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  .pe-events-grid { grid-template-columns: 1fr; }
  .pe-event-card { height: 300px; }
  .pe-partner-logo { min-width: 140px; padding: 14px 22px; height: 76px; }
  .pe-events-container { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .pe-carousel-track { animation: none; }
  .pe-event-card, .pe-event-card.pe-visible { opacity: 1; transform: none; transition: none; }
  .pe-event-card:hover { transform: none !important; }
  .pe-event-card:hover .pe-event-card-img { transform: none; }
}

/* ===========================================================
   ACTUALITÉS — refonte éditoriale premium
   1 article principal (~60%) + articles secondaires empilés (~40%)
   Préfixe "news-" pour éviter tout conflit de classes.
   =========================================================== */
.actualites {
  padding: 96px 0;
  background-color: var(--blanc);
}

.news-titre-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  margin-bottom: 48px;
}

.news-titre-texte { text-align: left; }

.news-voir-tout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-family: var(--police-texte);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--vert-fonce);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), gap var(--transition), color var(--transition);
}

.news-voir-tout svg { transition: transform var(--transition); }

.news-voir-tout:hover {
  color: var(--or-texte);
  border-bottom-color: var(--or-texte);
  gap: 12px;
}

.news-voir-tout:hover svg { transform: translateX(3px); }

/* --- Grille principale : carte vedette + liste secondaire --- */
.news-grid {
  display: flex;
  align-items: stretch;
  gap: 24px;
}

.news-main {
  flex: 1.6 1 0%;
  min-width: 0;
}

.news-main-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--ombre-premium-douce);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.news-main-link:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombre-premium);
}

.news-main-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--vert-clair);
}

.news-main-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.news-main-link:hover .news-main-media img {
  transform: scale(1.06);
}

.news-main-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 32px;
}

.news-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.news-badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--vert-fonce);
  color: var(--blanc);
  font-family: var(--police-texte);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 30px;
}

.news-badge-outline {
  background-color: transparent;
  color: var(--vert-fonce);
  border: 1.5px solid var(--vert-clair);
}

.news-date {
  font-family: var(--police-texte);
  font-size: 0.82rem;
  color: var(--gris-texte);
}

.news-main-title {
  font-family: var(--police-titre);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  color: var(--vert-fonce);
  line-height: 1.32;
  margin-bottom: 14px;
}

.news-main-excerpt {
  font-family: var(--police-texte);
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--gris-texte);
  margin-bottom: 22px;
  flex: 1;
}

.news-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-family: var(--police-texte);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--vert-fonce);
  padding-top: 4px;
  border-top: 2px solid var(--or);
  transition: gap var(--transition), color var(--transition);
}

.news-main-link:hover .news-cta {
  color: var(--or-texte);
  gap: 12px;
}

/* --- Liste des articles secondaires --- */
.news-secondary-list {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.news-card {
  flex: 1 1 0%;
}

.news-card-link {
  display: flex;
  align-items: stretch;
  gap: 18px;
  height: 100%;
  background-color: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--ombre-premium-douce);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.news-card-link:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombre-premium);
}

.news-card-media {
  position: relative;
  flex: 0 0 128px;
  width: 128px;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--vert-clair);
}

.news-card-media img,
.news-card-media-illustration svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 500ms ease;
}

.news-card-link:hover .news-card-media img,
.news-card-link:hover .news-card-media-illustration svg {
  transform: scale(1.08);
}

.news-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.news-card-body .news-meta-row {
  gap: 10px;
  margin-bottom: 8px;
}

.news-card-body .news-badge {
  font-size: 0.62rem;
  padding: 4px 10px;
}

.news-card-body .news-date {
  font-size: 0.76rem;
}

.news-card-title {
  font-family: var(--police-titre);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--vert-fonce);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-family: var(--police-texte);
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--gris-texte);
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-family: var(--police-texte);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--vert-fonce);
  transition: gap var(--transition), color var(--transition);
}

.news-card-link:hover .news-card-more {
  color: var(--or-texte);
  gap: 10px;
}

/* --- Apparition au scroll : fade-in + léger slide-up --- */
.news-main.au-scroll,
.news-card.au-scroll {
  transform: translateY(28px);
}

.news-secondary-list .news-card:nth-child(1) { transition-delay: 0ms; }
.news-secondary-list .news-card:nth-child(2) { transition-delay: 100ms; }
.news-secondary-list .news-card:nth-child(3) { transition-delay: 200ms; }

/* --- Responsive : tablette = 2 colonnes / mobile = 1 colonne, carte principale en premier --- */
@media (max-width: 992px) {
  .news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .news-main { grid-column: 1 / -1; }

  .news-secondary-list {
    display: contents;
  }

  .news-card-link {
    flex-direction: column;
  }

  .news-card-media {
    width: 100%;
    height: 180px;
  }
}

@media (max-width: 640px) {
  .news-titre-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-main-body { padding: 24px; }

  .news-card-link {
    flex-direction: row;
    padding: 14px;
  }

  .news-card-media {
    width: 96px;
    height: auto;
    flex-basis: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-main-link,
  .news-card-link,
  .news-main-media img,
  .news-card-media img,
  .news-card-media-illustration svg,
  .news-cta,
  .news-card-more,
  .news-voir-tout {
    transition: none !important;
  }

  .news-main-link:hover,
  .news-card-link:hover {
    transform: none;
  }
}

/* ===========================================================
   PRÉCHARGEMENT (preloader) — affiché avant le rendu complet
   de la page, masqué proprement une fois le site prêt.
   =========================================================== */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--blanc);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.preloader-cache {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-contenu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.preloader-logo {
  width: 88px;
  height: 88px;
  animation: preloader-pulse 1.6s ease-in-out infinite;
}

@keyframes preloader-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: 0.75; }
}

.preloader-barre {
  width: 140px;
  height: 4px;
  background-color: var(--bordure);
  border-radius: 99px;
  overflow: hidden;
}

.preloader-barre span {
  display: block;
  width: 40%;
  height: 100%;
  background-color: var(--vert-minagri);
  border-radius: 99px;
  animation: preloader-glisse 1.3s ease-in-out infinite;
}

@keyframes preloader-glisse {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
  .preloader-logo { animation: none; }
  .preloader-barre span { animation: none; width: 100%; }
}
