/* ============================================================
   FM3A PORTAL — Design System
   Fiarahamonina Maintsy manana Amby Ampy sy Afaka
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ============================================================
   1. CSS VARIABLES / CHARTE GRAPHIQUE
   ============================================================ */
:root {
  /* Palette principale (extraite du logo FM3A) */
  --vert-foret:    #2D6A4F;   /* vert foncé des arbres */
  --vert-clair:    #52B788;   /* vert moyen feuillage */
  --vert-sauge:    #7FB285;   /* vert bleuté du fond logo */
  --vert-pale:     #D8F3DC;   /* vert très clair, fonds */
  --jaune-soleil:  #F4C430;   /* jaune du soleil */
  --jaune-clair:   #FFF3B0;   /* fond jaune pâle */
  --brun-terre:    #6B4226;   /* brun silhouettes */
  --brun-clair:    #C9A87C;   /* brun clair, accents */
  --gris-bleu:     #5C7A72;   /* fond logo (bleu-gris) */
  --blanc:         #FFFFFF;
  --creme:         #F9F6F0;   /* fond général */
  --texte-fonce:   #1B2E25;   /* texte principal */
  --texte-moyen:   #4A6358;   /* texte secondaire */
  --texte-clair:   #8BA898;   /* texte désactivé */
  --bordure:       #C8DDD5;   /* bordures légères */
  --ombre:         rgba(45,106,79,0.12);

  /* Composantes — couleurs distinctives */
  --comp1: #2D6A4F;   /* Obj1 Sécurité alimentaire — vert forêt */
  --comp2: #E09F3E;   /* Obj2 Revenus — or */
  --comp3: #40916C;   /* Obj3 Environnement — vert moyen */
  --comp4: #9B5DE5;   /* Obj4 Capacités — violet */
  --comp5: #4895EF;   /* Obj5 Gestion FTA — bleu */

  /* Thématiques transversales */
  --theme-irrigation:   #0096C7;
  --theme-agroeco:      #52B788;
  --theme-capacites:    #F4A261;
  --theme-localisation: #E76F51;
  --theme-digital:      #6A4C93;

  /* Régions — 7 couleurs distinctes */
  --region1: #264653;
  --region2: #2A9D8F;
  --region3: #8AB17D;
  --region4: #E9C46A;
  --region5: #F4A261;
  --region6: #E76F51;
  --region7: #A8DADC;

  /* Typographie */
  --font-titre:  'Playfair Display', Georgia, serif;
  --font-corps:  'Source Sans 3', 'Helvetica Neue', sans-serif;

  /* Tailles */
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-md:   1.125rem;
  --fs-lg:   1.375rem;
  --fs-xl:   1.75rem;
  --fs-2xl:  2.25rem;
  --fs-3xl:  3rem;
  --fs-4xl:  3.75rem;

  /* Espacements */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;

  /* Rayons */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  /* Transitions */
  --trans-fast: 0.15s ease;
  --trans-med:  0.3s ease;
  --trans-slow: 0.5s ease;

  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(45,106,79,0.08), 0 1px 2px rgba(45,106,79,0.06);
  --shadow-md: 0 4px 12px rgba(45,106,79,0.12), 0 2px 4px rgba(45,106,79,0.08);
  --shadow-lg: 0 8px 32px rgba(45,106,79,0.18), 0 4px 8px rgba(45,106,79,0.1);
  --shadow-xl: 0 20px 60px rgba(45,106,79,0.22);
}

/* ============================================================
   2. RESET ET BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-corps);
  font-size: var(--fs-base);
  color: var(--texte-fonce);
  background-color: var(--creme);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--vert-foret); text-decoration: none; transition: color var(--trans-fast); }
a:hover { color: var(--vert-clair); }
ul { list-style: none; }

/* ============================================================
   3. TYPOGRAPHIE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titre);
  color: var(--texte-fonce);
  line-height: 1.25;
  font-weight: 700;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p { margin-bottom: var(--sp-md); color: var(--texte-moyen); }

.text-sm  { font-size: var(--fs-sm); }
.text-md  { font-size: var(--fs-md); }
.text-lg  { font-size: var(--fs-lg); }
.text-xl  { font-size: var(--fs-xl); }
.text-center { text-align: center; }
.text-white { color: var(--blanc) !important; }
.text-vert  { color: var(--vert-foret); }
.text-jaune { color: var(--jaune-soleil); }
.font-bold  { font-weight: 700; }
.font-titre { font-family: var(--font-titre); }

/* Titres de section */
.section-label {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--vert-clair);
  background: var(--vert-pale);
  padding: 0.3em 1em;
  border-radius: var(--r-full);
  margin-bottom: var(--sp-md);
}

