/* 
    SDBioHabitat - Design System "Zen & Expert"
    Version: 3.0.0
    Author: Antigravity (Powered by UI/UX Pro Max rules)
*/

:root {
    /* Color Palette: Unidad Verde Integration */
    --color-primary: #5cad47; /* Vert dynamique Unidad Verde */
    --color-primary-light: #86efac;
    --color-primary-dark: #3f7831; /* Vert foncé pour accessibilité textuelle (WCAG 4.5:1) sur fond clair */
    --color-secondary: #8da399; /* Vert sauge (Nature/Apaisement) */
    --color-secondary-dark: #667b72;
    --color-bg-base: #fdfaf5; /* Lin naturel tres clair */
    --color-bg-surface: #ffffff; /* Surface blanche parfaite */
    --color-text-main: #2c3e50; /* Bleu gris profond (Lisibilite > 4.5:1) */
    --color-text-muted: #5d6d7e;
    --color-glass-border: rgba(141, 163, 153, 0.15); /* Bordure legere vert sauge */
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Strict 8pt Spacing Grid (Rhythm) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Strict Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    /* Zen Shadows (Soft and Natural) */
    --shadow-sm: 0 2px 4px rgba(44, 62, 80, 0.04);
    --shadow-md: 0 8px 16px rgba(44, 62, 80, 0.06);
    --shadow-lg: 0 16px 32px rgba(44, 62, 80, 0.08);
}

/* Base Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* Empêche le défilement horizontal intempestif */
}

/* Custom Zen Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.25;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 300ms ease;
}

a:hover {
    opacity: 0.7;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
}

/* Header & Nav - Natural Glassmorphism */
header {
    background: rgba(92, 173, 71, 0.95); /* Vert primaire translucide */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-glass-border);
    transition: all 300ms ease; /* Correction UI/UX : max 300ms */
}

header.scrolled {
    background: rgba(92, 173, 71, 0.98);
    padding: var(--space-sm) 0;
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-img {
    height: 56px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-name {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-bg-surface);
    font-size: 18px;
    line-height: 1.1;
}

.logo-title {
    font-family: var(--font-body);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    color: var(--color-bg-surface);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--color-bg-surface);
    cursor: pointer;
    padding: var(--space-xs);
}

/* Navigation Dropdowns */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-bg-surface);
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) 0;
    z-index: 1001;
    top: 100%;
    left: 0;
    border: 1px solid var(--color-glass-border);
}

.dropdown-content a {
    color: var(--color-text-main);
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-content a:hover {
    background-color: var(--color-bg-base);
    color: var(--color-primary);
    opacity: 1; /* Override a:hover */
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Lang Selector */
.lang-selector {
    display: flex;
    gap: var(--space-xs);
    background: rgba(0, 0, 0, 0.1);
    padding: var(--space-xs);
    border-radius: var(--radius-full);
}

.lang-btn {
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    background: transparent;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 300ms ease;
}

.lang-btn.active {
    background: var(--color-bg-surface);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

/* Buttons - Soft Energy */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 16px;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-bg-surface);
    box-shadow: 0 4px 12px rgba(92, 173, 71, 0.3);
}

.btn-primary:hover {
    background: #4a8f39;
    box-shadow: 0 8px 24px rgba(92, 173, 71, 0.4);
    transform: translateY(-2px);
}

/* Bouton Contact dans le header (doit etre inversé car le fond est vert) */
header .btn-primary {
    background: var(--color-bg-surface);
    color: var(--color-primary);
    box-shadow: none;
}

header .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.btn-inverted {
    background: var(--color-bg-surface);
    color: var(--color-secondary-dark); /* Le texte prend la couleur du fond de la banniere */
}

.btn-inverted:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.btn-outline-light {
    background: transparent;
    color: var(--color-bg-surface);
    border: 2px solid var(--color-bg-surface);
}

.btn-outline-light:hover {
    background: var(--color-bg-surface);
    color: var(--color-secondary-dark);
    transform: translateY(-2px);
}

.btn-outline-green {
    background: transparent;
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary-dark);
}

.btn-outline-green:hover {
    background: var(--color-primary-dark);
    color: var(--color-bg-surface);
    transform: translateY(-2px);
}

