/* CSS styles for AFAGA landing page */

/* Global Resets and Base Styles */
html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333; /* Default text color */
    background-color: #FFFFFF; /* Default background */
}

/* Headings */
h1, h2, h3 {
    margin-top: 0;
    margin-bottom: 0.75em; /* Consistent bottom margin for headings */
    font-weight: 600; /* Slightly bolder headings */
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }

/* Links */
a {
    color: #4CAF50; /* Default link color (green) */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background-color: #4CAF50; /* Green */
    color: #FFFFFF; /* White */
    padding: 1em 20px; /* Added horizontal padding */
    text-align: center;
    position: sticky; /* Sticky header */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow for sticky header */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo h1 {
    margin: 0;
    font-size: 1.8em; /* Adjusted logo size */
}

header nav ul {
    list-style-type: none;
    padding: 0;
    margin: 10px 0 0; /* Added top margin for spacing from logo */
}

header nav ul li {
    display: inline-block; /* Changed to inline-block for better spacing control */
    margin: 0 15px; /* Consistent horizontal margin */
}

header nav ul li a {
    text-decoration: none;
    color: #FFFFFF; /* White */
    font-weight: 500;
    padding: 5px 0; /* Padding for easier clicking */
}

header nav ul li a:hover {
    text-decoration: underline;
}

/* Main Content & Sections */
main {
    padding-top: 20px; /* Space below sticky header */
}

section {
    padding: 40px 20px; /* Consistent vertical and horizontal padding for sections */
    margin-bottom: 20px; /* Space between sections */
}

/* Specific Section Styling Overrides */
#accueil, 
#pourquoi-choisir-afaga, 
#commander-afaga, 
#mode-demploi, 
#avis-clients,
#contact {
    border: none; /* Removing default border if any was previously missed */
}

/* Accueil Section Styles */
#accueil {
    padding: 0;
    margin-bottom: 20px; /* Ensure consistent margin */
}

#accueil .banner {
    background-color: #E8F5E9; /* Light green placeholder */
    min-height: 400px; /* Use min-height for flexibility */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px; /* Consistent padding */
}

#accueil .banner-content h1 { /* This is the product name */
    font-size: 2.2em; /* Adjusted for balance */
    color: #333;
    margin-bottom: 20px;
}

#accueil .banner-content .slogan {
    font-size: 1.3em; /* Adjusted for balance */
    color: #555;
    margin-bottom: 30px;
}

#accueil .banner-content .cta-button {
    background-color: #4CAF50; /* Green */
    color: #FFFFFF; /* White */
    padding: 15px 30px;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#accueil .banner-content .cta-button:hover {
    background-color: #45a049; /* Darker green */
    transform: translateY(-2px); /* Slight lift effect */
    text-decoration: none;
}

/* Pourquoi choisir AFAGA? Section Styles */
#pourquoi-choisir-afaga {
    background-color: #FFFFFF; /* White background */
}

#pourquoi-choisir-afaga h2 {
    text-align: center;
    color: #333;
    margin-bottom: 40px; /* Increased margin for better separation */
}

.benefits-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px; /* Slightly increased gap */
}

.benefit-item {
    background-color: #f9f9f9; /* Light grey background for items */
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px; /* Increased padding */
    width: 220px; /* Adjust width as needed */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Subtle shadow */
}

.benefit-item .icon-placeholder {
    display: block;
    font-size: 2.5em; /* Placeholder size */
    margin-bottom: 15px; /* Increased margin */
    color: #4CAF50; /* Green icon placeholder */
}

.benefit-item p {
    font-size: 1em;
    color: #555;
}

/* Commander AFAGA Section Styles */
#commander-afaga {
    background: linear-gradient(180deg, #f4f4f4 0%, #e8f5e9 100%);
}

#commander-afaga h2 {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
}

.order-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-around;
}

.order-info, .order-form-container {
    flex-basis: 45%;
    min-width: 300px; /* Ensures content doesn't get too squished */
}

.order-info .price {
    font-size: 1.6em; /* Slightly larger price */
    font-weight: bold;
    color: #4CAF50; /* Green */
    margin-bottom: 20px;
}

.order-info h3 {
    font-size: 1.3em; /* Adjusted sub-heading */
    color: #333;
    margin-bottom: 15px;
}

.order-info ul {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 0; /* Remove browser default padding if any */
    color: #555;
}

