/* ============================================
   E-KOULIBA — navbar.css (v2 maquette)
   ============================================ */

/* === NAVBAR DESKTOP === */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-navbar);
  height: 80px;
  border-bottom: 2px solid #D4A843;
}

body.dark-mode .navbar {
  border-bottom: 1.5px solid #D4A843;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Logo desktop */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 90px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

/* Logo E-KOULIBA — Playfair Display */
.logo-main {
  font-family: var(--font-titre); /* ← Playfair Display */
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  line-height: 1.2;
  font-style: normal; /* ← pas italic */
}

/* Arbre du Savoir — Playfair Display, pas italic */
.logo-sub {
  font-family: var(--font-titre); /* ← Playfair Display */
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-or);
  font-style: normal; /* ← pas italic */
  letter-spacing: 0.3px;
}

/* Liens navigation */
.navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin-left: auto;
  margin-right: 24px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-corps);
  font-size: 0.9rem;
  font-weight: 500;
  color: #C8C4BC;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background-color var(--transition);
}

.nav-link svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  flex-shrink: 0;
}

.nav-link:hover {
  color: var(--color-or);
  background-color: rgba(212,168,67,0.08);
}

.nav-link.active { color: var(--color-or); }

/* Dark mode toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  cursor: pointer;
  color: #C8C4BC;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color var(--transition), color var(--transition);
}

.theme-toggle:hover {
  background: rgba(212,168,67,0.15);
  color: var(--color-or);
  border-color: var(--color-or);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.icon-sun  { display: none;  }
.icon-moon { display: block; }

body.dark-mode .icon-sun  { display: block; }
body.dark-mode .icon-moon { display: none;  }

/* === NAVBAR MOBILE === */
.navbar-mobile {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-navbar);
  border-bottom: 1px solid rgba(212,168,67,0.3);
}
.navbar-mobile {
    border-bottom: 1px solid #D4A843; 
}

body.dark-mode .navbar-mobile {
  border-bottom: 0.5px solid #D4A843;
}

.navbar-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 70px;
  gap: 12px;
}

.mobile-logo-badge { flex-shrink: 0; }

.mobile-logo-badge img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-logo-text-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mobile-logo-main {
  font-family: var(--font-titre);
  font-size: 1rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.mobile-logo-sub {
  font-family: var(--font-titre);
  font-size: 0.7rem;
  color: var(--color-or);
 font-style: normal;
}

.mobile-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Hamburger */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  color: #C8C4BC;
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
}

.hamburger:hover { color: var(--color-or); }
.hamburger svg  { width: 22px; height: 22px; stroke: currentColor; }

.icon-menu  { display: block; }
.icon-close { display: none;  }

.hamburger.open .icon-menu  { display: none;  }
.hamburger.open .icon-close { display: block; }

/* === OVERLAY === */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 998;
}

.mobile-overlay.open { display: block; }

/* === DRAWER PANEL === */
.mobile-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: var(--color-bg-primary);
  border-radius: 20px 20px 0 0;
  border-top: 3px solid var(--color-or);
  padding: 24px 24px 0;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  max-height: 85vh;
  overflow-y: auto;
}

body.dark-mode .mobile-drawer { background-color: #1C1A16; }

.mobile-drawer.open { transform: translateY(0); }

/* Cercles décoratifs */
.drawer-dots {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.dot-or {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-or);
}

.dot-teal {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-teal);
}

/* Liens drawer */
.drawer-links {
  list-style: none;
  margin-bottom: 24px;
}

.drawer-links li {
  border-bottom: 1px solid var(--color-separator);
}

/* ✅ CORRECTION 1 — Supprimer le trait après le dernier lien */
.drawer-links li:last-child {
  border-bottom: none;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  text-decoration: none;
  color: var(--color-text-primary);
}

.drawer-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background-color: var(--color-separator);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color var(--transition);
}

body.dark-mode .drawer-icon { background-color: #3D3A2E; }

.drawer-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-text-secondary);
}

.drawer-link.active .drawer-icon { background-color: var(--color-or); }
.drawer-link.active .drawer-icon svg { stroke: #1C1C1C; }

/* ✅ CORRECTION 2 — Description poussée à droite */
.drawer-link-text {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex: 1;
}

.drawer-link-name {
  font-family: var(--font-corps);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.drawer-link-desc {
  font-size: 0.78rem;
  color: var(--color-text-secondary);
  text-align: right;
}

/* Footer drawer */
.drawer-footer {
  border-top: 1px solid var(--color-separator);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-footer-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.drawer-footer-main {
  display: block;
  font-family: var(--font-titre);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.drawer-footer-sub {
  font-family: var(--font-titre);
  display: block;
  font-size: 0.65rem;
  color: var(--color-or);
  font-style: normal; 
}

.drawer-footer-socials {
  display: flex;
  gap: 10px;
}

.drawer-footer-socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--color-or);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-or);
  transition: background-color var(--transition);
}

.drawer-footer-socials a:hover {
  background-color: var(--color-or);
  color: #1C1C1C;
}

.drawer-footer-socials svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}


