/* =========================================
   1. VARIABLES & RESET (L'ADN du site)
   ========================================= */
:root {
    /* Palette "High-End Consultant" */
    --color-bg: #FDFBF7;
    --color-text: #1A2C28;
    --color-accent: #C6A87C;
    --color-secondary: #2D4F44;
    --color-white: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Spacing & Sizes */
    --spacing-xs: 1rem;
    --spacing-md: 3rem;
    --spacing-lg: 6rem;
    
    /* UI Effects */
    --shadow-card: 0 20px 40px -10px rgba(45, 79, 68, 0.08);
    --radius-lg: 24px;
    --radius-sm: 8px;
    --header-height-desktop: 100px;
    --header-height-mobile: 130px; /* Un peu plus grand pour empiler logo + liens */
    --transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.15;
    color: var(--color-secondary);
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; display: block; border-radius: var(--radius-lg); }

/* =========================================
   2. HEADER FIXE (Optimisé Mobile)
   ========================================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height-desktop);
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.9); /* Effet verre plus opaque */
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--color-secondary);
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    font-size: 0.95rem;
    font-weight: 500;
    margin-left: 2rem;
    position: relative;
    color: var(--color-text);
}

/* Soulignement animé */
nav a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--color-accent);
    transition: var(--transition);
}

nav a:not(.btn-nav):hover::after { width: 100%; }

.btn-nav {
    border: 1px solid var(--color-secondary);
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-left: 2rem;
    white-space: nowrap;
}

.btn-nav:hover {
    background: var(--color-secondary);
    color: var(--color-white);
}

/* =========================================
   3. HERO SECTION (Layout Asymétrique)
   ========================================= */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    /* PADDING CRUCIAL : Pour ne pas être caché par le header fixe */
    padding-top: var(--header-height-desktop); 
    padding-bottom: 4rem;
    padding-left: 5%;
    padding-right: 5%;
    position: relative;
    gap: 4rem;
}

/* Cercle d'ambiance en arrière-plan */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(198, 168, 124, 0.15) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.2rem;
    color: #555;
    max-width: 550px;
    margin-bottom: 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(45, 79, 68, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(45, 79, 68, 0.3);
    background-color: #223b33;
}

.hero-visual {
    position: relative;
    height: 70vh;
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px; /* Reset forme organique pour responsive propre */
}

/* =========================================
   4. SECTIONS & CARTES
   ========================================= */
section {
    padding: var(--spacing-lg) 5%;
}

.section-header {
    margin-bottom: var(--spacing-md);
    max-width: 700px;
}

.overline {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    /* OPTIMISATION MOBILE: minmax réduit à 280px pour petits écrans */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card);
    border-color: var(--color-accent);
}

.service-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: rgba(198, 168, 124, 0.15);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

/* =========================================
   5. PAGES SERVICES (Zig-Zag)
   ========================================= */
.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.service-row.reverse { direction: rtl; }
.service-row.reverse > * { direction: ltr; }

.service-img-container {
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.service-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.service-row:hover .service-img-container img { transform: scale(1.05); }

.price-tag {
    display: inline-block;
    background-color: rgba(198, 168, 124, 0.15);
    color: #8c734b;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.feature-list { list-style: none; margin: 1.5rem 0 2rem 0; }
.feature-list li { margin-bottom: 0.8rem; padding-left: 1.5rem; position: relative; color: #555; }
.feature-list li::before {
    content: "•"; color: var(--color-accent); font-size: 1.5rem; position: absolute; left: 0; top: -5px;
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    background-color: var(--color-secondary);
    color: #D1D9D6;
    padding: 4rem 5% 2rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

footer a:hover { color: var(--color-accent); }
.legal-text { font-size: 0.85rem; opacity: 0.6; margin-top: 3rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem;}

/* =========================================
   7. ANIMATIONS
   ========================================= */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   ⚡ OPTIMISATION MOBILE (Le Cœur du Responsive)
   ========================================= */
@media (max-width: 968px) {
    /* Ajustements tablettes et petits laptops */
    .hero { gap: 2rem; }
    .hero-text h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    
    /* --- HEADER MOBILE OPTIMISÉ --- */
    header {
        height: auto;
        min-height: var(--header-height-mobile);
        padding: 1rem 5%;
        flex-direction: column; /* Empiler Logo et Liens */
        align-items: flex-start; /* Aligner à gauche */
        justify-content: center;
        gap: 0.5rem;
    }

    .logo { font-size: 1.4rem; margin-bottom: 0.5rem; }

    /* MENU "SCROLLABLE" (Style App moderne) */
    nav {
        width: 100%;
        overflow-x: auto; /* Permet le défilement horizontal */
        white-space: nowrap; /* Empêche le retour à la ligne */
        padding-bottom: 10px; /* Espace pour le scrollbar */
        -webkit-overflow-scrolling: touch; /* Scroll fluide sur iOS */
        margin-left: -5%; /* Astuce pour que le scroll touche les bords */
        padding-left: 5%;
        width: 110%; /* Comble la marge négative */
    }

    /* Masquer la barre de défilement (propre) */
    nav::-webkit-scrollbar { display: none; }

    nav a {
        margin-left: 0;
        margin-right: 1.5rem; /* Espace entre les liens */
        font-size: 0.9rem;
        display: inline-block;
    }
    
    .btn-nav {
        margin-left: 0;
        margin-right: 2rem; /* Marge à droite pour le dernier élément */
    }

    /* --- HERO MOBILE --- */
    .hero { 
        grid-template-columns: 1fr; /* Une seule colonne */
        text-align: left;
        padding-top: calc(var(--header-height-mobile) + 20px); /* Ajustement précis */
        gap: 2rem;
    }
    
    .hero-visual {
        display: block; /* On AFFICHE l'image sur mobile */
        height: 300px; /* Moins haute */
        order: -1; /* Optionnel: mettre image au dessus du texte (supprimer cette ligne si tu préfères l'image en bas) */
    }
    
    /* Si on garde l'image en dessous (standard), enlever 'order: -1' au dessus */

    .hero-text h1 { font-size: 2.5rem; }
    
    /* --- SECTIONS GÉNÉRALES --- */
    section { padding: 4rem 5%; }
    
    /* --- ZIG ZAG LAYOUT MOBILE --- */
    .service-row { 
        grid-template-columns: 1fr; 
        gap: 2rem; 
        margin-bottom: 4rem; 
    }
    .service-row.reverse { direction: ltr; } /* Désactiver l'inversion */
    .service-img-container { height: 250px; }
    
    /* --- FOOTER --- */
    footer { text-align: left; }
    footer > div { flex-direction: column; gap: 2rem; }
}