/* ============================================ */
/* HEADER MODERNE - STYLES                      */
/* ============================================ */

/* Reset du padding pour le main */
.main-content {
    padding-top: 80px;
}

/* ===== NAVBAR GLASSMORPHISM ===== */
.glass-nav {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    padding: 6px 0;
}

/* ===== BRAND ===== */
.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 105, 20, 0.2);
}

.brand-wrapper:hover .brand-icon {
    transform: rotate(-5deg) scale(1.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-primary {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.brand-secondary {
    font-weight: 300;
    font-size: 1.3rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* ===== NAVIGATION LINKS ===== */
.navbar-nav .nav-link {
    position: relative;
    padding: 8px 16px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
}

.navbar-nav .nav-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
    background: rgba(139, 105, 20, 0.06);
}

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

.navbar-nav .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Indicateur de navigation */
.nav-indicator {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav .nav-link.active .nav-indicator,
.navbar-nav .nav-link:hover .nav-indicator {
    width: 60%;
}

/* ===== TOGGLER ANIMÉ ===== */
.nav-toggler {
    border: none !important;
    padding: 8px !important;
    background: transparent !important;
}

.nav-toggler:focus {
    box-shadow: none !important;
}

.toggler-icon {
    display: block;
    width: 28px;
    height: 3px;
    margin: 5px 0;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-toggler[aria-expanded="true"] .toggler-icon:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggler[aria-expanded="true"] .toggler-icon:nth-child(2) {
    opacity: 0;
}

.nav-toggler[aria-expanded="true"] .toggler-icon:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== BOUTONS ACTIONS ===== */
.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
}

.btn-icon:hover {
    background: rgba(139, 105, 20, 0.08);
    transform: scale(1.05);
}

.btn-icon i {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.btn-icon:hover i {
    color: var(--primary-color);
}

/* Badge de notification */
.badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Admin link */
.admin-link i {
    color: var(--primary-color) !important;
}

/* ===== USER DROPDOWN ===== */
.user-dropdown {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 4px 12px 4px 4px !important;
    border-radius: 50px !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.user-dropdown:hover {
    border-color: var(--primary-color);
    background: rgba(139, 105, 20, 0.04);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.user-dropdown[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* ===== GLASS DROPDOWN ===== */
.glass-dropdown {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px !important;
    padding: 8px;
    min-width: 260px;
    margin-top: 10px;
}

.glass-dropdown .dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin-right: 12px;
}

.dropdown-user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.dropdown-user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.glass-dropdown .dropdown-item {
    padding: 10px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.glass-dropdown .dropdown-item:hover {
    background: rgba(139, 105, 20, 0.06);
    color: var(--primary-color);
}

.glass-dropdown .dropdown-item i {
    font-size: 1rem;
    width: 20px;
}

.glass-dropdown .logout-item:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.glass-dropdown .dropdown-divider {
    margin: 6px 0;
    border-color: rgba(0, 0, 0, 0.05);
}

/* ===== BOUTONS CONNEXION/INSCRIPTION ===== */
.btn-login {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 16px !important;
    border-radius: 50px !important;
    color: var(--text-secondary) !important;
    transition: all 0.3s ease !important;
}

.btn-login:hover {
    color: var(--primary-color) !important;
    background: rgba(139, 105, 20, 0.06) !important;
}

.btn-register {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    margin-left: 8px !important;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 105, 20, 0.3);
}

/* ===== FLASH MESSAGES ===== */
.flash-messages {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    max-width: 420px;
    width: 100%;
}

.alert-flash {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.alert-flash .alert-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-flash .alert-content {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-flash .alert-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    padding: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.alert-flash .alert-close:hover {
    opacity: 1;
}

.alert-flash.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert-flash.alert-success .alert-icon {
    color: #10b981;
}

.alert-flash.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-flash.alert-danger .alert-icon {
    color: #ef4444;
}

.alert-flash.alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert-flash.alert-warning .alert-icon {
    color: #f59e0b;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .glass-nav {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
    }
    
    .navbar-nav .nav-link {
        padding: 12px 16px;
        border-radius: 10px;
    }
    
    .navbar-nav .nav-link i {
        width: 24px;
    }
    
    .nav-indicator {
        display: none;
    }
    
    .user-dropdown {
        border: none;
        padding: 12px 16px !important;
        border-radius: 10px !important;
    }
    
    .user-dropdown:hover {
        background: rgba(139, 105, 20, 0.06);
    }
    
    .btn-register {
        margin-left: 0 !important;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    .btn-login {
        width: 100%;
        justify-content: center;
    }
    
    .flash-messages {
        top: 80px;
        right: 10px;
        left: 10px;
        max-width: 100%;
    }
    
    .main-content {
        padding-top: 70px;
    }
}

@media (max-width: 576px) {
    .brand-tagline {
        display: none;
    }
    
    .brand-primary,
    .brand-secondary {
        font-size: 1.1rem;
    }
    
    .brand-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .user-name {
        display: none !important;
    }
}

/* ===== SCROLL ANIMATION ===== */
.glass-nav.scrolled .brand-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
}

.glass-nav.scrolled .brand-primary,
.glass-nav.scrolled .brand-secondary {
    font-size: 1.1rem;
}

/* ===== SUPPRESSION DU SCROLLBAR EXTRA ===== */
body {
    padding-top: 0;
}