/**
 * =============================================================================
 * DEMO TEMPLATE - LAYOUT 3 COLONNES
 * =============================================================================
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.site-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 100px;
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.site-header nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.site-header nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.site-header nav a:hover {
    opacity: 0.8;
}

/* LAYOUT PRINCIPAL */
.main-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    max-width: 1400px;
    width: 100%;
    margin: 30px auto;
    padding: 0 30px;
}

/* SIDEBAR GAUCHE */
.sidebar-left {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
    min-height: 500px;
}

.sidebar-left h3 {
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.sidebar-left nav ul {
    list-style: none;
}

.sidebar-left nav li {
    margin-bottom: 12px;
}

.sidebar-left nav a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-left nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* CONTENU CENTRAL */
.content-area {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    min-height: 500px;
}

.content-area h2 {
    color: #1e40af;
    margin-bottom: 25px;
    font-size: 32px;
}

.content-area p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
}

/* SIDEBAR DROITE */
.sidebar-right {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
    min-height: 500px;
}

.sidebar-right h3 {
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.sidebar-right nav ul {
    list-style: none;
}

.sidebar-right nav li {
    margin-bottom: 12px;
}

.sidebar-right nav a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-right nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* FOOTER */
.site-footer {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    color: white;
    padding: 0;
    margin-top: auto;
    height: 80px;
    display: flex;
    align-items: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content p {
    margin: 0;
}

.site-footer nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

.site-footer nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.2s;
}

.site-footer nav a:hover {
    opacity: 0.8;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 200px 1fr 200px;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-left,
    .sidebar-right {
        min-height: auto;
    }
    
    .header-content,
    .footer-content {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .site-header {
        height: auto;
    }
    
    .site-footer {
        height: auto;
    }
}

/* =============================================================================
   RESPONSIVE MOBILE
   ============================================================================= */

/* Burger menu (caché par défaut) */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Menu mobile (caché par défaut) */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #1e40af;
    color: white;
}

.mobile-menu-header h2 {
    margin: 0;
    font-size: 20px;
}

.close-menu {
    background: none;
    border: none;
    font-size: 32px;
    color: white;
    cursor: pointer;
    line-height: 1;
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-menu-content nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-content nav li {
    margin-bottom: 15px;
}

.mobile-menu-content nav a {
    display: block;
    padding: 12px 15px;
    color: #1f2937;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s;
}

.mobile-menu-content nav a:hover {
    background: #f3f4f6;
}

/* Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

.mobile-overlay.active {
    display: block;
}

/* Menu desktop caché par défaut en mobile */
.desktop-menu {
    display: block;
}

/* MEDIA QUERIES */
@media (max-width: 768px) {
    
    /* Afficher le burger, cacher le menu desktop */
    .burger-menu {
        display: flex;
    }
    
    .desktop-menu {
        display: none;
    }
    
    /* Header */
    .site-header {
        height: auto;
        padding: 15px 0;
    }
    
    .header-content {
        padding: 0 20px;
    }
    
    .site-logo {
        font-size: 20px;
    }
    
    /* Layout en colonne unique */
    .main-layout {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 20px;
        margin: 20px auto;
    }
    
    /* Sidebars */
    .sidebar-left,
    .sidebar-right {
        min-height: auto;
        padding: 20px;
    }
    
    /* Content */
    .content-area {
        padding: 25px 20px;
    }
    
    .content-area h2 {
        font-size: 24px;
    }
    
    /* Footer */
    .site-footer {
        height: auto;
        padding: 20px 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .site-footer nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .site-logo {
        font-size: 18px;
    }
    
    .content-area {
        padding: 20px 15px;
    }
    
    .sidebar-left h3,
    .sidebar-right h3 {
        font-size: 16px;
    }
}