/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --primary: #252a34;    /* Anthracite - Toiture */
    --accent: #ffb400;     /* Jaune Or - Construction */
    --secondary: #08d9d6;  /* Cyan - Rénovation */
    --light: #f4f4f4;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   2. NAVIGATION & HEADER
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    background: var(--primary);
    position: sticky; 
    top: 0;
    z-index: 1000;
    height: 80px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
}

/* --- AJOUT DU STYLE LOGO IMAGE + TEXTE --- */
.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
}

.logo img {
    height: 55px; /* Ajustement pour un rendu optimal dans les 80px de la nav */
    width: auto;
    border-radius: 4px;
    display: block;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1;
}

.logo-text span { color: var(--accent); }

/* --- FIN DU STYLE LOGO --- */

#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none; 
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#backToTop:hover {
    transform: translateY(-5px);
    background: var(--white);
}

.nav-links { 
    display: flex; 
    list-style: none; 
    align-items: center; 
}

.nav-links li { margin-left: 30px; }

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover { color: var(--accent); }

.btn-nav-phone {
    background: var(--accent);
    color: var(--primary) !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
}

.btn-nav-phone:hover {
    background: var(--white);
    transform: scale(1.05);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1100;
}

.bar {
    width: 28px;
    height: 3px;
    background-color: var(--white);
    transition: 0.3s;
    border-radius: 2px;
}

/* ==========================================================================
   3. SECTIONS COMMUNES (Titres, Bannières)
   ========================================================================== */
.section-title { text-align: center; margin-bottom: 40px; }
.section-title span { color: var(--accent); font-weight: bold; text-transform: uppercase; letter-spacing: 2px; font-size: 0.9rem; }
.section-title h2 { font-size: 2.5rem; margin-top: 10px; text-transform: uppercase; font-weight: 800; }

.barre { 
    width: 70px; 
    height: 5px; 
    background: var(--accent); 
    margin: 15px auto; 
}

.page-header {
    background: var(--primary);
    padding: 140px 8% 70px;
    text-align: center;
    color: var(--white);
}

.page-header h1 { font-size: 3.5rem; font-weight: 800; text-transform: uppercase; }

/* ==========================================================================
   4. ACCUEIL (HERO & SERVICES)
   ========================================================================== */
.hero {
    background: linear-gradient(rgba(37, 42, 52, 0.85), rgba(37, 42, 52, 0.85)), 
                url('https://images.unsplash.com/photo-1632759145351-1d592919f522?q=80&w=2000'); 
    background-size: cover;
    background-position: center;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding: 0 20px;
}

.hero h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 20px; font-weight: 800; }
.text-accent { color: var(--accent); }

.location-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 25px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 30px;
    border: 1px solid var(--accent);
}

.cta-group .btn-primary, .btn-primary {
    background: var(--accent);
    color: var(--primary);
    padding: 18px 35px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
    border: none;
    display: inline-block;
}

.cta-group .btn-secondary {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 16px 35px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    display: inline-block;
    margin-left: 10px;
    transition: 0.3s;
}

/* Grille de Services */
.services-container { padding: 100px 8%; background: var(--light); text-align: center; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: 0.4s;
}

.icon-box {
    background: var(--primary);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: 0.4s;
}

.icon-box i { color: var(--accent); font-size: 1.8rem; }

.service-card:hover { transform: translateY(-15px); }
.service-card:hover .icon-box { background: var(--accent); transform: rotateY(360deg); }
.service-card:hover .icon-box i { color: var(--primary); }

.service-list {
    list-style: none;
    margin-top: 20px;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.service-list li { margin-bottom: 8px; font-size: 0.9rem; }
.service-list i { color: var(--accent); margin-right: 10px; }

/* ==========================================================================
   5. RÉALISATIONS (GALERIE)
   ========================================================================== */
.portfolio-page, .portfolio-container { padding: 80px 8%; background: var(--white); }
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 350px;
    box-shadow: var(--shadow);
}

.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }

.portfolio-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 42, 52, 0.92);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    text-align: center;
}

.portfolio-item:hover img { transform: scale(1.1); }
.portfolio-item:hover .portfolio-overlay { bottom: 0; }

/* ==========================================================================
   6. PAGE CONTACT
   ========================================================================== */
.contact-container { padding: 80px 8%; background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 60px; }

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    background: var(--light);
    padding: 20px;
    border-radius: 12px;
}

