/* ==========================================================================
   1. VARIABLES & CONFIGURATION
   ========================================================================== */
:root {
    /* --- Palette ARC Retraite --- */
    --color-primary: #800020;        /* Bordeaux */
    --color-primary-dark: #5a0016;   /* Bordeaux foncé (Hover) */
    --color-secondary: #1a1a1a;      /* Noir/Anthracite (Titres) */
    
    --color-text: #333333;           /* Gris foncé (Corps de texte) */
    --color-text-light: #666666;     /* Gris moyen (Sous-titres) */
    
    --color-bg: #fcfcfc;             /* Blanc cassé (Fond principal) */
    --color-bg-alt: #f4f4f4;         /* Gris très clair (Fond sections alternées) */
    --color-white: #ffffff;
    --color-accent: #d4af37;         /* Or (Détails) */

    /* --- Typographie --- */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* --- Espacements --- */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* --- Design System (Arrondis & Ombres Modernes) --- */
    --radius-sm: 4px;
    --radius-md: 12px;               /* Arrondis modernes */
    --radius-pill: 50px;             /* Pour les boutons */

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px -10px rgba(128, 0, 32, 0.15); /* Ombre bordeaux diffuse */
}

/* ==========================================================================
   2. RESET & BASES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-weight: 700;
    letter-spacing: -1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   3. UTILITAIRES & COMPOSANTS
   ========================================================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

/* --- BOUTONS (Style Moderne Pill) --- */
.btn-primary {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(128, 0, 32, 0.4);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: var(--color-primary);
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid var(--color-primary);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.text-link {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.text-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   4. HEADER & NAVIGATION
   ========================================================================== */
#main-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-links a {
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.mobile-menu-btn {
    display: none;
}

/* ==========================================================================
   5. SECTION HERO (Version Claire avec Voile Doux)
   ========================================================================== */
#hero {
    padding: 180px 0 100px;
    /* LE CHANGEMENT EST ICI : 
       J'ai remis un voile blanc (rgba 255,255,255) 
       mais à 0.6 (60%) pour que l'image reste visible.
    */
    background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), url('hero-bg.png');
    background-size: cover;
    background-position: center;
    text-align: center;
    color: var(--color-secondary);
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto var(--spacing-md);
    color: var(--color-primary); /* Titre Bordeaux */
    font-weight: 700;
}

.accent-text {
    color: var(--color-primary);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #4a4a4a; /* Sous-titre Gris Foncé */
    font-weight: 500;
    margin: 0 auto var(--spacing-lg);
    max-width: 600px;
    /* Ombre blanche pour garantir la lecture */
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* ==========================================================================
   6. SECTIONS STANDARD (Services, À Propos)
   ========================================================================== */
section {
    padding: var(--spacing-xl) 0;
}

#services {
    background-color: var(--color-white);
}

/* Grille des Services (Style Carte Moderne) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background-color: #ffffff;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(128, 0, 32, 0.1);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

/* Section À Propos */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.about-text .lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.about-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   7. SECTION CONTACT
   ========================================================================== */
#contact {
    background-color: var(--color-bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

/* Bloc Info Contact */
.contact-info {
    background: #ffffff;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.03);
}

.contact-details-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.contact-details-list .icon {
    font-size: 1.5rem;
}

/* Formulaire (Style Moderne) */
.contact-form-wrapper {
    background: #ffffff;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.contact-form-wrapper:hover {
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

.checkbox-label {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 1rem;
    cursor: pointer;
}

#form-feedback {
    margin-top: 1rem;
    text-align: center;
    font-weight: 600;
}

.success-message { color: green; }
.error-message { color: red; }

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

/* ==========================================================================
   9. ANIMATIONS & JS HELPERS
   ========================================================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: 8px 16px;
    z-index: 2000;
}

.skip-link:focus {
    top: 0;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   10. RESPONSIVE (Mobile & Tablette)
   ========================================================================== */
@media (max-width: 768px) {
    /* Mise en page globale */
    .section-title { font-size: 2rem; }
    #hero h1 { font-size: 2.5rem; }
    
    .about-container, 
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Menu Burger Mobile */
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
    }

    .mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--color-secondary);
        margin: 5px 0;
        transition: 0.3s;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        background-color: var(--color-white);
        flex-direction: column;
        justify-content: center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease-in-out;
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }
    
    /* Animation du bouton burger quand actif */
    .mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
}

/* --- CORRECTION DISTORSION IMAGE À PROPOS (ARC) --- */
.about-image img {
    width: 100% !important; /* Force la largeur réactive sur mobile */
    height: 400px; /* Maintient la hauteur du bloc définie dans le HTML */
    object-fit: cover; /* RECADRE l'image intelligemment au lieu de la compresser */
    object-position: center; /* Centre le recadrage */
    border-radius: var(--radius-md); /* Pour garder le design moderne */
}

/* Ajustement pour mobile pour ne pas garder une boîte trop haute */
@media (max-width: 768px) {
    .about-image img {
        height: 250px; /* On réduit la hauteur sur petit écran */
    }
}