/* ============================================
   AMAP Bios de Feuilly - Styles principaux
   ============================================ */

:root {
    --color-primary: #4a7c59;
    --color-secondary: #8b6f47;
    --color-accent: #d4a574;
    --color-text: #333;
    --color-bg: #fff;
    --color-light-bg: #f5f5f5;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --container-width: 1200px;
    --spacing-unit: 1rem;
}

/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* Header */
.site-header {
    background-color: var(--color-primary);
    color: white;
    padding: var(--spacing-unit) 0;
}

.header-top {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 2);
    margin-bottom: var(--spacing-unit);
}

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

.site-title {
    font-size: 1.8rem;
    margin: 0;
    color:white;
}


/* ============================================
   NAVIGATION - VERSION CORRIGÉE RESPONSIVE
   ============================================ */

.main-navigation {
    position: relative;
}

/* Menu desktop */
.nav-menu {
    display: flex;
    list-style: none;
    gap: calc(var(--spacing-unit) * 1.5);
    margin: 0;
    padding: 0;
    justify-content: center;
}

.nav-item {
    position: relative;
}

.nav-item a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-item a:hover,
.nav-item.active a {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Bouton hamburger - caché par défaut sur desktop */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 3px;
}

/* Animation du bouton hamburger quand actif */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sous-menu desktop */
.sub-menu {
    display: none;
    position: absolute;
    background: var(--color-primary);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 200px;
    top: 100%;
    left: 0;
    z-index: 100;
}

.nav-item:hover .sub-menu {
    display: block;
}

.sub-item a {
    padding: 0.5rem 1rem;
    white-space: nowrap;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */

@media (max-width: 768px) {
    .nav-menu {
        /* Forcer plein écran */
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        
        /* Style */
        background-color: #4a7c59 !important;
        padding: 80px 0 20px 0 !important;
        margin: 0 !important;
        
        /* Layout */
        display: flex;
        flex-direction: column;
        
        /* Z-index */
        z-index: 1001 !important;
        
        /* Animation */
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }
}


@media (max-width: 768px) {
    /* Afficher le bouton hamburger */
    .nav-toggle {
        display: flex;
        margin: 2px;
    }
    
    
    /* Items du menu mobile */
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item a {
        padding: 1rem;
        display: block;
        font-size: 1.1rem;
    }
    
    /* Sous-menu mobile */
    .sub-menu {
        position: static;
        display: none;
        background: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
    
    .nav-item.active .sub-menu {
        display: block;
    }
    
    .sub-item a {
        padding-left: 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-item a {
        font-size: 1rem;
    }
}

/* Bannière */
.banner img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 200px;
    object-fit: cover;
}

/* Contenu principal */
.main-content {
    padding: calc(var(--spacing-unit) * 3) 0;
    min-height: 60vh;
}

/* Titres */
h1 {
    color: var(--color-primary);
    font-size: 2.5rem;
    margin-bottom: calc(var(--spacing-unit) * 2);
    border-bottom: 3px solid var(--color-accent);
    padding-bottom: 0.5rem;
}

h2 {
    color: var(--color-secondary);
    font-size: 2rem;
    margin: calc(var(--spacing-unit) * 2) 0 var(--spacing-unit) 0;
}

h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin: calc(var(--spacing-unit) * 1.5) 0 calc(var(--spacing-unit) * 0.75) 0;
}

/* indentation */
li {
  margin-left: 40px;
}

/* Cartes producteurs */
.producteur-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: calc(var(--spacing-unit) * 1.5);
    margin-bottom: calc(var(--spacing-unit) * 2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.producteur-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.producteur-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 4px;
    margin: var(--spacing-unit) 0;
}

.certifications {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: var(--spacing-unit);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-certification {
    background-color: var(--color-accent);
    color: white;
}

/* FAQ */
.faq-item {
    background: var(--color-light-bg);
    border-left: 4px solid var(--color-primary);
    padding: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
    border-radius: 4px;
}

.faq-question {
    cursor: pointer;
    font-weight: 600;
    color: var(--color-primary);
}

.faq-answer {
    margin-top: calc(var(--spacing-unit) * 0.5);
    padding-top: calc(var(--spacing-unit) * 0.5);
    border-top: 1px solid #ddd;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
}

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

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-unit);
    margin: calc(var(--spacing-unit) * 2) 0;
}

/* Info blocks */
.info-block {
    background: var(--color-light-bg);
    padding: var(--spacing-unit);
    margin-bottom: var(--spacing-unit);
    border-radius: 4px;
}

.info-block.highlight {
    background-color: var(--color-accent);
    color: white;
}

/* Footer */
.site-footer {
    background-color: var(--color-primary);
    color: white;
    padding: calc(var(--spacing-unit) * 2) 0;
    margin-top: calc(var(--spacing-unit) * 4);
    text-align: center;
}

.footer-content a {
    color: white;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Utilitaires */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: calc(var(--spacing-unit) * 2);
}

.mb-2 {
    margin-bottom: calc(var(--spacing-unit) * 2);
}
