/* 
 * Styles personnalisés pour le logo SE-INPS
 * Fichier: public/assets/css/logo-custom.css
 */

/* Logo dans la navigation principale */
.b-brand .logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

/* Logo large (sidebar ouverte) */
.b-brand .logo.logo-lg {
    max-height: 73px;
    max-width: 150px;
}

/* Logo petit (sidebar fermée) */
.b-brand .logo.logo-sm {
    max-height: 30px;
    max-width: 30px;
    border-radius: 4px;
}

/* Logo sur la page de connexion */
.auth-creative-wrapper .img-fluid {
    width: auto;
    object-fit: contain;
}

/* Logo mobile sur la page de connexion */
.auth-creative-wrapper .d-lg-none .img-fluid {
    max-height: 50px;
    max-width: 80px;
    object-fit: contain;
}

/* Logo dans le cercle de la page de connexion */
.auth-creative-wrapper .position-absolute .img-fluid {
    max-height: 40px;
    max-width: 40px;
    object-fit: contain;
    border-radius: 50%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .b-brand .logo.logo-lg {
        max-height: 30px;
        max-width: 120px;
    }
    
    .b-brand .logo.logo-sm {
        max-height: 25px;
        max-width: 25px;
    }
}

/* Hover effects */
.b-brand:hover .logo {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Assurer que le logo reste bien centré */
.b-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style pour le cas où le logo ne charge pas */
.logo[alt]:after {
    content: attr(alt);
    font-size: 12px;
    color: #666;
    display: block;
    text-align: center;
}

/* ===================================
 * Styles pour les avatars utilisateur
 * ===================================*/

/* Avatar dans les tâches */
.avatar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Avatar petit (liste des tâches) */
.avatar-sm {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

/* Avatar moyen (détails des tâches) */
.avatar-md {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
}

/* Avatar large (profil utilisateur) */
.avatar-lg {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
}

/* Avatar texte (initiales) */
.avatar-text {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    border-radius: 50%;
    color: white;
}

.avatar-text.avatar-sm {
    font-size: 12px;
}

.avatar-text.avatar-md {
    font-size: 14px;
}

.avatar-text.avatar-lg {
    font-size: 18px;
}

/* Avatar dans la navigation */
.user-avtar {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    flex-shrink: 0;
}

/* Debug pour les avatars qui ne s'affichent pas */
.user-avtar[src*="h.png"],
.user-avtar[src*="f.png"] {
    background-color: #007bff;
    border: 2px solid #007bff;
}

/* Style spécifique pour les conteneurs flex */
.d-flex .user-avtar {
    flex-shrink: 0;
}

/* FORCER l'avatar dans le header - approche ultra-agressive */
.nxl-head-link img,
.nxl-head-link .user-avtar,
.nxl-head-link .user-avtar.me-0 {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    flex-shrink: 0 !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    background-color: #f8f9fa !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Forcer tous les img dans le dropdown du header */
.nxl-head-link * {
    max-width: none !important;
}

/* Debug - colorer en rouge si pas d'image */
.nxl-head-link img[src*="h.png"],
.nxl-head-link img[src*="f.png"] {
    border: 2px solid #dc3545 !important;
}

/* === STYLES POUR LES STATUTS UTILISATEUR === */

/* Indicateur de statut sur l'avatar */
.status-indicator {
    width: 12px !important;
    height: 12px !important;
    border: 2px solid #fff !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Styles pour le dropdown de statut */
.status-dropdown-menu {
    min-width: 280px;
}

.status-option {
    transition: all 0.2s ease;
}

.status-option:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.status-option.active {
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

.status-option .hstack i {
    transition: transform 0.2s ease;
}

.status-option:hover .hstack i {
    transform: scale(1.1);
}

/* Input pour le message de statut */
.status-message-input {
    border: 1px solid #e3e6f0;
    border-radius: 6px;
    font-size: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.status-message-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Animation pour le changement de statut */
.current-status-indicator {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.current-status-indicator.updating {
    transform: scale(1.2);
    animation: pulse-status 1s infinite;
}

@keyframes pulse-status {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Styles pour les différents statuts */
.status-en-ligne { background-color: #28a745 !important; }
.status-occupe { background-color: #ffc107 !important; }
.status-en-conge { background-color: #17a2b8 !important; }
.status-en-reunion { background-color: #dc3545 !important; }

/* Badge de statut dans le header */
.current-status-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Indicateurs de statut pour les listes d'utilisateurs */
.user-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .status-dropdown-menu {
        min-width: 250px;
    }
    
    .status-message-input {
        font-size: 11px;
    }
    
    .current-status-badge {
        display: none;
    }
}

/* Amélioration du dropdown utilisateur avec les statuts */
.nxl-user-dropdown .dropdown-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    margin: -8px -16px 8px -16px;
    padding: 16px;
}

.nxl-user-dropdown .dropdown-header h6 {
    color: white !important;
}

.nxl-user-dropdown .dropdown-header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Animation de chargement pour le changement de statut */
.status-loading {
    position: relative;
    overflow: hidden;
}

.status-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}




/* ===== DROPDOWN USER STYLES ===== */

/* Dropdown utilisateur */
.nxl-user-dropdown {
    min-width: 280px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Header du dropdown */
.nxl-user-dropdown .dropdown-header {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.nxl-user-dropdown .dropdown-header h6 {
    color: white !important;
    font-weight: 600;
}

.nxl-user-dropdown .dropdown-header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.nxl-user-dropdown .dropdown-header .user-avtar {
    border: 3px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
}

/* Badge dans le header */
.nxl-user-dropdown .dropdown-header .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
}

/* Items du dropdown */
.nxl-user-dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    border: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.nxl-user-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.nxl-user-dropdown .dropdown-item i {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.nxl-user-dropdown .dropdown-item:hover i {
    color: #495057;
}

/* Status dropdown spécial */
.nxl-user-dropdown .dropdown .dropdown-item {
    background: #f8f9fa;
    margin: 0.5rem;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.nxl-user-dropdown .dropdown .dropdown-menu {
    margin-top: 0.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Dividers */
.nxl-user-dropdown .dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid #e9ecef;
}

/* Bouton de déconnexion */
.nxl-user-dropdown .dropdown-item.text-danger {
    color: #dc3545 !important;
    font-weight: 500;
}

.nxl-user-dropdown .dropdown-item.text-danger:hover {
    background-color: #f8d7da;
    color: #721c24 !important;
}

.nxl-user-dropdown .dropdown-item.text-danger i {
    color: #dc3545 !important;
}

/* Status indicators */
.nxl-user-dropdown .hstack i.rounded-circle {
    width: 10px;
    height: 10px;
    border-width: 2px !important;
}

/* Animation pour l'ouverture */
.nxl-user-dropdown {
    animation: dropdownFadeIn 0.3s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nxl-user-dropdown {
        min-width: 250px;
    }
    
    .nxl-user-dropdown .dropdown-header {
        padding: 0.75rem;
    }
    
    .nxl-user-dropdown .dropdown-header .user-avtar {
        width: 40px;
        height: 40px;
    }
}

/* Hover effect sur les avatars */
.avatar-image:hover img,
.user-avtar:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Style pour les avatars en groupe */
.d-flex .avatar-image:not(:first-child) {
    margin-left: -8px;
    border: 2px solid white;
}

/* Responsive pour les avatars */
@media (max-width: 768px) {
    .avatar-md {
        width: 35px;
        height: 35px;
    }
    
    .avatar-sm {
        width: 28px;
        height: 28px;
    }
    
    .user-avtar {
        width: 35px;
        height: 35px;
    }
}

/* Animation de chargement pour les images */
.avatar-image img {
    transition: opacity 0.3s ease;
}

.avatar-image img.loaded {
    opacity: 1;
}

/* ===================================
 * Styles pour le bouton de toggle navigation
 * ===================================*/

/* Styles pour les boutons de toggle de navigation */
#vertical-nav-toggle,
#vertical-nav-toggle-header,
#vertical-nav-toggle-main,
#header-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 10px auto;
}

#vertical-nav-toggle:hover,
#vertical-nav-toggle-header:hover,
#vertical-nav-toggle-main:hover,
#header-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Bouton de toggle dans le header */
.header-left #vertical-nav-toggle-main {

    color: black;
    margin: 0;
    line-height: 1;
    font-size: 24px;
}




#vertical-nav-toggle i,
#vertical-nav-toggle-header i,
#vertical-nav-toggle-main i,
#header-nav-toggle i {
    color: black;
    font-size: 24px;
    font-family: feather;
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: all 0.3s ease;
}

.content-sidebar-body{
    margin: 24px;

}

/* ===================================
 * Styles pour le mode minimenu
 * On laisse le thème Duralux gérer le comportement natif :
 *   - Sidebar réduite à 100px (icônes)
 *   - Au hover de .nxl-navigation : expansion à 280px, texte/flèches réaffichés
 *   - Sous-menus .nxl-trigger affichés au hover de la navigation
 * On ajoute seulement des améliorations visuelles légères.
 * ===================================*/

/* Centrer les icônes quand la sidebar est réduite (non survolée) */
html.minimenu .nxl-navigation:not(:hover) .nxl-micon {
    margin-right: 0;
    text-align: center;
    width: 100%;
    justify-content: center;
    display: flex;
}

/* Transition fluide sur l'ouverture/fermeture des sous-menus */
html.minimenu .nxl-navigation:hover .navbar-content .nxl-submenu {
    transition: all 0.3s ease;
}

/* Améliorations visuelles des sous-menus dans la sidebar étendue */
html.minimenu .nxl-navigation:hover .navbar-content .nxl-submenu .nxl-link:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

html.minimenu .nxl-navigation:hover .navbar-content .nxl-submenu .nxl-link.active {
    background-color: #007bff;
    color: white;
    border-radius: 4px;
}

/* Responsive pour les boutons toggle */
@media (max-width: 768px) {
    #vertical-nav-toggle,
    #vertical-nav-toggle-header,
    #vertical-nav-toggle-main,
    #header-nav-toggle {
        width: 35px;
        height: 35px;
    }

    #vertical-nav-toggle i,
    #vertical-nav-toggle-header i,
    #vertical-nav-toggle-main i,
    #header-nav-toggle i {
        font-size: 14px;
    }
}