/**
 * 🌐 LANGUAGE SELECTOR STYLES
 * Styles pour le sélecteur de langue
 */

/* Conteneur du sélecteur */
.language-selector {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* Boutons de langue */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #3498db;
}

.lang-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Version compacte pour le header */
.header .language-selector {
    margin-left: 10px;
}

.header .lang-btn {
    padding: 4px 8px;
    font-size: 11px;
}

/* Version pour la sidebar admin */
.admin-header .language-selector {
    margin-right: 15px;
}

/* Dropdown version (alternative) */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-dropdown-btn:hover {
    border-color: #3498db;
    background: #f9fafb;
}

.language-dropdown-btn i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.language-dropdown.open .language-dropdown-btn i {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 120px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.language-dropdown.open .language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.language-option:first-child {
    border-radius: 7px 7px 0 0;
}

.language-option:last-child {
    border-radius: 0 0 7px 7px;
}

.language-option:hover {
    background: #f3f4f6;
}

.language-option.active {
    background: #eef2ff;
    color: #3498db;
    font-weight: 500;
}

.language-option .flag {
    font-size: 16px;
}

/* Icône globe pour le bouton */
.lang-globe-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-globe-btn:hover {
    border-color: #3498db;
    color: #3498db;
    background: #eef2ff;
}

/* Animation de chargement lors du changement de langue */
.i18n-loading {
    position: relative;
}

.i18n-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .language-selector {
        padding: 2px;
    }

    .lang-btn {
        padding: 4px 6px;
        font-size: 11px;
    }

    .lang-btn span:not(.flag) {
        display: none;
    }
}