/* CTA Association Banner - Glassmorphism */
.cta-banner {
    background: url('https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat;
    position: relative;
    padding: var(--space-3xl) var(--space-md);
    margin-bottom: var(--space-3xl); 
}

.cta-banner .cta-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85); /* Blanc très opalescent */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: var(--space-3xl) var(--space-xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.cta-banner h2 {
    color: var(--color-primary-dark); /* UI/UX : Contraste valide sur flou blanc */
    font-size: 32px;
    margin-bottom: var(--space-lg);
}

.cta-banner p {
    color: var(--color-text-main);
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: var(--space-xl);
}

.cta-banner strong {
    color: var(--color-secondary-dark);
    font-weight: 700;
}

.cta-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero Section */
.hero {
    padding: 140px 0 var(--space-3xl);
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(253, 250, 245, 0.85) 0%, rgba(253, 250, 245, 0.4) 50%, rgba(253, 250, 245, 0) 100%), url('hero-golden.png') center/cover no-repeat;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-content p[data-i18n="hero-subtitle"] {
    color: var(--color-secondary-dark);
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.hero-content h1 {
    font-size: clamp(36px, 5vw, 56px);
    margin-bottom: var(--space-lg);
    color: var(--color-text-main);
}

.hero-content p[data-i18n="hero-description"] {
    font-size: 18px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    max-width: 560px;
}

.hero-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sections */
section {
    padding: var(--space-3xl) 0;
    scroll-margin-top: 100px; /* Évite que le menu fixe ne cache le haut du texte lors du clic ! */
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title p {
    color: var(--color-secondary-dark);
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.section-title h2 {
    font-size: 36px;
}

/* Specific Helpers */
.bg-white {
    background-color: var(--color-bg-surface);
}

.validation-text p {
    font-size: 18px;
    margin-bottom: var(--space-md);
}

.card-highlight {
    background: var(--color-bg-base);
    border-left: 4px solid var(--color-primary);
}

/* Zen Cards */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: var(--space-xl);
}

.service-card {
    background: var(--color-bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1); /* Correction UI/UX : max 300ms */
    cursor: pointer;
    border: 1px solid transparent;
    overflow: hidden;
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-glass-border);
    transform: translateY(-4px); 
}

.service-image {
    height: 200px;
    width: 100%;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* About Section Banner Image */
.about-banner-image {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 60vh;
    overflow: hidden;
}

.about-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%; /* Pousse le focus sur le visage plus haut si l'image est rognée sur les écrans très larges */
}

.service-content {
    padding: var(--space-2xl);
}

.service-image + .service-content {
    padding-top: var(--space-lg);
}

.service-card .icon {
    width: 64px;
    height: 64px;
    background: var(--color-bg-surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 2;
    border: 4px solid var(--color-bg-surface);
}

.service-image + .service-content .icon {
    margin-top: -56px; /* Chevauchement fluide sur l'image */
}

/* Contact & Forms */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    color: var(--color-text-main);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px var(--space-md);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-base);
    font-family: inherit;
    font-size: 16px;
    transition: all 200ms ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.link-more {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-primary);
    font-weight: 600;
    margin-top: var(--space-lg);
    transition: gap 300ms ease;
}

.service-card:hover .link-more {
    gap: var(--space-sm);
    color: #4a8f39; /* Le vert s'assombrit au hover pour creer la reponse tactile */
}

.service-card h3 {
    font-size: 24px;
    font-family: var(--font-heading);
    margin-bottom: var(--space-sm);
}

.service-card p {
    color: var(--color-text-muted);
}

/* Footer Advanced */
footer {
    background: var(--color-secondary-dark);
    color: var(--color-bg-base);
    padding: var(--space-3xl) 0 var(--space-lg) 0;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-xl);
    text-align: left;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
    color: var(--color-bg-surface);
    margin-bottom: var(--space-lg);
    font-size: 18px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: var(--space-sm);
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-col a:hover {
    color: var(--color-bg-surface);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    opacity: 0.8;
}

/* Responsive constraints (Mobile) */
@media (max-width: 950px) {
    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .mobile-menu-btn {
        display: block; /* Affiche le boutton menu */
    }

    .nav-links {
        display: none; /* Cache le menu par defaut sur mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(92, 173, 71, 0.98); /* Fond vert sur mobile aussi */
        flex-direction: column;
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
        gap: var(--space-lg);
        align-items: flex-start;
    }

    .nav-links.active {
        display: flex; /* Affiche le menu si on a clique */
        animation: fadeIn 300ms ease;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding: var(--space-sm) 0 0 var(--space-md);
        display: none;
        background: transparent;
    }

    /* Le sous-menu s'affiche uniquement au clic ou hover soutenu sur mobile */
    .dropdown:hover .dropdown-content,
    .dropdown:active .dropdown-content {
        display: block;
    }

    .logo-img {
        height: 40px; /* Logo plus petit sur mobile */
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p[data-i18n="hero-description"] {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero {
        padding-top: 130px; /* Plus d'espace sous le header mobile */
        background: linear-gradient(rgba(253, 250, 245, 0.7), rgba(253, 250, 245, 0.7)), url('hero-golden.png') center/cover no-repeat;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
