@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700;800&family=Manrope:wght@400;600&display=swap');

:root {
    /* Couleurs SERBAX "Premium" */
    --primary: #003366;       /* Bleu Nuit Profond */
    --primary-light: #004d99; /* Bleu éclairci pour survol */
    --accent: #ff6b00;        /* Orange BTP Vibrant */
    --accent-glow: rgba(255, 107, 0, 0.3);
    --dark: #0f172a;          /* Noir bleuté moderne */
    --light: #f1f5f9;         /* Gris très pâle (fond de site) */
    --white: #ffffff;
    
    /* Variables Structurelles */
    --radius: 12px;
    --shadow-card: 0 10px 40px -10px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 60px -10px rgba(0, 51, 102, 0.15);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Animation fluide */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Manrope', sans-serif; background-color: var(--light); color: var(--dark); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { width: 100%; display: block; }
ul { list-style: none; }

/* --- TYPOGRAPHIE --- */
h1, h2, h3 { font-family: 'Montserrat', sans-serif; color: var(--primary); font-weight: 800; letter-spacing: -0.5px; }
h2 { font-size: 2.2rem; margin-bottom: 0.5rem; position: relative; display: inline-block; }
/* Petit trait orange sous les titres H2 */
h2::after { content: ''; display: block; width: 50%; height: 5px; background: var(--accent); margin-top: 8px; border-radius: 2px; }

/* --- NAVBAR (Effet Verre) --- */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 900; color: var(--primary); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-weight: 700; font-size: 0.95rem; text-transform: uppercase; position: relative; }
.nav-links a.active { color: var(--accent); }
.nav-links a:not(.btn-nav)::before {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0%; height: 2px; background: var(--accent); transition: 0.3s;
}
.nav-links a:not(.btn-nav):hover::before { width: 100%; }

.btn-nav {
    background: var(--primary); color: white; padding: 10px 25px; border-radius: 50px; font-weight: 700;
}
.btn-nav:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 5px 15px var(--accent-glow); }

