@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap");

/* ==========================================================================
   1. VARIABLES & RESET GLOBAL (Sécurité anti-débordement)
   ========================================================================== */
:root {
    --forest-green: #143520;
    --lime-green: #c5e063;
    --lime-hover: #b0ca50;
    --bg-sand: #faf8f3;
    --bg-white: #ffffff;
    --text-dark: #1a1e1c;
    --text-muted: #5a605d;
    --border-color: #e2dfd6;
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden; /* Blocage absolu du scroll horizontal à la racine */
}

body {
    font-family: "Outfit", sans-serif;
    background-color: var(--bg-sand);
    color: var(--text-muted);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

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

/* ==========================================================================
   2. TYPOGRAPHIE & UTILITAIRES
   ========================================================================== */
h1,
h2,
h3,
h4,
h5 {
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.1;
    overflow-wrap: break-word; /* Force la coupure si un mot est trop long */
}

h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -1px;
}

.text-white {
    color: var(--bg-white) !important;
}
.bg-forest {
    background-color: var(--forest-green);
    color: var(--bg-white);
}
.bg-light {
    background-color: var(--bg-white);
}
.w-100 {
    width: 100%;
}

.highlight {
    background-color: var(--lime-green);
    color: var(--forest-green);
    padding: 0 8px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 700;
}

.tag {
    display: inline-block;
    background: var(--bg-white);
    color: var(--forest-green);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}
.tag-lime {
    background: var(--lime-green);
    border-color: var(--lime-green);
}

/* ==========================================================================
   3. LAYOUT & CONTAINERS
   ========================================================================== */
.container {
    width: 100%;
    max-width: 100%; /* Retour à un max-width fixe pour les grands écrans */
    margin: 0 auto;
    padding: 0 5%; /* 5% d'espace de respiration de chaque côté */
}

section {
    padding: 8rem 0;
}

/* ==========================================================================
   4. COMPOSANTS (Boutons, Navbar, Héro)
   ========================================================================== */
.btn-primary,
.btn-outline-dark {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}
.btn-primary {
    background-color: var(--lime-green);
    color: var(--forest-green);
}
.btn-primary:hover {
    background-color: var(--lime-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 224, 99, 0.3);
}

.btn-outline-dark {
    background-color: transparent;
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
}
.btn-outline-dark:hover {
    background-color: var(--text-dark);
    color: var(--bg-white);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    transition: var(--transition);
    padding: 1.5rem 0;
}
.navbar.scrolled {
    background: var(--bg-sand);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bg-white);
    transition: color 0.3s;
}
.navbar.scrolled .logo {
    color: var(--text-dark);
}
.logo-dot {
    width: 12px;
    height: 12px;
    background: var(--lime-green);
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-links a {
    color: var(--bg-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.navbar.scrolled .nav-links a {
    color: var(--text-dark);
}
.nav-links a:hover {
    color: var(--lime-green);
}

/* Héro Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 2rem;
}
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplace background-size: cover pour les balises <img> */
    object-position: center 30%; /* Aligne l'image correctement */
    z-index: -2;
}
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(20, 53, 32, 0.4) 0%,
        rgba(20, 53, 32, 0.8) 100%
    );
    z-index: -1;
}

.hero-stats {
    color: var(--bg-white);
    margin-bottom: 2rem;
    max-width: 400px;
}
.hero-stats h2 {
    font-size: 4rem;
    color: var(--lime-green);
    margin-bottom: 0.5rem;
}
.hero-stats p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
.hero-avatars {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.hero-avatars img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--lime-green);
    margin-left: -15px;
}
.hero-avatars img:first-child {
    margin-left: 0;
}

/* LE TEXTE GÉANT (Optimisation parfaite) */
.hero-huge-text {
    /* Calcul : 100vw divisé par 11 lettres = max 9vw par lettre pour ne jamais déborder. */

    font-size: clamp(2rem, 9vw, 15rem);
    font-weight: 800;
    color: var(--lime-green);
    line-height: 0.8;
    letter-spacing: -2px;
    margin-bottom: -4%;
    text-align: center;
    position: relative;
    z-index: 10;
    width: 100%;
    white-space: nowrap; /* Le mot reste sur une seule ligne */
}

