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

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Barre de recherche et tri */
.search-sort-container {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-form {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
    position: relative;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.sort-options {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sort-options span {
    font-weight: bold;
}

.sort-options a {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
}

.sort-options a:hover {
    background-color: #e9ecef;
}

/* Conteneur principal */
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 2rem;
}

/* Style des articles */
#articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    width: 80%;
}

.article {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    gap: 1rem;
    min-width: max-content;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 10px;
    transition: transform 0.2s;
}

.article:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.img_article {
    width: 100%;
    max-width: 250px;
    height: 200px;
    max-height: 250px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.article p {
    font-weight: bold;
    margin-bottom: 1rem;
}

.article div {
    display: flex;
    gap: 0.5rem;
}

.article button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    flex-grow: 1;
}

.article button:first-child {
    background-color: #f8f9fa;
}

.article button:last-child {
    background-color: #007bff;
    color: white;
}

/* Détail produit */
#produit-detail {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

#bouton-retour > img {
    max-width: 50px;
}

.no-results {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin: 2rem 0;
}
