/* ============================================================
   THEME PROCIT — FOND CLAIR INSPIRÉ DU LOGO
   Vert (feuilles), Brun (tronc), Ruban vert "PROACTIF CITOYENS"
   ============================================================ */

:root {
  /* Couleurs identitaires */
  --leaf-dark: #0b4d16;    /* vert foncé du logo */
  --leaf-mid:  #1f7a34;    /* vert moyen du logo */
  --leaf-soft: #cde7d4;    /* vert clair feuille */
  --trunk:     #8b4a1f;    /* brun tronc */
  --ribbon:    #0f6c2c;    /* ruban vert */
  --accent:    #f0c55b;    /* jaune doux fruit */

  /* Fond du site */
  --bg-main:   #f4f7f3;    
  --bg-section:#eef5ee;    
  --bg-card:   #ffffff;    

  /* Textes */
  --text-main:  #1c1f1c;
  --text-muted: #6c746d;

  /* Divers */
  --border-soft: rgba(0, 0, 0, 0.08);
  --radius-xl: 1.5rem;
  --transition: 0.25s ease;
}

/* RESET */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  background: radial-gradient(circle at top, #e1f0e3 0, var(--bg-main) 55%);
  color: var(--text-main);
  overflow-x: hidden;
}

/* LINKS */
a {
  text-decoration: none;
  color: inherit;
  transition: 0.2s;
}

.page-wrap {
  margin-top: 80px;
}

/* ============================================================
   NAVBAR GLASS CLAIRE
   ============================================================ */

.nav-glass {
  background: linear-gradient(
      120deg,
      rgba(15, 108, 44, 0.08),
      rgba(255, 255, 255, 0.85)
    );
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(12, 52, 24, 0.12);
  transition: var(--transition);
}

.nav-solid {
  background: #ffffff !important;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08) !important;
}

/* FIX NAV TEXT ON LIGHT BACKGROUND */
.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
  color: var(--leaf-dark) !important;
  font-weight: 600;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: var(--leaf-mid) !important;
}

.logo-brand {
  height: 42px;
}

/* ============================================================
   HERO — VIDEO BACKGROUND + OVERLAY FEUILLES CLAIRES
   ============================================================ */

.hero-viewport {
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-viewport video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) brightness(0.95);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(205, 231, 212, 0.85), transparent 50%),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.9), var(--bg-main) 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* HERO TEXTES */
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-soft);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--leaf-dark);
}

.hero-title {
  font-size: clamp(2.5rem, 3vw + 1.6rem, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  margin-top: 0.9rem;
}

.hero-title span {
  color: var(--leaf-mid);
  font-weight: 800;
}

.hero-subtitle {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.9rem;
}

/* CTA HERO */
.hero-cta {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn-cta-primary,
.btn-cta-ghost {
  border-radius: 999px;
  padding: 0.75rem 1.6rem;
  font-weight: 600;
  font-size: 0.92rem;
  border-width: 1px;
}

.btn-cta-primary {
  background: linear-gradient(135deg, var(--ribbon), var(--leaf-mid));
  border-color: rgba(12, 84, 36, 0.12);
  color: white;
  box-shadow: 0 12px 30px rgba(12, 84, 36, 0.35);
}

.btn-cta-primary:hover {
  filter: brightness(1.05);
}

.btn-cta-ghost {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-soft);
  color: var(--leaf-dark);
}

.btn-cta-ghost:hover {
  background: #ffffff;
}

/* HERO METRICS */
.hero-metrics {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

.hero-metric h3 {
  margin: 0;
  font-weight: 800;
  color: var(--leaf-dark);
}

.hero-metric span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* ============================================================
   SECTIONS
   ============================================================ */

.section {
  padding: 4rem 0;
  background: var(--bg-main);
}

.section-alt {
  background: var(--bg-section);
  border-top: 1px solid rgba(12, 52, 24, 0.06);
  border-bottom: 1px solid rgba(12, 52, 24, 0.06);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--leaf-dark);
  margin-bottom: 0.7rem;
}

.section-intro {
  max-width: 620px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================================
   CARDS (PMA, JMW, ESPACE MDGC)
   ============================================================ */

.card-neo {
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.card-neo:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.card-neo-body {
  padding: 1.6rem 1.7rem;
}

.card-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.card-title {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--leaf-dark);
}

.card-text {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ============================================================
   PILIERS SOCIAUX (JEUNESSE, FEMMES, PAUVRES, MISSION)
   ============================================================ */

.pillar-item {
  background: #f8fbf8;
  border-radius: 1.2rem;
  border: 1px solid rgba(15, 81, 36, 0.12);
  padding: 1rem 1.2rem;
}

.pillar-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--leaf-dark);
  margin-bottom: 0.4rem;
}

.pillar-item .small {
  color: var(--text-muted);
}

/* ============================================================
   SHOP CARDS (PMA & JMW)
   ============================================================ */

.shop-card-img {
  height: 190px;
  width: 100%;
  object-fit: cover;
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}

.shop-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: #edf7f0;
  color: var(--leaf-dark);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer-gradient {
  background: #f0f5f0;
  border-top: 1px solid rgba(12, 52, 24, 0.12);
  padding: 2rem 0 2.2rem;
}

/* FIX FOOTER TEXT */
.footer-gradient,
.footer-gradient h5,
.footer-gradient h6,
.footer-gradient p,
.footer-gradient a,
.footer-gradient small {
  color: var(--leaf-dark) !important;
}

/* ============================================================
   UTILITAIRES
   ============================================================ */

.text-soft {
  color: var(--text-muted) !important;
}

/* ============================================================
   RESPONSIVE (EXISTANT)
   ============================================================ */

@media (max-width: 991.98px) {
  .hero-viewport {
    text-align: center;
  }
  .hero-metrics {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .logo-brand {
    height: 36px;
  }
}

/* NAV MOBILE : fond blanc + ombre pour le menu déroulant */
@media (max-width: 991.98px) {
  #navMenu {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    padding: 0.75rem 1rem;
  }

  #navMenu .nav-link {
    padding: 0.35rem 0;
  }
}