.section-title {
  font-family: var(--font-titre);
  font-size: var(--fs-2xl);
  color: var(--texte-fonce);
  margin-bottom: var(--sp-md);
}
.section-title span { color: var(--vert-foret); }

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--texte-moyen);
  max-width: 640px;
  margin: 0 auto var(--sp-2xl);
  line-height: 1.7;
}

/* ============================================================
   4. LAYOUT — CONTENEURS
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}
.container-wide {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}
.container-narrow {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.section { padding: var(--sp-4xl) 0; }
.section-sm { padding: var(--sp-3xl) 0; }

/* Grilles */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-xl); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-xl); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg); }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-lg); }

/* Flex utilitaires */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: var(--sp-md); }
.flex-wrap { flex-wrap: wrap; }

/* ============================================================
   5. HEADER & NAVIGATION
   ============================================================ */

/* Barre de bienvenue supérieure */
.topbar {
  background: var(--vert-foret);
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-xs);
  padding: 0.45rem 0;
  letter-spacing: 0.02em;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: rgba(255,255,255,0.8); font-size: var(--fs-xs); }
.topbar a:hover { color: var(--jaune-soleil); }
.topbar-left { display: flex; gap: var(--sp-lg); align-items: center; }
.topbar-right { display: flex; gap: var(--sp-md); align-items: center; }
.topbar-lang { display: flex; gap: var(--sp-sm); }
.topbar-lang a {
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.8);
  font-size: var(--fs-xs);
  transition: all var(--trans-fast);
}
.topbar-lang a.active,
.topbar-lang a:hover {
  background: var(--jaune-soleil);
  border-color: var(--jaune-soleil);
  color: var(--texte-fonce);
}

/* Header principal */
#header {
  background: var(--blanc);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--trans-med);
}
#header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--sp-lg);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: contain;
}
.logo-text { line-height: 1.2; }
.logo-text .nom {
  font-family: var(--font-titre);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--vert-foret);
  display: block;
}
.logo-text .tagline {
  font-size: var(--fs-xs);
  color: var(--texte-clair);
  letter-spacing: 0.04em;
  display: block;
}

/* Navigation principale */
.nav-principal { display: flex; align-items: center; gap: 0; }
.nav-principal > li { position: relative; }
.nav-principal > li > a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.9rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--texte-fonce);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color var(--trans-fast);
  border-bottom: 3px solid transparent;
  height: 72px;
}
.nav-principal > li > a:hover,
.nav-principal > li > a.active {
  color: var(--vert-foret);
  border-bottom-color: var(--vert-foret);
}
.nav-arrow {
  font-size: 0.6rem;
  transition: transform var(--trans-fast);
  color: var(--texte-clair);
}
.nav-principal > li:hover .nav-arrow { transform: rotate(180deg); }

/* Mega-menu / sous-menu */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--blanc);
  border-top: 3px solid var(--vert-foret);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--trans-med);
  z-index: 100;
  padding: var(--sp-sm) 0;
}
.nav-principal > li:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: var(--fs-sm);
  color: var(--texte-moyen);
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--trans-fast);
}
.submenu a:hover {
  background: var(--vert-pale);
  color: var(--vert-foret);
  border-left-color: var(--vert-foret);
}

/* Hamburger mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-sm);
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--texte-fonce);
  border-radius: 2px;
  transition: all var(--trans-med);
}

/* ============================================================
   6. BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
  background: var(--vert-pale);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--bordure);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--fs-xs);
  color: var(--texte-clair);
  flex-wrap: wrap;
  list-style: none;        /* Supprimer numérotation OL */
  counter-reset: none;     /* Pas de compteur */
  padding: 0;
  margin: 0;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;        /* Forcer suppression sur chaque li */
}
.breadcrumb li::before { content: none; } /* Annuler tout pseudo-élément */
.breadcrumb li::marker { content: none; } /* Annuler marker navigateur */
.breadcrumb a { color: var(--vert-foret); font-weight: 500; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { color: var(--texte-clair); font-size: 0.75rem; margin: 0 0.1rem; user-select: none; }
.breadcrumb-current { color: var(--texte-moyen); font-weight: 600; }

/* ============================================================
   7. HERO SLIDER
   ============================================================ */
.hero {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: var(--vert-foret);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
  /* Rendre l'image plus vive et lumineuse */
  filter: brightness(1.08) saturate(1.25) contrast(1.05);
}
.hero-slide.active { opacity: 1; }

/* Overlay dégradé — réduit pour laisser l'image plus visible et brillante */
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(27,46,37,0.62) 0%,
    rgba(27,46,37,0.28) 55%,
    rgba(27,46,37,0.05) 100%
  );
}

