/**
 * Neptune CMS Blocs - Structure alignée sur neptune_products_categories (mode blocs).
 * Image + titre en overlay, lien dans un bouton .small-button (à styler dans le thème).
 */
.neptune-cms-blocs__grid {
    display: grid;
    gap: 25px;
    justify-content: center;
}
.neptune-cms-blocs__grid--1 { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
.neptune-cms-blocs__grid--2 { grid-template-columns: repeat(2, 1fr); }
.neptune-cms-blocs__grid--3 { grid-template-columns: repeat(3, 1fr); }
.neptune-cms-blocs__grid--4 { grid-template-columns: repeat(4, 1fr); }

.neptune-cms-blocs__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: fit-content;
    position: relative;
}

/* Conteneur image + titre par-dessus (le lien est le .small-button) */
.neptune-cms-blocs__item-image-wrap {
    position: relative;
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.neptune-cms-blocs__item-image-wrap img,
.neptune-cms-blocs__item-image-wrap .neptune-cms-blocs__item-placeholder {
    display: block;
    width: 100%;
    border-radius: 10px;
    height: auto;
}

.neptune-cms-blocs__item-placeholder {
    display: block;
    width: 100%;
    padding-bottom: 56.25%;
    background: #eee;
}

/* Titre en overlay sur l'image */
.neptune-cms-blocs__item-title--on-image {
    top: 30px;
    position: absolute;
    text-transform: uppercase;
    left: 25px;
    color: #fff;
    font-size: 24px;
    font-family: var(--main-font);
    font-weight: 700;
    width: 30%;
    line-height: 30px;
}

/* Bouton lien : à styler dans le thème (classe .small-button) */
.neptune-cms-blocs__item .button-small {
    position: absolute;
    right: 15px;
    bottom: 15px;
}

@media (max-width: 480px) { 
    .neptune-cms-blocs__grid--2 { grid-template-columns: repeat(1, 1fr); }
    .neptune-cms-blocs__grid--3 { grid-template-columns: repeat(1, 1fr); }
    .neptune-cms-blocs__grid--4 { grid-template-columns: repeat(1, 1fr); }
    .neptune-cms-blocs .neptune-cms-blocs__title {
        text-align: center;
        margin-bottom: 20px;
    }
}