.info-item i { font-size: 1.5rem; color: var(--accent); margin-right: 20px; width: 30px; text-align: center; }
.info-item span { display: block; font-size: 0.75rem; text-transform: uppercase; font-weight: 800; color: #777; }
.info-item p { font-weight: 600; font-size: 1.1rem; }

.contact-form { background: var(--light); padding: 40px; border-radius: 15px; box-shadow: var(--shadow); }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; font-size: 1rem;
}

.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 5px rgba(255,180,0,0.3); }

/* ==========================================================================
   7. FOOTER & RÉASSURANCE
   ========================================================================== */
.zone-intervention { padding: 80px 8%; background: var(--primary); color: var(--white); text-align: center; }
.zone-intervention i { font-size: 3rem; color: var(--accent); margin-bottom: 20px; }

.reassurance { display: flex; justify-content: space-around; padding: 60px 8%; flex-wrap: wrap; gap: 30px; text-align: center; }
.reassurance-item i { font-size: 2.5rem; color: var(--primary); margin-bottom: 10px; display: block; }

footer { background: var(--primary); color: var(--white); padding: 80px 8% 30px; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 50px; margin-bottom: 50px; }
.footer-links ul { list-style: none; }
.footer-links a { color: #bbb; text-decoration: none; line-height: 2.5; transition: 0.3s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; text-align: center; font-size: 0.85rem; opacity: 0.6; }

/* ==========================================================================
   8. RESPONSIVE (MOBILE & TABLETTE)
   ========================================================================== */
@media (max-width: 992px) {
    .contact-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    /* Ajustement Logo Mobile */
    .logo img { height: 45px; }
    .logo-text { font-size: 1.4rem; }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--primary);
        width: 100%;
        height: calc(100vh - 80px);
        text-align: center;
        transition: 0.4s;
        z-index: 1000;
        padding-top: 40px;
    }

    .nav-links.active { left: 0; }
    .nav-links li { margin: 20px 0; margin-left: 0; }
    .header-contact { display: none; }

    .hero h1 { font-size: 2.8rem; }
    .page-header h1 { font-size: 2.5rem; }
    
    .cta-group .btn-secondary { margin-left: 0; margin-top: 15px; }

    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* --- FIX FINAL BOUTON FORMULAIRE --- */
.contact-form button.btn-primary {
    width: 100% !important;
    cursor: pointer;
    border: none;
    font-family: inherit;
    display: block;
}

/* --- STYLE DU LIEN FACEBOOK SUR L'INDEX --- */
.more-works { margin-top: 25px; font-size: 1.1rem; }
.more-works p { color: var(--primary); font-weight: 500; }
.more-works a {
    color: #1877F2; 
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px; 
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}
.more-works a i { font-size: 1.3rem; }
.more-works a:hover {
    background-color: rgba(24, 119, 242, 0.1); 
    transform: scale(1.05); 
    color: #145dbf;
}

/* --- SECTION CTA BANNER (Bas de page Réalisations) --- */
.cta-banner {
    background-color: var(--light); 
    padding: 80px 20px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.cta-content h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 800;
    text-transform: uppercase;
}
.cta-content p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.cta-banner .btn-primary {
    display: inline-block;
    padding: 18px 45px;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 700;
    text-decoration: none;
    background-color: var(--accent);
    color: var(--primary);
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 180, 0, 0.3);
}
.cta-banner .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 180, 0, 0.4);
    background-color: var(--primary);
    color: var(--accent);
}

@media (max-width: 768px) {
    .cta-banner { padding: 60px 20px; }
    .cta-content h2 { font-size: 1.8rem; }
    .cta-content p { font-size: 1.1rem; }
}

/* ==========================================================================
   NOUVEAU STYLE POUR CHANTIERS DÉTAILLÉS
   ========================================================================== */
.chantier-block {
    margin-bottom: 80px;
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.chantier-description {
    max-width: 700px;
    margin: -20px auto 40px;
    color: #666;
    text-align: center;
}

.gallery-main h3, .gallery-work h3 {
    text-align: left;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.2rem;
}

/* Galerie principale (Après) - On garde ta grille existante */
.gallery-main {
    margin-bottom: 40px;
}

/* Galerie Travaux (Avant/Pendant) - Grille plus petite */
.gallery-work {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.work-item {
    height: 150px; /* Plus petit pour ne pas voler la vedette */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
    filter: grayscale(30%); /* Un peu grisé pour l'aspect "chantier" */
}

.work-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .work-grid {
        grid-template-columns: 1fr 1fr;
    }
}