/* Conteneur principal des cartes */
#modalsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Carte individuelle */
.handinfo-container {
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s;
}

.handinfo-container:hover {
    transform: scale(1.02);
}

/* Image miniature */
.handinfo-container img {
    width: 100%;
    max-width: 220px;
    height: 220px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    margin-bottom: 12px;
    background-color: #eee;
}

/* Bouton */
.handinfo-container button {
    background-color: #004AAD;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.handinfo-container button:hover {
    background-color: #004AAD;
}

/* POP-UP (modale) */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    width: 60vw;       /* réduit de 95vw à 80vw */
    height: 95vh;      /* réduit de 95vh à 80vh */
    padding: 20px;
    border-radius: 10px;
    overflow-y: auto;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
}


/* Images dans le pop-up (une sous l’autre) */
.modal-content img {
    width: 60%;               /* largeur relative du conteneur */
    max-width: 600px;         /* largeur max */
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

/* Bouton de fermeture */
.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}
