/* Styles consolidés : suppression des doublons et des classes non utilisées comme .search-container */
    .search-form {
        position: relative;
        width: 100%;
        max-width: 600px; /* Augmenté pour le sélecteur de catégorie */
        display: flex;
        background: white;
        border-radius: 25px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        margin: 0 auto;
    }

    .category-select {
        padding: 0.75rem 1rem;
        border: none;
        font-size: 1rem;
        outline: none;
        background: #f2f2f2;
        border-right: 1px solid #ddd;
    }

    .search-bar {
        flex: 1;
        padding: 0.75rem 1rem;
        border: none;
        font-size: 1rem;
        outline: none;
        background: transparent;
    }

    .search-button {
        background: linear-gradient(135deg, #45a049, #3d8b40);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .search-button:hover {
        background: linear-gradient(135deg, #3d8b40, #2d6930);
    }

    .search-form:focus-within {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        line-height: 1.6;
        background-color: #f8f9fa;
        color: #333;
    }

    header {
        background: linear-gradient(135deg, #4CAF50, #45a049);
        color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .header-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0.25rem 1rem; /* Hauteur encore plus réduite */
    }

    .header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.75rem; /* Marge réduite */
        margin-bottom: 0.5rem; /* Marge réduite */
    }

    .logo-section {
        display: flex;
        align-items: center;
        gap: 0.5rem; /* Espace réduit */
    }

    .logo {
        width: 40px; /* Taille très réduite */
        height: 40px; /* Taille très réduite */
        border-radius: 50%;
        flex-shrink: 0;
        object-fit: cover;
    }

    .header-title h1 {
        font-size: clamp(1.2rem, 3vw, 1.8rem); /* Taille de police très réduite */
        font-weight: 700;
        margin: 0;
    }

    .auth-links {
        display: flex;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .auth-links a {
        color: white;
        text-decoration: none;
        padding: 0.5rem 1rem;
        border: 2px solid white;
        border-radius: 25px;
        transition: all 0.3s ease;
        font-weight: 500;
        white-space: nowrap;
    }

    .auth-links a:hover {
        background-color: white;
        color: #4CAF50;
    }

    nav {
    display: flex;
    align-items: center; /* Align items vertically */
    flex-wrap: wrap;
    justify-content: space-between; /* Distribute space between groups */
    margin-bottom: 1rem;
    padding: 0 1rem; /* Add some padding to the nav itself */
}

nav .nav-links-group { /* New class for the main navigation links */
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    flex-grow: 1; /* Allow this group to grow and take available space */
    justify-content: center; /* Center the navigation links within their group */
}

nav .auth-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    /* margin-left: auto; // No longer needed if using space-between on parent */
}

/* Adjust mobile menu for new structure */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav .nav-links-group {
        width: 100%;
        justify-content: flex-start; /* Align to start in mobile */
        gap: 0.5rem;
    }

    nav .auth-links {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        margin-top: 1rem; /* Add some space from nav links */
    }
}

    nav a {
        color: white;
        text-decoration: none;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        transition: background-color 0.3s ease;
        font-weight: 500;
    }

    nav a:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .mobile-menu-toggle {
        display: none;
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }

    main {
        max-width: 1200px;
        margin: 0 auto;
        padding: 2rem 1rem;
    }

    .about-section {
        background: white;
        padding: 2rem;
        border-radius: 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        margin-bottom: 3rem;
        text-align: center;
    }

    .about-section h2 {
        color: #4CAF50;
        margin-bottom: 1rem;
        font-size: clamp(1.5rem, 3vw, 2rem);
    }

    .about-section p {
        font-size: 1.1rem;
        line-height: 1.8;
        color: #666;
    }

    .category-title {
        font-size: 2rem;
        color: #333;
        margin-bottom: 1.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #eee;
    }

    .container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
        padding: 0;
        margin-bottom: 2rem;
    }

    .product {
        background: white;
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        display: flex;
        flex-direction: column;
    }

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

    .product-image {
        width: 100%;
        height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .product:hover .product-image img {
        transform: scale(1.05);
    }

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

    .product h2 {
        color: #333;
        margin-bottom: 0.5rem;
        font-size: 1.3rem;
    }

    .product p {
        margin-bottom: 0.5rem;
        color: #666;
    }

    .product .price {
        font-size: 1.5rem;
        font-weight: bold;
        color: #4CAF50;
        margin: 1rem 0;
    }

    .product button {
        background: linear-gradient(135deg, #4CAF50, #45a049);
        color: white;
        border: none;
        padding: 1rem;
        border-radius: 10px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 0.5rem;
    }

    .product button:hover {
        background: linear-gradient(135deg, #45a049, #3d8b40);
        transform: translateY(-2px);
    }

    #commanderButton {
        background: linear-gradient(135deg, rgb(15, 6, 3), rgb(8, 5, 1));
        color: white;
        border: none;
        padding: 1rem 2rem;
        border-radius: 10px;
        font-size: 1.2rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 1rem;
    }

    .product .quantity-input {
        width: 60px;
        padding: 0.5rem;
        border: 1px solid #ccc;
        border-radius: 5px;
        margin-right: 0.5rem;
        font-size: 1rem;
    }

    .product .cart-controls {
        display: flex;
        align-items: center;
        margin-top: auto;
    }

    #commanderButton:hover {
        background: linear-gradient(135deg, rgb(0, 0, 0), rgb(246, 243, 243));
        transform: translateY(-2px);
    }

    .footer {
        background: linear-gradient(135deg, #2c3e50, #34495e);
        color: white;
        margin-top: 4rem;
    }

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

    .footer-section h3 {
        color: #4CAF50;
        margin-bottom: 1rem;
        font-size: 1.2rem;
    }

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

    .footer-section li {
        margin-bottom: 0.5rem;
        cursor: pointer;
        transition: color 0.3s ease;
    }

    .footer-section li:hover {
        color: #4CAF50;
    }

    .footer-bottom {
        text-align: center;
        padding: 1rem;
        border-top: 1px solid rgb(0, 1, 2);
        margin-top: 2rem;
    }

    /* Nouveaux styles pour les statistiques */
    .stats-widget {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: linear-gradient(135deg, #4CAF50, #45a049);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 25px;
        font-size: 0.9rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .stats-widget:hover {
        transform: translateY(-2px);
        background: #e55a2b;
    }

    .feedback-button {
        position: fixed;
        bottom: 80px;
        right: 20px;
        background: #ff6b35;
        color: white;
        border: none;
        padding: 0.75rem;
        border-radius: 50%;
        font-size: 1.2rem;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        transition: all 0.3s ease;
    }

    .feedback-button:hover {
        transform: translateY(-2px);
        background: #e55a2b;
    }
    
    /* Styles pour la modale */
    .modal {
        display: none;
        position: fixed;
        z-index: 1001;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0,0,0,0.4);
    }

    .modal-content {
        background-color: #fefefe;
        margin: 15% auto;
        padding: 20px;
        border: 1px solid #888;
        width: 80%;
        max-width: 600px;
        border-radius: 10px;
        position: relative;
    }

    .close-button {
        color: #aaa;
        float: right;
        font-size: 28px;
        font-weight: bold;
    }

    .close-button:hover,
    .close-button:focus {
        color: black;
        text-decoration: none;
        cursor: pointer;
    }

    @media (max-width: 768px) {
        .header-top {
            flex-direction: column;
            text-align: center;
        }

        .logo-section {
            flex-direction: column;
        }

        .auth-links {
            justify-content: center;
        }

        nav {
            display: none;
            flex-direction: column;
            gap: 0.5rem;
            width: 100%;
        }

        nav.active {
            display: flex;
        }

        .mobile-menu-toggle {
            display: block;
            align-self: flex-end;
        }

        .container {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }

        .about-section {
            padding: 1.5rem;
            margin-bottom: 2rem;
        }

        main {
            padding: 1rem;
        }

        .stats-widget,
        .feedback-button {
            position: relative;
            bottom: auto;
            right: auto;
            margin: 1rem auto;
            display: block;
            width: fit-content;
        }
    }

    @media (max-width: 480px) {
        .header-container {
            padding: 0.5rem;
        }

        .auth-links {
            flex-direction: column;
            width: 100%;
        }

        .auth-links a {
            text-align: center;
        }

        .product-content {
            padding: 1rem;
        }

        .footer-content {
            padding: 2rem 1rem 1rem;
            grid-template-columns: 1fr;
            text-align: center;
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .product {
        animation: fadeIn 0.6s ease-out;
    }

    .product:nth-child(1) {
        animation-delay: 0.1s;
    }

    .product:nth-child(2) {
        animation-delay: 0.2s;
    }

    .product:nth-child(3) {
        animation-delay: 0.3s;
    }