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

:root {
    --font-xs: 0.875rem; /* 14px */
    --font-s: 1rem;      /* 16px */
    --font-m: 1.125rem;  /* 18px */
    --font-l: 1.5rem;    /* 24px */
    --font-xl: 2.5rem;   /* 40px */

    /* Couleurs */
    --vert: #00e094;
    --gris1: #333;
    --gris2: #252525;
    --gris3: #818181;
    --gris-clair: #f5f5f7;
    --noir: #000000;
    --blanc: #ffffff;
    
    /* Rayon des coins uniformisé à 15px */
    --radius-global: 15px;
}

@font-face {
    font-family: 'Inter';
    src: url('/fonts/Inter-Variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-display: swap;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    font-size: 16px;          
    font-weight: 300;         
    line-height: 1.5;         
    color: var(--noir);
    background-color: var(--blanc);
    letter-spacing: 0.5px;
}

body {
    overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.2; }

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.border-top { border-top: 1px solid var(--gris1); }

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-tag {
    display: inline-block;
    font-size: var(--font-xs);
    margin-bottom: 8px;
    font-weight: 600; 
}

h1, .section-header h2, .contact-text h2 {
    font-size: var(--font-xl);
    font-weight: 700;
    margin-bottom: 24px;
}

/* ---- BOUTONS ---- */
.btn {
    font-weight: 700;
    display: inline-block;
    background-color: var(--vert);
    color: var(--noir);
    padding: 12px 32px;
    border-radius: 50px; /* Conserve le format pilule */
    font-size: var(--font-xs);
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease; 
}

.btn-secondary {
    background-color: transparent;
    color: var(--blanc);
    border: 2px solid var(--blanc);
    margin-left: 16px;
    font-weight: 600;
}

.btn-form-submit {
    align-self: flex-start;
    width: auto;
    padding: 12px 32px;
}

/* ---- HEADER ---- */
header {
    background-color: var(--noir);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 35px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

nav a {
    text-decoration: none;
    font-size: var(--font-xs);
    color: var(--blanc);
}

nav a.nav-btn {
    background-color: var(--vert);
    font-weight: 700;
    color: var(--noir);
    padding: 10px 24px;
    border-radius: 50px;
    transition: background-color 0.2s ease;
}

/* ---- HERO ---- */
.hero {
    background: linear-gradient(to bottom, var(--noir) 0%, rgb(35, 35, 40) 100%);
    color: var(--blanc);
    padding: 70px 0;
    overflow: hidden;
}

.hero-grid, .contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr; 
    gap: 75px; 
    align-items: center;
}

.hero-text, .contact-text {
    width: 100%;
}

.hero-text p, .contact-text p {
    font-size: var(--font-m); 
    margin-bottom: 40px;
    color: #e0e0e0; 
}

.hero-actions {
    display: flex;
    align-items: center;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-img-src {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-global);
}

/* ---- CONTACT DETAILS ---- */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 8px;
}

.contact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gris3);
    margin-bottom: 6px;
}

.contact-sublabel {
    display: block;
    font-size: var(--font-xs);
    color: var(--gris3);
    margin-top: 6px;
    letter-spacing: 0.5px;
}

/* Configuration PC : pas de bordure ni coin à gauche touchés */
.contact-phone-block {
    padding: 20px 24px;
    border-left: 3px solid var(--vert);
    background-color: rgba(0, 224, 148, 0.06);
    border-radius: 0 var(--radius-global) var(--radius-global) 0;
}

.contact-phone {
    font-size: 1.75rem; /* 28px */
    font-weight: 700;
    color: var(--blanc);
    text-decoration: none;
    letter-spacing: 1px;
    display: inline-block;
    transition: color 0.2s ease;
}

.contact-phone:hover {
    color: var(--vert);
}

.contact-item {
    display: flex;
    flex-direction: column;
}

