/* ==========================================================================
   Variables (Palette de couleurs et Typographies)
   ========================================================================== */
:root {
    --blanc: #ffffff;
    --beige: #F4F1EA;
    --marron: #6B4423;
    --noir: #1A1A1A;
    
    --police-titre: 'Playfair Display', serif;
    --police-texte: 'Lato', sans-serif;
}

/* ==========================================================================
   Reset et Base (Mobile First)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Permet un défilement fluide au clic sur le menu */
    scroll-padding-top: 149px;
}

body {
    font-family: var(--police-texte);
    color: var(--noir);
    background-color: var(--blanc);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--police-titre);
    font-weight: 600;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Classes utilitaires */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.section {
    padding: 4rem 0;
}

.bg-beige {
    background-color: var(--beige);
}

.bg-noir {
    background-color: var(--noir);
}

.texte-blanc {
    color: var(--blanc);
}

.couleur-marron {
    color: var(--marron);
}

.lien-blanc {
    color: var(--blanc);
    text-decoration: underline;
}

.btn-primary {
    display: inline-block;
    background-color: var(--marron);
    color: var(--blanc);
    padding: 12px 24px;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #503118;
}

/* ==========================================================================
   Composants
   ========================================================================== */

/* En-tête et Menu Sticky */
.header {
    position: sticky;
    top: 0;
    background-color: var(--blanc);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    font-family: var(--police-titre);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--marron);
    margin-bottom: 1rem;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--marron);
}

/* Hero Section (Accueil) */
.hero {
    background-image: linear-gradient(rgba(26, 26, 26, 0.6), rgba(26, 26, 26, 0.6)), url('https://images.unsplash.com/photo-1509440159596-0249088772ff?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--blanc);
    padding: 0 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Grilles (Produits, Engagements) */
.grid-produits, .grid-engagements {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.carte-produit {
    background-color: var(--blanc);
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 1rem;
}

.carte-produit h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.3rem;
}

.carte-produit p {
    padding: 0 1rem;
    font-size: 0.95rem;
    color: #555;
}

.engagement {
    text-align: center;
    padding: 2rem;
    background-color: var(--beige);
    border-radius: 8px;
}

/* Section Savoir-Faire */
.contenu-scinde {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contenu-scinde p {
    margin-bottom: 1rem;
}

.contenu-scinde img {
    border-radius: 8px;
}

/* Contact */
.infos-contact {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

/* Footer amélioré */
.footer {
    background-color: var(--noir);
    color: var(--blanc);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--beige);
}

.footer-section p {
    color: #ccc;
    font-size: 0.95rem;
}

.reseaux-sociaux {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-icon {
    color: var(--blanc);
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

/* Effet au survol : changement de couleur et léger déplacement vers le haut */
.social-icon:hover {
    color: var(--marron);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    color: #777;
    font-size: 0.85rem;
}

/* ==========================================================================
   Responsive (Tablettes et Ordinateurs)
   ========================================================================== */
@media (min-width: 768px) {
    html {
        scroll-padding-top: 71px; 
    }

    .header {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 5%;
    }

    .logo {
        margin-bottom: 0;
    }

    .hero {
        height: 80vh;
    }

    .hero h1 {
        font-size: 4rem;
    }

    .hero p {
        font-size: 1.4rem;
    }

    .grid-produits {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-engagements, .infos-contact {
        grid-template-columns: repeat(3, 1fr);
    }

    .contenu-scinde {
        flex-direction: row;
        align-items: center;
    }

    .contenu-scinde .texte, .contenu-scinde .image {
        flex: 1;
    }

    /* Ajout pour le footer sur ordinateur */
    .footer-content {
        flex-direction: row;
        justify-content: space-around;
        text-align: left;
    }

    .reseaux-sociaux {
        justify-content: flex-start;
    }
}

@media (min-width: 1024px) {
    .grid-produits {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   Animations du Menu (JavaScript)
   ========================================================================== */

/* La transition ne s'applique plus qu'aux couleurs et ombres */
.header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Le menu garde sa taille mais devient transparent avec une ombre */
.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}