main {
    padding-top: 128px;
    margin-left: 1rem;
    margin-right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#chantiers {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    text-align: center;
    align-items: stretch;
}

.chantier {
    flex: 1 1 calc(33.333% - 1rem);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.chantier-description {
    flex-grow: 1;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gallery-item {
    flex: 1 1 calc(33.333% - 1rem);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item img {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox:target {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    z-index: 1001;
}

.lightbox-close {
    position: absolute;
    top: 8px;
    right: 32px;
    font-size: 64px;
    color: white;
    text-decoration: none;
    z-index: 1002;
}

.lightbox-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    cursor: default;
}


@media (max-width: 1400px) {
    .chantier {
        flex: unset;
    }
}