:root {
    --bg-dark: #0a0d14;
    --bg-card: #12151c;
    --bg-lighter: #1a2332;
    --neon-blue: #00f6ff;
    --deep-blue: #001829;
    --accent-blue: #0088ff;
    --text-primary: #e0e0e0;
    --text-secondary: #8892b0;
    --gradient-blue: linear-gradient(135deg, #001829, #0a0d14);
    --sidebar-width: 260px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

.bg-dark {
    background: var(--bg-dark);
    background-image: radial-gradient(circle at 20% 30%, var(--deep-blue) 0%, transparent 50%), radial-gradient(circle at 80% 70%, #001220 0%, transparent 50%);
    min-height: 100vh;
}

/* Header Styles */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(135deg, #0f1520, var(--bg-lighter));
    border-bottom: 1px solid rgba(0, 246, 255, 0.2);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    height: 100%;
    max-width: 100%;
}

.btn-menu {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

    .btn-menu:hover {
        background: rgba(0, 246, 255, 0.1);
        color: var(--neon-blue);
    }

    /* Bouton pour rouvrir la sidebar en mode bureau */
    .btn-menu.sidebar-opener {
        margin-right: 1rem;
        border: 1px solid rgba(0, 246, 255, 0.3);
        border-radius: 0.5rem;
        transition: all 0.3s ease;
    }

        .btn-menu.sidebar-opener:hover {
            border-color: var(--neon-blue);
            box-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
        }

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: 2px solid var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin: 0 2rem;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 246, 255, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    width: 100%;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

    .search-bar:focus-within {
        border-color: var(--neon-blue);
        box-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
    }

.search-input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

    .search-input::placeholder {
        color: var(--text-secondary);
    }

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

    .notification-btn:hover {
        background: rgba(0, 246, 255, 0.1);
        color: var(--neon-blue);
    }

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: #ff3366;
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
    border-radius: 50%;
    min-width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-menu {
    position: relative;
}

.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--neon-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
}

    .profile-icon:hover {
        box-shadow: 0 0 15px rgba(0, 246, 255, 0.5);
    }

.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid rgba(0, 246, 255, 0.3);
    border-radius: 0.5rem;
    min-width: 150px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.profile-menu:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 246, 255, 0.1);
    transition: all 0.3s ease;
}

    .dropdown-menu a:hover {
        background: rgba(0, 246, 255, 0.1);
        color: var(--neon-blue);
    }

    .dropdown-menu a:last-child {
        border-bottom: none;
    }

/* Layout Container */
.layout-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: linear-gradient(135deg, #0f1520, var(--bg-lighter));
    border-right: 1px solid rgba(0, 246, 255, 0.2);
    overflow-y: auto;
    z-index: 999;
    transition: all 0.3s ease;
    transform: translateX(0);
}

    /* Sidebar fermée en mode bureau */
    .sidebar:not(.sidebar-open) {
        transform: translateX(-100%);
    }

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 246, 255, 0.2);
}

    .sidebar-header h3 {
        color: var(--neon-blue);
        font-size: 1.1rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        flex: 1;
    }

.sidebar-toggle {
    background: none;
    border: 1px solid rgba(0, 246, 255, 0.3);
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

    .sidebar-toggle:hover {
        background: rgba(0, 246, 255, 0.1);
        color: var(--neon-blue);
        border-color: var(--neon-blue);
        box-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
    }

.close-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

    .close-btn:hover {
        background: rgba(0, 246, 255, 0.1);
        color: var(--neon-blue);
    }

.nav-menu {
    padding: 1rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

    .nav-link:hover {
        background: rgba(0, 246, 255, 0.1);
        color: var(--neon-blue);
        border-left-color: var(--neon-blue);
    }

    .nav-link.active {
        background: rgba(0, 246, 255, 0.15);
        color: var(--neon-blue);
        border-left-color: var(--neon-blue);
    }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 0;
    padding: 2rem;
    background: var(--bg-dark);
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease;
}

.site-main {
    flex: 1;
    padding: 2rem;
    background: var(--bg-dark);
    background-image: radial-gradient(circle at 20% 30%, var(--deep-blue) 0%, transparent 50%), radial-gradient(circle at 80% 70%, #001220 0%, transparent 50%);
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease;
    width: 100%;
    max-width: none;
}

    /* Page d'accueil sans sidebar */
    .site-main.homepage {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

    .page-header h1 {
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--neon-blue);
        text-shadow: 0 0 15px rgba(0, 246, 255, 0.3);
        margin-bottom: 0.5rem;
    }

    .page-header p {
        color: var(--text-secondary);
        font-size: 1.1rem;
    }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 246, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

    .dashboard-card:hover {
        border-color: var(--neon-blue);
        box-shadow: 0 0 20px rgba(0, 246, 255, 0.2);
        transform: translateY(-2px);
    }

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--neon-blue);
}

    .card-header h3 {
        font-size: 1.1rem;
        font-weight: 600;
    }

.card-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 246, 255, 0.3);
}

.metric-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Recent Activity */
.recent-activity {
    background: var(--bg-card);
    border: 1px solid rgba(0, 246, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.activity-header {
    margin-bottom: 1.5rem;
}

    .activity-header h2 {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--neon-blue);
    }

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 246, 255, 0.1);
    transition: all 0.3s ease;
}

    .activity-item:hover {
        background: rgba(0, 246, 255, 0.05);
        border-color: rgba(0, 246, 255, 0.3);
    }

.activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 246, 255, 0.1);
    border-radius: 50%;
    color: var(--neon-blue);
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

    .activity-content p {
        color: var(--text-primary);
        margin-bottom: 0.25rem;
    }

.activity-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Overlay for mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

@media (max-width: 1024px) {
    .sidebar-overlay {
        display: block;
    }

    .close-btn {
        display: block;
    }

    .sidebar-toggle {
        display: none;
    }
}

@media (min-width: 1025px) {
    .close-btn {
        display: none;
    }

    .sidebar-toggle {
        display: flex;
    }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar-open {
        transform: translateX(0) !important;
    }

    .site-main:not(.homepage) {
        margin-left: 0;
        padding: 1rem;
    }

    .site-main.with-sidebar:not(.homepage),
    .site-main:not(.with-sidebar):not(.homepage) {
        margin-left: 0 !important;
    }

    .header-center {
        display: none;
    }

    .sidebar-toggle {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .sidebar {
        width: 100vw;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .site-main {
        padding: 1rem 0.5rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 246, 255, 0.3);
    border-radius: 3px;
}

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 246, 255, 0.5);
    }
