/* ============================================
   FANAMBINA — Design system & UI global
   Association : Agence payeur • Ciblage • Prestataire de service
   ============================================ */

:root {
  /* Vert (dominant, éclairci) */
  --primary: #2a8f3a;
  --primary-light: #3ba84a;
  --primary-dark: #1e6b2a;
  --accent: #4CAF50;
  /* Couleurs de l'association (animations & accents) */
  --color-yellow: #F4D03F;
  --color-red: #E74C3C;
  --color-violet: #9B59B6;
  --secondary: #f0f7f0;
  --dark: #1a1a1a;
  --light: #f8faf8;
  --card-radius: 16px;
  --card-radius-sm: 12px;
  --card-shadow: 0 8px 32px rgba(42, 143, 58, 0.1);
  --card-shadow-hover: 0 20px 50px rgba(42, 143, 58, 0.18);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #333;
  line-height: 1.65;
  overflow-x: hidden;
  background-color: #fff;
}

/* ----- Navbar (Bootstrap compatible) ----- */
.navbar-fanambina {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
  padding: 0.75rem 0;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.navbar-fanambina.scrolled {
  padding: 0.5rem 0;
  background: rgba(42, 143, 58, 0.98) !important;
  backdrop-filter: blur(12px);
}

.navbar-fanambina .navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  color: white !important;
  font-size: 1.15rem;
}

.navbar-fanambina .navbar-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-right: 10px;
  border-radius: 8px;
}

.navbar-fanambina .navbar-toggler {
  border: none;
  padding: 0.5rem;
}

.navbar-fanambina .navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

.navbar-fanambina .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%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-fanambina .nav-link {
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  margin: 0 0.15rem;
  border-radius: 8px;
  transition: var(--transition);
}

.navbar-fanambina .nav-link:hover,
.navbar-fanambina .nav-link.active {
  color: white !important;
  background: rgba(255, 255, 255, 0.15);
}

/* ----- Hero ----- */
.hero-fanambina {
  min-height: 100vh;
  background: var(--primary-dark);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  color: white;
}

/* ----- Slider d'images en arrière-plan (hero) ----- */
.hero-bg-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
}

/* Chaque slide visible à son tour avec fondu (5 slides × 20%) */
.hero-bg-slide:nth-child(1) { animation: heroBgSlide1 25s ease-in-out infinite; }
.hero-bg-slide:nth-child(2) { animation: heroBgSlide2 25s ease-in-out infinite; }
.hero-bg-slide:nth-child(3) { animation: heroBgSlide3 25s ease-in-out infinite; }
.hero-bg-slide:nth-child(4) { animation: heroBgSlide4 25s ease-in-out infinite; }
.hero-bg-slide:nth-child(5) { animation: heroBgSlide5 25s ease-in-out infinite; }

@keyframes heroBgSlide1 {
  0%, 16% { opacity: 1; }
  20%, 100% { opacity: 0; }
}

@keyframes heroBgSlide2 {
  0%, 18% { opacity: 0; }
  20%, 36% { opacity: 1; }
  40%, 100% { opacity: 0; }
}

@keyframes heroBgSlide3 {
  0%, 38% { opacity: 0; }
  40%, 56% { opacity: 1; }
  60%, 100% { opacity: 0; }
}

@keyframes heroBgSlide4 {
  0%, 58% { opacity: 0; }
  60%, 76% { opacity: 1; }
  80%, 100% { opacity: 0; }
}

@keyframes heroBgSlide5 {
  0%, 78% { opacity: 0; }
  80%, 96% { opacity: 1; }
  100% { opacity: 0; }
}

/* Overlay vert léger pour lisibilité du texte (images bien visibles) */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg,
    rgba(30, 107, 42, 0.45) 0%,
    rgba(42, 143, 58, 0.4) 50%,
    rgba(59, 168, 74, 0.35) 100%);
  z-index: 0;
  pointer-events: none;
}

/* Légère lueur animée aux couleurs de l'association (vert, jaune, rouge, violet) */
.hero-fanambina::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg,
    transparent 0%,
    rgba(244, 208, 63, 0.04) 25%,
    transparent 50%,
    rgba(155, 89, 182, 0.04) 75%,
    transparent 100%);
  background-size: 400% 400%;
  animation: heroGlow 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-fanambina::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

.hero-fanambina .floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.hero-fanambina .shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
  filter: blur(50px);
  animation: floatShape 18s ease-in-out infinite;
}

