/* --- Variables de couleur et Polices --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #0d233a;
    --orange-color: #ff5722;
    --orange-hover: #e04e1b;
    --bg-light: #fdf6f2;
    --text-dark: #333333;
    --text-gray: #666666;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --footer-bg: #111111;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Voile sombre arrière-plan --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

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

/* --- Barre de navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-toggle {
    display: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* --- Contrôle strict du Logo --- */
.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo img {
    height: 32px !important;
    width: auto !important;
    max-width: none !important;
    object-fit: contain;
    display: block;
}

.logo h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    white-space: nowrap;
}

.text-orange { color: var(--orange-color); }

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    margin: 0 15px;
    transition: color 0.3s;
}

.nav-links a.active {
    color: var(--orange-color);
    border-bottom: 2px solid var(--orange-color);
    padding-bottom: 5px;
}

.close-menu {
    display: none;
}

/* --- Bouton Téléchargement --- */
.btn-download {
    background-color: var(--orange-color);
    color: white !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-download:hover {
    background-color: var(--orange-hover);
    transform: translateY(-2px);
}

/* --- Section Conteneur Principal --- */
.container {
    max-width: 1280px;
    margin: 30px auto;
    padding: 0 20px;
    flex-grow: 1;
}

.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.hero-section p {
    color: var(--text-gray);
    font-size: 16px;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Grille et Cartes --- */
.grid-realisations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.badge {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.badge-electricite { background-color: #ffe6cc; color: #d35400; }

.card-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.description {
    font-size: 13.5px;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888888;
    border-top: 1px solid #f1f1f1;
    padding-top: 12px;
}

.card-footer span i {
    margin-right: 4px;
    color: #aaaaaa;
}

/* --- Bouton WhatsApp Texte (Haut à gauche) --- */
.wa-container-left {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    max-width: 1280px;
    margin: 20px auto 0 auto;
    padding: 0 20px;
}

.whatsapp-audit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    transition: all 0.3s ease;
}

.whatsapp-audit-btn:hover {
    background-color: #20ba5a;
    transform: translateY(-2px);
}

.whatsapp-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-right: 8px;
    flex-shrink: 0;
}

/* --- Bouton WhatsApp Flottant (Bas à droite) --- */
.float-whatsapp {
    position: fixed;
    width: 55px;
    height: 55px;
    bottom: 25px;
    right: 20px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.float-whatsapp:hover {
    background-color: #20ba5a;
    transform: scale(1.1);
}

/* --- Footer --- */
.footer {
    background-color: var(--footer-bg);
    color: #ffffff;
    padding: 50px 0 20px 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-col h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-text {
    color: #aaaaaa;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px;
    max-width: 400px;
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    background-color: #222222;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-decoration: none;
}

.footer-links, .footer-contact { list-style: none; }
.footer-links li, .footer-contact li { margin-bottom: 12px; font-size: 14px; color: #aaaaaa; }
.footer-links li a { color: #aaaaaa; text-decoration: none; }

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #222222;
    font-size: 13px;
    color: #666666;
}

/* --- Adaptations Mobiles --- */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 12px !important;
    }

    .menu-toggle {
        display: block;
        font-size: 1.05rem !important;
    }

    /* 1. Header & Logo */
    .logo img {
        height: 20px !important;
    }

    .logo h2 {
        font-size: 0.75rem !important;
    }

    .btn-download {
        font-size: 0.55rem !important;
        padding: 4px 8px !important;
        border-radius: 4px !important;
    }

    .btn-download i {
        font-size: 0.65rem !important;
    }

    /* 2. Adaptation des boutons WhatsApp */
    .wa-container-left {
        justify-content: flex-start !important;
        padding: 0 12px !important;
        margin-top: 15px !important;
    }

    .whatsapp-audit-btn {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }

    .whatsapp-icon {
        width: 14px !important;
        height: 14px !important;
        margin-right: 5px !important;
    }

    .float-whatsapp {
        width: 48px;
        height: 48px;
        bottom: 20px;
        right: 15px;
        font-size: 26px;
    }

    /* 3. FIXATION DU FOOTER (Passage en 1 seule colonne) */
    .footer-container {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 25px !important;
        padding: 0 15px !important;
        text-align: left;
    }

    .footer-col {
        width: 100% !important;
    }

    .footer-text {
        max-width: 100% !important;
        font-size: 13px !important;
    }

    .footer-col h3 {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }

    /* Lisibilité du logo dans le footer sombre */
    .footer-logo h2 {
        color: #ffffff !important;
        font-size: 1rem !important;
    }

    /* Menu latéral */
    .nav-links {
        position: fixed;
        top: 0;
        left: -280px;
        width: 250px;
        height: 100vh;
        background-color: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 20px 20px 20px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin-bottom: 20px;
        width: 100%;
    }

    .nav-links a {
        font-size: 0.95rem;
        display: block;
        width: 100%;
        margin: 0;
    }

    .close-menu {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 1.4rem;
        cursor: pointer;
        color: var(--text-dark);
    }

    .hero-section h1 { font-size: 22px; }
    }
    
