/* ==================================================================== */
/* === MODERN EXOTIC FRUITS CSS THEME (APPLIED TO FRUITS.CSS) === */
/* ==================================================================== */

/* --- ROOT VARIABLES & MODERN BASE --- */
:root {
    /* Palette inspirée des fruits exotiques */
    --mango-orange: #ff8c42;
    --passion-purple: #6f2da8;
    --kiwi-green: #8fbc8f;
    --dragon-pink: #ff69b4;
    --coconut-white: #fff8dc;
    --papaya-coral: #ff7f7f;
    --avocado-green: #568203;
    
    /* Couleurs principales */
    --primary-gradient: linear-gradient(135deg, var(--mango-orange) 0%, var(--papaya-coral) 100%);
    --secondary-gradient: linear-gradient(135deg, var(--passion-purple) 0%, var(--dragon-pink) 100%);
    --accent-gradient: linear-gradient(135deg, var(--kiwi-green) 0%, var(--avocado-green) 100%);
    
    /* Couleurs de base */
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-primary: #fdfdfd;
    --bg-secondary: #f8f9fa;
    --border-light: rgba(0, 0, 0, 0.08);
    --shadow-light: 0 2px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 15px 40px rgba(0, 0, 0, 0.15);
    
    /* Typography moderne */
    --font-primary: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Playfair Display', Georgia, serif;
    
    /* Animations */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Import des polices Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

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

*:focus {
    outline: 2px solid var(--mango-orange);
    outline-offset: 2px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- HEADER & NAVIGATION --- */
header {
    background: rgba(255, 140, 66, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem 1rem;
    color: white;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-light);
}

/* ======================================= */
/* === ANIMATIONS ET MICRO-INTERACTIONS === */
/* ======================================= */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.logo {
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #fff, #ffe4b5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    /* === LIGNE AJOUTÉE POUR L'ANIMATION === */
    animation: float 6s ease-in-out infinite;
}

nav {
    background: var(--secondary-gradient);
    padding: 1rem;
    box-shadow: var(--shadow-light);
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    transition: var(--transition-smooth);
    display: block;
    position: relative;
    overflow: hidden;
}

nav a:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
}

nav a:hover:before {
    left: 0;
}

nav a:hover, nav a:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* --- MENUS DÉROULANTS MODERNES --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(111, 45, 168, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-width: 200px;
    box-shadow: var(--shadow-medium);
    z-index: 1000;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content a {
    color: white;
    padding: 12px 20px;
    text-align: left;
    border-radius: 0;
}

.dropdown-content a:hover, .dropdown-content a:focus {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
    box-shadow: none;
}

/* --- STRUCTURE GÉNÉRALE & CONTENEURS --- */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.intro-text-box, .content-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 900px;
    margin: 2rem auto;
    box-shadow: var(--shadow-medium);
    text-align: center;
}

.intro-text-box h1, .content-box h1 {
    font-family: var(--font-secondary);
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.content-box h2 {
    font-family: var(--font-secondary);
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    text-align: left;
    border-bottom: 2px solid var(--border-light);
}

.byline {
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 1rem;
}

/* --- STRUCTURE DÉDIÉE PAGE FRUIT --- */
.top-content-wrapper {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    margin: 2rem auto;
}

.top-image-container {
    width: 450px;
    height: 280px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-smooth);
}

.top-image-container:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: var(--shadow-strong);
}

.top-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-ad-container {
    width: 336px;
    height: 280px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.top-ad-container:hover {
    border-color: var(--mango-orange);
}


/* --- GRILLES & CARTES DE FRUITS --- */
.fruits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.fruit-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.fruit-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong);
}

.fruit-image {
    height: 200px;
    width: 100%;
    overflow: hidden;
}

.fruit-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.fruit-card:hover .fruit-image img {
    transform: scale(1.1);
}

.fruit-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.fruit-name {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--mango-orange);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.fruit-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.fruit-origin {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* --- BOUTONS & DÉTAILS --- */
.toggle-details {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-light);
    margin-top: auto;
    align-self: flex-start;
}

.toggle-details:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.toggle-details:before {
    content: '👁️ ';
    margin-right: 8px;
}

.toggle-details[data-expanded="true"]:before {
    content: '🙈 ';
}

.toggle-details[data-expanded="true"] {
    background: var(--accent-gradient);
}

.fruit-details {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed rgba(255, 140, 66, 0.3);
}

/* --- LISTES DE FRUITS (PAGES D'INDEX) --- */
.fruit-list-section {
    padding: 2rem;
    text-align: center;
    margin: 2rem auto;
    max-width: 800px;
    background-color: white; /* Ajouté : couleur de fond blanche */
    border-radius: 12px; /* Optionnel : pour donner un aspect de carte flottante */
    box-shadow: var(--shadow-light); /* Optionnel : pour une légère ombre */
}

