/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* --- PALETTE ACR PROVENCE --- */
    --bleu-marine: #1C2A39;
    --blanc-casse: #F4F4F2;
    --gris-clair: #E6E4DF;
    --vert-olive: #6F7F4F;
    --gris-anthracite: #2E2E2E;
    --gris-moyen: #7A7A7A;

    /* --- MAPPING --- */
    --color-white: #FFFFFF; 
    --color-black: var(--bleu-marine);
    --color-text-grey: var(--gris-anthracite);
    --color-gold-main: var(--vert-olive);
    --color-gold-hover: var(--bleu-marine);
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    --header-height: 110px;
    --max-width: 1300px;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--color-text-grey);
    line-height: 1.9;
    background-color: var(--blanc-casse); 
    font-weight: 300;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

/* =========================================
   LOADER
   ========================================= */
.loader-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--blanc-casse); z-index: 9999;
    display: flex; justify-content: center; align-items: center;    
    transition: opacity 0.8s ease, visibility 0.8s;
}
.loader-content { display: flex; justify-content: center; align-items: center; }
.house-svg { width: 120px; height: 120px; }
.house-lines {
    fill: none; stroke-width: 2.5; stroke-linecap: square; stroke-linejoin: miter;
    stroke-dasharray: 600; stroke-dashoffset: 600;
    animation: drawHouse 0.5s cubic-bezier(0.55, 0.055, 0.675, 0.19) forwards; 
}
.stroke-blue { stroke: var(--bleu-marine); }
.stroke-olive { stroke: var(--vert-olive); }
@keyframes drawHouse { to { stroke-dashoffset: 0; } }
.loader-hidden { opacity: 0; visibility: hidden; }

/* =========================================
   TYPOGRAPHIE & ANIMATIONS
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-black);
    font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
    transition: var(--transition);
}
h1:hover, h2:hover, h3:hover { color: var(--color-gold-main); }

.reveal { opacity: 0; transform: translateY(50px); transition: all 1s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

.btn-gold {
    display: inline-block; padding: 14px 35px;
    background-color: var(--color-gold-main); color: #FFFFFF;
    font-weight: 600; font-size: 0.8rem; letter-spacing: 1px;
    border: 1px solid var(--color-gold-main);
    transition: var(--transition); text-transform: uppercase;
    cursor: pointer; text-decoration: none;
}
.btn-gold:hover { background-color: transparent; color: var(--color-gold-main); }

.btn-anim-hover { transition: transform 0.3s; }
.btn-anim-hover:hover { transform: scale(1.05) translateY(-3px); }

.section-header { text-align: center; margin-bottom: 80px; }
.section-header h2 { font-size: 2.2rem; position: relative; padding-bottom: 20px; display: inline-block; }
.separator-gold { width: 60px; height: 3px; background-color: var(--vert-olive); margin: 15px auto; }

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: transparent; transition: all 0.4s ease; 
    border-bottom: none;
}
header.scrolled {
    background: rgba(255, 255, 255, 0.98); 
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.navbar {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 10px 50px; height: 80px;
    border-bottom: 1px solid rgba(255,255,255,0.1); transition: 0.4s;
}
header.scrolled .navbar { border-bottom: 1px solid rgba(0,0,0,0.05); }

.logo img { height: 65px; width: auto; border-radius: 15px; transition: var(--transition); }

/* Navigation Desktop */
.nav-links { 
    display: flex; list-style: none; gap: 40px; align-items: center; 
    margin-left: auto; 
}

