/* =========================================
   1. VARIABLES & DESIGN SYSTEM
   ========================================= */
:root {
    /* Palette de couleurs Premium */
    --color-primary: #0A2540;       /* Bleu Profond */
    --color-primary-light: #183B5E;
    --color-accent: #D4AF37;        /* Or Métallique */
    --color-accent-hover: #B5952F;
    --color-text-dark: #1A1A1A;
    --color-text-light: #4A5568;
    --color-bg-light: #F7F9FC;
    --color-white: #FFFFFF;

    /* Typographie */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Espacement */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Ombres */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   2. RESET & BASES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%; /* Empêche le site d'être plus large que l'écran */
    overflow-x: hidden; /* Coupe tout ce qui dépasse sur les côtés */
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: break-word;
    hyphens: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* =========================================
   3. UTILITAIRES (Classes globales)
   ========================================= */
.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.text-white-opacity { color: rgba(255, 255, 255, 0.8); }
.text-accent { color: var(--color-accent); font-weight: 500; }

/* =========================================
   4. BOUTONS (CTA)
   ========================================= */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.cta-button.primary {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.cta-button.primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-button.secondary {
    background-color: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
    margin-left: 1rem;
}

.cta-button.secondary:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

.cta-button.full-width {
    width: 100%;
    text-align: center;
}

/* =========================================
   5. HEADER & NAVIGATION
   ========================================= */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: transform 0.3s ease-in-out;
}

.header-hidden {
    transform: translateY(-100%);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 35px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--color-primary);
    position: relative;
}

/* Soulignement animé au survol */
.nav-links a:not(.cta-button-nav)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition-fast);
}

.nav-links a:not(.cta-button-nav):hover::after {
    width: 100%;
}

.cta-button-nav {
    background-color: var(--color-primary);
    color: var(--color-white) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
}

.cta-button-nav:hover {
    background-color: var(--color-primary-light);
}

/* Style de base du bouton burger (caché sur PC) */
.mobile-menu-toggle {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

/* Les 3 barres du burger */
.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #0A2540;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 37, 64, 0.9) 0%, rgba(10, 37, 64, 0.6) 50%, rgba(10, 37, 64, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--color-white);
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
}

/* =========================================
   7. SECTIONS PRINCIPALES (About, Services, Contact)
   ========================================= */
   
/* --- About --- */
.section-about {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-image-wrapper { position: relative; }

.about-image {
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.badge-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.badge-text { font-size: 0.9rem; font-weight: 500; }
.about-content .section-title { font-size: 2.5rem; margin-bottom: 1.5rem; }
.lead-text { font-size: 1.1rem; color: var(--color-text-light); margin-bottom: 1.5rem; }

.text-link {
    color: var(--color-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--color-accent);
    padding-bottom: 2px;
}
.text-link:hover { color: var(--color-accent); }

/* --- Services --- */
.section-services {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-light);
}

.section-header { margin-bottom: var(--spacing-lg); }
.section-title { font-size: 2.5rem; margin-bottom: 1rem; }
.section-subtitle { color: var(--color-text-light); font-size: 1.1rem; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.card-icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: var(--color-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition-fast);
}

.service-card:hover .card-icon-wrapper { background-color: var(--color-primary); }
.card-icon { width: 32px; height: 32px; object-fit: contain; }
.service-card:hover .card-icon { filter: brightness(0) invert(1); }

.service-card h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.service-card p { color: var(--color-text-light); font-size: 0.95rem; }

/* --- Contact --- */
.section-contact {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-primary);
    color: var(--color-white);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.contact-list { margin-top: 2rem; }
.contact-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-form-wrapper {
    background-color: var(--color-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
    font-weight: 500;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1);
}

/* =========================================
   8. FOOTER & COOKIES
   ========================================= */
.main-footer {
    background-color: #06182a;
    color: rgba(255, 255, 255, 0.6);
    padding: 2rem 0;
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo-img { height: 25px; opacity: 0.7; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a:hover { color: var(--color-white); }

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    width: 90%;
    max-width: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
}

.cookie-buttons { display: flex; gap: 1rem; }

.cookie-button-accept {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.cookie-button-decline {
    background-color: transparent;
    color: var(--color-text-light);
    border: 1px solid #E2E8F0;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

/* =========================================
   9. PAGE MENTIONS LÉGALES
   ========================================= */
.page-header {
    padding-top: 140px;
    padding-bottom: 4rem;
    background-color: var(--color-bg-light);
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    color: var(--color-primary);
}

.legal-content {
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
    padding-bottom: 0.5rem;
    line-height: 1.3;
}

.legal-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--color-primary-light);
}

.legal-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.7;
    text-align: left; /* FIX: Aligné à gauche pour éviter les trous */
}

/* Listes personnalisées */
.legal-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2rem;
}