.fruit-list-section h2 {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.fruit-list-section ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* MODIFICATION ICI pour les dimensions de l'image dans la liste des fruits */
.fruit-list-section .fruit-list-image {
    width: 300px;  /* Nouvelle largeur pour l'image */
    height: 210px; /* Nouvelle hauteur pour l'image */
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1rem;
    background-color: white; /* Ajouté : couleur de fond blanche pour l'image */
    display: flex; /* Optionnel: pour centrer l'image si elle est plus petite que le conteneur */
    justify-content: center; /* Optionnel: pour centrer l'image */
    align-items: center; /* Optionnel: pour centrer l'image */
}

.fruit-list-section .fruit-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.fruit-list-section a {
    background: transparent;
    color: var(--mango-orange);
    border: 2px solid var(--mango-orange);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.fruit-list-section a:hover {
    background: var(--mango-orange);
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* --- CONTENUS SPÉCIFIQUES MODERNISÉS (Tableau, Conseil) --- */
.nutrition-table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    text-align: left;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    overflow: hidden;
}

.nutrition-table caption {
    caption-side: top;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--passion-purple);
    margin-bottom: 1rem;
}

.nutrition-table th, .nutrition-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.nutrition-table thead {
    background: rgba(111, 45, 168, 0.1);
}

.nutrition-table th {
    font-weight: 600;
    color: var(--passion-purple);
}

.conseil-box {
    background: linear-gradient(135deg, rgba(143, 188, 143, 0.1) 0%, rgba(86, 130, 3, 0.05) 100%);
    border-left: 4px solid var(--kiwi-green);
    padding: 1.5rem 2rem; /* Augmentation du padding latéral pour l'esthétique */
    border-radius: 16px; /* Bordure plus arrondie */
    box-shadow: var(--shadow-light);
    text-align: left;
    
    /* === CORRECTION : Centrage du bloc === */
    max-width: 90%;          /* Limite sa largeur pour qu'il ne touche pas les bords */
    margin: 2rem auto;       /* Marge verticale et centrage horizontal automatique */
}

.conseil-box h2 {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--avocado-green);
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
    background: none;
    -webkit-text-fill-color: initial;
    /* CORRECTION : Ajout de Flexbox pour l'alignement */
    display: flex;
    align-items: center;
}

/* NOUVEAU : Style pour l'icône dans le titre du conseil */
.conseil-box h2 .icon,
.conseil-box h2 i {
    color: var(--avocado-green);
    font-size: 1.8rem;  /* Taille de l'icône (si c'est une police d'icônes) */
    width: 32px;        /* Largeur (si c'est une image) */
    height: 32px;       /* Hauteur (si c'est une image) */
    margin-right: 1rem; /* Espace entre l'icône et le texte */
    flex-shrink: 0;     /* Empêche l'icône de rétrécir */
}

.conseil-box ul {
    list-style: none;
    padding-left: 0;
}

.conseil-box li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.conseil-box li:before {
    content: "🍃";
    position: absolute;
    left: 0;
    top: 0;
}


/* --- LISTES NUMÉROTÉES PERSONNALISÉES --- */
.content-box ol {
    list-style-type: none;
    counter-reset: custom-counter;
    padding-left: 0;
    text-align: left;
}

.content-box ol li {
    counter-increment: custom-counter;
    margin-bottom: 2rem;
    position: relative;
    padding-left: 60px;
    min-height: 40px;
}

.content-box ol li::before {
    content: counter(custom-counter);
    position: absolute;
    left: 0;
    top: -5px;
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-light);
}

/* Style par défaut du bouton (MODIFIÉ) */
.fruit-list-section a {
    display: inline-block; /* <<<=== LA LIGNE LA PLUS IMPORTANTE À AJOUTER */
    background: var(--mango-orange); 
    color: white; 
    border: 2px solid transparent; 
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-light);
    margin: 5px 7px; 
}


.fruit-list-section a:hover {
    background: var(--passion-purple); /* Passe à la couleur violette au survol */
    transform: translateY(-2px) scale(1.05); /* On conserve l'animation */
    box-shadow: var(--shadow-medium); /* On conserve l'ombre */
}


/* --- BOUTON RETOUR EN HAUT --- */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 100;
    width: 55px;
    height: 55px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: var(--primary-gradient);
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

#backToTopBtn svg {
    width: 26px;
    height: 26px;
    stroke: white;
    stroke-width: 2px;
}

#backToTopBtn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-strong);
}


/* --- FOOTER --- */
footer {
    background: var(--secondary-gradient);
    color: white;
    text-align: center;
    padding: 3rem 1rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: left;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.copyright {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .top-content-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .top-image-container, .top-ad-container {
        width: 95%;
        max-width: 450px;
    }
    .intro-text-box, .content-box {
        padding: 1.5rem;
    }
}

/* --- SCROLLBAR & SELECTION --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}
::selection {
    background: var(--mango-orange);
    color: white;
}