/* On garde Bootstrap mais on améliore uniquement le dropdown de langues */
.dropdown-menu.modern-list {
  /* Reset propre */
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  border: none;
  border-radius: 0.85rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.96);
  min-width: 190px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.24s ease-out;
  pointer-events: none;
}

/* Quand Bootstrap ajoute .show → le dropdown devient visible */
.dropdown-menu.modern-list.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.modern-list li{
    display: block!important;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .dropdown-menu.modern-list {
    background: rgba(33, 37, 41, 0.97);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

/* Style des liens */
.modern-list .dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.3rem !important;
  margin: 0 0.5rem;
  border-radius: 0.6rem;
  font-weight: 500;
  color: #333;
  transition: all 0.22s ease;
}

.modern-list .dropdown-item:hover,
.modern-list .dropdown-item:focus,
.modern-list .dropdown-item.active {
  background: rgba(99, 102, 241, 0.14) !important;
  color: #5b4ef6 !important;
  transform: translateX(4px);
}

/* Petite barre colorée à gauche au hover */
.modern-list .dropdown-item::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 50%;
  width: 4px;
  height: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 2px;
  transition: height 0.25s ease;
  transform: translateY(-50%);
}

.modern-list .dropdown-item:hover::before {
  height: 60%;
}

/* Drapeaux */
.modern-list .dropdown-item img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Langue active */
.modern-list .dropdown-item.active {
  font-weight: 600;
  background: rgba(99, 102, 241, 0.2) !important;
  color: #5b4ef6 !important;
}

/* Dark mode pour les items */
@media (prefers-color-scheme: dark) {
  .modern-list .dropdown-item { color: #e2e8f0; }
  .modern-list .dropdown-item:hover,
  .modern-list .dropdown-item.active {
    background: rgba(139, 92, 246, 0.25) !important;
    color: #ddd6fe !important;
  }
}