/**
 * ===============================================
 * SMART EVENTS - NAVBAR INTERACTIVE PREMIUM
 * Fichier: public/css/navbar.css
 * Version: 2.0 Premium
 * Author: Smart Events Morocco ✨
 * ===============================================
 */

/* ===== NAVBAR PREMIUM ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* background: rgba(20, 25, 40, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.navbar.scrolled {
  background: rgba(18, 22, 35, 0.95);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

/* ===== CONTAINER ===== */
.navbar-container {
  max-width: 77rem;
  margin: auto;
  /* padding: 1rem 2rem; */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== LOGO ANIMÉ AVEC PARTICULES ===== */
.navbar-logo {
  position: relative;
  display: block;
}

.navbar-logo12 {
  width: 8rem;
  height: auto;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.navbar-logo:hover .navbar-logo12 {
  transform: rotate(5deg) scale(1.1);
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.6));
}

/* Particules autour du logo */
.navbar-logo::before,
.navbar-logo::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #d4af37;
  border-radius: 50%;
  opacity: 0;
  transition: all 0.6s ease;
}

.navbar-logo:hover::before {
  animation: particle1 1.5s ease-in-out infinite;
}

.navbar-logo:hover::after {
  animation: particle2 1.5s ease-in-out infinite 0.3s;
}

@keyframes particle1 {
  0%, 100% { transform: translate(0, 0); opacity: 0; }
  50% { transform: translate(-20px, -20px); opacity: 1; }
}

@keyframes particle2 {
  0%, 100% { transform: translate(0, 0); opacity: 0; }
  50% { transform: translate(20px, -15px); opacity: 1; }
}

/* ===== MENU INTERACTIVE ===== */
.navbar-menu {
  display: flex;
  margin-top: 1rem;
  gap: 0.5rem;
  list-style: none;
}

.navbar-menu li {
  position: relative;
  perspective: 1000px;
}

.navbar-menu li a {
  position: relative;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 12px;
  letter-spacing: 1px;
  display: block;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Effet de brillance qui traverse */
.navbar-menu li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
  transition: left 0.5s ease;
}

.navbar-menu li a:hover::before {
  left: 100%;
}

/* Bordure lumineuse animée */
.navbar-menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #d4af37, #f4d03f, #d4af37);
  transform: translateX(-50%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.navbar-menu li a:hover::after {
  width: 90%;
}

.navbar-menu li a:hover {
  color: #f4d03f;
  background: rgba(212, 175, 55, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.2);
}

/* Lien actif avec pulse effect */
.navbar-menu li a.active {
  color: #f4d03f;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(244, 208, 63, 0.15));
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4), inset 0 0 20px rgba(212, 175, 55, 0.1);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.6); }
}

/* ===== ACTIONS ===== */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ===== DROPDOWN PREMIUM ===== */
.dropdown {
  position: relative;
}

.dropdown-btn {
  background: transparent;
  border: 2px solid rgba(212, 175, 55, 0.5);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

/* Effet de brillance diagonal */
.dropdown-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
}

.dropdown-btn:hover::before {
  left: 100%;
}

.dropdown-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: #d4af37;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}

.dropdown-btn i.fa-chevron-down {
  transition: transform 0.3s ease;
}

.dropdown.active .dropdown-btn i.fa-chevron-down {
  transform: rotate(180deg);
}

