/* ============================================
   NAVBAR CSS — AVDA (PARTIE 1/2)
   Structure Desktop & Liens Agrandis
   ============================================ */

/* --- Variables Globales Navbar --- */
:root {
  --navbar-height: 80px;
  --navbar-height-scrolled: 70px;
  --navbar-bg: #13441E;
}

/* --- Navbar Fixed Frame --- */
.navbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--navbar-height);
  background-color: var(--navbar-bg);
  z-index: 9999;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  height: var(--navbar-height-scrolled);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

/* --- LOGO — Correction Affichage & Cadrage --- */
.navbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 10005; /* Toujours au-dessus du menu mobile */
  text-decoration: none;
}

.navbar-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-xs, 4px);
  transition: height 0.3s ease;
}

.navbar.scrolled .navbar-logo img {
  height: 40px;
}

/* --- MENU DESKTOP (Agrandissement des textes) --- */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.65rem 1rem;
  font-size: 1.05rem; /* Taille augmentée */
  font-weight: 600;
  color: #FFFFFF !important;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.nav-link > i:not(.fa-chevron-down) {
  font-size: 1.1rem;
  color: #DFA21A;
}

.nav-link .fa-chevron-down {
  font-size: 0.75rem;
  opacity: 0.8;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  background-color: rgba(223, 162, 26, 0.15);
  color: #DFA21A !important;
}

.nav-link:hover .fa-chevron-down {
  transform: rotate(180deg);
}

/* --- DROPDOWN DESKTOP --- */
.dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 260px;
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 0.6rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 1000;
  border: 1px solid #E8DFC0;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.98rem;
  color: #2D3748;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.dropdown-item i {
  color: #13441E;
  font-size: 0.95rem;
}

.dropdown-item:hover {
  background-color: #FFF8E7;
  color: #13441E;
  padding-left: 1.25rem;
}