/* Fallback si pas d'image */
.hero-slide:not([style*="background-image"]) {
  background: linear-gradient(135deg, var(--vert-foret) 0%, var(--gris-bleu) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  /* Décaler le contenu vers le haut pour qu'il ne soit pas caché par la barre stats (≈110px) */
  padding-bottom: 110px;
}
.hero-text { max-width: 600px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  background: rgba(244,196,48,0.2);
  border: 1px solid rgba(244,196,48,0.5);
  color: var(--jaune-soleil);
  padding: 0.35rem 1rem;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-lg);
}
.hero-title {
  font-family: var(--font-titre);
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--blanc);
  line-height: 1.15;
  margin-bottom: var(--sp-lg);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hero-title em {
  font-style: normal;
  color: var(--jaune-soleil);
}
.hero-desc {
  font-size: var(--fs-md);
  color: rgba(255,255,255,0.88);
  margin-bottom: var(--sp-xl);
  line-height: 1.7;
  max-width: 500px;
}
.hero-actions { display: flex; gap: var(--sp-md); flex-wrap: wrap; }

/* Indicateurs hero (chiffres clés) */
.hero-stats {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: rgba(27,46,37,0.85);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stats-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  divide-x: 1px solid rgba(255,255,255,0.1);
}
.hero-stat {
  padding: var(--sp-lg) var(--sp-xl);
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.12);
  transition: background var(--trans-fast);
}
.hero-stat:last-child { border-right: none; }
.hero-stat:hover { background: rgba(82,183,136,0.15); }
.hero-stat-val {
  font-family: var(--font-titre);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--jaune-soleil);
  display: block;
  line-height: 1;
  margin-bottom: 0.2rem;
}
.hero-stat-label {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

/* Contrôles slider */
.hero-controls {
  position: absolute;
  bottom: 125px;  /* au-dessus de la barre stats */
  right: var(--sp-2xl);
  z-index: 4;
  display: flex;
  gap: var(--sp-sm);
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all var(--trans-med);
  border: none;
}
.hero-dot.active {
  background: var(--jaune-soleil);
  width: 24px;
  border-radius: var(--r-full);
}

/* ============================================================
   8. BOUTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.75rem 1.75rem;
  border-radius: var(--r-full);
  font-family: var(--font-corps);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--trans-med);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--vert-foret);
  color: var(--blanc);
  border-color: var(--vert-foret);
}
.btn-primary:hover {
  background: #1e4d38;
  border-color: #1e4d38;
  color: var(--blanc);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,106,79,0.4);
}
.btn-outline-white {
  background: transparent;
  color: var(--blanc);
  border-color: rgba(255,255,255,0.6);
}
.btn-outline-white:hover {
  background: var(--blanc);
  color: var(--vert-foret);
  border-color: var(--blanc);
  transform: translateY(-2px);
}
.btn-gold {
  background: var(--jaune-soleil);
  color: var(--texte-fonce);
  border-color: var(--jaune-soleil);
}
.btn-gold:hover {
  background: #e0b020;
  border-color: #e0b020;
  color: var(--texte-fonce);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244,196,48,0.4);
}
.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: var(--fs-xs);
}
.btn-lg {
  padding: 1rem 2.25rem;
  font-size: var(--fs-base);
}
.btn-icon-after::after { content: '→'; }

/* ============================================================
   9. CARTES / CARDS
   ============================================================ */
.card {
  background: var(--blanc);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-med);
  border: 1px solid var(--bordure);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.card-body { padding: var(--sp-lg); }
.card-body-lg { padding: var(--sp-xl); }

.card-meta {
  display: flex;
  gap: var(--sp-sm);
  align-items: center;
  margin-bottom: var(--sp-sm);
  flex-wrap: wrap;
}
.card-tag {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-full);
  background: var(--vert-pale);
  color: var(--vert-foret);
}
.card-date {
  font-size: var(--fs-xs);
  color: var(--texte-clair);
}
.card-title {
  font-family: var(--font-titre);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--texte-fonce);
  margin-bottom: var(--sp-sm);
  line-height: 1.3;
  transition: color var(--trans-fast);
}
.card:hover .card-title { color: var(--vert-foret); }
.card-excerpt {
  font-size: var(--fs-sm);
  color: var(--texte-moyen);
  line-height: 1.65;
  margin-bottom: var(--sp-md);
}
.card-footer {
  padding: var(--sp-md) var(--sp-lg);
  border-top: 1px solid var(--bordure);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.read-more {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--vert-foret);
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  transition: gap var(--trans-fast);
}
.read-more:hover { gap: var(--sp-sm); color: var(--vert-foret); }
.read-more::after { content: '→'; }