.nav-links li a { text-decoration: none; color: #FFFFFF; font-family: var(--font-heading); font-size: 0.8rem; font-weight: 500; letter-spacing: 1px; transition: var(--transition); text-transform: uppercase; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }

header.scrolled .nav-links li a { color: var(--bleu-marine); text-shadow: none; }
.nav-links li a:hover, header.scrolled .nav-links li a:hover { color: var(--color-gold-main) !important; }

/* Bouton Devis */
.btn-nav-devis { border: 1px solid var(--color-gold-main); padding: 10px 25px; color: var(--color-gold-main) !important; font-weight: 600; border-radius: 4px; text-shadow: none !important; }
.btn-nav-devis:hover { background-color: transparent; color: #FFFFFF !important; border-color: #FFFFFF; }
header.scrolled .btn-nav-devis { border-color: var(--bleu-marine); color: var(--bleu-marine) !important; }
header.scrolled .btn-nav-devis:hover { background-color: var(--bleu-marine); color: #FFFFFF !important; }

/* Hamburger Menu (Caché par défaut) */
.hamburger {
    display: none;
    cursor: pointer;
}
.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: white;
}
header.scrolled .bar { background-color: var(--bleu-marine); }

/* Sous-barres */
.sub-navbar, .level-3-navbar {
    display: flex; justify-content: flex-end; gap: 20px; padding: 5px 50px;
    background: transparent; width: 100%; transition: 0.4s;
}
.sub-navbar { border-bottom: 1px solid rgba(255,255,255,0.3); }
header.scrolled .sub-navbar { border-bottom: 1px solid rgba(0,0,0,0.1); }

.sub-navbar a, .level-3-navbar a {
    font-family: var(--font-body); font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 1px; color: #FFFFFF; text-decoration: none; transition: 0.3s; font-weight: 500;
}
header.scrolled .sub-navbar a { color: var(--gris-anthracite); }
header.scrolled .level-3-navbar a { color: var(--bleu-marine); }
.sub-navbar a:hover, .level-3-navbar a:hover { color: var(--color-gold-main) !important; }

.level-3-navbar { padding: 10px 50px; border-bottom: none; flex-wrap: wrap; }
.level-3-navbar a { font-size: 0.7rem; }
header.scrolled .level-3-navbar { background: rgba(244, 244, 242, 0.5); }

/* =========================================
   HERO GENERAL
   ========================================= */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; filter: blur(8px); transform: scale(1.1); z-index: -2; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(28, 42, 57, 0.6); z-index: -1; }
.hero-content { text-align: center; color: var(--color-white); max-width: 900px; padding: 0 20px; z-index: 1; }
.hero-logo-img { height: 120px; display: block; margin: 0 auto 30px auto; border-radius: 15px; }
.hero-content h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; letter-spacing: 5px; }

/* =========================================
   LAYOUT & GRID SYSTEM
   ========================================= */
section { min-height: 100vh; display: flex; align-items: center; padding: 60px 0; }
.full-screen-section { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 80px 20px; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 30px; width: 100%; }
.center-block { text-align: center; max-width: 900px; margin: 0 auto; }

/* Grid 2 colonnes */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

/* Correctif Image Hessene */
.img-box {
    width: 100%; height: 100%; min-height: 400px;
    background-size: cover; background-position: center;
    border-radius: 10px; box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

footer { background-color: var(--color-black); color: var(--gris-clair); padding: 80px 0 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 50px; margin-bottom: 60px; }
.footer-col h4 { color: var(--color-white); margin-bottom: 25px; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: var(--gris-clair); text-decoration: none; transition: 0.3s; }
.footer-col a:hover { color: var(--color-gold-main); padding-left: 5px; }

/* Partenaires */
.partners-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; margin-top: 40px; }
.partners-container img { height: 60px; filter: grayscale(100%); opacity: 0.7; transition: 0.3s; }
.partners-container img:hover { filter: grayscale(0); opacity: 1; }

/* Services Home */
.services-centered { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; align-items: stretch; }
.service-wrapper { display: flex; flex: 1; min-width: 300px; max-width: 350px; }
.service-card { width: 100%; display: flex; flex-direction: column; justify-content: space-between; height: 100%; }

/* Devis Box */
.devis-box { background: white; padding: 40px; border-radius: 10px; color: var(--gris-anthracite); box-shadow: 0 10px 30px rgba(0,0,0,0.2); max-width: 800px; margin: 0 auto; }
.contact-map-row { display: flex; justify-content: center; align-items: stretch; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.schedule-box { flex: 1; min-width: 300px; background: var(--bleu-marine); padding: 40px; border-radius: 10px; color: white; }
.map-box { flex: 1; min-width: 300px; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.horaires-list { list-style: none; padding: 0; margin-top: 20px; text-align: left; }
.horaires-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.2); }

