/* Styles généraux */
body {
    padding-top: 70px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar Desktop */
.navbar-desktop {
    background: linear-gradient(90deg, #c7c7c7, #6f84a0, #FFFACD);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.brand-name {
    font-weight: 700;
    color: #333;
    font-size: 1.5rem;
}

.navbar-nav-desktop {
    display: flex;
}

.navbar-nav-desktop .navbar-nav {
    display: flex;
    flex-direction: row;
    margin: 0;
}

.navbar-desktop .nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.navbar-desktop .nav-link:hover {
    background-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Bouton de déconnexion Desktop */
.btn-logout-desktop {
    background-color: rgba(0,0,0,0.2);
    color: #333;
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-logout-desktop:hover {
    background-color: rgba(0,0,0,0.3);
    color: #000;
    transform: translateY(-2px);
}

.btn-logout-desktop i {
    font-size: 1rem;
}

.logout-text {
    font-weight: 500;
}

/* Barre fixe en haut pour mobile */
.mobile-top-bar {
    display: none;
    background: linear-gradient(90deg, #c7c7c7, #6f84a0, #FFFACD);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.mobile-top-bar .container {
    height: 100%;
    display: flex;
    align-items: center;
}

.mobile-top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 15px;
}

.mobile-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-logo-img {
    height: 35px;
    width: auto;
}

.mobile-brand-name {
    font-weight: 700;
    color: #333;
    font-size: 1.2rem;
    white-space: nowrap;
}

/* Bouton de déconnexion Mobile */
.btn-logout-mobile {
    background-color: rgba(0,0,0,0.2);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-logout-mobile:hover {
    background-color: rgba(0,0,0,0.3);
    color: #000;
    transform: scale(1.1);
}

.btn-logout-mobile i {
    font-size: 1.2rem;
}

/* Menu fixe en bas pour mobile */
.mobile-bottom-nav {
    display: none;
    background: linear-gradient(90deg, #c7c7c7, #6f84a0, #FFFACD);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    border-top: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
}

.mobile-nav-item {
    flex: 1;
    text-align: center;
    height: 100%;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 5px;
    position: relative;
}

.mobile-nav-link i {
    font-size: 1.4rem;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.mobile-nav-text {
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-link.active {
    color: #2c3e50;
}

.mobile-nav-link.active i {
    color: #2c3e50;
    transform: translateY(-2px);
}

.mobile-nav-link.active .mobile-nav-text {
    font-weight: 600;
    color: #2c3e50;
}

.mobile-nav-link:hover {
    color: #2c3e50;
}

.mobile-nav-link:hover i {
    transform: translateY(-2px);
}

/* Indicateur visuel pour l'élément actif */
.mobile-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: #2c3e50;
    border-radius: 3px;
}

/* Footer */
.footer {
    background-color: #000;
    color: #fff;
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Responsive */
/* Pour smartphones (jusqu'à 576px) */
@media (max-width: 576px) {
    body {
        padding-top: 60px;
        padding-bottom: 70px;
    }
    
    .navbar-desktop {
        display: none;
    }
    
    .mobile-top-bar {
        display: block;
    }
    
    .mobile-bottom-nav {
        display: block;
    }
    
    .footer {
        display: none;
    }
    
    main {
        padding-top: 15px;
        padding-bottom: 15px;
        margin-bottom: 10px;
    }
}

/* Pour tablettes (de 577px à 768px) */
@media (min-width: 577px) and (max-width: 768px) {
    body {
        padding-top: 60px;
        padding-bottom: 70px;
    }
    
    .navbar-desktop {
        display: none;
    }
    
    .mobile-top-bar {
        display: block;
        height: 65px;
    }
    
    .mobile-bottom-nav {
        display: block;
        height: 75px;
    }
    
    .footer {
        display: none;
    }
    
    .mobile-logo-img {
        height: 40px;
    }
    
    .mobile-brand-name {
        font-size: 1.4rem;
    }
    
    .mobile-nav-link i {
        font-size: 1.5rem;
    }
    
    .mobile-nav-text {
        font-size: 0.8rem;
    }
    
    main {
        padding-top: 20px;
        padding-bottom: 20px;
        margin-bottom: 15px;
    }
}

/* Pour desktop (à partir de 769px) */
@media (min-width: 769px) {
    .mobile-top-bar {
        display: none;
    }
    
    .mobile-bottom-nav {
        display: none;
    }
    
    .navbar-desktop {
        display: flex;
    }
    
    .footer {
        display: block;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* Pour les très grands écrans */
@media (min-width: 1200px) {
    .navbar-desktop .nav-link {
        padding: 10px 20px;
        margin: 0 10px;
        font-size: 1.1rem;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .brand-name {
        font-size: 1.8rem;
    }
    
    .btn-logout-desktop {
        padding: 10px 25px;
        font-size: 1.1rem;
    }
    
    .footer-content {
        font-size: 1rem;
        padding: 25px 0;
    }
}

/* Animation pour la navbar mobile */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    animation: fadeInUp 0.3s ease-out;
}

/* Transition pour les changements d'état */
.navbar-desktop .nav-link,
.mobile-nav-link,
.btn-logout-desktop,
.btn-logout-mobile {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Style pour le contenu principal */
main {
    flex: 1;
}

/* Assurer que le contenu ne soit pas caché derrière la navbar */
@media (min-width: 769px) {
    main {
        padding-top: 20px;
    }
}

/* Modal de confirmation pour déconnexion */
.logout-modal .modal-content {
    border-radius: 15px;
    border: none;
}

.logout-modal .modal-header {
    background: linear-gradient(90deg, #c7c7c7, #6f84a0, #FFFACD);
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.logout-modal .modal-body {
    padding: 30px;
    text-align: center;
}

.logout-modal .modal-footer {
    border-top: none;
    justify-content: center;
}

.btn-confirm-logout {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 500;
}

.btn-confirm-logout:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.btn-cancel-logout {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 500;
}

.btn-cancel-logout:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}



/* Styles supplémentaires pour les fonctionnalités JS */

/* Animation pour l'indicateur de page active */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Style pour le loader de page */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #c7c7c7, #6f84a0, #FFFACD);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

#page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Style pour les notifications */
.alert.position-fixed {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Amélioration du responsive */
@media (max-width: 768px) {
    main {
        transition: padding 0.3s ease;
    }
}

/* Animation pour les liens actifs */
.mobile-nav-link.active {
    position: relative;
}

/* Transition fluide pour les changements d'état */
.navbar-desktop .nav-link,
.mobile-nav-link,
.btn-logout-desktop,
.btn-logout-mobile {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Style pour le modal de déconnexion */
.logout-modal .modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.logout-modal .modal-header {
    background: linear-gradient(90deg, #c7c7c7, #6f84a0, #FFFACD);
    border-bottom: none;
}

.logout-modal .modal-body {
    text-align: center;
    padding: 2rem;
}

.logout-modal .modal-footer {
    border-top: none;
    justify-content: center;
    padding-bottom: 2rem;
}

.btn-confirm-logout {
    background: linear-gradient(90deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-confirm-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.btn-cancel-logout {
    background: linear-gradient(90deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cancel-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Ajoutez ces styles à votre fichier style.css existant */

/* Styles pour l'affichage du nom d'utilisateur */
.user-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-display-desktop {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.user-display-desktop:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.user-display-mobile {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
}

.user-name-desktop {
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name-mobile {
    color: #333;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.user-avatar-mobile {
    width: 28px;
    height: 28px;
}

.user-avatar i {
    color: #333;
    font-size: 0.9rem;
}

.user-avatar-mobile i {
    font-size: 0.8rem;
}

.mobile-user-info-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Ajustements pour le mobile-top-bar */
.mobile-top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 10px;
}

/* Ajustements responsive */
@media (max-width: 768px) {
    .user-display-mobile {
        max-width: 120px;
        padding: 3px 6px;
    }
    
    .user-name-mobile {
        font-size: 0.8rem;
    }
    
    .mobile-user-info-section {
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .user-display-mobile {
        max-width: 100px;
    }
    
    .user-name-mobile {
        font-size: 0.75rem;
    }
    
    .user-avatar-mobile {
        width: 24px;
        height: 24px;
    }
    
    .mobile-top-bar-content {
        padding: 0 8px;
    }
}

@media (max-width: 480px) {
    .user-display-mobile {
        max-width: 80px;
    }
    
    .user-name-mobile {
        font-size: 0.7rem;
    }
    
    .user-avatar-mobile {
        width: 22px;
        height: 22px;
    }
    
    .user-avatar-mobile i {
        font-size: 0.7rem;
    }
}

@media (max-width: 360px) {
    .user-display-mobile {
        max-width: 60px;
    }
    
    .user-name-mobile {
        display: none; /* Cache le nom sur les très petits écrans */
    }
    
    .mobile-user-info-section {
        gap: 5px;
    }
}

/* Animation pour le survol de l'avatar */
.user-avatar {
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.4);
}