/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    min-height: 100%;
    font-family: Arial, sans-serif;
    background: linear-gradient(
        rgb(219, 34, 34, 0.5), 
        rgb(66, 110, 180, 0.5) 
    );
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 20px;
    padding: 2rem;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    flex: 1 1 calc(25% - 20px); /* 4 cases par ligne */
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Animation fluide */
}


.card img {
    border-radius: 10px;
    width: 100%;
    height: auto; /* Modifier la hauteur pour auto-ajuster */
    object-fit: cover; /* Garde bien l'image centrée et adaptée */
    object-position: center; /* Centre l'image */
    display: block; /* Important : évite l'ajout de marges indésirables */
}


.card:hover {
    transform: scale(1.02); /* Zoom léger au survol */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); /* Ombre plus prononcée au survol */
}

.card a {
    display: block;
    padding: 15px;
    color: black;
    text-decoration: none;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
    .card {
        flex: 1 1 calc(33% - 20px); /* 3 cases par ligne */
    }
}

@media (max-width: 768px) {
    .card {
        flex: 1 1 calc(50% - 20px); /* 2 cases par ligne */
    }
}

@media (max-width: 480px) {
    .card {
        flex: 1 1 100%; /* 1 case par ligne pour les petits écrans */
    }
}