/* Social Icons */
.social-icon { font-size: 3rem; color: var(--bleu-marine); transition: transform 0.3s, color 0.3s; display: inline-block; }
.social-icon:hover { transform: scale(1.2) translateY(-5px); color: var(--vert-olive) !important; cursor: pointer; }

/* =========================================
   STYLE SPÉCIFIQUE : RÉALISATIONS & CONSEILS
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.project-card {
    background: white; border-radius: 8px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: var(--transition); border: 1px solid #eee;
}
.project-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-color: var(--vert-olive); }

.card-image { width: 100%; height: 250px; overflow: hidden; position: relative; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.project-card:hover .card-image img { transform: scale(1.1); }

.card-category { position: absolute; top: 20px; right: 20px; background: var(--vert-olive); color: white; padding: 5px 15px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; border-radius: 4px; }

.card-content { padding: 30px; }
.card-content h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--bleu-marine); }
.card-location { font-size: 0.85rem; color: var(--gris-moyen); margin-bottom: 15px; font-weight: 600; }
.card-desc { font-size: 0.95rem; line-height: 1.6; margin-bottom: 25px; color: var(--gris-anthracite); }

.btn-card { display: inline-block; color: var(--vert-olive); font-weight: 700; text-decoration: none; font-size: 0.8rem; transition: 0.3s; }
.btn-card:hover { color: var(--bleu-marine); padding-left: 5px; }

/* --- PAGE DÉTAIL --- */
.simple-content-container { margin-top: 200px; margin-bottom: 100px; }
.detail-main-img { width: 100%; height: auto; max-height: 80vh; object-fit: contain; border-radius: 8px; margin-bottom: 50px; box-shadow: 0 15px 40px rgba(0,0,0,0.1); display: block; margin-left: auto; margin-right: auto; }
.project-body { max-width: 800px; margin: 0 auto 60px; text-align: justify; font-size: 1.1rem; line-height: 1.8; }
.project-body h4 { color: var(--vert-olive); margin-top: 30px; margin-bottom: 15px; }
.project-body ul { margin-bottom: 20px; padding-left: 20px; }
.project-body li { margin-bottom: 10px; }

/* Galerie simple */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 40px; }
.gallery-item { height: 280px; overflow: hidden; border-radius: 5px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; cursor: zoom-in; }
.gallery-item:hover img { transform: scale(1.1); }

/* Lightbox */
.lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 9999; justify-content: center; align-items: center; cursor: zoom-out; }
.lightbox img { max-width: 90%; max-height: 90vh; border: 2px solid white; box-shadow: 0 0 30px rgba(0,0,0,0.5); }

/* =========================================
   RESPONSIVE MOBILE / TABLETTE (Menu Burger)
   ========================================= */
@media (max-width: 1024px) {
    .navbar { padding: 15px 20px; }
    
    /* Masquer les sous-menus */
    .sub-navbar, .level-3-navbar { display: none; }
    
    /* Afficher le Burger */
    .hamburger { display: block; z-index: 1001; }
    
    /* Animation du Burger */
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    /* Menu Mobile Plein Écran */
    .nav-links {
        position: fixed; 
        background: var(--blanc-casse); 
        top: 0; 
        left: -100%; 
        width: 100%; 
        height: 100vh;
        flex-direction: column; 
        justify-content: flex-start; 
        align-items: center; 
        transition: 0.4s;
        padding-top: 100px;
        z-index: 999;
        overflow-y: auto;
    }
    .nav-links.active { left: 0; }
    .nav-links li { margin: 15px 0; }
    .nav-links li a { color: var(--bleu-marine) !important; font-size: 1.3rem; font-weight: 700; }
    
    /* Barres du burger toujours visibles (foncées sur fond clair du menu ouvert) */
    .bar { background-color: white; }
    header.scrolled .bar { background-color: var(--bleu-marine); }
    .hamburger.active .bar { background-color: var(--bleu-marine) !important; }
    
    /* Ajustement grille */
    .grid-2 { grid-template-columns: 1fr; }
}