/* Variables de couleurs basées sur l'avocat */
:root {
    --dark-skin: #2D3E1A;      /* Vert sombre peau */
    --flesh-green: #A7C957;    /* Vert chair tendre */
    --pit-brown: #6A3805;      /* Brun noyau */
    --cream-bg: #F2E8CF;       /* Crème fond */
    --light-off: #F9F9F9;      /* Blanc cassé */
    --text-color: #333;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-off);
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    background-color: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-skin);
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.logo span {
    color: var(--flesh-green);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-skin);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--flesh-green);
}

.lang-switcher {
    margin-left: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    color: var(--dark-skin);
}

.lang-switcher a {
    color: var(--pit-brown); /* Utilisation d'un brun plus visible que le gris #ccc */
    text-decoration: none;
    padding: 0 8px;
    transition: all 0.3s;
}

.lang-switcher a:hover {
    color: var(--flesh-green);
}

.lang-switcher a.active-lang {
    color: var(--dark-skin);
    border-bottom: 2px solid var(--flesh-green);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: linear-gradient(to right, var(--dark-skin) 50%, var(--flesh-green) 50%); /* Fond bicolore conservé */
}

/* Structure en "U" Géant et Lisse */
.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 85%; /* Hauteur pour passer au dessous de l'avocat */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2)), url('https://images.unsplash.com/photo-1523049673857-eb18f1d7b578?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') center/cover no-repeat;
    /* Création du U parfait sans angles internes */
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    z-index: -1;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: tubeBreath 6s infinite alternate ease-in-out;
}

@keyframes tubeBreath {
    from { height: 82%; }
    to { height: 88%; }
}

@keyframes tubeFloat {
    from { transform: translate(-50%, -52%); }
    to { transform: translate(-50%, -48%); }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-content {
    position: relative;
    z-index: 10;
    animation: fadeInUp 1.2s ease-out;
}

.wave-container {
    position: absolute;
    bottom: -1px; /* Évite un petit trait blanc */
    left: 0;
    width: 100%;
    line-height: 0;
    z-index: 2;
}

.wave-container svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

.hero-content {
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin: 10px;
}

.btn-primary {
    background-color: var(--flesh-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-skin);
    transform: translateY(-3px);
}

.btn-secondary {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--dark-skin);
}

/* Produits */
.products {
    background-color: var(--flesh-green);
    color: var(--white);
    padding: 80px 0;
    overflow: hidden; /* Cache les cartes qui débordent pendant l'animation */
}

.products .section-title {
    color: var(--white);
}

.slider-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.product-grid {
    display: flex; /* Passage en flex pour l'alignement horizontal du slider */
    gap: 30px;
    animation: slideProducts 20s linear infinite; /* Animation continue */
    width: max-content; /* S'adapte à la largeur des cartes */
}

/* Duplication virtuelle pour un défilement infini sans coupure */
.product-grid:hover {
    animation-play-state: paused; /* Arrête le défilement au survol */
}

.product-card {
    flex: 0 0 300px; /* Largeur fixe pour chaque carte */
    background-color: var(--white);
    color: var(--text-color); /* Keep text inside cards dark */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.product-img {
    height: 180px; /* Taille diminuée comme demandé */
    background-size: cover;
    background-position: center;
}

@keyframes slideProducts {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-330px * 3)); } /* Ajuster selon le nombre de cartes */
}

