/* mosaique */

.mosaique-grid {
    display: grid;
    grid-gap: 0;
    grid-template-columns: 1fr;
}

.item {
    cursor: pointer;
    position: relative;
}
.item.actuel {
    background-color: #eee; 
    border-radius: 5px;
    box-shadow: 0 0 2px 2px #efefef;
}
.item.selected {
    background-color: var(--color-ok); 
}

.item:hover .item-illu, #viewer-inner .item-illu:hover {
    object-fit: contain !important;
    background-color: #efefef;
    box-shadow: inset 0 0 1rem #eee;
}

.item .item-infos {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    border-radius: 3px;
    background-color: #fff;
    padding: 0.3rem;
    display:none;
    text-align: center;
}

.item:hover .item-infos {
    display: block;
}

.item .item-infos-n2 {
    display: none;
}

.item[data-search="hide"], .item[data-filtre="hide"], .item[data-filtre="show"][data-search="hide"], .item[data-filtre="hide"][data-search="show"] {
    display:none;
}
.item[data-search="show"], .item[data-filtre="show"] {
    display:block;
}
[data-listingtype="mes"] .mosaique-grid {
    grid-template-columns: 1fr 1fr 1fr;  
}

[data-listingtype="mb"] .mosaique-grid {
    grid-template-columns: 1fr 1fr;  
}

/* filtrage (collections) */
#v-collectionclose {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.mosaique-grid[data-filtered='true'] .item:not(.filtered) {
    display: none;
}

#collections-container[data-filtered='true'] .collection:not(.filtered) {
    display:none;
}
#collections-container .collection-texte {
    display:none;
}
#collections-container[data-filtered='true'] .grid {
    display: block !important;
}
#collections-container .filtered .collection-texte {
    display:block;
}
#collections-container[data-filtered='true'] .filtered [data-source] {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-gap: 1rem;
}

/* full window */

#fw {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 1rem;
    grid-template-areas:
        "fwvisual" "fwinfos";
    height: 100vh;
    overflow: hidden;
    position: relative;
}

[data-toolbar="hide"] #viewer-menu {
    display: none;
}
#viewer-inner[data-show-info="hide"] #fw {
    grid-template-columns: 1fr;
    grid-template-areas:
        "fwvisual";
}
#viewer-inner[data-show-info="hide"] #fw-infos{
    display: none;   
}

#fw-visual {
    grid-area: fwvisual;
    height:100%;
    overflow: hidden;
}
#fw-infos {
    grid-area: fwinfos;
    overflow: auto;
}

#fw-image {
    position:relative;
    height: 100%;
}
#fw-image img {
    object-fit: contain;
    height: 100%;
    display: block;
    width: 100%;
    cursor:zoom-in;
}

#fw-image img.active {
    object-fit:none; 
    cursor: move;
}

#fw-image img.active ~ div  {
    display: none;
}

.fw-description {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    text-align: center;
    text-shadow: 1px 1px 1px #000;
    color: #fff;
    opacity: 0;
    transition: opacity 1s linear;
}

.fw-description span {
    padding:4px;
    background-color: var(--color-primary);
}

#fw-image:hover .fw-description {
    opacity: 1;
}

.fw-nav {
    position: absolute;
    top: 0;
    left:0;
    height:100%;
    width:20%;
    cursor: url("images/chevron-left-big.svg"), auto;
}
.fw-nav:hover {
    background: linear-gradient(to left, rgba(0,0,0,0),rgba(0,0,0,0.25));
}
.fw-next {
    right:0;
    left: auto;
    cursor: url("images/chevron-right-big.svg"), auto;
}
.fw-next:hover {
    background: linear-gradient(to right, rgba(0,0,0,0),rgba(0,0,0,0.25));
}

#fw-infos img[data-slideshow] {
    cursor:pointer;
}
#fw-infos img[data-slideshow='actuel'] {
    opacity: 0.2;
    background-color: #ccc;
}
#fw-infos img[data-slideshow='actuel']:hover {
    opacity: 0.5;
}
[data-show-info="hide"] .docinfobutton {
    background-color:#d5d5d5;
}

@media (min-width: 576px) {
    [data-listingtype="mes"] .mosaique-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr;  
    }
    [data-listingtype="mb"] .mosaique-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (min-width: 768px) {

    [data-listingtype="mes"] .mosaique-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;  
    }
    [data-listingtype="mb"] .mosaique-grid {
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    }
    [data-listingtype="mm"] .mosaique-grid {
        grid-template-columns: 1fr 1fr;
    }
    .item .item-infos {
        position: absolute;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }

    @media (min-width: 992px) {
        [data-listingtype="mes"] .mosaique-grid {
            grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;  
        }
        [data-listingtype="mb"] .mosaique-grid {
            grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
        }
        [data-listingtype="mm"] .mosaique-grid {
            grid-template-columns: 1fr 1fr 1fr 1fr;
        }

        .item .item-infos {
            bottom: 1.5rem;
            left: 1.5rem;
            right: 1.5rem;

        }
    }

    @media (min-width: 1200px) {

        [data-listingtype="mes"] .mosaique-grid {
            grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;  
        }
        [data-listingtype="mb"] .mosaique-grid {
            grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
        }
        [data-listingtype="mm"] .mosaique-grid {
            grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
        }

        .item .item-infos {
            position: absolute;
            bottom: 2rem;
            left: 2rem;
            right: 2rem;
        }