/* --- HERO SECTION (Cinématique) --- */
.hero {
    height: 90vh; position: relative; display: flex; align-items: center; overflow: hidden; color: var(--white);
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); /* Coupe en bas */
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
    animation: zoomEffect 20s infinite alternate; /* Zoom lent */
}
@keyframes zoomEffect { from { transform: scale(1); } to { transform: scale(1.15); } }

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,20,40,0.9) 0%, rgba(0,51,102,0.6) 100%); z-index: -1;
}
.hero-content { position: relative; z-index: 2; max-width: 800px; text-align: left; }
.hero h1 { font-size: 3.5rem; color: var(--white); margin-bottom: 20px; line-height: 1.1; }
.highlight { color: transparent; -webkit-text-stroke: 1px var(--accent); }
.hero p { font-size: 1.2rem; color: #cbd5e1; margin-bottom: 30px; max-width: 600px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; border-radius: 50px; font-weight: 700; font-family: 'Montserrat', sans-serif; cursor: pointer; transition: var(--transition); border: none; }
.btn-primary { background: linear-gradient(45deg, var(--accent), #ff8c00); color: white; box-shadow: 0 10px 25px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 35px var(--accent-glow); }
.btn-outline { border: 2px solid rgba(255,255,255,0.3); color: white; backdrop-filter: blur(5px); }
.btn-outline:hover { background: white; color: var(--primary); border-color: white; }
.btn-secondary { background: var(--primary); color: white; }
.btn-secondary:hover { background: var(--primary-light); }

/* --- SECTION COMMUNE --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 100px 0; }
.bg-light { background-color: #e2e8f0; } /* Légèrement plus foncé que le body pour contraste */
.section-header { text-align: center; margin-bottom: 60px; max-width: 700px; margin-left: auto; margin-right: auto; }
.center-btn { text-align: center; margin-top: 50px; }

/* --- FEATURES (Cartes Flottantes) --- */
.features-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 30px; 
    margin-top: -80px; position: relative; z-index: 10; 
}
.feature-card {
    background: var(--white); padding: 40px 30px; border-radius: var(--radius); text-align: center;
    box-shadow: var(--shadow-card); transition: var(--transition); border-bottom: 4px solid transparent;
}
.feature-card:hover { transform: translateY(-15px); border-bottom: 4px solid var(--accent); box-shadow: var(--shadow-hover); }
.feature-icon { width: 50px; height: 50px; color: var(--primary); margin-bottom: 20px; }

/* --- SERVICES PREVIEW (Grid) --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-card); transition: var(--transition); group;
}
.card-img { height: 250px; overflow: hidden; }
.card-img img { height: 100%; object-fit: cover; transition: 0.6s; }
.service-card:hover .card-img img { transform: scale(1.1); }
.card-content { padding: 25px; position: relative; }
.card-link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 700; margin-top: 15px; }

/* --- STATS SECTION (Chiffres Clés) --- */
.stats-section {
    background: var(--dark); color: white; padding: 80px 0; margin: 80px 0;
    position: relative; overflow: hidden;
    /* Motif de fond subtil */
    background-image: radial-gradient(circle at 20% 50%, rgba(0, 51, 102, 0.4), transparent 50%);
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; text-align: center; position: relative; z-index: 2; }
.stat-item h3 { font-size: 3.5rem; color: var(--white); margin-bottom: 5px; background: -webkit-linear-gradient(#fff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-item p { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* --- PROCESS SECTION (Timeline) --- */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.process-step {
    background: var(--white); padding: 30px; border-radius: var(--radius); text-align: center;
    position: relative; box-shadow: var(--shadow-card); transition: var(--transition);
}
.process-step:hover { transform: translateY(-10px); }
.step-number {
    width: 50px; height: 50px; background: var(--primary); color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 800;
    margin: -55px auto 20px auto; border: 4px solid var(--light); /* Effet "sort du cadre" */
}

/* --- SERVICES PAGE DETAIL --- */
.page-header { background: var(--primary); padding: 120px 0 60px 0; text-align: center; color: white; }
.page-header h1 { color: white; }
.services-grid-large { display: flex; flex-direction: column; gap: 80px; }
.service-row { display: flex; align-items: center; gap: 50px; }
.service-row.reverse { flex-direction: row-reverse; }
.service-img { flex: 1; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-hover); }
.service-info { flex: 1; }
.service-info h2 { font-size: 2rem; margin-bottom: 20px; }
.service-list li { margin-bottom: 10px; display: flex; gap: 10px; font-weight: 600; color: #555; }
.service-list i { color: var(--accent); }
.price-tag { display: inline-block; background: #e0f2fe; color: var(--primary); padding: 5px 15px; border-radius: 20px; font-weight: 700; font-size: 0.85rem; margin-right: 15px; margin-bottom: 20px;}

/* --- FAQ SECTION --- */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); border-radius: 10px; margin-bottom: 15px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.faq-question {
    padding: 20px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    transition: 0.3s;
}
.faq-question:hover { background: #f8fafc; color: var(--accent); }
.faq-answer { max-height: 0; overflow: hidden; padding: 0 20px; transition: 0.4s ease-out; background: #f8fafc; color: #555; }
.faq-item.active .faq-answer { max-height: 200px; padding-bottom: 20px; }
.faq-icon { transition: 0.3s; }
.faq-item.active .faq-icon { transform: rotate(180deg); color: var(--accent); }

/* --- CONTACT PAGE --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; }
.icon-box { width: 50px; height: 50px; background: rgba(0, 51, 102, 0.1); color: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.info-item { display: flex; gap: 20px; margin-bottom: 30px; align-items: center; }
.contact-form-container { background: var(--white); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow-card); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 15px; border: 2px solid #e2e8f0; border-radius: 8px; font-family: inherit; transition: 0.3s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); outline: none; background: #f8fafc; }
.full-width { width: 100%; justify-content: center; }

/* --- FOOTER & SPEED DIAL --- */
footer { background: var(--dark); color: #94a3b8; padding: 80px 0 20px 0; margin-top: 50px; }
.footer-col h3 { color: white; margin-bottom: 20px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 60px; padding-top: 20px; text-align: center; }

.speed-dial { position: fixed; bottom: 30px; right: 30px; z-index: 100; display: flex; flex-direction: column-reverse; align-items: center; gap: 15px; }
.main-fab { width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: white; border: none; box-shadow: 0 5px 20px var(--accent-glow); cursor: pointer; display: flex; justify-content: center; align-items: center; transition: 0.3s; font-size: 1.5rem; }
.main-fab:hover { transform: scale(1.1) rotate(90deg); }
.speed-dial-options { opacity: 0; transform: translateY(20px); pointer-events: none; transition: 0.3s; display: flex; flex-direction: column; gap: 10px; }
.speed-dial:hover .speed-dial-options { opacity: 1; transform: translateY(0); pointer-events: all; }
.sd-btn { width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: 0.3s; }
.sd-btn.phone { background: var(--dark); }
.sd-btn.whatsapp { background: #25D366; }
.sd-btn:hover { transform: scale(1.1); }

/* --- CLASSES D'ANIMATION (JS Targets) --- */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: all 0.8s ease-out; }
.reveal-left.active { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: all 0.8s ease-out; }
.reveal-right.active { opacity: 1; transform: translateX(0); }

/* --- FOOTER PREMIUM --- */
.footer-premium {
    background-color: #050b14; /* Noir très profond légèrement bleuté */
    color: #94a3b8;
    padding: 80px 0 30px 0;
    margin-top: 80px;
    border-top: 5px solid var(--accent); /* La ligne orange signature */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

/* Colonne Identité */
.footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    display: block;
}
.footer-logo span { color: var(--accent); }
.footer-desc { margin-bottom: 25px; line-height: 1.6; font-size: 0.95rem; }

/* Réseaux Sociaux */
.social-links { display: flex; gap: 15px; }
.social-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
    color: white;
}
.social-icon:hover { background: var(--accent); transform: translateY(-3px); }

/* Titres Colonnes */
.footer-col h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-left: 15px;
}
.footer-col h4::before {
    content: ''; position: absolute; left: 0; top: 5px; height: 15px; width: 3px;
    background: var(--accent); border-radius: 2px;
}

/* Listes de liens */
.footer-links li { margin-bottom: 12px; }
.footer-links a {
    display: flex; align-items: center; gap: 8px;
    transition: 0.3s;
}
.footer-links a i { width: 16px; color: var(--accent); opacity: 0; transition: 0.3s; transform: translateX(-5px); }
.footer-links a:hover { color: white; padding-left: 5px; }
.footer-links a:hover i { opacity: 1; transform: translateX(0); }

/* Infos Contact */
.contact-row { display: flex; gap: 15px; margin-bottom: 20px; align-items: flex-start; }
.accent-icon { color: var(--accent); width: 20px; flex-shrink: 0; margin-top: 3px; }
.phone-link { display: block; color: white; font-weight: 700; margin-bottom: 5px; }
.phone-link:hover { color: var(--accent); }

/* Bas de page */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}

/* --- Correction Centrage Page Services (CTA Banner) --- */
.cta-banner {
    text-align: center; /* Centre le texte */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre les éléments flexibles (comme le bouton) */
    justify-content: center;
    padding: 80px 20px;
    background: var(--white); /* ou var(--light) selon votre préférence */
}

.cta-banner h2 {
    margin-bottom: 15px;
    width: 100%;
}

.cta-banner p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    color: #555;
    max-width: 600px; /* Limite la largeur pour la lecture */
    margin-left: auto;
    margin-right: auto;
}

/* Force le bouton à être centré s'il ne l'est pas */
.cta-banner .btn {
    margin: 0 auto;
}

/* --- RESPONSIVE MOBILE & TABLETTE --- */

@media (max-width: 1024px) {
    /* Ajustements pour Tablettes / Petits PC */
    .hero h1 { font-size: 3rem; }
    .hero { height: auto; min-height: 70vh; padding: 100px 0; }
    .container { padding: 0 30px; }
}

@media (max-width: 900px) {
    /* Layouts qui passent en colonne */
    .service-row, .service-row.reverse { flex-direction: column; gap: 30px; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; } /* Footer en 2 colonnes */
    
    /* Ajustement images services */
    .service-img { height: 250px; width: 100%; }
}

@media (max-width: 768px) {
    /* --- 1. NAVIGATION MOBILE CORRIGÉE --- */
    .hamburger { 
        display: block; 
        font-size: 2rem; 
        color: var(--primary); 
        cursor: pointer; 
        z-index: 1001; /* Au-dessus du menu */
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%; /* Prend tout l'écran */
        background: rgba(255, 255, 255, 0.98); /* Fond blanc opaque */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transform: translateY(-100%); /* Caché en haut */
        transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Animation rebond */
        box-shadow: none;
        z-index: 1000;
    }
    
    .nav-links.active { transform: translateY(0); } /* Le menu descend */
    
    .nav-links a {
        font-size: 1.5rem; /* Plus gros pour le doigt */
        color: var(--dark);
    }

    /* --- 2. HERO SECTION ADAPTÉE --- */
    .hero {
        height: auto;
        padding: 140px 0 80px 0; /* Espace pour le header */
        text-align: center;
        clip-path: none; /* On enlève la coupe en biais sur mobile qui casse la mise en page */
    }
    
    .hero-content { margin: 0 auto; }
    
    .hero h1 { 
        font-size: 2.2rem; /* Titre plus petit */
        line-height: 1.3;
    }
    
    .hero p { font-size: 1rem; margin-bottom: 30px; }
    
    .hero-btns {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .hero-btns .btn { width: 100%; justify-content: center; }

    /* --- 3. GRILLES & SECTIONS --- */
    .section-padding { padding: 60px 0; }
    
    /* Stats : 2 colonnes au lieu de 1 pour gagner de la place */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    
    /* Process : On enlève le décalage 1 sur 2 */
    .process-step { margin-bottom: 20px; }
    .process-step:hover { transform: none; } /* On désactive le hover sur mobile */
    
    /* Footer : Tout en 1 colonne centrée ou alignée gauche */
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 15px; }

    /* Fix marges négatives des features */
    .features-grid { margin-top: 0; }
}

@media (max-width: 480px) {
    /* --- 4. TRÈS PETITS ÉCRANS --- */
    .logo { font-size: 1.5rem; }
    
    .hero h1 { font-size: 1.8rem; }
    
    /* Stats en 1 seule colonne si l'écran est vraiment petit */
    .stats-grid { grid-template-columns: 1fr; }
    
    .contact-form-container { padding: 25px; }
    
    .speed-dial { bottom: 20px; right: 20px; }
}


.service-img-gallery {
    display: grid;
    grid-template-columns: 1.3fr 1fr; /* largeur augmentée */
    gap: 14px;
}

.service-img-gallery img {
    width: 100%;
    height: 210px; /* un peu plus haut */
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.service-img-gallery img:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* Mobile */
@media (max-width: 768px) {
    .service-img-gallery {
        grid-template-columns: 1fr;
    }

    .service-img-gallery img {
        height: 260px;
    }
}

/* Galerie avec limitation */
.service-img-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 30px;
}

.service-img-gallery img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
}

/* Masquer les images après la 2e */
.service-img-gallery.collapsed img:nth-child(n+3) {
    display: none;
}

/* Bouton Voir plus */
.gallery-toggle {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-toggle button {
    background: transparent;
    border: 2px solid #d4a017;
    color: #d4a017;
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.gallery-toggle button:hover {
    background: #d4a017;
    color: #fff;
}

/* Mobile */
@media (max-width: 768px) {
    .service-img-gallery {
        grid-template-columns: 1fr;
    }
}
