/* Variables de couleurs */
:root {
    --primary-color: #f39c12; /* Jaune/Orange solaire */
    --dark-bg: #1a252f;
    --text-main: #333333;
    --text-light: #ffffff;
    --bg-light: #f4f4f4;
}

/* Réinitialisation de base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---------------------------------- */
/* EN-TÊTE / NAVBAR                  */
/* ---------------------------------- */
header {
    background-color: #FFFFFF;
    border-bottom: 1px solid #F3F4F6;
    position: relative;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo img {
    height: 40px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
}

nav a {
    text-decoration: none;
    color: #6B7280;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

nav a:hover {
    color: #1470AF;
}

nav a.active {
    color: #FF914D;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 600;
}

.header-ctas {
    display: flex;
    align-items: center;
    gap: 24px;
}

.phone-number {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1470AF;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid #E5E7EB;
    padding: 10px 16px;
    border-radius: 6px;
}

.phone-number img {
    width: 16px;
}

/* BOUTONS */
.btn-diagnostic {
    background-color: #1470AF;
    color: #FFFFFF;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-diagnostic a {
    color: #FFFFFF;
    text-decoration: none;
}

.btn-secondary {
    background-color: #FFFFFF;
    color: #6B7280;
    padding: 12px 24px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

/* Menu déroulant */
.dropdown {
    position: relative;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--text-light);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    top: 100%;
    left: 0;
    flex-direction: column;
    gap: 0;
}
.dropdown:hover .dropdown-content {
    display: flex;
}
.dropdown-content li {
    width: 100%;
}
.dropdown-content li a {
    padding: 15px 20px;
    display: block;
    text-transform: none;
}
.dropdown-content li a:hover {
    background-color: #f4f4f4;
}

/* Hero Section avec l'image dans le HTML et texte superposé */
.hero-image-container {
    position: relative; /* Permet de superposer les éléments à l'intérieur */
    width: 100%;
    height: 60vh; /* Hauteur de la section */
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* L'image remplit tout l'espace sans se déformer */
    z-index: 1; /* Place l'image en arrière-plan */
}

.hero-titles {
    position: relative; /* Place le texte au-dessus de l'image absolue */
    z-index: 2; /* Assure que le texte est au premier plan */
    text-align: center;
    padding: 40px;
    background-color: rgba(26, 37, 47, 0.3); /* Fond noir semi-transparent pour la lisibilité */
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
}

.hero-titles h1 {
    font-size: 38px;
    color: #ffffff; /* Le texte passe en blanc */
    margin: 0 auto 20px;
    line-height: 1.3;
}

.hero-titles h2 {
    font-size: 22px;
    color: var(--primary-color);
    font-weight: 400;
}

/* Ajustement Responsive pour le Hero */
@media (max-width: 768px) {
    .hero-image-container {
        height: 50vh;
    }
    .hero-titles {
        padding: 25px;
    }
    .hero-titles h1 {
        font-size: 26px;
    }
    .hero-titles h2 {
        font-size: 18px;
    }
}

/* Contenu textuel + image illustrative */
.content-wrapper {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.content-text {
    flex: 2;
}

.content-text p {
    margin-bottom: 25px;
    font-size: 17px;
    text-align: justify;
}

.content-image-small {
    flex: 1;
}

.content-image-small img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* --- FOOTER --- */
.site-footer {
    background-color: #2D2D2D;
    color: #FFFFFF;
    padding: 60px 20px 30px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- LOGO --- */
.footer-logo {
    margin-bottom: 60px;
}

.footer-logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

/* --- GRILLE DE LIENS --- */
.footer-links-grid {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 60px;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px; /* Espace entre le bloc du haut et du bas de la même colonne */
}

.footer-block h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.footer-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-block li {
    margin-bottom: 12px;
}

.footer-block a {
    color: #D1D5DB; /* Gris clair */
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-block a:hover {
    color: #FFFFFF;
}

/* --- BAS DU FOOTER --- */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 20px;
}

.copyright {
    color: #D1D5DB;
    font-size: 0.8rem;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.social-icons a:hover img {
    transform: scale(1.1);
}


/* ========================================= */
/* --- RESPONSIVE DESIGN ---                 */
/* ========================================= */

/* --- TABLETTES (Largeur max : 992px) --- */
@media (max-width: 992px) {
    /* On empile le texte et l'image du contenu principal */
    .content-wrapper {
        flex-direction: column-reverse; /* L'image passera au-dessus du texte */
        text-align: center;
        gap: 30px;
    }

    .content-text p {
        text-align: left; /* Garde le texte lisible */
    }

    .content-image-small {
        width: 100%;
        max-width: 500px; /* Évite que l'image soit gigantesque sur tablette */
        margin: 0 auto;
    }
}

/* --- SMARTPHONES (Largeur max : 768px) --- */
@media (max-width: 768px) {
    
    /* HEADER : On centre tout et on empile */
    .header-container {
        flex-direction: column;
        gap: 20px;
        padding: 20px 15px;
    }

    nav ul {
        display: flex; /* 👈 Cette ligne force le menu à apparaître ! */
        flex-direction: column;
        gap: 10px;
    }

    /* Le sous-menu s'affiche en dessous au lieu de flotter par-dessus */
    .dropdown-content {
        position: relative;
        box-shadow: none;
        border-left: 3px solid var(--primary-color);
        margin-top: 10px;
        background-color: var(--bg-light);
    }

    /* 3. Boutons et appels à l'action en pleine largeur */
    .header-ctas {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .btn-diagnostic, .phone-number {
        width: 100%;
        justify-content: center;
    } 

    /* BOUTONS D'APPEL : Pleine largeur sur mobile */
    .header-ctas {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .phone-number, .btn-diagnostic {
        width: 100%;
        justify-content: center;
    }

    /* HERO SECTION : Réduire un peu plus les marges et textes */
    .hero-titles {
        width: 95%;
        padding: 20px 15px;
    }

    .hero-titles h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .hero-titles h2 {
        font-size: 16px;
    }



    /* 4. Footer empilé */
    .footer-links-grid {
        flex-direction: column;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}