.container {
    display: flex;
    flex-wrap: wrap; /* Permet aux cartes de passer à la ligne */
    gap: 20px; /* Espace entre les cartes */
    justify-content: center; /* Aligner les cartes au centre */
    margin: 0 auto;
    max-width: 1200px; /* Optionnel: pour limiter la largeur du conteneur */
}

.card {
    position: relative;
    flex: 1 1 calc(100% - 40px); /* Par défaut, prend toute la largeur moins les gaps */
    max-width: 450px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px); /* Légère animation au survol */
}

.card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.card .title {
    padding: 10px;
    background: #fff; /* Ou une autre couleur de fond */
    color: #333;
    font-size: 18px;
    text-align: center;
}

/* Responsive Design */

/* À partir de 480px : afficher deux cartes par ligne */
@media (min-width: 480px) {
    .card {
        flex: 1 1 calc(50% - 40px);
    }
}

/* À partir de 768px : afficher trois cartes par ligne */
@media (min-width: 768px) {
    .card {
        flex: 1 1 calc(33.333% - 40px);
    }
}

/* À partir de 1024px : afficher quatre cartes par ligne */
@media (min-width: 1024px) {
    .card {
        flex: 1 1 calc(25% - 40px);
    }
}
