.galerie{
    display: flex;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.liste-miniatures{
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 150px;
    flex-shrink: 0;
}

input[type="radio"]{
    display: none;
}

.miniature{
    cursor: pointer;
    border-radius: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.miniature img{
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.miniature:hover{
    opacity: 1;
    transform: scale(1.05);
}

.image-principale {
    flex-grow: 1;
    background-color: transparent; 
    border: 5px solid #bfd8bc;
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.grande-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.4s ease;
}

#img1:checked ~ .image-principale .img-1,
#img2:checked ~ .image-principale .img-2,
#img3:checked ~ .image-principale .img-3,
#img4:checked ~ .image-principale .img-4,
#img5:checked ~ .image-principale .img-5,
#img6:checked ~ .image-principale .img-6 {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 20 !important; /* Plus haut que le défaut */
    pointer-events: auto;
}

/*mise en évidence de la miniature*/
#img1:checked  .liste-miniatures label[for="img1"],
#img2:checked  .liste-miniatures label[for="img2"],
#img3:checked  .liste-miniatures label[for="img3"],
#img4:checked  .liste-miniatures label[for="img4"],
#img5:checked  .liste-miniatures label[for="img5"],
#img6:checked  .liste-miniatures label[for="img6"] {
    opacity: 1;
    border-color: #BFD8BC;
    transform: scale(1.05);
}


/* Responsive*/
@media (max-width: 700px) {
    .galerie {
        flex-direction: column-reverse;
    }
    .liste-miniatures { 
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }
    .miniature {
        width: 100px;
        height: 80px;
        flex-shrink: 0;
    }
}