.bento-grid-acf {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Ajustement des proportions */
    grid-template-rows: 1fr 1fr;
    gap: 3rem; /* Espacement entre les éléments */
    padding: 20px;
    max-width: 80rem;
    margin: 0 auto;
    height: 40rem;
    /* Ajout pour forcer l'espacement */
    box-sizing: border-box;
}

/* Images bento */
.bento-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Ajout pour s'assurer que l'élément prend bien sa place */
    min-height: 0;
    min-width: 0;
}

.bento-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.bento-image:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.bento-image:hover::before {
    opacity: 0.1;
}

.bento-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Layout spécifique : 1ère image à gauche (grande), 2ème et 3ème à droite */
.bento-image:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 3; /* Prend les 2 rangées */
}

.bento-image:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.bento-image:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

/* Masquer les images supplémentaires si plus de 3 */
.bento-image:nth-child(n+4) {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .bento-grid-acf {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        gap: 2rem; /* Réduction du gap sur mobile */
        padding: 15px;
    }

    .bento-image:nth-child(1),
    .bento-image:nth-child(2),
    .bento-image:nth-child(3) {
        grid-column: 1;
        grid-row: auto;
        height: 200px;
    }

    .bento-image:nth-child(n+4) {
        display: block;
    }
}

@media (max-width: 480px) {
    .bento-grid-acf {
        gap: 1rem; /* Gap encore plus réduit sur très petits écrans */
        padding: 10px;
    }

    .bento-image:nth-child(1),
    .bento-image:nth-child(2),
    .bento-image:nth-child(3) {
        height: 180px;
    }
}