/* ==========================================================================
   5. SECTIONS (Grilles et Contenus)
   ========================================================================== */
/* À Propos */
.about-section {
    padding-top: 10rem;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-stats-row {
    display: flex;
    gap: 3rem;
    margin: 3rem 0;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}
.stat-item h3 {
    font-size: 3rem;
    color: var(--forest-green);
}
.stat-item p {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.text-desc {
    flex: 1;
}
.features-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.icon-lime {
    width: 40px;
    height: 40px;
    background: var(--lime-green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.about-image img {
    width: 100%;
    border-radius: 16px;
    height: 700px;
    object-fit: cover;
}

/* Services (Accordéon) */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
}
.services-text h2 {
    margin-bottom: 2rem;
}

.services-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}
.acc-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
    overflow: hidden;
}
.acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 1.5rem 0;
}
.acc-header h3 {
    color: var(--bg-white);
    font-size: 1.5rem;
    transition: color 0.3s;
}
.acc-icon {
    color: var(--lime-green);
    font-size: 1.5rem;
    font-weight: 300;
    flex-shrink: 0;
    margin-left: 1rem;
}
.acc-item.active .acc-header h3 {
    color: var(--lime-green);
}

.acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}
.acc-body {
    padding-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}
.acc-body p {
    color: rgba(255, 255, 255, 0.7);
}
.acc-body img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

/* Portfolio / Différence */
.section-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}
.diff-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 3rem;
    align-items: center;
}
.diff-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
}

/* Processus */
.process-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
}
.process-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3rem;
}
.process-item:last-child {
    border: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.p-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--lime-green);
    flex-shrink: 0;
}
.p-content h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Formulaire Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
}
.contact-details {
    margin-top: 3rem;
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
}
.contact-details p {
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--forest-green);
}
.contact-form-wrapper {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    width: 100%;
}
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.input-group {
    margin-bottom: 1.5rem;
    width: 100%;
}
.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--forest-green);
    margin-bottom: 0.5rem;
}
.input-group input,
.input-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-sand);
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}
.input-group input:focus,
.input-group select:focus {
    border-color: var(--lime-green);
    background: var(--bg-white);
}

/* FAQ */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.faq-image img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 16px;
}
.faq-item {
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    overflow: hidden;
}
.faq-btn {
    width: 100%;
    text-align: left;
    padding: 1.5rem 0;
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
}
.faq-btn span {
    color: var(--lime-green);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-left: 1rem;
}
.faq-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.faq-body p {
    padding-bottom: 1.5rem;
}

/* Footer */
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}
.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--bg-white);
    text-decoration: none;
    font-weight: 500;
}
.footer-links a:hover {
    color: var(--lime-green);
}
.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* ==========================================================================
   6. RESPONSIVE DESIGN COMPLET
   ========================================================================== */