/* Formes aux 4 couleurs de l'association (vert, jaune, rouge, violet) */
.hero-fanambina .shape-1 { width: 200px; height: 200px; background: var(--primary-light); top: 15%; left: 10%; animation-delay: 0s; }
.hero-fanambina .shape-2 { width: 280px; height: 280px; background: var(--color-yellow); top: 55%; left: 5%; animation-delay: 4s; animation-duration: 22s; }
.hero-fanambina .shape-3 { width: 120px; height: 120px; background: var(--color-red); top: 25%; right: 15%; animation-delay: 8s; animation-duration: 20s; }
.hero-fanambina .shape-4 { width: 180px; height: 180px; background: var(--color-violet); bottom: 20%; right: 8%; animation-delay: 2s; animation-duration: 25s; }

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.12; }
  33% { transform: translate(15px, -20px) scale(1.08); opacity: 0.18; }
  66% { transform: translate(-10px, 15px) scale(0.95); opacity: 0.1; }
}

.hero-fanambina .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-fanambina .hero-logo {
  width: 200px;
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.35));
}

.hero-fanambina .hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4), 0 4px 24px rgba(0,0,0,0.25);
  letter-spacing: -0.02em;
}

.hero-fanambina .hero-tagline {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 0.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35), 0 2px 16px rgba(0,0,0,0.2);
}

.hero-fanambina .hero-badges {
  margin-bottom: 1.5rem;
}

.hero-fanambina .hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.18);
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(6px);
  transition: var(--transition);
}

.hero-fanambina .hero-badge:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.5);
}

.hero-fanambina .btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  color: var(--primary);
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  border: 2px solid white;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.hero-fanambina .btn-hero-primary {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 10px 35px rgba(0,0,0,0.2);
}

.hero-fanambina .btn-hero:hover {
  background: transparent;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.hero-fanambina .btn-hero-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.8);
}

.hero-fanambina .btn-hero-outline:hover {
  background: white;
  color: var(--primary);
  border-color: white;
}

/* ----- Sections communes ----- */
.section-fanambina {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.section-fanambina.alt-bg {
  background: linear-gradient(180deg, #fff 0%, var(--secondary) 100%);
}

.section-fanambina .section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-fanambina .section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1.25rem;
  line-height: 1.2;
  position: relative;
  display: inline-block;
}

.section-fanambina .section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.section-fanambina .section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

.section-fanambina .section-subtitle {
  font-size: 1.15rem;
  color: #555;
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* ----- Cartes « Piliers » (3 actions) ----- */
.pillar-card {
  background: #fff;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(42, 143, 58, 0.12);
  position: relative;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--color-yellow), var(--color-red), var(--color-violet));
  background-size: 200% 100%;
  animation: pillarBar 6s linear infinite;
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
  z-index: 1;
}

@keyframes pillarBar {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

.pillar-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(42, 143, 58, 0.2);
}

.pillar-card:hover::before {
  transform: scaleX(1);
}

.pillar-card .pillar-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(42, 143, 58, 0.15) 0%, rgba(76, 175, 80, 0.12) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.pillar-card:hover .pillar-icon-wrap {
  background: linear-gradient(135deg, var(--primary), var(--color-yellow), var(--color-red), var(--color-violet));
  background-size: 300% 300%;
  animation: iconGlow 4s ease infinite;
  color: white;
  transform: scale(1.05);
}

@keyframes iconGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.pillar-card .pillar-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.pillar-card .pillar-desc {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.pillar-card .pillar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}

.pillar-card .pillar-link:hover {
  color: var(--primary-dark);
  gap: 0.6rem;
  border-bottom-color: var(--primary);
}

/* ----- Bloc Objectif / Mission ----- */
.objectif-block {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 4rem 2rem;
  border-radius: var(--card-radius);
  position: relative;
  overflow: hidden;
}

.objectif-block::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--color-yellow), var(--color-red), var(--color-violet));
  background-size: 300% 100%;
  animation: pillarBar 8s linear infinite;
  opacity: 0.9;
}

.objectif-block::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.objectif-block .section-title {
  color: white;
}

.objectif-block .section-title::after {
  background: rgba(255,255,255,0.85);
}

.objectif-block p {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 720px;
  margin: 0 auto;
}

