/* Opt-in enregistré dans className. Aucun sélecteur sur la lightbox native.
 * Ne s'applique qu'aux galeries non recadrées : les choix natifs restent prioritaires.
 */
.wp-block-gallery.is-style-as-hauteur-limitee.has-nested-images:not(.is-cropped) .wp-block-image:not(#individual-image) {
    align-self: flex-start;
    flex-grow: 0;
}
.wp-block-gallery.is-style-as-hauteur-limitee.has-nested-images:not(.is-cropped) .wp-block-image:not(#individual-image) img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(420px, 60vh);
    object-fit: contain;
    margin-inline: auto;
}

/* La légende appartient au flux de l'œuvre, pas à sa surface peinte.
 * Feuille chargée uniquement sur les fiches artistes (public et canevas éditeur).
 * Aucun contenu ni balisage riche n'est réécrit.
 */
.wp-block-gallery.has-nested-images .wp-block-image:not(#individual-image) figcaption {
    position: static;
    inset: auto;
    flex: 0 0 auto;
    width: 100%;
    max-height: none;
    margin: 0;
    padding: 0.6em 0 0;
    overflow: visible;
    overflow-wrap: anywhere;
    background: none;
    color: #30343b;
    text-shadow: none;
    scrollbar-gutter: auto;
    will-change: auto;
}

.wp-block-gallery.has-nested-images .wp-block-image:not(#individual-image):has(figcaption)::before {
    content: none;
}