.dropdown-btn.primary {
  background: linear-gradient(135deg, #bb7f19, #f4d03f);
  border: none;
  color: #1a1a2e;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.dropdown-btn.primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropdown-btn.primary:hover::after {
  opacity: 1;
}

.dropdown-btn.primary:hover {
  background: linear-gradient(-135deg, #f4d03f, #d4af37);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
}

/* ===== DROPDOWN MENU AVEC BOUNCE ===== */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  background: rgba(25, 28, 45, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  min-width: 250px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  z-index: 999;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Flèche du dropdown */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 25px;
  width: 16px;
  height: 16px;
  background: rgba(25, 28, 45, 0.98);
  border-left: 1px solid rgba(212, 175, 55, 0.2);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  transform: rotate(45deg);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  padding: 14px 20px;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Barre latérale colorée */
.dropdown-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #d4af37, #f4d03f);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.dropdown-menu a:hover::before {
  transform: scaleY(1);
}

.dropdown-menu a:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #f4d03f;
  padding-left: 30px;
}

.dropdown-menu a i {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.dropdown-menu a:hover i {
  transform: scale(1.2) rotate(5deg);
}



/* ===== MOBILE TOGGLE AVEC ROTATION ===== */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 2px solid #d4af37;
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.mobile-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #d4af37;
  transform: scaleX(0);
  transition: transform 0.3s ease;
  z-index: -1;
}

.mobile-toggle:hover::before {
  transform: scaleX(1);
}

.mobile-toggle:hover {
  color: #1a1a2e;
  transform: rotate(90deg);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* ===== MOBILE MENU PREMIUM ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 350px;
  height: 100vh;
  background: rgba(18, 22, 35, 0.98);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.6);
  transition: right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1001;
  overflow-y: auto;
  padding: 2rem;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

.mobile-menu-header img {
  width: 10rem;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

.mobile-close {
  background: transparent;
  border: 2px solid #d4af37;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
}

.mobile-close:hover {
  background: #d4af37;
  color: #1a1a2e;
  transform: rotate(90deg);
}

.mobile-menu-list {
  list-style: none;
  margin-bottom: 2rem;
}

.mobile-menu-list li {
  margin-bottom: 0.5rem;
}

.mobile-menu-list a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.mobile-menu-list a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #d4af37, #f4d03f);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.mobile-menu-list a:hover::before {
  transform: scaleY(1);
}

.mobile-menu-list a:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #f4d03f;
  padding-left: 30px;
}

.mobile-dropdowns {
  padding-top: 1rem;
  border-top: 2px solid rgba(212, 175, 55, 0.2);
}

.mobile-dropdown {
  margin-bottom: 1.5rem;
}

.mobile-dropdown-title {
  color: #d4af37;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 2px;
  margin-bottom: 0.8rem;
  padding-left: 10px;
}

.mobile-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 0.3rem;
  transition: all 0.3s ease;
}

.mobile-dropdown a:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #f4d03f;
  transform: translateX(10px);
}

.flag-icon, .event-icon {
  font-size: 20px;
}

/* ===== OVERLAY AVEC BLUR ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 999;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== ANIMATIONS SMOOTH ===== */
@keyframes slideInRight {
  from { 
    transform: translateX(100%); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

@keyframes fadeIn {
  from { opacity: 0; } 
  to { opacity: 1; }
}

@keyframes glow {
  0%, 100% { 
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); 
  }
  50% { 
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); 
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .navbar-menu { gap: 0.3rem; }
  .navbar-menu li a { padding: 10px 16px; font-size: 13px; }
  .dropdown-btn { font-size: 12px; padding: 10px 16px; }
}

@media (max-width: 900px) {
  .navbar-menu,
  .navbar-actions .dropdown {
    display: none !important;
  }
  .mobile-toggle {
    display: block;
    margin-right: 1rem;
  }
}

@media (max-width: 480px) {
  .mobile-menu {
    width: 100%;
  }
  .navbar-logo12 {
    width: 10rem;
    padding-left: 1rem;
  }
  .navbar-container {
    gap: 0;
    justify-content: space-between;
  }
}

/* ===== SCROLLBAR CUSTOM POUR MOBILE MENU ===== */
.mobile-menu::-webkit-scrollbar {
  width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
  background: rgba(212, 175, 55, 0.1);
}

.mobile-menu::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.5);
  border-radius: 3px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.7);
}

/* ===== ACCESSIBILITY ===== */
.dropdown-btn:focus,
.mobile-toggle:focus,
.mobile-close:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}