.avocado-img {
    background-image: url('https://images.unsplash.com/photo-1519162808019-7de1683fa2ad?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

.oil-img {
    background-image: url('https://images.unsplash.com/photo-1474979266404-7eaacbcd87c5?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
}

.product-info {
    padding: 30px;
}

.product-info h3 {
    margin-bottom: 15px;
    color: var(--dark-skin);
}

.btn-text {
    display: inline-block;
    margin-top: 15px;
    color: var(--pit-brown);
    text-decoration: none;
    font-weight: 700;
}

/* Bienfaits */
.benefits {
    background-color: var(--cream-bg);
    padding: 80px 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    text-align: center;
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.benefit-item h4 {
    font-size: 1.3rem;
    color: var(--dark-skin);
    margin-bottom: 10px;
}

/* Footer */
footer {
    background-color: var(--dark-skin);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info .logo {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-info .logo img {
    height: 30px;
    width: 30px;
}

.footer-links h4, .footer-contact h4 {
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    color: var(--flesh-green);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--flesh-green);
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}
.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}
.social-links a:hover {
    color: var(--flesh-green);
    transform: translateY(-3px);
}
.footer-contact p i {
    margin-right: 10px;
    color: var(--flesh-green);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: #ccc;
}

/* Mobile Responsive */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--dark-skin);
    margin: 5px;
    transition: all 0.3s ease;
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--white);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        z-index: 999; /* Ensure it's above other content */
    }

    .nav-links li {
        margin: 20px 0;
    }

    .burger {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem; /* Adjusted for better readability on tablets */
    }

    .hero-content p {
        font-size: 1rem; /* Adjusted */
    }

    .sub-hero h1 {
        font-size: 2.5rem; /* Adjusted for better readability on tablets */
    }

    .sub-hero p {
        font-size: 1rem; /* Adjusted */
    }

    .section-title {
        font-size: 2rem; /* Adjusted for smaller screens */
    }

    .product-grid {
        /* Disable animation and make it a responsive grid */
        animation: none;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Allow stacking, min width 280px */
        justify-items: center; /* Center cards in grid */
    }

    .product-card {
        flex: unset; /* Remove fixed flex basis */
        width: 100%; /* Take full width of grid column */
        max-width: 350px; /* Max width for cards to prevent them from being too wide */
    }

    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* More compact for smaller screens */
    }

    .footer-content {
        grid-template-columns: 1fr; /* Stack footer columns */
        text-align: center;
    }

    .footer-links ul {
        padding: 0; /* Remove default padding for list */
    }

    .social-links {
        justify-content: center; /* Center social links in footer */
    }

    .news-container {
        grid-template-columns: 1fr; /* Stack news cards */
    }

    .timeline-item {
        flex-direction: column; /* Stack timeline items vertically */
        align-items: center;
        text-align: center;
    }

    .timeline-item .date {
        margin-bottom: 10px;
    }

    .timeline-item .content {
        padding-left: 0;
        border-left: none;
        border-top: 2px solid var(--cream-bg); /* Add a top border instead of left */
        padding-top: 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr; /* Stack contact form and info */
    }

    .hero-image-overlay {
        height: 70%; /* Adjust height for smaller screens */
        border-radius: 0 0 40% 40% / 0 0 80% 80%; /* Adjust border-radius */
        animation: none; /* Disable animation on small screens */
    }

    .sub-hero {
        padding: 100px 0 80px; /* Adjust padding */
    }

    .wave-container svg, .section-avocado .wave-transition svg {
        height: 80px; /* Adjust wave height */
    }

    .lang-switcher {
        margin-left: 0; /* Remove margin for mobile menu */
        margin-top: 15px; /* Add some spacing */
    }
}

@media screen and (max-width: 480px) {
    .nav-links {
        width: 70%; /* Wider menu for very small screens */
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .sub-hero h1 {
        font-size: 2rem;
    }

    .sub-hero p {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 20px; /* Smaller buttons */
    }

    .hero-image-overlay {
        height: 60%; /* Further adjust height */
        border-radius: 0 0 30% 30% / 0 0 60% 60%; /* Further adjust border-radius */
    }

    .wave-container svg, .section-avocado .wave-transition svg {
        height: 60px; /* Further adjust wave height */
    }
}

.nav-active {
    transform: translateX(0%);
}

/* Sub-pages Styles Improved */
.sub-hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background: linear-gradient(to right, var(--dark-skin) 50%, var(--flesh-green) 50%);
    overflow: hidden;
}

.sub-hero .hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 85%;
    z-index: 1;
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.sub-hero .container {
    position: relative;
    z-index: 10;
    animation: fadeInUp 1s ease-out;
}

.sub-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.sub-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Horizontal Bicolour Bands */
.section-avocado {
    background-color: var(--flesh-green);
    color: var(--white);
    padding: 100px 0 150px; /* Increased bottom padding for the wave */
    position: relative;
}

.section-avocado .wave-transition {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
}

.section-avocado .wave-transition svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.section-avocado h2, .section-avocado h3 {
    color: var(--white);
}

.section-cream {
    background-color: var(--cream-bg);
    color: var(--dark-skin);
    padding: 80px 0;
}

.section-cream h2, .section-cream h3 {
    color: var(--dark-skin);
}

/* Ensure no overlap or gaps */
.sub-hero + .section-avocado {
    margin-top: 0;
}

.content-section {
    padding: 80px 0;
}

.text-block h2 {
    color: var(--dark-skin);
    margin-bottom: 20px;
}

/* Timeline */
.timeline {
    padding: 80px 0;
}

.timeline-item {
    display: flex;
    margin-bottom: 50px;
}

.timeline-item .date {
    font-weight: 700;
    color: var(--flesh-green);
    font-size: 1.5rem;
    min-width: 100px;
}

.timeline-item .content {
    padding-left: 30px;
    border-left: 2px solid var(--cream-bg);
}

/* Contact */
.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

/* News cards in news page */
.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-info {
    padding: 20px;
}

.news-info h3 {
    margin: 10px 0;
    color: var(--dark-skin);
}

.news-info a {
    color: var(--flesh-green);
    text-decoration: none;
    font-weight: 700;
}
