/* ===== NAVBAR RESPONSIVE - MOBILE FIRST ===== */

/* ===== NAVBAR DESKTOP (Masqué sur mobile) ===== */
.navbar-desktop {
    display: none;
}

/* ===== NAVBAR MOBILE (Visible par défaut) ===== */
.navbar-mobile {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gris-clair);
}

.navbar-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    min-height: 60px;
}

/* ===== MOBILE MENU BUTTON ===== */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--noir);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===== MOBILE LOGO ===== */
.mobile-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
}

.mobile-logo img {
    height: 52px;
    width: auto;
    max-width: 140px;
}

/* ===== MOBILE ICONS (Messages, etc) ===== */
.mobile-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.icon-link {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--noir);
    font-size: 1.2rem;
    transition: color var(--transition);
    border-radius: 8px;
}

.icon-link:hover {
    background: var(--fond);
    color: var(--or);
}

.badge-count {
    position: absolute;
    top: -6px;
    right: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--error);
    color: white;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
}

/* ===== MOBILE DRAWER ===== */
.mobile-drawer-new {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: white;
    z-index: 999;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer-new.active {
    left: 0;
}

/* ===== DRAWER HEADER ===== */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--gris-clair);
    background: var(--fond);
}

.drawer-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--noir);
    margin: 0;
}

.close-drawer {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    color: var(--noir);
    font-size: 1.2rem;
    transition: background var(--transition);
    cursor: pointer;
}

.close-drawer:hover {
    background: var(--gris-clair);
}

/* ===== DRAWER USER PROFILE ===== */
.drawer-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--gris-clair);
    background: white;
}

.drawer-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--or);
}

.drawer-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.drawer-username {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--noir);
    margin: 0;
}

.drawer-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--or-pale);
    color: var(--or-hover);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
    width: fit-content;
}

.drawer-link-badge:hover {
    background: var(--or);
    color: white;
}

/* ===== DRAWER MENU ===== */
.drawer-menu {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: white;
}

.drawer-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gris-moyen);
    padding: 12px 16px 8px;
    margin: 8px 0 0 0;
    border-top: 1px solid var(--gris-clair);
}

.drawer-section-title:first-child {
    border-top: none;
    margin-top: 0;
}

.drawer-menu li:not(.drawer-section-title) {
    border-bottom: 1px solid var(--gris-clair);
}

.drawer-menu li:last-child {
    border-bottom: none;
}

.drawer-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--noir);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.drawer-menu a i {
    font-size: 1.1rem;
    color: var(--or);
    width: 20px;
    text-align: center;
}

.drawer-menu a:hover {
    background: var(--fond);
    color: var(--or);
    padding-left: 18px;
}

.drawer-menu a .badge-dot {
    margin-left: auto;
    margin: 0;
}

/* ===== DRAWER FOOTER ===== */
.drawer-footer {
    padding: 16px;
    border-top: 1px solid var(--gris-clair);
    background: var(--fond);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== DRAWER LANGUAGE ===== */
.drawer-lang {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-lang label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--noir);
}

.drawer-lang-options {
    display: flex;
    gap: 8px;
}

.lang-opt {
    flex: 1;
    padding: 10px 12px;
    background: white;
    border: 2px solid var(--gris-clair);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gris-moyen);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    display: block;
}

.lang-opt:hover {
    border-color: var(--or);
    color: var(--or);
}

.lang-opt.active {
    background: var(--or);
    color: white;
    border-color: var(--or);
}

/* ===== DRAWER BUTTONS ===== */
.drawer-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: white;
    color: var(--error);
    border: 2px solid var(--error);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.drawer-logout:hover {
    background: var(--error);
    color: white;
}

.btn-drawer-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--or);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-drawer-primary:hover {
    background: var(--or-hover);
}

.btn-drawer-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: white;
    color: var(--noir);
    border: 2px solid var(--gris-clair);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-drawer-secondary:hover {
    border-color: var(--or);
    color: var(--or);
}

/* ===== MOBILE OVERLAY ===== */
.mobile-overlay-new {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-overlay-new.active {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
    pointer-events: all;
}

/* ===== PAGE BODY MOBILE ===== */
.page-body {
    padding-top: 60px;
    min-height: calc(100vh - 60px);
}

/* ===== TABLETTE (768px+) ===== */
@media (min-width: 768px) {
    .navbar-desktop {
        display: flex !important;
    }
    
    .navbar-mobile {
        display: none !important;
    }
    
    .navbar-desktop .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 24px;
    }
    
    .navbar-desktop .navbar-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 40px;
    }
    
    .nav-menu {
        display: flex;
        align-items: center;
        gap: 32px;
        margin: 0;
    }
    
    .nav-menu a {
        font-size: 0.9375rem;
        font-weight: 500;
        color: var(--gris-moyen);
        padding: 6px 0;
        position: relative;
        transition: color var(--transition);
    }
    
    .nav-menu a:hover {
        color: var(--noir);
    }
    
    .nav-menu a.active {
        color: var(--or);
        font-weight: 600;
    }
    
    .nav-menu a.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 2.5px;
        background: var(--or);
        border-radius: 2px;
    }
    
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 24px;
    }
    
    .page-body {
        padding-top: 72px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes drawerSlideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .mobile-drawer-new,
    .mobile-overlay-new,
    .mobile-menu-btn span {
        transition: none;
    }
}

/* ===== PRINT ===== */
@media print {
    .navbar-mobile,
    .navbar-desktop {
        display: none;
    }
}
