/* Language Switcher - Intégré dans la navbar (FIXED position) */

/* Desktop switcher - Position absolue en haut à droite */
.lang-switcher-nav {
  position: fixed;
  top: 20px;
  right: 140px; /* À gauche du bouton Télécharger */
  z-index: 10000;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-current:hover {
  background: rgba(102, 126, 234, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.lang-flag {
  font-size: 18px;
  line-height: 1;
}

.lang-code {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.lang-chevron {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.lang-current:hover .lang-chevron {
  transform: translateY(2px);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(26, 26, 46, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}

.lang-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(4px);
}

.lang-item.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.lang-item .lang-flag {
  font-size: 22px;
  flex-shrink: 0;
}

.lang-item .lang-name {
  font-size: 15px;
  font-weight: 500;
}

/* Mobile switcher dans menu mobile */
.lang-switcher-mobile {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 16px;
  padding-top: 16px;
}

.lang-mobile-label {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding: 0 20px;
}

.lang-mobile-item {
  display: block;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 15px;
  border-left: 3px solid transparent;
}

.lang-mobile-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-left-color: rgba(102, 126, 234, 0.5);
}

.lang-mobile-item.active {
  background: rgba(102, 126, 234, 0.15);
  color: #ffffff;
  border-left-color: #667eea;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
  .lang-switcher-nav {
    display: none; /* Caché sur mobile, on utilise lang-switcher-mobile */
  }
}

@media (min-width: 993px) {
  .lang-switcher-mobile {
    display: none; /* Caché sur desktop */
  }
}

/* Ajustement position quand navbar scroll */
.navbar.scrolled ~ .lang-switcher-nav {
  top: 15px;
}

@media (max-width: 1200px) {
  .lang-switcher-nav {
    right: 120px; /* Plus proche sur écrans moyens */
  }
}