/* Card composante/objectif */
.card-composante {
  background: var(--blanc);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--bordure);
  border-top: 4px solid var(--accent-color, var(--vert-foret));
  transition: all var(--trans-med);
  cursor: pointer;
}
.card-composante:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.comp-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--sp-lg);
  background: var(--icon-bg, var(--vert-pale));
}
.comp-num {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--texte-clair);
  margin-bottom: var(--sp-xs);
}
.comp-titre {
  font-family: var(--font-titre);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--texte-fonce);
  margin-bottom: var(--sp-sm);
  line-height: 1.3;
}
.comp-desc {
  font-size: var(--fs-sm);
  color: var(--texte-moyen);
  line-height: 1.6;
  margin-bottom: var(--sp-lg);
}
.comp-progress {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--texte-clair);
}
.progress-bar {
  height: 6px;
  background: var(--vert-pale);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent-color, var(--vert-foret));
  border-radius: var(--r-full);
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* ============================================================
   10. SECTION CHIFFRES CLÉS
   ============================================================ */
.stats-section {
  background: linear-gradient(135deg, var(--vert-foret) 0%, var(--gris-bleu) 100%);
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.stat-card {
  text-align: center;
  padding: var(--sp-xl);
  color: var(--blanc);
  position: relative;
}
.stat-card::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,0.15);
}
.stat-card:last-child::after { display: none; }
.stat-number {
  font-family: var(--font-titre);
  font-size: 3rem;
  font-weight: 700;
  color: var(--jaune-soleil);
  line-height: 1;
  margin-bottom: var(--sp-sm);
}
.stat-unit {
  font-size: 1.5rem;
  color: var(--jaune-soleil);
}
.stat-label {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.stat-icon {
  font-size: 1.75rem;
  margin-bottom: var(--sp-sm);
  display: block;
}

/* ============================================================
   11. SECTION CARTE MINIATURE (ACCUEIL)
   ============================================================ */
.map-preview-section { background: var(--creme); }
#map-home {
  height: 450px;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

/* ============================================================
   12. SECTION TÉMOIGNAGES
   ============================================================ */
.temoignage-card {
  background: var(--blanc);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--bordure);
  position: relative;
}
.temoignage-card::before {
  content: '"';
  font-family: var(--font-titre);
  font-size: 5rem;
  color: var(--vert-pale);
  position: absolute;
  top: 0.5rem; left: 1.2rem;
  line-height: 1;
}
.temoignage-text {
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--texte-moyen);
  line-height: 1.75;
  margin-bottom: var(--sp-lg);
  position: relative;
  z-index: 1;
}
.temoignage-author {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
}
.author-photo {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--vert-clair);
}
.author-photo-placeholder {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--vert-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.author-name {
  font-weight: 700;
  color: var(--texte-fonce);
  font-size: var(--fs-sm);
}
.author-lieu {
  font-size: var(--fs-xs);
  color: var(--texte-clair);
}

/* ============================================================
   13. THÉMATIQUES TRANSVERSALES (BADGES)
   ============================================================ */
.thematique-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.5rem 1rem;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-med);
  border: 2px solid transparent;
}
.thematique-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.theme-irrigation   { background: #E0F4FA; color: var(--theme-irrigation); }
.theme-agroeco      { background: #A8D8B8; color: #0F4A28; font-weight:700; }
.theme-capacites    { background: #FEF3E4; color: var(--theme-capacites); }
.theme-localisation { background: #FEE8E3; color: var(--theme-localisation); }
.theme-digital      { background: #F0EBFA; color: var(--theme-digital); }

.thematique-badge:hover.theme-irrigation   { background: var(--theme-irrigation); color: white; }
.thematique-badge:hover.theme-agroeco      { background: #1A6B3C; color: white; }
.thematique-badge:hover.theme-capacites    { background: var(--theme-capacites); color: white; }
.thematique-badge:hover.theme-localisation { background: var(--theme-localisation); color: white; }
.thematique-badge:hover.theme-digital      { background: var(--theme-digital); color: white; }

/* ============================================================
   14. LEÇONS APPRISES
   ============================================================ */
.lecon-card {
  background: var(--blanc);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  border-left: 4px solid var(--vert-foret);
  box-shadow: var(--shadow-sm);
  transition: all var(--trans-med);
}
.lecon-card:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--jaune-soleil);
  transform: translateX(4px);
}
.lecon-icon { font-size: 1.5rem; margin-bottom: var(--sp-sm); }
.lecon-titre {
  font-family: var(--font-titre);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--texte-fonce);
  margin-bottom: var(--sp-sm);
}
.lecon-resume { font-size: var(--fs-sm); color: var(--texte-moyen); line-height: 1.6; }

/* ============================================================
   15. REGIONS & CARTE
   ============================================================ */
.region-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-full);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--blanc);
  cursor: pointer;
  transition: all var(--trans-med);
}
.region-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); opacity: 0.9; }