.legal-list li {
    margin-bottom: 0.8rem;
    color: var(--color-text-light);
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.legal-list li::before {
    content: "•";
    color: var(--color-accent);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1;
    top: 2px;
}

.legal-list strong { color: var(--color-primary); font-weight: 600; }

a.legal-link {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition-fast);
}
a.legal-link:hover { color: var(--color-accent); }
hr.legal-separator {
    border: 0;
    border-top: 1px solid #E2E8F0;
    margin: 4rem 0;
}

/* =========================================
   10. ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

/* =========================================
   11. ZONE RESPONSIVE & MOBILE (Optimisé)
   ========================================= */

/* --- VERSION MOBILE (Écrans < 768px) --- */
@media screen and (max-width: 768px) {
    
    /* A. Ajustements Généraux (Typo & Layout) */
    .hero-content h1 { font-size: 2.5rem; }
    .page-title { font-size: 2rem; }
    .legal-content { padding: 2rem 0; }
    
    /* On passe les grilles en 1 colonne */
    .about-grid,
    .contact-container,
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Padding pour compenser le header fixe */
    body { padding-top: 70px; }

    /* B. Menu Navigation Mobile (Slide-in) */
    .mobile-menu-toggle {
        display: block; /* On affiche le burger */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%; 
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px); /* Effet verre */
        
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        
        transform: translateX(100%); /* Caché à droite */
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .nav-links.active {
        transform: translateX(0%); /* Menu ouvert */
    }

    .nav-links li a {
        font-size: 1.5rem;
        color: #0A2540;
        font-weight: 600;
    }

    /* Animation du burger en croix */
    .mobile-menu-toggle.toggle span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .mobile-menu-toggle.toggle span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.toggle span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* C. Fix des Boutons Hero (Empilés) */
    .hero-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    .cta-button {
        width: 80%;
        max-width: 300px;
        text-align: center;
        margin: 0 !important; /* Force la suppression des marges latérales */
    }

    .logo-img {
        height: 25px; /* Essayez 25px ou 28px */
    }
}

/* --- VERSION PC (> 769px) --- */
@media screen and (min-width: 769px) {
    /* Reset pour s'assurer que le menu PC est correct */
    .mobile-menu-toggle { display: none; }
    .nav-links {
        display: flex;
        transform: none;
        height: auto;
        width: auto;
        background: none;
        position: relative;
        flex-direction: row;
    }
}

/* --- VERSION TRÈS PETITS ÉCRANS (< 380px) --- */
@media screen and (max-width: 380px) {
    
    /* On réduit le titre pour qu'il ne dépasse pas */
    .hero-content h1 {
        font-size: 2rem; /* Au lieu de 2.5rem */
    }

    /* On réduit les marges de côté pour gagner de la place */
    .container {
        width: 95%; /* On prend presque toute la largeur */
        padding: 0 0.5rem;
    }

    /* On ajuste les boutons pour qu'ils ne touchent pas les bords */
    .cta-button {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }
}

/* --- Message de Succès Formulaire --- */
.form-status {
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 0.5s ease-out;
}

.form-status h3 {
    color: var(--color-primary);
    margin-top: 1rem;
    font-size: 1.5rem;
}

.form-status p {
    color: var(--color-text-light);
}

/* Animation du Checkmark (Style Apple/Stripe) */
.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #28a745; /* Vert succès */
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #28a745;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #28a745;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 100% { box-shadow: inset 0px 0px 0px 30px #fff; } }