/* --- CSS Variables & Design System --- */
:root {
    --color-primary: #1A2F24;
    /* Dark Green */
    --color-secondary: #F6F3F0;
    /* Light Beige */
    --color-accent: #D4A373;
    /* Gold/Tan */
    --color-text-main: #1A2F24;
    --color-text-muted: rgba(26, 47, 36, 0.7);
    --color-bg-white: #FFFFFF;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Watermark global subtil */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    max-width: 800px;
    background-image: url('images/Logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1,
h2,
h3,
h4,
.brand,
.footer-brand {
    font-family: var(--font-heading);
    font-weight: 600;
}

.brand {
    font-size: 1.5rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Helper Classes */
.text-center {
    text-align: center;
}

.items-center {
    align-items: center;
}

.sub-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #fff;
}

.btn-primary:hover {
    background-color: #c49463;
    transform: translateY(-2px);
}

/* Section Spacing */
.section {
    padding: 6rem 0;
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-primary);
}

/* Layout Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.grid-2-histoire {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

/* --- Header / Navbar --- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition);
    padding: 1.5rem 0;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

#navbar.scrolled .brand,
#navbar.scrolled .nav-links a {
    color: var(--color-primary);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Initially on the hero section, text is white to contrast image */
#navbar:not(.scrolled) .brand,
#navbar:not(.scrolled) .nav-links a,
#navbar:not(.scrolled) .mobile-menu-btn {
    color: #fff;
}

.nav-links a {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    margin-left: 2.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-accent) !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background-color: var(--color-bg-white);
    padding: 1rem 2rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    padding: 1rem 0;
    text-decoration: none;
    color: var(--color-primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    border-bottom: 1px solid #eaeaea;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: url('images/hero_bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 0 1rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(26, 47, 36, 0.5), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* --- Nos Produits --- */
.product-card {
    text-align: center;
}

.product-img {
    height: 300px;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.03);
}

.bg-butter {
    background-image: url('images/butter.jpg');
}

.bg-yogurt {
    background-image: url('images/yogurt.jpg');
}

.bg-cheese {
    background-image: url('images/cheese.jpg');
}

.product-title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.product-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* --- Témoignages --- */
.temoignages {
    background-color: var(--color-secondary);
}

.testimonial-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.stars {
    color: var(--color-accent);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.quote {
    font-style: italic;
    font-size: 1.05rem;
    color: var(--color-primary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid #f0f0f0;
    padding-top: 1.5rem;
}

.testimonial-footer .name {
    display: block;
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.testimonial-footer .city {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.product-tag {
    font-size: 0.8rem;
    color: var(--color-accent);
    text-transform: uppercase;
    font-weight: 500;
}

/* --- Notre Histoire --- */
.histoire-img-container {
    height: 500px;
    background-image: url('images/about-farm.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.histoire-content .section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.body-text {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.stats-row {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.stat-item {
    text-align: left;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #4C7D8A;
    letter-spacing: 0.08em;
    font-weight: 400;
    opacity: 0.9;
}

/* --- Engagements --- */
.border-top {
    border-top: 1px solid #eaeaea;
    padding-top: 6rem;
}

.engagement-card {
    padding: 0 1rem;
}

.icon-circle {
    width: 64px;
    height: 64px;
    background-color: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    margin: 0 auto 1.5rem auto;
}

.engagement-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.engagement-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* --- Footer --- */
.footer {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 5rem 0 2rem 0;
}

.grid-footer {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-tagline {
    color: rgba(246, 243, 240, 0.7);
    max-width: 300px;
}

.footer-heading {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(246, 243, 240, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-contact p {
    color: rgba(246, 243, 240, 0.7);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.footer-contact a {
    color: rgba(246, 243, 240, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    color: rgba(246, 243, 240, 0.5);
    font-size: 0.85rem;
}

/* --- Responsive --- */
@media (max-width: 860px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    #navbar:not(.scrolled) .mobile-menu-btn {
        color: #fff;
    }

    #navbar.scrolled .mobile-menu-btn {
        color: var(--color-primary);
    }

    .hero-title {
        font-size: 3rem;
    }

    .grid-2-histoire {
        grid-template-columns: 1fr;
    }

    .histoire-img-container {
        height: 350px;
    }

    .grid-footer {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .stats-row {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }
}

/* --- Subpages (Contact, Mentions Légales) --- */
.page-header-container {
    padding-top: 10rem;
    padding-bottom: 4rem;
    background-color: var(--color-primary);
    color: #fff;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-section {
    padding: 6rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info-block {
    background-color: var(--color-secondary);
    padding: 3rem;
    border-radius: 4px;
}

.contact-info-block h3 {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.contact-info-block p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Mentions Legales content */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.legal-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

@media (max-width: 860px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}