@media (min-width: 992px) {
    #avis-wrapper{
        position: relative;
        display: block;
        width: 100%;
        max-height: 800px;
        height: auto;
        overflow: hidden;
    }
    /* Conteneur principal */
    #API_Blocks_Galerie {
        width: 100%;
        height: 100%;
        margin: 0;
        overflow: hidden;
    }
    #Galerie-block{
        width: 100%;
        height: auto;
        overflow: hidden;
    }
    #svg-desktop {
        display: block;
    }

    #svg-mobile {
        display: none;
    }
    /* Conteneur du SVG */
    .svg-gallery {
        position: relative;
        width: auto;
        height: 100%;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 10px;
    }
    .svg-responsive {
        width: 100%;
        height: auto;
    }

    .hidden {
        display: none;
    }
    /* Popup galerie */
    #popup-gallery {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        justify-content: center;
        align-items: center;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s, opacity 0.3s ease-in-out;
    }
    #popup-gallery.visible {
        visibility: visible;
        opacity: 1;
        z-index: 1000;
    }
    #popup-gallery .popup-content {
        background: #fff;
        border-radius: 10px;
        padding: 20px;
        max-width: 90%;
        max-height: 90%;
        overflow-y: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    #gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    justify-content: center;
    align-items: center;
    }

    #gallery-images img {
        width: 100%;
        height: auto;
        border-radius: 5px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    #gallery-images img:hover {
        transform: scale(1.05);
    }
    .close-btn {
        position: absolute;
        top: 10px;
        right: 20px;
        font-size: 24px;
        color: #333;
        cursor: pointer;
        background: #fff;
        border: none;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        transition: background-color 0.3s ease;
    }
    .close-btn:hover {
        background: #f5f5f5;
    }
}
/* Smartphones : en dessous de 600px */
@media (max-width: 991px) {
    #avis-wrapper{
        position: relative;
        display: block;
        width: 100%;
        max-height: 800px;
        height: auto;
        overflow: hidden;
    }
    /* Conteneur principal */
    #API_Blocks_Galerie {
        width: 100%;
        height: 100%;
        margin: 0;
        overflow: hidden;
    }
    #Galerie-block{
        width: 100%;
        height: auto;
        overflow: hidden;
    }
    #svg-desktop {
        display: none;
    }

    #svg-mobile {
        display: block;
    }
    /* Conteneur du SVG */
    .svg-gallery {
        position: relative;
        width: auto;
        height: 100%;
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 10px;
    }
    .svg-responsive {
        width: 100%;
        height: auto;
    }

    .hidden {
        display: none;
    }
    /* Popup galerie */
    #popup-gallery {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        justify-content: center;
        align-items: center;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s, opacity 0.3s ease-in-out;
    }
    #popup-gallery.visible {
        visibility: visible;
        opacity: 1;
        z-index: 1000;
    }
    #popup-gallery .popup-content {
        background: #fff;
        border-radius: 10px;
        padding: 20px;
        max-width: 90%;
        max-height: 90%;
        overflow-y: auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        position: relative;
    }
    #gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    justify-content: center;
    align-items: center;
    }

    #gallery-images img {
        width: 100%;
        height: auto;
        border-radius: 5px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    #gallery-images img:hover {
        transform: scale(1.05);
    }
    .close-btn {
        position: absolute;
        top: 10px;
        right: 20px;
        font-size: 24px;
        color: #333;
        cursor: pointer;
        background: #fff;
        border: none;
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        transition: background-color 0.3s ease;
    }
    .close-btn:hover {
        background: #f5f5f5;
    }
}