/* Styles pour le nouveau sélecteur de langue avec initiales */

/* === SÉLECTEUR DESKTOP === */
.language-selector {
  position: relative;
  display: inline-block;
  margin-left: 12px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-toggle:hover {
  background: #f8f9fa;
  border-color: #d0d0d0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.lang-toggle:active {
  transform: translateY(1px);
}

.current-lang {
  font-size: 14px;
  font-weight: 700;
  color: #2c3e50;
  min-width: 20px;
  text-align: center;
}

.dropdown-arrow {
  font-size: 10px;
  color: #666;
  transition: transform 0.2s ease;
}

.language-selector.open .dropdown-arrow {
  transform: rotate(180deg);
}

.language-selector.open .lang-options {
  display: block;
}

.lang-options {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  min-width: 60px;
  overflow: hidden;
  margin-top: 4px;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.lang-option:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

.lang-option:active {
  background: #e9ecef;
}

/* === SÉLECTEUR MOBILE === */
.mobile-language-selector {
  position: relative;
  display: inline-block;
}

.mobile-lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-lang-toggle:hover {
  background: #f8f9fa;
  border-color: #d0d0d0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.mobile-lang-toggle:active {
  transform: translateY(1px);
}

.mobile-current-lang {
  font-size: 13px;
  font-weight: 700;
  color: #2c3e50;
  min-width: 18px;
  text-align: center;
}

.mobile-dropdown-arrow {
  font-size: 9px;
  color: #666;
  transition: transform 0.2s ease;
}

.mobile-language-selector.open .mobile-dropdown-arrow {
  transform: rotate(180deg);
}

.mobile-lang-options {
  position: absolute;
  top: 100%;
  right: 0;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  min-width: 50px;
  overflow: hidden;
  margin-top: 4px;
}

.mobile-lang-option {
  display: block;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.mobile-lang-option:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

.mobile-lang-option:active {
  background: #e9ecef;
}

/* === ANIMATIONS === */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-options,
.mobile-lang-options {
  animation: slideDown 0.2s ease-out;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .language-selector {
    margin-left: 8px;
  }
  
  .lang-toggle {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .current-lang {
    font-size: 13px;
    min-width: 18px;
  }
  
  .dropdown-arrow {
    font-size: 9px;
  }
  
  .lang-option {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* === SUPPRESSION DES EFFETS DE FOCUS === */
.lang-toggle,
.mobile-lang-toggle,
.lang-option,
.mobile-lang-option {
  outline: none !important;
  box-shadow: none !important;
}

.lang-toggle:focus,
.mobile-lang-toggle:focus,
.lang-option:focus,
.mobile-lang-option:focus {
  outline: none !important;
  box-shadow: none !important;
}

.lang-toggle:active,
.mobile-lang-toggle:active,
.lang-option:active,
.mobile-lang-option:active {
  outline: none !important;
  box-shadow: none !important;
}

/* Suppression des effets de sélection de texte */
.lang-toggle,
.mobile-lang-toggle,
.lang-option,
.mobile-lang-option {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* === MODE SOMBRE (optionnel) === */
@media (prefers-color-scheme: dark) {
  .lang-toggle,
  .mobile-lang-toggle {
    background: #343a40;
    border-color: #495057;
    color: #f8f9fa;
  }
  
  .lang-toggle:hover,
  .mobile-lang-toggle:hover {
    background: #495057;
  }
  
  .current-lang,
  .mobile-current-lang {
    color: #f8f9fa;
  }
  
  .lang-options,
  .mobile-lang-options {
    background: #343a40;
    border-color: #495057;
  }
  
  .lang-option,
  .mobile-lang-option {
    color: #f8f9fa;
  }
  
  .lang-option:hover,
  .mobile-lang-option:hover {
    background: #495057;
    color: #ffffff;
  }
}