/* ==========================================
   DRAWER — Animations mobiles
   ========================================== */

/* --- Cercles décoratifs qui flottent --- */
.dot-or {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-or);
  animation: floatDotOr 3s ease-in-out infinite; /* ← flottement */
  transition: transform 0.2s ease;
}

.dot-teal {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-teal);
  animation: floatDotTeal 3s ease-in-out infinite 0.5s; /* ← décalé */
  transition: transform 0.2s ease;
}

/* ← flottement or */
@keyframes floatDotOr {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-8px) scale(1.05); }
}

/* ← flottement teal — sens inverse */
@keyframes floatDotTeal {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(8px) scale(1.05); }
}

/* --- Liens drawer — entrée en cascade --- */
.drawer-links li {
  animation: slideInDrawer 0.3s ease both;
}

.drawer-links li:nth-child(1) { animation-delay: 0.05s; }
.drawer-links li:nth-child(2) { animation-delay: 0.10s; }
.drawer-links li:nth-child(3) { animation-delay: 0.15s; }
.drawer-links li:nth-child(4) { animation-delay: 0.20s; }

@keyframes slideInDrawer {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Icône drawer — légère rotation au tap --- */
.drawer-link:active .drawer-icon {
  transform: scale(0.92);
  transition: transform 0.15s ease;
}

/* --- Footer drawer — entrée depuis le bas --- */
.drawer-footer {
  animation: fadeInUp 0.4s ease 0.25s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Socials — pulse au hover --- */
.drawer-footer-socials a {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.drawer-footer-socials a:hover {
  transform: scale(1.15);
}
/* ==========================================
   DRAWER — Animations mobiles
   ========================================== */

/* --- Cercles flottants --- */
.mobile-drawer.open .dot-or {
  animation: floatDotOr 3s ease-in-out infinite;
}

.mobile-drawer.open .dot-teal {
  animation: floatDotTeal 3s ease-in-out infinite 0.5s;
}

@keyframes floatDotOr {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(-8px) scale(1.05); }
}

@keyframes floatDotTeal {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(8px) scale(1.05); }
}

/* --- Liens — entrée en cascade au ouverture --- */
.mobile-drawer.open .drawer-links li {
  animation: slideInDrawer 0.3s ease both;
}

.mobile-drawer.open .drawer-links li:nth-child(1) { animation-delay: 0.05s; }
.mobile-drawer.open .drawer-links li:nth-child(2) { animation-delay: 0.10s; }
.mobile-drawer.open .drawer-links li:nth-child(3) { animation-delay: 0.15s; }
.mobile-drawer.open .drawer-links li:nth-child(4) { animation-delay: 0.20s; }

@keyframes slideInDrawer {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Icône — légère pression au tap --- */
.drawer-link:active .drawer-icon {
  transform: scale(0.92);
  transition: transform 0.15s ease;
}

/* --- Footer — entrée depuis le bas --- */
.mobile-drawer.open .drawer-footer {
  animation: slideUpFooter 0.4s ease 0.25s both;
}

@keyframes slideUpFooter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Socials — scale au hover --- */
.drawer-footer-socials a {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.drawer-footer-socials a:hover {
  transform: scale(1.15);
}
/* --- Liens drawer — effets interactifs --- */
.drawer-link {
  transition: padding-left 0.2s ease, background-color 0.2s ease;
  border-radius: 8px;
}

/* ← glisse vers la droite au hover */
.drawer-link:hover {
  padding-left: 8px;
  background-color: rgba(212, 168, 67, 0.06);
}

/* ← pression au tap */
.drawer-link:active {
  background-color: rgba(212, 168, 67, 0.12);
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* --- Icône — rotation légère au hover --- */
.drawer-icon {
  transition: background-color 0.2s ease, transform 0.25s ease;
}

.drawer-link:hover .drawer-icon {
  transform: rotate(-6deg) scale(1.08); /* ← légère rotation */
}

/* --- Nom du lien — couleur or au hover --- */
.drawer-link:hover .drawer-link-name {
  color: var(--color-or);
  transition: color 0.2s ease;
}

/* --- Description — glisse légèrement --- */
.drawer-link:hover .drawer-link-desc {
  color: var(--color-text-primary);
  transition: color 0.2s ease;
}

/* --- Cercles dots — pulse au tap --- */
.dot-or:active,
.dot-teal:active {
  transform: scale(0.9);
  transition: transform 0.15s ease;
}

/* --- Socials footer — rotation au hover --- */
.drawer-footer-socials a svg {
  transition: transform 0.25s ease;
}

.drawer-footer-socials a:hover svg {
  transform: rotate(12deg) scale(1.1);
}


/* ==========================================
   NAVBAR — Responsive garanti tous devices
   ========================================== */

/* Force desktop caché sous 768px */
@media (max-width: 768px) {
  .navbar {
    display: none !important;
  }

  .navbar-mobile {
    display: block !important;
  }
}

/* Force mobile caché au dessus de 768px */
@media (min-width: 769px) {
  .navbar-mobile {
    display: none !important;
  }

  .navbar {
    display: block !important;
  }
}