/* ----- Zones d'intervention / Expérience ----- */
.experience-since {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.experience-since-inline {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  margin-bottom: 0.25rem;
}

.zones-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.zone-badge {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(42, 143, 58, 0.1);
  border: 1px solid rgba(42, 143, 58, 0.25);
  border-radius: 50px;
  transition: var(--transition);
}

.zone-badge:hover {
  background: rgba(42, 143, 58, 0.18);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.zones-block {
  padding: 1.25rem 1.5rem;
  background: var(--secondary);
  border-radius: var(--card-radius-sm);
  border-left: 4px solid var(--primary);
}

body.dark-mode .zone-badge {
  color: var(--primary-light);
  background: rgba(76, 175, 80, 0.15);
  border-color: rgba(76, 175, 80, 0.3);
}

body.dark-mode .zones-block {
  background: #2a2a2a;
}

/* ----- Contact band ----- */
.contact-band {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 4rem 0;
  position: relative;
}

.contact-band::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--color-yellow), var(--color-red), var(--color-violet));
  background-size: 300% 100%;
  animation: pillarBar 8s linear infinite;
}

.contact-band .contact-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.contact-band .contact-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contact-band .contact-icon {
  font-size: 1.1rem;
  opacity: 0.95;
  flex-shrink: 0;
}

.contact-band a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  transition: var(--transition);
}

.contact-band a:hover {
  color: white;
  text-decoration: underline;
}

/* ----- Footer ----- */
.footer-fanambina {
  background: #0d0d0d;
  color: rgba(255,255,255,0.8);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.95rem;
}

.footer-fanambina a {
  color: var(--accent);
  text-decoration: none;
}

.footer-fanambina a:hover {
  color: #6fcf72;
  text-decoration: underline;
}

.btn-about {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(42, 143, 58, 0.2);
  color: var(--accent) !important;
  border: 1px solid var(--accent);
  border-radius: 8px;
  text-decoration: none !important;
  transition: var(--transition);
  font-weight: 600;
}

.btn-about:hover {
  background: var(--accent);
  color: white !important;
  border-color: var(--accent);
}

/* ----- Boutons flottants ----- */
.btn-back-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(26, 95, 42, 0.4);
}

.btn-back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-back-top:hover {
  background: var(--primary-light);
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 28px rgba(26, 95, 42, 0.5);
}

.btn-dark-mode {
  position: fixed;
  bottom: 90px;
  right: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 999;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(26, 95, 42, 0.4);
}

.btn-dark-mode:hover {
  background: var(--dark);
  transform: rotate(15deg);
}

.btn-dark-mode .fa-sun { display: none; }
body.dark-mode .btn-dark-mode .fa-moon { display: none; }
body.dark-mode .btn-dark-mode .fa-sun { display: inline-block !important; }

/* ----- Animations au scroll ----- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ----- Page interne : en-tête ----- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 120px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M0 40L40 0H20L0 20M40 20V40H20'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.page-hero .page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  position: relative;
}

.page-hero .page-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto;
}

/* ----- Cartes contenu (pages internes) ----- */
.content-card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0,0,0,0.06);
  transition: var(--transition);
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.content-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(26, 95, 42, 0.12);
}

.content-card .content-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26, 95, 42, 0.1) 0%, rgba(76, 175, 80, 0.1) 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.content-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.content-card p {
  color: #555;
  font-size: 0.92rem;
  margin-bottom: 0;
  line-height: 1.6;
  flex-grow: 1;
}

/* ----- Dark mode ----- */
body.dark-mode {
  background: #121212;
  color: #e0e0e0;
}

body.dark-mode .section-fanambina.alt-bg {
  background: linear-gradient(180deg, #1a1a1a 0%, #222 100%);
}

body.dark-mode .section-title,
body.dark-mode .pillar-title,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3 {
  color: #fff;
}

body.dark-mode .pillar-card,
body.dark-mode .content-card {
  background: #252525;
  border-color: #333;
}

body.dark-mode .pillar-desc,
body.dark-mode .content-card p,
body.dark-mode .section-subtitle {
  color: #b0b0b0;
}

body.dark-mode .pillar-card:hover {
  border-color: rgba(76, 175, 80, 0.3);
}

/* ----- Page À propos : sections d'information ----- */

/* Carte principale pour les sections à propos */
.apropos-card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 2rem 1.75rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(42, 143, 58, 0.08);
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.apropos-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(42, 143, 58, 0.15);
}

/* En-tête de section avec icône */
.apropos-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--primary);
  gap: 1rem;
}

.apropos-header .content-icon {
  margin-bottom: 0;
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
}

.apropos-header h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  flex-grow: 1;
}

/* Liste d'informations */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.info-item {
  display: flex;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(42, 143, 58, 0.1);
  gap: 0.75rem;
  align-items: flex-start;
}

.info-item:first-child {
  padding-top: 0;
}