.contact-email {
    font-size: var(--font-m);
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-email:hover {
    color: var(--vert);
}

.contact-address {
    font-size: var(--font-m);
    color: #e0e0e0;
    margin: 0 !important;
}

/* ---- SECTION RÉSIDENTIELLE (BENTO) ---- */
.section-residentiel {
    padding: 100px 0;
}

.bento {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-auto-rows: minmax(40px, auto); 
    gap: 20px;
}

.bloc {
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-global);
    display: flex;
    align-items: flex-end;
    padding: 40px;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.bloc::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 100%);
    border-radius: var(--radius-global);
}

.bloc-contenu {
    position: relative;
    z-index: 1;
    color: var(--blanc);
}

.bloc-contenu h3 {
    font-size: calc(var(--font-l) * 1.15);
    font-weight: 600;
    margin-bottom: 16px;
}

.bloc-contenu p {
    font-size: var(--font-s);
}

.b1 { grid-column: 2 / span 4; grid-row: 1 / span 7; } 
.b2 { grid-column: 6 / span 5; grid-row: 1 / span 5; } 
.b3 { grid-column: 6 / span 4; grid-row: 6 / span 6; }
.b4 { grid-column: 1 / span 5; grid-row: 8 / span 5; }
.b5 { grid-column: 6 / span 5; grid-row: 12 / span 5; }
.b6 { grid-column: 2 / span 4; grid-row: 13 / span 7; }
.b7 { grid-column: 6 / span 3; grid-row: 17 / span 7; }

/* ---- SERVICES ENTREPRISES (STACKING) ---- */
.section-stacking {
    padding-bottom: 100px;
}

.stacking-container {
    display: flex;
    flex-direction: column;
    gap: 15vh; 
    max-width: 1400px;
    margin: 0 auto;
}

.stacking-spacer {
    height: 30vh;
    pointer-events: none;
}

.card-sticky {
    position: sticky;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    padding: 60px;
    border-radius: var(--radius-global);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    transform-origin: top center;
    --scale: 1;
    --bright: 1;
    transform: scale(var(--scale));
    filter: brightness(var(--bright));
}

.card-sticky::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 100%);
    border-radius: var(--radius-global);
    z-index: 1;
}

.card-contenu-wrapper {
    position: relative;
    z-index: 2;
    max-width: 750px;
}

.card-contenu-wrapper h3 {
    font-size: calc(var(--font-l) * 1.25);
    margin-bottom: 20px;
    color: var(--blanc);
    font-weight: 600;
}

.card-contenu-wrapper p {
    font-size: var(--font-m);
    color: #f0f0f0;
}

.card-sticky:nth-child(1) { top: 100px; }
.card-sticky:nth-child(2) { top: 130px; }
.card-sticky:nth-child(3) { top: 160px; }
.card-sticky:nth-child(4) { top: 190px; }
.card-sticky:nth-child(5) { top: 220px; }
.card-sticky:nth-child(6) { top: 250px; }

/* ---- CONTACT ---- */
.section-dark {
    background: linear-gradient(to top, var(--noir) 0%, rgb(35, 35, 40) 100%);
    color: var(--blanc);
}

.main-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 40px;
    border-radius: var(--radius-global);
    border: 1px solid #e5e5e7;
    background-color: var(--gris-clair);
}

.main-form input,
.main-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d1d6;
    border-radius: var(--radius-global);
    font-family: inherit;
    font-size: var(--font-xs);
    background-color: var(--blanc);
    color: var(--noir);
}

.main-form input::placeholder,
.main-form textarea::placeholder {
    color: #8e8e93;
}

.main-form input:focus,
.main-form textarea:focus {
    outline: none;
    border-color: var(--vert);
}

/* ---- FOOTER ---- */
footer {
    background-color: var(--noir);
    color: var(--blanc);
    padding: 60px 0 30px 0;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-xs);
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    text-decoration: none;
    color: var(--gris3);
    cursor: pointer;
}

