/* =========================================
   STYLE GLOBAL - TERROIR DE L'EST
   ========================================= */

:root {
    --vert-imperial: #0f2819; /* Plus sombre, plus premium */
    --vert-vif: #2ecc71; /* Pour les actions */
    --or-terre: #eebb4d;
    --blanc-casse: #f4f7f6;
    --blanc-pur: #ffffff;
    --gris-texte: #1e272e;
    --gris-clair: #ecf0f1;
    --ombre-douce: 0 4px 20px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Web Components Setup */
header-nadege, footer-nadege { display: block; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--blanc-casse);
    color: var(--gris-texte);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    color: var(--vert-imperial);
    font-weight: 700;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* TOP BAR */
.top-bar {
    background: linear-gradient(90deg, var(--vert-imperial) 0%, #143322 100%);
    color: white;
    padding: 8px 40px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 0.5px;
}
.top-bar-right a { margin-left: 20px; opacity: 0.8; }
.top-bar-right a:hover { opacity: 1; color: var(--or-terre); }

/* HEADER */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); /* Ombre douce plus marquée */
    position: sticky; top: 0; z-index: 1000;
}
.brand-logo h1 { font-size: 1.6rem; margin: 0; line-height: 1; }
.brand-logo span { font-size: 0.65rem; color: var(--or-terre); letter-spacing: 2px; text-transform: uppercase; font-weight: 700; display: block; margin-top: 4px; }
.brand-logo img { border-radius: 50%; border: 2px solid var(--or-terre); box-shadow: 0 4px 15px rgba(0,0,0,0.1); transition: transform 0.3s; }

.nav-menu { display: flex; gap: 30px; align-items: center; }
.nav-link { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; color: var(--gris-texte); position: relative; }
.nav-link:hover { color: var(--or-terre); }

/* Burger Menu (Caché sur Desktop) */
.burger-menu { display: none; font-size: 1.5rem; color: var(--vert-imperial); cursor: pointer; }

.header-actions { display: flex; align-items: center; gap: 20px; }
.header-search {
    background: var(--blanc-casse);
    border: none;
    border-radius: 30px;
    padding: 8px 15px;
    display: flex; align-items: center;
    width: 250px;
    transition: width 0.3s ease;
}
.header-search:focus-within { width: 300px; box-shadow: 0 0 0 2px var(--or-terre); }
.header-search input { border: none; outline: none; font-size: 0.85rem; width: 100%; background: transparent; }
.icon-btn { font-size: 1.2rem; color: var(--vert-imperial); cursor: pointer; position: relative; }
.cart-badge {
    position: absolute; top: -8px; right: -8px;
    background-color: var(--or-terre); color: white;
    font-size: 0.6rem; width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: bold;
}

/* HERO */
.hero-section {
    position: relative;
    height: 85vh;
    background: var(--vert-imperial) url('../../img/banniere.jpg') center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85));
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 20px; }
.hero-tag {
    display: inline-block; background: var(--or-terre); color: var(--vert-imperial);
    padding: 5px 15px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; margin-bottom: 20px;
    text-transform: uppercase; letter-spacing: 1px;
}
.hero-title { font-size: 4rem; line-height: 1.1; margin-bottom: 20px; text-shadow: 0 5px 15px rgba(0,0,0,0.6); color: white; font-weight: 800; letter-spacing: -1px; }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 40px; opacity: 0.9; font-weight: 300; }