/* ============================================================
   16. NEWSLETTER FOOTER
   ============================================================ */
.newsletter-section {
  background: linear-gradient(135deg, var(--vert-foret) 0%, #1a3d2b 100%);
  padding: var(--sp-3xl) 0;
}
.newsletter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3xl);
  align-items: center;
}
.newsletter-text h3 {
  font-family: var(--font-titre);
  font-size: var(--fs-2xl);
  color: var(--blanc);
  margin-bottom: var(--sp-sm);
}
.newsletter-text p { color: rgba(255,255,255,0.75); margin: 0; }
.newsletter-form { display: flex; gap: var(--sp-sm); }
.newsletter-input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: var(--r-full);
  font-family: var(--font-corps);
  font-size: var(--fs-sm);
  background: rgba(255,255,255,0.12);
  color: var(--blanc);
  outline: none;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all var(--trans-fast);
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-input:focus {
  background: rgba(255,255,255,0.2);
  border-color: var(--jaune-soleil);
}

/* ============================================================
   17. FOOTER PRINCIPAL
   ============================================================ */
footer {
  background: var(--texte-fonce);
  color: rgba(255,255,255,0.75);
  padding: var(--sp-4xl) 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-3xl);
  margin-bottom: var(--sp-3xl);
}
.footer-brand .logo-img { margin-bottom: var(--sp-md); /* Pas de filtre : logo naturel sur fond sombre */ }
.footer-brand .logo-text .nom { color: var(--blanc); }
.footer-brand .logo-text .tagline { color: rgba(255,255,255,0.5); }
.footer-about {
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-top: var(--sp-md);
  color: rgba(255,255,255,0.65);
}
.footer-col h4 {
  font-family: var(--font-corps);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blanc);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.65);
  transition: color var(--trans-fast);
}
.footer-links a:hover { color: var(--jaune-soleil); }
.footer-social { display: flex; gap: var(--sp-sm); margin-top: var(--sp-lg); }
.social-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.7);
  transition: all var(--trans-fast);
}
.social-btn:hover { background: var(--vert-clair); color: var(--blanc); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--sp-lg) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: var(--sp-md);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--jaune-soleil); }

/* ============================================================
   18. UTILITAIRES DIVERS
   ============================================================ */
.bg-creme   { background: var(--creme); }
.bg-blanc   { background: var(--blanc); }
.bg-vert    { background: var(--vert-foret); }
.bg-pale    { background: var(--vert-pale); }

.divider {
  height: 1px;
  background: var(--bordure);
  margin: var(--sp-3xl) 0;
}
.divider-vert {
  height: 3px;
  background: linear-gradient(90deg, var(--vert-foret), var(--vert-clair), transparent);
  width: 80px;
  border-radius: var(--r-full);
  margin: var(--sp-md) 0 var(--sp-xl);
}

/* Section avec fond décoratif */
.section-decorated {
  position: relative;
  overflow: hidden;
}
.section-decorated::before {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: var(--vert-pale);
  opacity: 0.5;
}

/* Loader animé */
.loader-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2xl);
}
.loader-dots span {
  width: 8px; height: 8px;
  background: var(--vert-foret);
  border-radius: 50%;
  animation: bounce 1.2s infinite;
}
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1.2); opacity: 1; }
}

/* Badge "Nouveau" */
.badge-new {
  background: var(--jaune-soleil);
  color: var(--texte-fonce);
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: var(--sp-xs);
}