.info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  font-weight: 600;
  color: var(--primary);
  min-width: 220px;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.info-value {
  color: #555;
  flex: 1;
  min-width: 220px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.info-value a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.info-value a:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

/* Dark mode pour page à propos */
body.dark-mode .apropos-card {
  background: #252525;
  border-color: rgba(76, 175, 80, 0.15);
}

body.dark-mode .apropos-card:hover {
  border-color: rgba(76, 175, 80, 0.3);
}

body.dark-mode .apropos-header {
  border-bottom-color: var(--primary-light);
}

body.dark-mode .apropos-header h2 {
  color: var(--primary-light);
}

body.dark-mode .info-item {
  border-bottom-color: rgba(76, 175, 80, 0.15);
}

body.dark-mode .info-label {
  color: var(--primary-light);
}

body.dark-mode .info-value {
  color: #b0b0b0;
}

body.dark-mode .info-value a {
  color: var(--accent);
}

body.dark-mode .info-value a:hover {
  color: #6fcf72;
}

/* Responsive pour page à propos */
@media (max-width: 768px) {
  .apropos-card {
    padding: 1.5rem 1.25rem;
  }
  
  .apropos-header {
    flex-direction: row;
    gap: 0.75rem;
  }
  
  .apropos-header h2 {
    font-size: 1.15rem;
  }
  
  .info-label {
    min-width: 100%;
    font-size: 0.9rem;
  }
  
  .info-value {
    min-width: 100%;
    padding-left: 0;
    font-size: 0.9rem;
  }
  
  .info-item {
    padding: 0.75rem 0;
  }
}

/* ----- Utilitaires ----- */
.text-primary-fanambina { color: var(--primary) !important; }
.bg-light-fanambina { background: var(--secondary) !important; }

/* ----- Galerie d'images ----- */
.gallery-card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 0;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0,0,0,0.06);
  transition: var(--transition);
  height: 100%;
  overflow: hidden;
}

.gallery-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(26, 95, 42, 0.12);
  transform: translateY(-4px);
}

body.dark-mode .gallery-card {
  background: #252525;
  border-color: #333;
}

body.dark-mode .gallery-card:hover {
  border-color: rgba(76, 175, 80, 0.3);
}

/* ----- Galerie avec légendes ----- */
.gallery-card-with-caption {
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  height: 100%;
}

.gallery-card-with-caption:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-6px);
}

.gallery-card-with-caption .ratio {
  position: relative;
  overflow: hidden;
}

.gallery-card-with-caption img {
  transition: var(--transition);
}

.gallery-card-with-caption:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
  padding: 2.5rem 1.5rem 1.5rem;
  color: white;
  transform: translateY(0);
  transition: var(--transition);
}

.gallery-card-with-caption:hover .gallery-caption {
  background: linear-gradient(to top, rgba(42,143,58,0.95) 0%, rgba(42,143,58,0.75) 70%, transparent 100%);
}

.caption-icon {
  width: 45px;
  height: 45px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
  transition: var(--transition);
}

.gallery-card-with-caption:hover .caption-icon {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
  transform: scale(1.1);
}

.caption-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.caption-text {
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.95;
  line-height: 1.4;
}

/* ----- Bouton galerie amélioré ----- */
.btn-gallery {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  padding: 1.25rem 2rem;
  border-radius: 60px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 40px rgba(42, 143, 58, 0.3);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
}

.btn-gallery::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-gallery:hover::before {
  left: 100%;
}

.btn-gallery:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 50px rgba(42, 143, 58, 0.4);
  border-color: rgba(255,255,255,0.3);
  color: white;
}

.btn-gallery-icon {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.btn-gallery:hover .btn-gallery-icon {
  background: rgba(255,255,255,0.3);
  transform: rotate(15deg) scale(1.1);
}

.btn-gallery-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
}

.btn-gallery-main {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
}

.btn-gallery-sub {
  font-size: 0.85rem;
  font-weight: 400;
  opacity: 0.9;
  display: block;
}

.btn-gallery-arrow {
  font-size: 1.2rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-gallery:hover .btn-gallery-arrow {
  transform: translateX(5px);
}

body.dark-mode .gallery-card-with-caption {
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

body.dark-mode .gallery-card-with-caption:hover {
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
  .btn-gallery {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    text-align: center;
  }
  
  .btn-gallery-text {
    align-items: center;
    text-align: center;
  }
  
  .btn-gallery-arrow {
    display: none;
  }
  
  .caption-title {
    font-size: 1.1rem;
  }
  
  .caption-text {
    font-size: 0.85rem;
  }
}

/* ----- Images ----- */
.object-fit-cover { object-fit: cover; }

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .section-fanambina { padding: 3.5rem 0; }
  .pillar-card .pillar-icon-wrap { width: 60px; height: 60px; font-size: 1.5rem; }
  .page-hero { padding: 100px 0 50px; }
}