.btn-gold {
    background: linear-gradient(45deg, #eebb4d, #f1c40f, #eebb4d);
    background-size: 200% auto;
    color: var(--vert-imperial);
    padding: 18px 50px; border-radius: 50px; font-weight: 800; text-transform: uppercase;
    display: inline-block; box-shadow: 0 10px 25px rgba(212, 175, 55, 0.4);
    transition: all 0.4s ease;
}
.btn-gold:hover { background-position: right center; transform: translateY(-3px) scale(1.05); box-shadow: 0 15px 35px rgba(212, 175, 55, 0.6); }

/* STATS BAR (MYTHO MODE) */
.stats-bar {
    background: white;
    margin: -50px auto 0;
    width: 90%; max-width: 1100px;
    position: relative; z-index: 10;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    display: flex; justify-content: space-around; padding: 30px;
    text-align: center;
}
.stat-item h3 { font-size: 2.5rem; color: var(--vert-imperial); margin-bottom: 5px; }
.stat-item p { font-size: 0.9rem; color: #7f8c8d; text-transform: uppercase; font-weight: 600; }

/* PRODUCTEURS */
.social-proof-bar { background: var(--blanc-casse); padding: 80px 20px; text-align: center; }
.section-title-center { font-size: 2.5rem; margin-bottom: 10px; color: var(--vert-imperial); }
.producers-list { 
    display: flex; gap: 30px; overflow-x: auto; padding: 20px 10px; margin-top: 20px;
    scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--or-terre) transparent;
}
.producers-list::-webkit-scrollbar { height: 8px; }
.producers-list::-webkit-scrollbar-thumb { background-color: var(--or-terre); border-radius: 10px; }
.producer-item {
    background: white; padding: 15px 25px; border-radius: 50px;
    display: flex; align-items: center; gap: 15px; text-align: left;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: transform 0.3s;
    flex: 0 0 auto; scroll-snap-align: start; min-width: 250px;
}
.producer-item:hover { transform: translateY(-5px); }
.producer-face { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--or-terre); }

/* MARKET */
.products-section { padding: 60px 20px; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 40px; }

.filter-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.filter-btn {
    background: white; border: 1px solid #ddd; padding: 8px 20px; border-radius: 30px;
    cursor: pointer; font-weight: 600; transition: all 0.3s;
}
.filter-btn.active, .filter-btn:hover { background-color: var(--vert-imperial); color: white; border-color: var(--vert-imperial); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.product-card { 
    background: white; border-radius: 20px; overflow: hidden; box-shadow: var(--ombre-douce); border: none; transition: all 0.4s ease;
    opacity: 0; /* Invisible au départ pour l'animation */
}
/* Animation d'apparition */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
.product-card.visible { animation: fadeInUp 0.6s ease-out forwards; }
.product-card.visible:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }

.card-image-wrapper { height: 250px; overflow: hidden; position: relative; }
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .card-image-wrapper img { transform: scale(1.1); }
.card-badge { position: absolute; top: 15px; left: 15px; background: rgba(255,255,255,0.9); color: var(--vert-imperial); padding: 5px 12px; font-size: 0.7rem; border-radius: 20px; font-weight: 700; z-index: 2; }
.card-details { padding: 20px; text-align: center; }
.card-price { display: block; margin-top: 10px; color: var(--or-terre); font-weight: 700; font-size: 1.3rem; }

/* FOOTER */
footer { background-color: #1a1a1a; color: #b0b0b0; padding-top: 60px; font-size: 0.9rem; border-top: 5px solid var(--vert-imperial); }
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; }
.footer-col h4 { color: white; margin-bottom: 20px; font-family: 'Playfair Display', serif; }
.footer-col ul li { margin-bottom: 10px; }