/* Indicateur de période */
.periode-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  background: var(--vert-pale);
  color: var(--vert-foret);
  border: 1px solid var(--vert-clair);
}

/* Alertes/messages */
.alert {
  padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-md);
  font-size: var(--fs-sm);
  display: flex;
  gap: var(--sp-md);
  align-items: flex-start;
}
.alert-success { background: var(--vert-pale); color: var(--vert-foret); border: 1px solid var(--vert-clair); }
.alert-error   { background: #FEE8E3; color: #C0392B; border: 1px solid #E74C3C; }
.alert-info    { background: #E0F4FA; color: #0077A8; border: 1px solid #0096C7; }

/* Scroll to top */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  background: var(--vert-foret);
  color: var(--blanc);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--trans-med);
  z-index: 99;
  border: none;
  font-size: 1rem;
  text-decoration: none;
}
#scroll-top.visible { opacity: 1; transform: translateY(0); }
#scroll-top:hover { background: var(--vert-clair); transform: translateY(-3px); }

/* ============================================================
   19. ANIMATIONS D'ENTRÉE
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   20. RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-xl); }
  .hero-stats-inner { grid-template-columns: repeat(3, 1fr); }
  .hero-stat:nth-child(3)::after { display: none; }
  .hero-stat:nth-child(4), .hero-stat:nth-child(5) { border-top: 1px solid rgba(255,255,255,0.12); }
}

@media (max-width: 900px) {
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  .hero { height: 480px; }
  .hero-title { font-size: 2.4rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .newsletter-inner { grid-template-columns: 1fr; gap: var(--sp-xl); }
}

@media (max-width: 768px) {
  .container { padding: 0 var(--sp-lg); }
  .nav-principal { display: none; }
  .nav-toggle { display: flex; }
  .nav-principal.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--blanc);
    z-index: 9999;
    padding: 5rem var(--sp-xl) var(--sp-xl);
    overflow-y: auto;
    gap: 0;
  }
  .nav-principal.open > li > a { height: auto; padding: var(--sp-md) 0; border-bottom: 1px solid var(--bordure); font-size: var(--fs-base); }
  .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: var(--vert-pale); border-radius: var(--r-md); margin-top: var(--sp-sm); }
  .topbar-left { display: none; }
  .hero-stats-inner { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2)::after { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { height: 420px; }
  .hero-title { font-size: var(--fs-2xl); }
  .hero-stats-inner { grid-template-columns: 1fr 1fr; }
  .hero-stat { padding: var(--sp-md); }
  .hero-stat-val { font-size: 1.4rem; }
  h2 { font-size: var(--fs-xl); }
  .section { padding: var(--sp-3xl) 0; }
  .hero-content { padding-bottom: 130px; } /* stats plus hautes sur mobile */
}

/* ============================================================
   21. BANNIÈRE DE PAGES INTERNES
   ============================================================ */
/* Usage : <div class="page-banner"> sur les pages À propos, Acteurs, etc. */
.page-banner {
  position: relative;
  height: 220px;   /* Hauteur réduite vs hero (580px) */
  overflow: hidden;
  background: var(--vert-foret);
}
.page-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  display: block;
}
.page-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(27,46,37,0.82) 40%, transparent 100%);
}
.page-banner h1 {
  font-family: var(--font-titre);
  font-size: var(--fs-2xl);
  color: #fff;
  margin-top: var(--sp-sm);
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ============================================================
   22. CARTE LEAFLET — styles popup et tooltip
   ============================================================ */
.leaflet-popup-content-wrapper {
  border-radius: var(--r-md) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: var(--font-corps) !important;
}
.leaflet-popup-tip { background: #fff !important; }
.fm3a-popup-titre {
  font-family: var(--font-titre);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.fm3a-popup-meta {
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 0.5rem;
}
.fm3a-popup-photo {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  display: block;
}
.fm3a-popup-lien {
  font-size: 0.8rem;
  color: var(--vert-foret, #2D6A4F);
  font-weight: 600;
  text-decoration: none;
}
.fm3a-popup-lien:hover { text-decoration: underline; }
.leaflet-region-tooltip {
  background: rgba(27,46,37,0.9) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  padding: 3px 8px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}
.leaflet-region-tooltip::before {
  border-top-color: rgba(27,46,37,0.9) !important;
}

/* Grille témoignages accueil — 3 colonnes, 2 sur tablette, 1 sur mobile */
.temoignages-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .temoignages-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .temoignages-grid { grid-template-columns: 1fr; } }
