.navbar {
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}
/* Compensation pour la navbar fixe */
body { padding-top: 64px; }

/* 🟢 CLIENT - Violet */
.navbar-client {
    background: linear-gradient(90deg, #6d28d9, #8b5cf6);
}
/* 🟠 OWNER - Bleu nuit */
.navbar-owner {
    background-color: #0f172a;
}
/* 🔴 ADMIN - Noir profond */
.navbar-admin {
    background-color: #000000;
}
/* 👤 Guest */
.navbar-guest {
    background: linear-gradient(90deg, #6d28d9, #8b5cf6);
}

/* Texte et logo */
.logo a {
    color: #ffffff;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0 auto; /* Centrer les liens sur desktop */
}
.nav-links a {
    color: #e5e7eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px; /* Espace entre icône et texte (pour sous-menus) */
}
.nav-links a:hover {
    color: #ffffff;
}
.nav-links li.active > a,
.nav-links li.active > a i {
    color: #ffffff;
    opacity: 1;
    position: relative;
}
.nav-links li.active > a::after {
    content: '';
    display: block;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
}
.nav-links a i {
    font-size: 24px; /* Taille des icônes principales pour visibilité */
}
.logout-btn {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px;
    width: 100%; /* Pour mieux s'adapter dans sous-menus */
}

/* Boutons d'action dans les sous-menus (ex: "Mon espace client") */
.submenu-btn {
    background: none;
    border: none;
    color: #000;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}
.submenu-btn:hover {
    color: #6d28d9;
}

/* Styles pour sous-menus */
.has-submenu {
    position: relative; /* Pour positionner les sous-menus relativement */
}
.submenu {
    display: none; /* Cacher les sous-menus par défaut */
    position: absolute;
    top: 100%; /* Sous le menu principal */
    left: 0;
    background: #87CEEB; /* Bleu ciel au lieu de blanc */
    color: #000; /* Texte noir pour contraste */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px;
    min-width: 200px; /* Plus large pour textes longs */
    z-index: 1000;
    transition: all 0.3s ease; /* Animation fluide pour ouverture */
}
.submenu li {
    margin: 5px 0;
}
.submenu a {
    color: #000;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px; /* Espace pour icônes dans sous-menus */
}
.has-submenu:hover .submenu {
    display: block; /* Ouvrir au hover sur desktop */
}

/* Full-Screen Menu (gardé si besoin, mais non utilisé ici) */
.full-screen-menu {
    height: 0;
    width: 100%;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-y: hidden;
    transition: 0.5s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.full-screen-menu .menu-content {
    text-align: center;
}
.full-screen-menu .menu-content a,
.full-screen-menu .menu-content button {
    display: block;
    margin: 20px 0;
    color: white;
    font-size: 24px;
    text-decoration: none;
}

/* Responsive pour mobile (Bottom Tab Bar) */
@media (max-width: 768px) {
    /* La navbar passe en bas sur mobile : on annule le décalage prévu pour la navbar du haut */
    body {
        padding-top: 0;
        padding-bottom: 70px;
    }
    .navbar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px 0;
        justify-content: center;
        z-index: 999;
    }
    .logo {
        display: none; /* Masquer le logo sur mobile */
    }
    .nav-links {
        width: 100%;
        gap: 0;
        justify-content: space-around;
    }
    .nav-links li {
        flex: 1;
        text-align: center;
    }
    .nav-links a {
        flex-direction: column;
        gap: 4px;
    }
    .nav-links a i {
        font-size: 24px; /* Icônes plus grandes sur mobile */
    }
    /* Sous-menus sur mobile : Ouvrir vers le haut */
    .has-submenu {
        position: relative;
    }
    .submenu {
        position: absolute;
        bottom: 100%; /* Ouvrir vers le haut (au-dessus de la barre bottom) */
        top: auto; /* Annule le top:100% */
        left: 50%;
        transform: translateX(-50%); /* Centrer horizontalement */
        background: #87CEEB; /* Bleu ciel */
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1); /* Ombre vers le haut */
        padding: 15px; /* Plus d'espace pour beauté */
        min-width: auto; /* Adapter à la largeur */
        width: max-content; /* Ne pas dépasser */
        max-width: 90vw; /* Limite pour petits écrans */
        transition: all 0.3s ease;
    }
    .has-submenu:hover .submenu {
        display: none; /* Désactiver hover sur mobile */
    }
    .submenu.open {
        display: block !important; /* Ouvrir avec JS (prioritaire sur le :hover ci-dessus) */
    }
    .submenu a,
    .submenu-btn {
        padding: 8px 4px; /* Zone de clic plus grande sur mobile */
    }
}

/* CSS pour auth-container (inchangé) */
.auth-container {
    width: 400px;
    max-width: calc(100% - 32px);
    margin: 60px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
@media (max-width: 480px) {
    .auth-container {
        margin: 30px auto;
        padding: 20px;
    }
}
.auth-container h2 {
    text-align: center;
    margin-bottom: 25px;
}
.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}
.form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.password-wrapper {
    position: relative;
}
.toggle-password {
    position: absolute;
    right: 10px;
    top: 35px;
    cursor: pointer;
}
.btn-auth {
    width: 100%;
    padding: 10px;
    background: #6d28d9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.btn-auth:hover {
    background: #5b21b6;
}
.auth-link {
    text-align: center;
    margin-top: 15px;
}
.error {
    color: red;
    font-size: 12px;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}