.order-info ul li {
    margin-bottom: 10px; /* Consistent spacing */
}

.order-form-container {
    background-color: #FFFFFF; /* White background for form area */
    padding: 30px; /* Increased padding */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Slightly more pronounced shadow */
}

.order-form-container h3 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px; /* Increased spacing */
}

.form-group label {
    display: block;
    margin-bottom: 8px; /* Increased spacing */
    font-weight: 500; /* Medium weight for labels */
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 12px; /* Increased padding */
    border: 1px solid #ccc; /* Slightly darker border for better visibility */
    border-radius: 4px;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50; /* Green focus border */
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2); /* Subtle focus glow */
}

.submit-button {
    background-color: #4CAF50; /* Green */
    color: #FFFFFF; /* White */
    padding: 12px 25px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    display: block;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-button:hover {
    background-color: #45a049; /* Darker green */
    transform: translateY(-2px);
    text-decoration: none;
}

/* Mode d'emploi Section Styles */
#mode-demploi {
    background-color: #FFFFFF; /* White background */
}

#mode-demploi h2 {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
}

.instructions-container {
    max-width: 600px; 
    margin: 0 auto; 
    text-align: left; 
}

.instructions-container ol {
    counter-reset: step-counter;
}

.instructions-container ol li {
    position: relative;
    padding-left: 50px; /* space for circle */
    margin-bottom: 25px; /* bigger spacing */
    font-size: 1.1em;
}

.instructions-container ol li::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #4CAF50;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Avis clients Section Styles */
#avis-clients {
    background-color: #E8F5E9; /* Light green background for contrast */
}

#avis-clients h2 {
    text-align: center;
    color: #333;
    margin-bottom: 15px;
}

#avis-clients .average-rating {
    font-size: 1.2em;
    color: #4CAF50; /* Green for stars/rating */
    margin-bottom: 30px;
    text-align: center; /* Ensure it's centered */
}

.testimonials-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.testimonial-item {
    background-color: #FFFFFF; 
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    width: 300px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: left;
}

.testimonial-item .testimonial-text {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
    quotes: "“" "”" "‘" "’"; 
}

.testimonial-item .testimonial-text::before {
    content: open-quote;
    font-size: 1.5em;
    line-height: 0;
    position: relative;
    top: 0.2em; /* Adjusted for better alignment */
    margin-right: 5px;
    color: #4CAF50; /* Green quotes */
}

.testimonial-item .testimonial-text::after {
    content: close-quote;
    font-size: 1.5em;
    line-height: 0;
    position: relative;
    top: 0.2em; /* Adjusted for better alignment */
    margin-left: 5px;
    color: #4CAF50; /* Green quotes */
}

.testimonial-item .testimonial-author {
    font-weight: bold;
    color: #333;
    text-align: right;
    margin-top: 10px; /* Space above author */
}

/* Contact Section Styles */
#contact {
    background-color: #FFFFFF; /* White background */
}

#contact h2 {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
}

.contact-info-container {
    max-width: 600px;
    margin: 0 auto; 
    text-align: center; /* Center the p tags */
}

.contact-item {
    font-size: 1.2em; 
    color: #555;
    margin-bottom: 20px; 
}

.contact-item a {
    color: #4CAF50; 
    font-weight: 500; /* Medium weight for contact links */
}