/* Toggler plus visible sur fond clair */
.navbar-toggler {
  border-color: rgba(0, 0, 0, 0.35);
}

.navbar-toggler-icon {
  filter: invert(25%);
}

/* Galerie activités sociales */
.gallery-card {
  border-radius: 1rem;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.09);
}

/* --- ADMIN TOPBAR --- */
.admin-topbar {
  background: linear-gradient(135deg, #1d2671 0%, #4a00e0 40%, #0f766e 100%);
  color: #fff;
}

.admin-logo-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.admin-brand-title {
  letter-spacing: .04em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.admin-brand-subtitle {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
}

/* Liens nav admin desktop */
.admin-main-nav .admin-nav-link {
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  transition: background .2s, color .2s, transform .15s;
}

.admin-main-nav .admin-nav-link:hover {
  background: rgba(255,255,255,0.16);
  color: #fff;
  transform: translateY(-1px);
}

.admin-main-nav .admin-nav-link.active {
  background: rgba(255,255,255,0.24);
  color: #fff;
}

/* Avatar admin */
.admin-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

/* Liens nav mobile */
.admin-nav-link-mobile {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  background: rgba(15,23,42,0.06);
}

.admin-nav-link-mobile:hover {
  background: rgba(15,23,42,0.12);
  color: #fff;
}

/* Main wrapper admin */
main.container-fluid {
  max-width: 1400px;
}

/* ============================================================
   AJUSTEMENTS iPAD (TES 3 POINTS)
   ============================================================ */

/* 1) iPad PORTRAIT : moins d’espace dans le hero
   - on enlève le min-height plein écran
   - le contenu est collé plus haut
*/
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .hero-viewport {
    min-height: auto;
    padding: 3rem 0 2.5rem;          /* moins de marge haut/bas */
    align-items: flex-start;         /* contenu en haut */
  }

  .hero-content {
    padding-top: 1rem;
  }

  .hero-metrics {
    margin-top: 1.5rem;
  }
}

/* 2) iPad PAYSAGE : moins de vide à droite + hero un peu plus compact
   et 3) menu sur une seule ligne
*/
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {

  /* HERO : texte plus compact */
  .hero-viewport {
    min-height: auto;
    padding: 3rem 0 2.5rem;
  }

  .hero-content .row {
    align-items: flex-start !important;
  }

  .hero-title {
    font-size: clamp(2.2rem, 2.4vw + 1.2rem, 3.1rem);
    line-height: 1.05;
  }

  /* NAVBAR : tout tenir sur une seule ligne */
  #mainNav .navbar-brand {
    font-size: 0.95rem;
  }

  .logo-brand {
    height: 36px;
  }

  #mainNav .navbar-nav {
    gap: 0.1rem;
  }

  #mainNav .navbar-nav .nav-link {
    font-size: 0.9rem;
    padding: 0.35rem 0.45rem;
  }
}


/* --- iPad PORTRAIT : réduire les espaces haut/bas du hero --- */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .hero-viewport {
    /* on enlève le "plein écran" */
    min-height: auto;
    /* on resserre le bloc */
    padding: 2.5rem 0 2rem;
    align-items: flex-start; /* contenu collé vers le haut */
  }

  .hero-content {
    padding-top: 1.5rem; /* petit décalage sous la navbar */
  }
}

/* --- iPad / petits laptops en LANDSCAPE : moins de vide à droite --- */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {
  .hero-viewport {
    min-height: calc(100vh - 90px); /* un peu moins haut que avant */
    padding: 2.5rem 0 2rem;
  }

  .hero-title {
    /* titre un peu plus petit pour réduire la hauteur et le vide à droite */
    font-size: clamp(2.3rem, 2.4vw + 1.3rem, 3.1rem);
  }
}

/* --- Menu sur une seule ligne en paysage iPad --- */
@media (min-width: 768px) and (max-width: 1180px) {
  .navbar-nav .nav-link {
    padding-inline: 0.55rem;  /* moins d’espace gauche/droite */
    font-size: 0.9rem;        /* texte légèrement plus petit */
  }
}