/* ------------------------
   Conteneur galerie
------------------------ */
.conteneur {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Chaque article photo */
.photos {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photos img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.photos:hover img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

/* Overlay texte */
.texte {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.photos:hover .texte {
    transform: translateY(0);
}

.texte h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.texte p {
    margin: 0;
    font-size: 13px;
    line-height: 1.3;
}

/* ------------------------
   Lightbox
------------------------ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none; /* cachée par défaut */
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

.arrow-left {
    left: 20px;
}

.arrow-right {
    right: 20px;
}

.arrow:hover {
    color: #3498db;
    transform: translateY(-50%) scale(1.2);
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Close lightbox on mobile tap (optional) */
.lightbox:target {
    display: flex;
}

/* ------------------------
   Responsive
------------------------ */
@media screen and (max-width: 768px) {
    .conteneur {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .texte h3 {
        font-size: 14px;
    }

    .texte p {
        font-size: 12px;
    }

    .arrow {
        font-size: 30px;
    }
}
