/* style.css */

/* --- 1. Global Reset & Base Styles --- */
/* Normalize default browser styles for consistency across browsers */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* CSS Variables for easy customization and consistency */

/* Base HTML styles */
html {
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

body {
    font-family: var(--font-family);
    line-height: 1.6; /* Optimal line height for readability */
    color: var(--text-color);
    background-color: var(--light-bg);
    overflow-x: hidden; /* Prevent horizontal scroll bars caused by animations */
}

/* Link styles */
a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed); /* Smooth color transition on hover */
}

a:hover {
    color: var(--secondary-color);
}

/* List styles */
ul {
    list-style: none; /* Remove default bullet points */
}

/* Heading styles */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    line-height: 1.2;
}

/* Reusable Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto; /* Center the container */
    padding: 0 var(--spacing-sm); /* Responsive horizontal padding */
    height: auto;
}

/* Button styles */
.button,
.btn,
.cta-button,
.challenge-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    white-space: nowrap; /* Prevent text wrapping on small buttons */
}

.button:hover,
.btn:hover,
.cta-button:hover,
.challenge-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px); /* Subtle lift effect on hover */
    color: #fff;
}

.btn.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}
/* --- 3. Hero Section 0 (Product Showcase) --- */
.leo-product-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 0 50px; /* Base padding */
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); /* Gradient background */
    min-height: 70vh;
    overflow: hidden; /* Hide overflowing parts of images/animations */
    position: relative;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: var(--spacing-md); /* Space between hero content and image */
    padding-top: calc(var(--section-padding) + 50px); /* Adjust for fixed header, + 50px for extra space */
}

.leo-product-showcase .leo-content {
    text-align: center;
    max-width: 500px;
    z-index: 2;
    animation: fadeInSlideUp 1s ease-out forwards; /* Animation on load */
    padding: 20px;
}

.leo-product-showcase .leo-content h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    line-height: 1.1;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.leo-product-showcase .leo-content p {
    font-size: 1.3em;
    margin-bottom: var(--spacing-md);
    color: #555;
}

.leo-image-slideshow {
    width: 550px; /* Fixed width for larger screens */
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-dark);
    transform: scale(0.95); /* Slight initial scale for animation */
    animation: fadeInScale 1s ease-out forwards;
    animation-delay: 0.3s;
    background-color: var(--white);
    flex-shrink: 0; /* Prevent shrinking below its content size */
}

.leo-image-slideshow .slides-container {
    display: flex; /* Arrange slides horizontally */
    height: 100%;
    transition: transform 0.8s ease-in-out; /* Smooth transition for slide change */
}

.leo-image-slideshow .slide {
    min-width: 100%; /* Each slide takes full width of container */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    opacity: 0.7; /* Dim non-active slides */
    transform: scale(0.95); /* Slight scale for non-active slides */
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.leo-image-slideshow .slide.active {
    opacity: 1;
    transform: scale(1);
}

.leo-image-slideshow .slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure image fits within bounds without cropping */
    border-radius: var(--border-radius);
    cursor: pointer;
}

.leo-image-slideshow .slide-caption {
    position: absolute;
    bottom: var(--spacing-sm);
    left: var(--spacing-sm);
    right: var(--spacing-sm); /* Occupy full width for responsiveness */
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 10px 15px; /* Adjust padding for better look */
    border-radius: 5px;
    /* --- Modifications ici pour apparaître directement --- */
    opacity: 1; /* Rendre la légende visible par défaut */
    transform: translateY(0); /* Ne pas appliquer de transformation initiale */
    /* --- Fin des modifications --- */
    text-align: center; /* Center content within caption */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* --- Supprime la règle de survol pour la légende --- */
/* .hero-image-slideshow .slide:hover .slide-caption {
    opacity: 1;
    transform: translateY(0);
} */

.slide-caption h3 {
    font-size: 1.1em; /* Smaller font size for caption title */
    margin-bottom: 5px; /* Space between title and link */
    color: var(--white); /* Ensure title is white */
}

.slide-caption .tiktok-link {
    color: #fff; /* White link text */
    font-size: 0.9em;
    font-weight: 500;
    display: inline-flex; /* Align icon and text */
    align-items: center;
    gap: 5px; /* Space between icon and text */
    padding: 5px 10px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.2); /* Subtle background for link */
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.slide-caption .tiktok-link:hover {
    background-color: #ff0050; /* TikTok brand color on hover */
    color: var(--white);
}


/* --- 4. Image Modal --- */
.modal {
    display: flex; /* Use flex to center the content */
    position: fixed;
    z-index: 2000; /* Ensure it's on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Allow scrolling if image is very large */
    background-color: rgba(0, 0, 0, 0.9); /* Dark overlay */
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    opacity: 0; /* Hidden by default, JS toggles 'is-open' class */
    pointer-events: none; /* Allows clicks underneath when hidden */
}

.modal.is-open {
    opacity: 1;
    pointer-events: auto; /* Enable clicks when open */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.4s ease-out; /* Zoom in animation when opening */
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}


/* --- 5. Hero Section (Challenge Intro) --- */


/* --- 14. Responsive Design (Media Queries) --- */

/* For screens smaller than 992px (e.g., tablets in landscape, small desktops) */
@media (max-width: 992px) {
    .leo-product-showcase {
        flex-direction: column; /* Stack items vertically */
        padding: 100px var(--spacing-sm) 50px;
    }

    .leo-image-slideshow {
        width: 100%; /* Take full width on smaller screens */
        max-width: 450px; /* But don't exceed a reasonable size */
        height: 350px;
    }

}

/* For screens smaller than 768px (e.g., tablets in portrait, large phones) */
@media (max-width: 768px) {
    .leo-product-showcase {
        padding: 80px var(--spacing-sm) 40px;
        margin-top: -30px;
        min-height: 40vh;
    }


    .leo-image-slideshow {
        max-width: 90%;
        height: 300px;
    }

    /* Adjust slide caption on smaller screens */
    .leo-image-slideshow .slide-caption {
        padding: 8px 10px; /* Reduce padding */
    }

    .slide-caption h3 {
        font-size: 1em; /* Smaller title */
    }

    .slide-caption .tiktok-link {
        font-size: 0.8em; /* Smaller link text */
        padding: 3px 8px; /* Smaller link padding */
    }
}

/* For screens smaller than 480px (e.g., most mobile phones) */
@media (max-width: 480px) {
   

    .leo-product-showcase .leo-content h1 {
        font-size: 2.2em;
    }

    .leo-image-slideshow {
        height: 250px;
    }

    /* Adjust slide caption on very small screens */
    .leo-image-slideshow .slide-caption {
        padding: 5px 8px; /* Further reduce padding */
    }

    .slide-caption h3 {
        font-size: 0.9em; /* Even smaller title */
    }

    .slide-caption .tiktok-link {
        font-size: 0.7em; /* Even smaller link text */
        padding: 2px 5px; /* Even smaller link padding */
    }


  
    .modal-content {
        max-width: 95%;
        max-height: 70%;
    }

    .modal-close {
        font-size: 30px;
        top: 10px;
        right: 20px;
    }

}