/* ---- Variables & Global Styles ---- */
:root {
    --primary-color: #4CAF50; /* Vert frais */
    --secondary-color: #FFC107; /* Jaune soleil */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --dark-gray: #555;
    --white: #fff;
    --border-radius: 8px;
    --box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

html {
    scroll-behavior: smooth; /* Active le défilement fluide */
}

body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; text-align: center; }
h2 { font-size: 2.2rem; border-bottom: 3px solid var(--secondary-color); padding-bottom: 0.5rem; margin-top: 2.5rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}
a:hover {
    color: #2E7D32; /* Vert plus foncé */
}

/* ---- Header & Navigation ---- */
header {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    header .container nav {
        display: flex;
        align-items: center; /* Aligne verticalement les éléments */
        gap: 15px; /* Ajoute un espace entre le bouton Accueil et le menu */
    }

:root {
  --primary-color: #4CAF50; /* Exemple de couleur principale (vert) */
  --border-radius: 5px;   /* Exemple de rayon pour les bordures */
}

/* 1. Styles communs pour le bouton "Accueil" et le menu déroulant */
.dropbtn, .nav-link {
    background-color: var(--primary-color);
    color: white;
    padding: 9px 20px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    text-decoration: none; /* Important pour que le lien Accueil n'ait pas de soulignement */
    border: none;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color 0.3s;
    display: inline-block; /* Assure que les dimensions sont bien appliquées */
}

/* 2. Style commun au survol de la souris */
.dropbtn:hover, .nav-link:hover {
    background-color: #388E3C;
}

/* 3. Organisation de la barre de navigation */
header .container nav {
    display: flex; /* Aligne les éléments sur une ligne */
    align-items: center; /* Centre les éléments verticalement */
    gap: 10px; /* Ajoute un petit espace entre les deux boutons */
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color 0.3s;
}

.dropbtn:hover {
    background-color: #388E3C;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: var(--border-radius);
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ---- Main Content & Article ---- */
main {
    padding: 2rem 0;
}

article {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.article-header {
    text-align: center;
    margin-bottom: 2rem;
}

.meta {
    color: var(--dark-gray);
    font-style: italic;
    font-size: 0.9rem;
}

/* ---- NOUVEAUX STYLES: Hero Content (Image + Ad) ---- */
.hero-content-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2.5rem 0;
}

.hero-image img {
    display: block;
    max-width: 340px;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.hero-ad {
    width: 340px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9e9e9;
    border-radius: var(--border-radius);
    overflow: hidden; /* S'assure que le contenu de l'ad ne dépasse pas */
}

/* Style pour le texte de remplacement si l'ad ne s'affiche pas */
.hero-ad .ad-placeholder {
    font-family: 'Montserrat', sans-serif;
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

/* Cache le placeholder si l'ad Google est chargée */
.hero-ad ins[data-ad-status="filled"] + .ad-placeholder {
    display: none;
}


.intro {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--dark-gray);
}

/* ---- Animation pour les conteneurs ---- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.intro {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--dark-gray);
}

/* ---- Animation pour les conteneurs qui bougent ---- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Sections (Fruit list, Astuces, FAQ) ---- */
section {
    margin-top: 3rem;
}

.fruit-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.fruit-columns ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.fruit-columns li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.fruit-columns li b {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    font-size: 1.8rem;
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.card {
    background: #FAFAFA;
    border: 1px solid #ddd;
    border-left: 5px solid var(--secondary-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
}

.faq-item p {
    margin: 0;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-color);
}

        .fruit-card {
            background-color: #f9f9f9;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        .fruit-card h3 {
            margin-top: 0;
            color: #c0392b;
        }


/* ---- Bouton Retour en Haut ---- */
#backToTopBtn {
    display: none; /* Caché par défaut */
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%; /* Forme circulaire */
    font-size: 18px;
    width: 50px;
    height: 50px;
    line-height: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.2s, opacity 0.3s;
}

#backToTopBtn:hover {
    background-color: #388E3C; /* Vert plus foncé */
    transform: translateY(-2px);
}


/* ---- Footer ---- */
footer {
    background-color: #333;
    color: var(--white);
    padding: 2rem 0 1rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}
.footer-col ul li a {
    color: var(--white);
    transition: padding-left 0.3s;
}
.footer-col ul li a:hover {
    padding-left: 5px;
    color: var(--secondary-color);
}

.social-links a {
    margin-right: 10px;
    color: var(--white);
    font-size: 1.2rem;
}
.social-links a:hover {
    color: var(--secondary-color);
}

.copyright {
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #ccc;
}

/* ---- Responsive Design ---- */
@media (max-width: 900px) {
    .hero-content-container {
        flex-direction: column; /* Empile l'image et l'ad */
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .fruit-columns {
        grid-template-columns: 1fr;
    }

    article {
        padding: 1.5rem;
    }
}

/* ---- Responsive Design ---- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .fruit-columns {
        grid-template-columns: 1fr;
    }

    article {
        padding: 1.5rem;
    }
}