.footer-links a:hover {
    color: var(--vert);
}

/* ---- SYSTEME DE FENETRES MODALES (UNIFIEES) ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-fenetre {
    background-color: var(--gris-clair);
    color: var(--noir);
    width: 90%;
    max-width: 650px; /* Taille fixe identique pour toutes les fenêtres */
    height: 70vh;    /* Hauteur fixe identique */
    border-radius: var(--radius-global);
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gris1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-fenetre {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gris1);
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    color: var(--noir);
}

/* Corps interne pour l'alignement ou le défilement */
.modal-corps, .modal-corps-defilement {
    padding: 40px;
    flex: 1;
}

.modal-corps-defilement {
    overflow-y: auto; /* Permet le scroll pour les longs textes légaux */
}

.modal-fenetre h2 {
    font-size: var(--font-l);
    margin-bottom: 24px;
    color: var(--noir);
    font-weight: 700;
}

.modal-fenetre h3 {
    font-size: var(--font-s);
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.modal-fenetre p {
    font-size: var(--font-xs);
    color: var(--gris1);
    margin-bottom: 12px;
}

/* Liste spécifique de la fenêtre Pays */
.modal-liste-pays {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.modal-liste-pays a {
    display: block;
    padding: 14px 20px;
    background-color: var(--blanc);
    color: var(--noir);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-global);
    border: 1px solid #d1d1d6;
    transition: all 0.2s ease;
}

.modal-liste-pays a:hover, .modal-liste-pays a.active {
    background-color: var(--vert);
    color: var(--noir);
    border-color: var(--vert);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
    .hero-grid, .contact-grid {
        grid-template-columns: 1fr; 
        text-align: center;
        gap: 48px;
    }
    .hero-text, .contact-text { margin: 0 auto; }
    .hero-actions { justify-content: center; }
    .btn-form-submit { align-self: center; }

    .contact-details {
        align-items: center;
    }
}

@media (max-width: 900px) {
    .bento {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        gap: 16px;
    }
    .b1, .b2, .b3, .b4, .b5, .b6, .b7 {
        grid-column: span 1 !important;
        grid-row: auto !important;
        min-height: 340px;
        height: auto;
        padding: 30px;
    }
    .b1 {
        grid-column: span 2 !important;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    .btn-secondary { margin-left: 0; }
}

@media (max-width: 600px) {
    .bento {
        grid-template-columns: 1fr;
    }
    .b1, .b2, .b3, .b4, .b5, .b6, .b7 {
        grid-column: span 1 !important;
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px; 
    }

    header nav {
        display: none !important;
    }

    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 16px 24px;
        gap: 0;
    }

    .logo-img {
        height: 28px;
    }
    
    .section { padding: 60px 0; }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .card-sticky {
        padding: 40px 24px;
        min-height: 420px;
        max-width: 100% !important;
        transform: none !important;
        filter: none !important;
    }
    .card-sticky:nth-child(1) { top: 155px; }
    .card-sticky:nth-child(2) { top: 170px; }
    .card-sticky:nth-child(3) { top: 185px; }
    .card-sticky:nth-child(4) { top: 200px; }
    .card-sticky:nth-child(5) { top: 215px; }
    .card-sticky:nth-child(6) { top: 230px; }

    /* Configuration Mobile pour le bloc Téléphone */
    .contact-phone-block {
        text-align: center;         /* Texte centré */
        border-left: none;          /* Plus de bordure latérale gauche */
        background-color: rgba(0, 224, 148, 0.08);
        border-radius: var(--radius-global); /* Tous les coins arrondis (15px) */
        max-width: 100%;
        width: 100%;
    }

    .contact-phone {
        font-size: 1.5rem;
    }
    
    .modal-fenetre {
        height: 80vh; /* Légèrement plus grand sur mobile pour le confort de lecture */
        padding: 10px;
    }
    .modal-corps, .modal-corps-defilement {
        padding: 24px;
    }
}