/* --- BLOC DROITE DESKTOP (Langue + Don) --- */
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.nav-lang {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.lang-btn.active {
  background-color: #DFA21A;
  border-color: #DFA21A;
  color: #13441E;
}

.btn-donate {
  background-color: #E53E3E;
  color: #FFFFFF !important;
  padding: 0.65rem 1.3rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- HAMBURGER --- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10005; /* Toujours au-dessus */
  gap: 5px;
}

.hamburger-line {
  width: 25px;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   NAVBAR CSS — AVDA (PARTIE 2/2)
   Correction Responsive, Mobile & Tablette
   ============================================ */

/* --- OVERLAY MOBILE --- */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* ============================================
   RÈGLES DESKTOP PAR DÉFAUT (>= 1024px)
   ============================================ */

/* Masquage explicite des composants mobiles sur grand écran */
.nav-lang-mobile,
.nav-donate-mobile,
.hamburger {
  display: none !important;
}

/* Affichage du bloc de droite sur desktop */
.navbar .nav-right {
  display: flex !important;
  align-items: center;
  gap: 15px;
}

/* ==========================================
   RESPONSIVE — Mobile & Tablette (< 1024px)
   ========================================== */
@media (max-width: 1023px) {

  /* 1. Affichage Hamburger & Masquage Bloc Desktop */
  .hamburger {
    display: flex !important;
  }

  .navbar .nav-right {
    display: none !important;
  }

  /* 2. Menu latéral tiroir (Mobile Drawer) */
  .nav-menu {
    position: fixed !important;
    top: 0;
    right: -100%;
    left: auto !important;
    transform: none !important;
    width: min(85vw, 360px) !important;
    height: 100vh;
    height: 100dvh;
    background-color: #FFFFFF !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: calc(var(--navbar-height, 70px) + 1rem) 1.5rem 2rem !important;
    overflow-y: auto !important;
    z-index: 10004 !important;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.25) !important;
  }

  .nav-menu.active {
    right: 0 !important;
  }

  /* 3. Liens de navigation dans le tiroir */
  .nav-menu .nav-item {
    width: 100% !important;
    border-bottom: 1px solid #E8DFC0;
  }

  .nav-menu .nav-link {
    color: #2D3748 !important;
    padding: 1rem 0 !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-radius: 0 !important;
    width: 100% !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-align: left;
    transition: all 0.2s ease;
  }

  .nav-menu .nav-link > i:not(.fa-chevron-down) {
    color: #13441E !important;
    font-size: 1.15rem !important;
    width: 24px;
  }

  .nav-menu .nav-link .fa-chevron-down {
    color: #A0AEC0 !important;
    font-size: 0.85rem !important;
    transition: transform 0.3s ease, color 0.3s ease;
  }

  .nav-menu .nav-link:hover,
  .nav-menu .nav-link:focus {
    background-color: rgba(19, 68, 30, 0.05) !important;
    color: #13441E !important;
    padding-left: 0.4rem !important;
  }

  /* 4. Gestion Accordéon / Sous-menus (Dropdown) */
  .dropdown {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out !important;
    background-color: #F9F8F3 !important;
    min-width: 100% !important;
  }

  .nav-item.dropdown-open .dropdown {
    max-height: 800px;
  }

  .nav-item.dropdown-open .nav-link .fa-chevron-down {
    transform: rotate(180deg);
    color: #13441E !important;
  }

  .dropdown-item {
    display: flex !important;
    align-items: center !important;
    padding: 0.85rem 1rem 0.85rem 2rem !important;
    border-radius: 0 !important;
    font-size: 0.95rem !important;
    color: #2D3748 !important;
    border-bottom: 1px solid #E8DFC0;
  }

  .dropdown-item:last-child {
    border-bottom: none;
  }

  .dropdown-item i {
    color: #13441E !important;
  }

  /* 5. BOUTON HAMBURGER / CROIX */
  .hamburger {
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 6px;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 32px;
    height: 26px;
    z-index: 10005 !important;
    position: relative;
  }

  .hamburger .hamburger-line {
    display: block !important;
    width: 100%;
    height: 3px;
    background-color: #FFFFFF !important;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
  }

  .hamburger.active .hamburger-line {
    background-color: #13441E !important;
  }

  .hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0 !important;
  }

  .hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
  }

  /* 6. Boutons Bas de Menu Mobile (Langue & Don) */
  .nav-lang-mobile {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px;
    margin-top: auto !important;
    padding-top: 1.5rem !important;
    padding-bottom: 0.5rem !important;
    border-top: 1px solid #E8DFC0;
    width: 100%;
  }

  .nav-lang-mobile .lang-btn,
  .nav-menu .lang-btn {
    color: #2D3748 !important;
    border: 1.5px solid #CBD5E0 !important;
    padding: 6px 16px !important;
    font-size: 0.9rem !important;
    border-radius: 6px !important;
    font-weight: 600;
    background: transparent;
  }

  .nav-lang-mobile .lang-btn.active,
  .nav-menu .lang-btn.active {
    background-color: #13441E !important;
    border-color: #13441E !important;
    color: #FFFFFF !important;
  }

  .nav-donate-mobile {
    display: block !important;
    margin-top: 0.8rem !important;
    width: 100%;
  }

  .nav-donate-mobile .btn-donate {
    width: 100% !important;
    justify-content: center !important;
    text-align: center;
    display: flex;
    align-items: center;
    padding: 0.85rem !important;
    font-size: 1rem !important;
  }
}

/* ==========================================
   PETIT MOBILE (< 480px)
   ========================================== */
@media (max-width: 480px) {
  .navbar-logo img {
    height: 38px !important;
  }

  .nav-menu {
    width: 100vw !important;
  }

  .nav-menu .nav-link {
    font-size: 1rem !important;
    padding: 0.95rem 0 !important;
  }
}

/* Bloquer le scroll du fond quand le menu est ouvert */
body.menu-open {
  overflow: hidden !important;
}




/* ============================================
   CORRECTION ALIGNEMENT "SUPPORT US" MOBILE
   ============================================ */
@media (max-width: 1023px) {

  /* Ajustement pour les liens sans sous-menu (ex: Support Us) */
  .nav-menu .nav-item:last-child .nav-link,
  .nav-menu .nav-link:not(:has(.fa-chevron-down)) {
    justify-content: center !important; /* Centre l'icône et le texte */
    gap: 12px !important;              /* Espacement propre entre cœur et texte */
    text-align: center !important;
  }

  /* Si vous préférez un alignement à gauche uniforme avec les autres : */
  /*
  .nav-menu .nav-link:not(:has(.fa-chevron-down)) {
    justify-content: flex-start !important;
    gap: 12px !important;
  }
  */
}