/* Menu Mobile (Burger) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}
.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--bg-white);
    border-radius: 2px;
    transition: 0.3s;
}

/* TABLETTE (Max 1024px) */
@media (max-width: 1024px) {
    @media (max-width: 1024px) {
        /* On cache uniquement le bouton "Soumission" dans la navbar */
        .navbar .btn-primary {
            display: none;
        }

        /* Le menu déroulant mobile caché par défaut */
        .nav-links {
            position: absolute;
            top: 80px; /* S'aligne juste sous la navbar */
            left: 0;
            width: 100%;
            background-color: var(
                --forest-green
            ); /* Fond vert profond élégant */
            flex-direction: column;
            align-items: center;
            padding: 2rem 0;
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);

            /* État initial (caché et légèrement remonté) */
            visibility: hidden;
            opacity: 0;
            transform: translateY(-20px);
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        /* Classe ajoutée par le JavaScript pour ouvrir le menu */
        .nav-links.is-active {
            visibility: visible;
            opacity: 1;
            transform: translateY(0);
        }

        /* Style des liens dans le menu mobile */
        .nav-links a {
            color: var(--bg-white) !important; /* Force les liens en blanc */
            font-size: 1.2rem;
            padding: 1rem 0;
            width: 100%;
            text-align: center;
        }

        .mobile-menu-btn {
            display: flex;
            z-index: 1001;
        }

        /* Animation fluide des 3 barres vers une croix (X) */
        .mobile-menu-btn span {
            transition:
                transform 0.3s ease,
                opacity 0.3s ease;
            transform-origin: center;
        }
        .mobile-menu-btn.is-active span:nth-child(1) {
            transform: translateY(8px) rotate(45deg);
        }
        .mobile-menu-btn.is-active span:nth-child(2) {
            opacity: 0;
        }
        .mobile-menu-btn.is-active span:nth-child(3) {
            transform: translateY(-8px) rotate(-45deg);
        }

        /* Tes autres règles existantes pour le max-width: 1024px restent ici... */
        .hero-huge-text {
            font-size: 15vw;
            margin-bottom: -6%;
        }
        .about-grid,
        .services-grid,
        .process-layout,
        .contact-grid,
        .faq-grid {
            grid-template-columns: 1fr;
            gap: 3rem;
        }
        .diff-grid {
            grid-template-columns: 1fr;
            text-align: center;
            gap: 2rem;
        }
        .about-image img,
        .faq-image img {
            height: 400px;
        }
        .footer-content {
            flex-direction: column;
            align-items: flex-start;
        }
    }
    .mobile-menu-btn {
        display: flex;
    }

    .about-grid,
    .services-grid,
    .process-layout,
    .contact-grid,
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .diff-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .about-image img,
    .faq-image img {
        height: 400px;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* MOBILE STANDARD (Max 768px) */
@media (max-width: 768px) {
    section {
        padding: 5rem 0;
    }
    .about-section {
        padding-top: 6rem;
    }

    .about-stats-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    .features-mini-grid {
        grid-template-columns: 1fr;
    }
    .acc-body {
        grid-template-columns: 1fr;
    }
    .input-row {
        grid-template-columns: 1fr;
    }

    .hero-stats h2 {
        font-size: 3rem;
    }
    .hero-huge-text {
        font-size: 13vw;
        margin-bottom: -8%;
    }

    .process-item {
        flex-direction: column;
        gap: 1rem;
    }
    .p-num {
        font-size: 2rem;
    }
}

/* IPHONE SE & PETITS ÉCRANS (Max 400px) RÈGLES ULTRA-STRICTES */
@media (max-width: 400px) {
    .container {
        padding: 0 1.25rem;
    } /* Marges latérales minimales */
    section {
        padding: 4rem 0;
    }

    /* Le Héro */
    .hero {
        height: 90vh;
    }
    .hero-stats h2 {
        font-size: 2.5rem;
    }

    /* LA CORRECTION DU DÉBORDEMENT "PAYSAGEMENT" */
    .hero-huge-text {
        max-width: 100%;
        text-align: center;
        font-size: clamp(
            1rem,
            10vw,
            12vw
        ); /* Force la taille pour qu'elle s'ajuste parfaitement */
        letter-spacing: -2px;
        margin-bottom: -10%;
    }

    /* Réduction globale de la taille des titres */
    h2 {
        font-size: 1.8rem;
    }
    .stat-item h3 {
        font-size: 2.2rem;
    }
    .acc-header h3 {
        font-size: 1.1rem;
    }
    .p-content h4 {
        font-size: 1.2rem;
    }
    .faq-btn {
        font-size: 1.1rem;
    }

    /* Formulaire compressé */
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    .contact-details {
        padding: 1.5rem;
    }

    /* Boutons en pleine largeur */
    .btn-primary,
    .btn-outline-dark {
        width: 100%;
        padding: 0.8rem;
    }

    /* Espacements réduits */
    .about-stats-row {
        padding-bottom: 1.5rem;
        margin: 1.5rem 0;
    }
    .services-grid {
        gap: 2rem;
    }
    .diff-image img {
        height: 250px;
    }
    .faq-image img {
        height: 300px;
    }

    /* Footer aligné */
    .footer-links {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
}

/* Animations de Révélation */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 {
    transition-delay: 0.2s;
}
