/* Barre de navigation supérieure selon la maquette top.json */

.top-navbar {
    background-color: rgba(255, 255, 255, 1);
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 0 80px 0 80px; /* Espace réduit car le bouton tab-open est maintenant fixe */
    flex-grow: 1;
    align-self: stretch;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    min-height: 70px;
}

/* Bouton pour ouvrir/fermer la sidebar */
.tab-open {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: fixed;
    left: 20px;
    top: 14px;
    z-index: 10000;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    padding: 8px;
}

.tab-open:hover {
    transform: scale(1.1);
}

/* Position du bouton quand la sidebar est ouverte */
.tab-open.sidebar-open {
    left: 300px; /* 280px (largeur sidebar) + 20px (marge) */
}

.tab-icon {
    position: relative;
    width: 100%;
    height: 100%;
}

.tab-line {
    position: absolute;
    border-radius: 1px;
    border-width: 2px;
    border-color: rgba(234, 0, 105, 1);
    border-style: solid;
    background-color: transparent;
}

.tab-line-1 {
    width: 20px;
    height: 20px;
    top: 2px;
    left: 2px;
}

.tab-line-2 {
    width: 9px;
    height: 20px;
    top: 2px;
    left: 2px;
}

/* Section centrale avec notifications - Alignée à droite */
.nav-center {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-left: auto; /* Pousse les notifications vers la droite */
}

.notification-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-bell {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-bell:hover {
    transform: scale(1.1);
}

.notification-bell i {
    color: #121432;
    font-size: 20px;
}

.notification-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 79, 85, 1);
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Section utilisateur - Alignée à droite */
.nav-user-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 32px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info:hover {
    transform: scale(1.02);
}

.user-avatar {
    background-color: rgba(255, 104, 176, 1);
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 10px;
    flex-shrink: 0;
    border-radius: 36px;
}

.user-initials {
    color: rgba(255, 255, 255, 1);
    height: auto;
    text-align: left;
    line-height: normal;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-stretch: normal;
    font-style: normal;
    font-weight: 500;
    text-decoration: none;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-name {
    color: rgba(18, 20, 50, 1);
    height: auto;
    text-align: left;
    line-height: normal;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-stretch: normal;
    font-style: normal;
    font-weight: 500;
    text-decoration: none;
}

.user-dropdown-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.user-dropdown-toggle i {
    color: #121432;
    font-size: 16px;
}

.user-info:hover .user-dropdown-toggle {
    transform: rotate(180deg);
}

/* Responsive design */
@media (max-width: 1200px) {
    .top-navbar {
        padding: 0 40px 0 320px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .top-navbar {
        padding: 0 20px 0 20px;
        gap: 20px;
        min-height: 60px;
    }
    
    .nav-center {
        gap: 20px;
    }
    
    .nav-user-section {
        gap: 20px;
    }
    
    .user-name {
        display: none; /* Cacher le nom sur mobile */
    }
}

/* Animation pour l'indicateur de notification */
@keyframes notification-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.notification-indicator {
    animation: notification-pulse 2s infinite;
}

/* Style pour la sidebar fermée */
.sidebar-closed .top-navbar {
    padding-left: 80px;
}

/* Menu déroulant utilisateur */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    margin-top: 8px;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-avatar {
    background-color: rgba(255, 104, 176, 1);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-initials {
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 500;
}

.dropdown-user-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-full-name {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #121432;
}

.dropdown-email {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background-color: #f0f0f0;
    margin: 0;
}

.dropdown-items {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #121432;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #121432;
    text-decoration: none;
}

.dropdown-item i {
    width: 16px;
    color: #666;
}

.logout-item {
    color: #dc3545;
}

.logout-item:hover {
    background-color: #f8d7da;
    color: #dc3545;
}

.logout-item i {
    color: #dc3545;
}

/* Position relative pour le conteneur parent */
.nav-user-section {
    position: relative;
}

/* Transitions fluides */
.top-navbar * {
    transition: all 0.3s ease;
}
