/* === HEADER MODERNE === */
.modern-header {
    position: fixed;
    height: 80px;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
}

.modern-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--karmine-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modern-header:hover::before {
    opacity: 0.02;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* === NAVIGATION PRINCIPALE === */
.nav-modern {
    display: flex;
    gap: 2rem;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition-smooth);
    overflow: hidden;
    font-weight: 500;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--karmine-gradient);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    border-radius: var(--radius-md);
    transform: scale(0.8);
}

.nav-item:hover::before {
    opacity: 0.1;
    transform: scale(1);
}

.nav-item:hover {
    color: var(--karmine-blue);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.nav-item.active {
    background: var(--karmine-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.nav-item.active::before {
    opacity: 0;
}

.nav-icon {
    font-size: 1.1rem;
    z-index: 2;
    position: relative;
    transition: transform var(--transition-normal);
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    z-index: 2;
    position: relative;
    font-weight: 600;
    transition: letter-spacing var(--transition-normal);
}

.nav-item:hover .nav-text {
    letter-spacing: 0.02em;
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--karmine-blue);
    transition: width var(--transition-bounce);
    border-radius: 2px;
}

.nav-item:hover .nav-indicator {
    width: 80%;
}

.nav-item.active .nav-indicator {
    width: 0;
}

/* === ACTIONS HEADER === */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* === BOUTON HAMBURGER === */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    padding: 0;
    position: relative;
    z-index: 1001;
    transition: transform var(--transition-smooth);
}

.hamburger-btn:hover {
    transform: scale(1.1);
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--karmine-blue);
    border-radius: 2px;
    transition: all var(--transition-smooth);
    transform-origin: center;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* === OVERLAY ET SIDEBAR === */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-smooth);
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === STRUCTURE SIDEBAR AVEC FLEXBOX === */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: right var(--transition-smooth);
    z-index: 1000;

    /* Structure flexbox pour footer fixe */
    display: flex;
    flex-direction: column;
}

.sidebar-menu.active {
    right: 0;
}

/* === HEADER SIDEBAR === */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(135deg,
    rgba(0, 212, 255, 0.1),
    rgba(0, 150, 255, 0.05)
    );
    flex-shrink: 0; /* Ne se réduit pas */
}

.sidebar-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--karmine-blue);
    transform: rotate(90deg);
}

/* === CONTENU PRINCIPAL SCROLLABLE === */
.sidebar-content {
    flex: 1; /* Prend tout l'espace disponible */
    overflow-y: auto;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border-left: 4px solid transparent;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--karmine-gradient);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    z-index: -1;
}

.sidebar-item:hover::before {
    opacity: 0.1;
}

.sidebar-item:hover {
    color: var(--karmine-blue);
    border-left-color: var(--karmine-blue);
    transform: translateX(10px);
    background: rgba(0, 212, 255, 0.05);
}

.sidebar-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    transition: transform var(--transition-normal);
}

.sidebar-item:hover .sidebar-icon {
    transform: scale(1.2);
}

.sidebar-text {
    font-weight: 500;
    font-size: 0.95rem;
    transition: letter-spacing var(--transition-normal);
}

.sidebar-item:hover .sidebar-text {
    letter-spacing: 0.02em;
}

/* === FOOTER FIXE EN BAS === */
.sidebar-footer {
    flex-shrink: 0; /* Ne se réduit pas */
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    background: linear-gradient(135deg,
    rgba(0, 0, 0, 0.1),
    rgba(0, 50, 100, 0.05)
    );
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* === BOUTONS DU FOOTER === */
.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    width: 100%;
    text-align: left;
    backdrop-filter: blur(10px);
}

.sidebar-btn.primary {
    background: var(--karmine-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.sidebar-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.sidebar-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--karmine-blue);
    transform: translateY(-1px);
    border-color: var(--karmine-blue);
}

.sidebar-btn.tertiary {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-btn.tertiary:hover {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1.1rem;
    transition: transform var(--transition-normal);
}

.sidebar-btn:hover .btn-icon {
    transform: scale(1.1);
}

.btn-text {
    transition: letter-spacing var(--transition-normal);
}

.sidebar-btn:hover .btn-text {
    letter-spacing: 0.02em;
}

/* === ANIMATIONS === */
.sidebar-item {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInFromRight 0.3s ease forwards;
}

.sidebar-item:nth-child(1) { animation-delay: 0.1s; }
.sidebar-item:nth-child(2) { animation-delay: 0.15s; }
.sidebar-item:nth-child(3) { animation-delay: 0.2s; }
.sidebar-item:nth-child(4) { animation-delay: 0.25s; }
.sidebar-item:nth-child(5) { animation-delay: 0.3s; }
.sidebar-item:nth-child(6) { animation-delay: 0.35s; }

.sidebar-btn {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInFromBottom 0.3s ease forwards;
}

.sidebar-btn:nth-child(1) { animation-delay: 0.4s; }
.sidebar-btn:nth-child(2) { animation-delay: 0.45s; }
.sidebar-btn:nth-child(3) { animation-delay: 0.5s; }

@keyframes slideInFromRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromBottom {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SCROLLBAR PERSONNALISÉE === */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--karmine-blue);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--karmine-light);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-modern {
        display: none;
    }

    .sidebar-menu {
        width: 100%;
        right: -100%;
    }

    .sidebar-footer {
        padding: 1rem;
        gap: 0.5rem;
    }

    .sidebar-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}
