/* ===== STYLES DE BASE (DESKTOP) ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Top Nav --- */
.top-nav {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 10px 0;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.top-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-nav-left, .top-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-nav-left span { color: white; font-weight: 600; }
.top-nav-left a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex; align-items: center; padding: 5px 8px; border-radius: 4px;
}
.top-nav-left a:hover { color: #ff6600; }
.top-nav-left p { margin: 0; color: #ecf0f1; font-size: 13px; }
.top-nav-right { font-size: 13px; color: #ecf0f1; font-weight: 500; }

/* --- Header --- */
.header-main {
    background: #d3d3d3;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative; z-index: 50;
}

.header-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.logo img { height: 100px; width: auto; display: block; }

.quote-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.quote-text { color: #2c3e50; font-size: 18px; font-weight: 600; margin-bottom: 8px; }

.quote-button {
    background: #34495e; color: white; padding: 12px 24px; border: none; border-radius: 6px;
    text-decoration: none; font-size: 15px; font-weight: 600; transition: background 0.3s ease; text-transform: uppercase;
}
.quote-button:hover { background: #2980b9; }

.contact-info { color: #2c3e50; font-size: 15px; font-weight: 500; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

/* --- Navbar (Desktop Default) --- */
.nav-container {
    background: #ff6600;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav {
    display: flex; list-style: none; justify-content: center; gap: 0;
}

.nav-link {
    text-decoration: none; color: white; font-weight: 600; padding: 16px 22px;
    transition: background 0.3s ease; display: block; text-align: center;
    min-width: 140px; font-size: 14px; text-transform: uppercase;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.nav-link:hover { background: rgba(255, 255, 255, 0.15); }
.nav-item:last-child .nav-link { border-right: none; }

/* Elements cachés par défaut sur Desktop */
.menu-toggle { display: none; }
.sidebar-header { display: none; }
.menu-overlay { display: none; }

/* Dropdowns Desktop */
.nav-item { position: relative; }
.dropdown {
    position: absolute; top: 100%; left: 0; background: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); border-radius: 8px;
    padding: 15px 0; min-width: 280px; opacity: 0; visibility: hidden;
    transform: translateY(-10px); transition: all 0.3s ease; z-index: 1001;
    border-top: 3px solid #ff6600;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
    display: flex; align-items: center; padding: 14px 25px; color: #2c3e50;
    text-decoration: none; transition: background 0.3s ease; font-weight: 500;
}
.dropdown-item:hover { background: #f8f9fa; color: #ff6600; }
.dropdown-item i { margin-right: 12px; width: 20px; color: #ff6600; font-size: 16px; }

/* --- Footer (Code Original restauré) --- */
.footer {
    position: relative;
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.footer::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(44, 62, 80, 0.85); z-index: 1;
}

.footer-content, .footer-bottom { position: relative; z-index: 2; }

.footer-content {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; margin-bottom: 30px;
}

.footer-section h3 { margin-bottom: 20px; color: #ff6600; }
.footer-section p { margin-bottom: 10px; font-size: 14px; }
.footer-section a { color: #bdc3c7; text-decoration: none; transition: color 0.3s; }
.footer-section a:hover { color: #3f51b5; }

.social-icons { display: flex; gap: 15px; margin-top: 15px; }
.social-icon {
    width: 40px; height: 40px; background: #3f51b5; color: white; display: flex;
    align-items: center; justify-content: center; border-radius: 50%; text-decoration: none;
    transition: background 0.3s;
}
.social-icon:hover { background: #5c6bc0; }
.footer-bottom {
    text-align: center; padding-top: 20px; border-top: 1px solid #ff6600;
    color: #bdc3c7; font-size: 12px;
}

/* =========================================
   RESPONSIVE DESIGN (TABLETTE & MOBILE)
   ========================================= */
@media (max-width: 991px) {

    /* --- 1. OVERLAY --- */
    .menu-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.6); z-index: 998; display: none;
    }
    .menu-overlay.active { display: block; }

    /* --- 2. HEADER REORGANISÉ --- */
    .header-main-content {
        flex-wrap: wrap; padding: 10px 15px;
    }

    /* Le bouton Burger (Carré Orange) */
    .menu-toggle {
        display: flex; align-items: center; justify-content: center;
        width: 45px; height: 45px; background: #ff6600; color: white;
        font-size: 20px; border-radius: 4px; cursor: pointer; order: 1;
    }

    .logo { order: 2; margin-left: auto; }
    .logo img { height: 60px; }

    /* Section Devis/Contact sur une nouvelle ligne */
    .quote-section {
        order: 3; width: 100%; margin-top: 15px; padding-top: 15px;
        border-top: 1px solid #bbb; align-items: center; text-align: center;
        flex-direction: row; justify-content: space-around;
    }

    .quote-text { display: none; }
    .quote-button { font-size: 12px; padding: 8px 12px; }
    .contact-info { font-size: 13px; text-align: center; }

    /* Top Nav caché */
    .top-nav { display: none; }

    /* --- 3. SIDEBAR ORANGE (#ff6600) --- */
    .nav-container {
        position: fixed; top: 0; left: -100%; width: 280px; height: 100vh;
        background: #ff6600; /* Sidebar Orange */
        box-shadow: 2px 0 10px rgba(0,0,0,0.2); z-index: 999;
        transition: left 0.3s ease-in-out; overflow-y: auto; padding: 0;
    }

    .nav-container.active { left: 0; }

    /* En-tête Sidebar */
    .sidebar-header {
        display: flex; justify-content: space-between; align-items: center;
        background: #2c3e50; /* Header Bleu foncé pour contraste */
        color: white; padding: 15px 20px;
    }
    .sidebar-title { font-weight: bold; font-size: 18px; }
    .close-btn { cursor: pointer; font-size: 20px; }

    /* Liste Verticale */
    .nav { flex-direction: column; width: 100%; }
    .nav-item { width: 100%; }

    .nav-link {
        color: white; /* Texte Blanc sur fond Orange */
        border-right: none; border-bottom: 1px solid rgba(255,255,255,0.2);
        padding: 15px 20px;
    }
    
    .nav-link:hover {
        background: rgba(255,255,255,0.1); color: white;
    }

    /* --- 4. DROPDOWNS DANS SIDEBAR --- */
    .dropdown {
        position: static; box-shadow: none; border: none;
        background: #e65c00; /* Orange plus foncé pour les sous-menus */
        opacity: 1; visibility: visible; transform: none; width: 100%;
        display: block; padding-left: 0;
    }

    .dropdown-item {
        padding: 12px 20px 12px 40px; font-size: 13px;
        color: white; /* Texte blanc */
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dropdown-item:hover {
        background: rgba(255,255,255,0.1); color: white;
    }
    
    .dropdown-item i { color: white; margin-right: 10px; }
    
    /* Footer Ajustement Mobile */
    .footer-content { grid-template-columns: 1fr; }
    .social-icons { justify-content: center; }
}

@media (max-width: 400px) {
    .quote-section { flex-direction: column; gap: 10px; }
}