/* Style des boutons de langue avec renforcement de la visibilité */
.language-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 2px 0;
}

.language-option:hover {
    background-color: rgba(0, 123, 255, 0.2);
    transform: translateX(5px);
}

/* Style spécifique pour chaque langue */
.language-fr img {
    border: 1px solid transparent;
}

.language-en img {
    border: 1px solid transparent;
}

/* Style pour la langue active */
.dropdown-item.active,
.dropdown-item:active,
.active-language {
    background-color: rgba(0, 123, 255, 0.3) !important;
    color: white !important;
    font-weight: bold !important;
}

/* Amélioration du menu déroulant */
.language-dropdown .dropdown-menu {
    padding: 8px !important;
    min-width: 160px !important;
}

.language-dropdown .dropdown-toggle {
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 8px 12px;
}

.language-dropdown .dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Animation lors du changement de langue */
@keyframes language-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

body.language-changing {
    animation: language-pulse 1s infinite;
}

/* Indicateur de chargement pour le changement de langue */
.language-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
    background-size: 300% 100%;
    animation: gradient-animation 2s linear infinite;
    z-index: 9999;
}

@keyframes gradient-animation {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

/* Ajustements pour améliorer la visibilité du menu */
.dropdown-item {
    clear: both;
    font-weight: 400;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    padding: 0.5rem 1.5rem !important;
    transition: background-color 0.2s ease-in-out !important;
}

/* Styles spécifiques pour le mode sombre */
.dropdown-menu {
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

.dropdown-item {
    color: #f8f9fa !important;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: #495057 !important;
    color: white !important;
}