.footer-newsletter { display: flex; gap: 5px; margin-top: 10px; }
.footer-newsletter input { padding: 10px; flex-grow: 1; border-radius: 4px; border: none; }
.footer-newsletter button { padding: 10px 15px; background: var(--or-terre); border: none; cursor: pointer; border-radius: 4px; font-weight: bold; }
.footer-bottom { background-color: #111; padding: 20px; text-align: center; border-top: 1px solid #333; }

/* CTA PRODUCTEUR */
.cta-pro-section {
    background: var(--vert-imperial);
    color: white;
    padding: 80px 20px;
    display: flex; align-items: center; justify-content: center; gap: 50px;
    flex-wrap: wrap;
}
.cta-content { max-width: 500px; }
.cta-content h2 { color: white; font-size: 2.5rem; margin-bottom: 15px; }
.cta-content p { opacity: 0.8; margin-bottom: 30px; font-size: 1.1rem; }
.cta-buttons { display: flex; gap: 15px; flex-wrap: wrap; }
.btn-outline {
    border: 2px solid var(--or-terre); color: var(--or-terre);
    padding: 12px 30px; border-radius: 30px; font-weight: 700; text-transform: uppercase;
}
.btn-outline:hover { background: var(--or-terre); color: var(--vert-imperial); }
.cta-image img { border-radius: 20px; box-shadow: -20px 20px 0 rgba(255,255,255,0.1); max-width: 400px; }

/* PAGE PROFIL PRODUCTEUR */
.producer-hero { height: 50vh; }
.producer-hero-overlay { background: linear-gradient(to bottom, rgba(15, 40, 25, 0.4), rgba(15, 40, 25, 0.9)); }
.producer-details-section { padding: 80px 20px; max-width: 1200px; margin: 0 auto; }
.producer-details-container { display: flex; gap: 50px; align-items: center; flex-wrap: wrap; }
.producer-avatar-col { flex: 1; min-width: 300px; text-align: center; }
.producer-avatar-img { border-radius: 20px; box-shadow: var(--ombre-douce); width: 100%; max-width: 350px; object-fit: cover; border: 4px solid var(--or-terre); }
.producer-info-col { flex: 2; min-width: 300px; }
.producer-section-title { text-align: left; margin-bottom: 20px; font-size: 2.5rem; color: var(--vert-imperial); font-family: 'Playfair Display', serif; }
.producer-divider { width: 60px; height: 3px; background-color: var(--or-terre); margin-bottom: 30px; }
.producer-desc { font-size: 1.1rem; color: #555; margin-bottom: 15px; line-height: 1.8; }

/* Surcharge des barres de stats pour la page producteur */
.producer-stats { margin: 0; width: 100%; box-shadow: none; border: 1px solid #eee; padding: 20px; border-radius: 10px; display: flex; justify-content: space-around; text-align: center; }
.producer-stats .stat-item h3 { font-size: 1.5rem; color: var(--or-terre); }
.producer-stats .stat-item p { font-size: 0.8rem; }

.producer-products-section { background-color: white; border-top: 1px solid #eee; }

/* Footer spécifique producteur */
.producer-footer-container { padding-bottom: 20px; display: flex; justify-content: center; text-align: center; }
.producer-footer-col { max-width: 400px; }
.producer-footer-col h4 { font-family: 'Playfair Display', serif; color: white; margin-bottom: 15px; }


/* MOBILE */
@media (max-width: 900px) {
    .main-header { flex-direction: column; gap: 15px; padding: 15px 20px; position: relative; }
    
    .burger-menu { display: block; position: absolute; top: 20px; right: 20px; }
    
    .nav-menu { 
        display: flex;
        flex-direction: column;
        gap: 20px; 
        font-size: 0.8rem;
        width: 100%;
        text-align: center;
        
        /* Animation Slide Down */
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding-top: 0;
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, padding-top 0.5s ease-in-out;
    }
    .nav-menu.active { 
        max-height: 500px; /* Hauteur suffisante pour le contenu */
        opacity: 1;
        padding-top: 20px;
    }
    
    .header-search { display: none; /* On cache la recherche mais on garde le menu */ }
    .top-bar { display: none; } /* On épure sur mobile */
    .hero-title { font-size: 2.2rem; }
    .stats-bar { flex-direction: column; gap: 30px; width: 95%; }
    .cta-pro-section { text-align: center; }
    .cta-image { display: none; }
    
    /* Mobile pour la page producteur */
    .producer-details-container { gap: 30px; }
    .producer-info-col { text-align: center; }
    .producer-section-title { text-align: center; }
    .producer-divider { margin: 0 auto 30px auto; }
    .producer-stats { flex-direction: row; gap: 15px; flex-wrap: wrap; width: 100%; }
}