/* =========================
   GALERIE RÉALISATIONS
   ========================= */

.imgal-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
    margin: 0 0 25px;
    padding: 0;
}

.imgal-container > .maskimg {
    position: relative;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    cursor: pointer;
}

/* Images */
.imgal-container .maskimg img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Lien */
.imgal-container .maskimg a {
    display: block;
    position: relative;
    color: #fff;
    line-height: 0;
}

/* Overlay */
.imgal-container .maskimg a:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

/* Overlay au survol */
.imgal-container .maskimg:hover a:before {
    opacity: 1;
}

/* Texte */
.view-article  .imgal-container h2 {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 2;
    margin: 0;
    padding: 0 15px;
    color: #fff;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 600;
    text-transform: none;
    background: transparent;
}

/* Pas de pseudo-élément sur les titres */
.imgal-container h2:before {
    display: none !important;
}


/* =========================
   GROUPES DE 2 IMAGES
   ========================= */

/* 
   Groupe 1 :
   nettoyage1 = grande
   10.jpg = petite
*/
.imgal-container.saipem:nth-of-type(3) > .maskimg:first-child {
    grid-column: span 2;
}

.imgal-container.saipem:nth-of-type(3) > .maskimg:nth-child(2) {
    grid-column: span 1;
}


/*
   Groupe 2 :
   avant = petite
   après = grande
*/
.imgal-container.saipem:nth-of-type(5) > .maskimg:first-child {
    grid-column: span 1;
}

.imgal-container.saipem:nth-of-type(5) > .maskimg:nth-child(2) {
    grid-column: span 2;
}


/*
   Groupe 3 :
   1.jpg = grande
   lasergame = petite
*/
.imgal-container.saipem:nth-of-type(6) > .maskimg:first-child {
    grid-column: span 2;
}

.imgal-container.saipem:nth-of-type(6) > .maskimg:nth-child(2) {
    grid-column: span 1;
}


/*
   Groupe 4 :
   cheminée = petite
   7.jpg = grande
*/
.imgal-container.saipem:nth-of-type(7) > .maskimg:first-child {
    grid-column: span 1;
}

.imgal-container.saipem:nth-of-type(7) > .maskimg:nth-child(2) {
    grid-column: span 2;
}


/*
   Groupe 5 :
   8.jpg = grande
   façade = petite
*/
.imgal-container.saipem:nth-of-type(8) > .maskimg:first-child {
    grid-column: span 2;
}

.imgal-container.saipem:nth-of-type(8) > .maskimg:nth-child(2) {
    grid-column: span 1;
}


/* =========================
   TABLETTE
   ========================= */

@media (max-width: 992px) {

    .imgal-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .imgal-container.saipem > .maskimg {
        grid-column: span 1 !important;
    }

    .imgal-container h2 {
        font-size: 16px;
        bottom: 15px;
    }
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 767px) {

    .imgal-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .imgal-container.saipem > .maskimg {
        grid-column: span 1 !important;
    }

    .imgal-container h2 {
        font-size: 16px;
        bottom: 15px;
        padding: 0 15px;
    }
}