/* Footer */
footer {
    background-color: #333;
    color: #FFFFFF; 
    text-align: center;
    padding: 25px 20px; /* Increased padding */
    margin-top: 30px; /* Space above footer */
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

footer a {
    color: #E8F5E9; /* Light green for footer links */
}

footer a:hover {
    color: #FFFFFF; /* White on hover */
}

/* Utility Classes (Optional - Add if needed later) */
.text-center {
    text-align: center;
}

.sr-only { /* For screen readers only */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Products Grid System */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.5em;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-card .product-price {
    font-size: 1.3em;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 0.5rem;
}

.product-card .product-description {
    font-size: 1em;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-card .cta-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.product-card .cta-button:hover {
    background-color: #45a049;
}

/* Product Gallery */
#product-gallery {
    background-color: #FFFFFF;
}

.product-gallery {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 20px auto;
    max-width: 800px;
}

.product-image {
    width: 260px;
    height: 260px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Video placeholder */
.video-container {
    max-width: 560px;
    margin: 0 auto 40px;
}

/* Video placeholder generic rule (video or iframe) */
.video-container .video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: none;
}

/* Hamburger Menu */
.nav-toggle {
    display: none; /* Hidden on desktop */
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5em;
}

.hamburger {
    display: block;
    position: relative;
    width: 2em;
    height: 3px;
    background: white;
    transition: transform 0.2s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: white;
    transition: transform 0.2s ease-in-out, top 0.2s ease-in-out, bottom 0.2s ease-in-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Typography scaling for mobile */
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.6em; }
    h3 { font-size: 1.4em; }
    
    /* Header mobile optimization */
    header {
        padding: 1em 15px;
        flex-wrap: wrap;
    }
    
    header .logo h1 {
        font-size: 1.5em;
    }

    header nav {
        position: absolute;
        background: #333;
        top: 100%;
        left: 0;
        right: 0;
        transform: scale(1, 0);
        transform-origin: top;
        transition: transform 400ms ease-in-out;
    }

    header nav.nav--visible {
        transform: scale(1, 1);
    }

    header nav ul {
        flex-direction: column;
        margin: 0;
    }

    header nav ul li {
        margin: 0;
        padding: 1em;
        text-align: center;
        border-bottom: 1px solid #555;
    }

    header nav ul li:last-child {
        border-bottom: none;
    }

    .nav-toggle {
        display: block; /* Show hamburger */
    }

    /* Mobile navigation close button */
    .nav-close {
        display: none;
        position: absolute;
        top: 10px;
        right: 15px;
        background: transparent;
        border: none;
        color: white;
        font-size: 2em;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-close:hover {
        color: #ccc;
    }

    .nav-close .close-icon {
        line-height: 1;
        font-weight: bold;
    }

    /* Show close button when menu is open */
    header nav.nav--visible .nav-close {
        display: flex;
    }

    /* Animate hamburger to X */
    .nav--visible .hamburger {
        transform: rotate(45deg);
    }
    
    .nav--visible .hamburger::before {
        top: 0;
        transform: rotate(-90deg);
    }
    
    .nav--visible .hamburger::after {
        bottom: 0;
        transform: rotate(90deg);
    }

    /* Hero section mobile optimization */
    #accueil .banner {
        min-height: 300px;
        padding: 30px 15px;
    }
    
    #accueil .banner-content h1 {
        font-size: 1.6em;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    #accueil .banner-content .slogan {
        font-size: 1em;
        margin-bottom: 20px;
        line-height: 1.4;
    }
    
    #accueil .banner-content .cta-button {
        padding: 12px 24px;
        font-size: 1em;
    }

    /* Products grid mobile optimization */
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .product-card {
        margin: 0;
        padding: 1.5rem;
    }
    
    .product-card img {
        width: 100%;
        height: auto;
        max-height: 200px;
        object-fit: cover;
    }

    /* Benefits section mobile optimization */
    .benefits-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .benefit-item {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 1.5rem;
    }
    
    .benefit-item p {
        font-size: 1em;
        line-height: 1.5;
    }

    /* Order section mobile optimization */
    .order-content {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .order-info, .order-form-container {
        flex-basis: 100%;
        min-width: auto;
        padding: 1.5rem;
    }
    
    .order-form-container {
        padding: 1.5rem;
    }

    /* Testimonials mobile optimization */
    .testimonials-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .testimonial-item {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 1.5rem;
    }

    /* Contact section mobile optimization */
    .contact-info-container {
        padding: 0 1rem;
    }
    
    .contact-item {
        font-size: 1.1em;
        margin-bottom: 1rem;
        word-break: break-word;
    }

    /* Video container mobile optimization */
    .video-container {
        margin: 0 1rem 2rem;
        max-width: none;
    }
    
    /* Section padding mobile */
    section {
        padding: 30px 15px;
    }
    
    /* Product image mobile */
    .product-image {
        width: 100%;
        height: auto;
        max-width: 200px;
        max-height: 200px;
    }
}

/* Ultra small devices */
@media (max-width: 480px) {
    h1 { font-size: 1.6em; }
    h2 { font-size: 1.4em; }
    h3 { font-size: 1.2em; }
    
    header .logo h1 {
        font-size: 1.3em;
    }
    
    #accueil .banner-content h1 {
        font-size: 1.4em;
    }
    
    .benefit-item {
        padding: 1rem;
    }
    
    .product-card {
        padding: 1rem;
    }
}
