/* MB filters */
.filtres {
    padding: 15px 20px;
    background-color: var(--base-2);
    margin-bottom: 40px;
}
.filtres nav > label {
    display: inline-block;
    padding-right: 30px;
    cursor: pointer;
    font-weight: 600;
}
.filtres input[id^="touch"] {
    position: absolute;
    opacity: 0;
    height: 0;
}
.filtres input[id^="touch"]:checked ~ .items { 
    visibility: initial;
    transform: translate(0, 0);
    opacity: 1;
    transition: all .3s ease;
    -webkit-transition: all .3s ease;
    -moz-transition: all .3s ease;
}
.filtres span.arrow {
    display: inline-block;
    position: relative;
    top: -15px;
    left: -20px;
    width: 0;
    height: 0;
}
.filtres span.arrow::before,
.filtres span.arrow::after {
    display: block;
    position: relative;
    content: "";
    width: 9px;
    height: 1px;
    top: 10px;
    background-color: var(--contrast) !important;
    transition: all ease-in-out 0.1333333333s;
}
.filtres span.arrow::before {
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    -webkit-transform-origin: 50%;
    transform-origin: 50%;
}
.filtres span.arrow::after {
    left: 6px;
    top: 9px;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
    -webkit-transform-origin: 50%;
    transform-origin: 50%;
}
.filtres input[id^="touch"]:checked ~ span.arrow::before {
    transform: rotate(-45deg);
}
.filtres input[id^="touch"]:checked ~ span.arrow::after {
    transform: rotate(45deg);
}
.filtres .items {
    z-index: 999;
    width: 100%;
    max-width: var(--theme-width);
    padding: 10px 15px 15px;
    margin-left: -20px;
    clear: both;
    position: absolute;
    transform: translate(0, -20px);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    list-style-type: none;
    background-color: var(--base-2);
    transition: all .3s ease;
    -webkit-transition: all .3s ease;
    -moz-transition: all .3s ease;
}

/* Filtres sous catégories */
.filtres.categories {
    padding: 0;
    margin-bottom: 30px;
}
.filtres.categories,
.filtres.categories .items {
    background-color: transparent;
}
@media (min-width: 981px) {
    .filtres.categories {
        padding: 0;
    }
    .filtres.categories,
    .filtres.categories .items {
        background-color: transparent;
    }
    .filtres.categories nav > label,
    .filtres.categories span.arrow {
        display: none !important;
    }
    .filtres.categories .items {
        width: 100%;
        position: relative;
        padding: 0;
        margin: 0;
        visibility: initial !important;
        transform: translate(0, 0) !important;
        opacity: 1 !important;
    }
}
@media (min-width: 981px) {
    .filtres:not(.mode) nav > label,
    .filtres:not(.mode) span.arrow {
        display: none !important;
    }
    .filtres:not(.mode) .items {
        width: 100%;
        position: relative;
        padding: 0;
        margin: 0;
        visibility: initial !important;
        transform: translate(0, 0) !important;
        opacity: 1 !important;
    }
}

/* Filtres MODE */
.filtres.mode span:not(.arrow) {
    float: left;
    font-family: 'EB Garamond';
    font-size: 1.175em;
}
.filtres.mode nav.filters {
    text-align: right;
}
.filtres.mode .items {
    width: calc(100% - 30px);
}
.filtres.mode .facetwp-facet.facetwp-type-radio .facetwp-radio[data-value=""] {
    display: none !important;
}
@media (max-width: 768px) {
    .filtres.mode nav.filters {
        text-align: center;
    }
}

/* Filtres DECO */
@media (max-width: 980px) {
    .filtres.deco .facetwp-facet.facetwp-type-radio {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: flex-start;
    }
    .filtres.deco .facetwp-facet.facetwp-type-radio .facetwp-radio {
        margin: 0 0 5px 0 !important;
    }
}
@media (min-width: 981px) {
    .filtres.deco {
        padding: 0;
    }
    .filtres.deco,
    .filtres.deco .items {
        background-color: transparent;
    }
}
@media (max-width: 981px) {
    .filtres.deco {
        margin-left: -15px;
        margin-right: -15px;
        text-align: center;
    }
}

/* FacetWP */
.facetwp-facet {
    margin-bottom: 0 !important;
    letter-spacing: 1.25px;
}
.facetwp-hidden,
.facetwp-counter,
.woocommerce-pagination {
    display: none !important;
}
.facetwp-display-value {
    padding-right: 0 !important;
}

/* Smooth animations */
.facetwp-template {
    opacity: 1;
    transform: translateY(0);
    transition: .15s all ease-out;
}
.loading-icon {
    z-index: 999;
    opacity: 0;
    position: fixed;
    top: calc(50% - 20px);
    left: calc(50% - 20px);
    width: 40px;
    height: 40px;
    border-radius: 100px;
    animation: spinner 1s cubic-bezier(.6,0,.4,1) infinite;
    border: 2px solid transparent;
    border-top-color: currentColor;
    transition: .15s opacity ease-out;
}
.loading-icon.loading {
    opacity: 1;
}
.facetwp-template.loading {
    opacity: 0;
    transform: translateY(10px);
}

/* FacetWP Radio */
.facetwp-radio {
    margin-bottom: 0 !important;
    padding-left: 22px !important;
}
.facetwp-facet.facetwp-type-radio {
    display: flex;
    align-items: center;
    justify-content: center;
}
.facetwp-type-radio .facetwp-radio:not(:last-of-type) {
    margin-right: 20px !important;
}
.facetwp-noradio .facetwp-type-radio .facetwp-radio {
    display: inline-flex;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 1.175em;
    font-family: 'EB Garamond', 'Times New Roman', serif;
}
@media (max-width: 768px) {
    .facetwp-facet.facetwp-type-radio {
        flex-direction: column;
    }
}
@media (min-width: 981px) {
    .facetwp-noradio .facetwp-type-radio .facetwp-radio {
        font-weight: 500;
    }
}
.facetwp-noradio .facetwp-type-radio .facetwp-radio[data-value=""]:not(.checked),
.facetwp-noradio .facetwp-type-radio .facetwp-radio:not(.checked) .facetwp-display-value {
    background-image: linear-gradient(var(--contrast-2), var(--contrast-2)) !important;
    background-size: 0 1px !important;
    background-position: 0 100% !important;
    background-repeat: no-repeat !important;
    transition: .3s background ease-out;
    -webkit-transition: .3s background ease-out;
    -moz-transition: .3s background ease-out;
}
.facetwp-noradio .facetwp-type-radio .facetwp-radio[data-value=""]:not(.checked):hover,
.facetwp-noradio .facetwp-type-radio .facetwp-radio:not(.checked) .facetwp-display-value:hover {
    background-size: 100% 1px !important;
}
.facetwp-noradio .facetwp-type-radio .facetwp-radio.checked {
    font-weight: 700;
}
@media (min-width: 980px) {
    .facetwp-noradio .facetwp-type-radio .facetwp-radio:not(:first-child):before {
        content: "";
        display: flex;
        width: 1px;
        margin: 0 12px;
        background-color: var(--contrast);
    }
}
@media (min-width: 1080px) and (max-width: 1160px) {
    .facetwp-noradio .facetwp-type-radio .facetwp-radio:not(:first-child):before {
        margin: 0 8px !important;
    }
}
@media (min-width: 980px) and (max-width: 1079px) {
    .facetwp-noradio .facetwp-type-radio .facetwp-radio:not(:first-child):before {
        margin: 0 4px !important;
    }
}

/* FacetWP Load more pagination */
.facetwp-facet.facetwp-type-pager {
    margin: 60px 0 80px !important;
}
.facetwp-facet.facetwp-type-pager .facetwp-load-more {
    width: 360px;
    font-family: 'Nunito Sans', sans-serif;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 100%;
    font-weight: 600;
    margin: 0 auto;
    padding: 15px;
    line-height: initial !important;
    letter-spacing: 2px;
    border: 1px solid var(--contrast);
    color: var(--contrast);
    background-color: transparent;
    transition: .3s all ease-out;
    -moz-transition: .3s all ease-out;
    -webkit-transition: .3s all ease-out;
}
.facetwp-facet.facetwp-type-pager .facetwp-load-more:hover,
.facetwp-facet.facetwp-type-pager .facetwp-load-more:focus {
    color: var(--base-3);
    background-color: var(--contrast);
}

@media (max-width: 980px) {
    .facetwp-facet.facetwp-type-pager {
        margin-bottom: 40px 0 50px !important;
    }
    .filtres.mode span:not(.arrow):not(.facetwp-display-value) {
        display: none !important;
    }
    .filtres.mode nav.filters {
        text-align: center;
    }
    .filtres.categories,
    .filtres.mode {
        width: calc(50% + 15px);
        float: left;
        margin-bottom: 30px;
        padding: 15px 0;
        background-color: var(--base-2);
    }
    .filtres.categories {
        margin-left: -15px;
    } 
    .filtres.categories nav.filters {
        text-align: center;
        border-right: 1px solid var(--contrast-2);
    }
    .filtres.categories .items {
        width: 50%;
        text-align: left;
        padding: 20px 15px 5px 15px;
        margin: 0;
        background-color: var(--base-2);
    }
    .filtres.categories .facetwp-facet.facetwp-type-radio {
        flex-direction: column;
        align-items: flex-start;
    }
    .filtres.categories .facetwp-facet.facetwp-type-radio .facetwp-radio {
        margin: 0 0 5px 0 !important;
    }
    .filtres.mode {
        margin-right: -15px;
    }
    .filtres.mode .facetwp-facet.facetwp-type-radio {
        flex-direction: column;
        align-items: flex-start;
    }
    .filtres.mode .facetwp-radio {
        background: none !important;
        margin: 0 0 5px 5px !important;
        padding: 0 !important;
    }
    .filtres.mode .facetwp-radio.checked {
        font-weight: 700;
    }
    .filtres.mode nav.filters {
        text-align: center;
    }
    .filtres.mode .items {
        width: 50%;
        margin-left: 0;
        padding: 20px 15px 15px 15px;
    }
}

@keyframes spinner {
    0% { transform: rotate(0deg) }
    to { transform: rotate(359deg) }
}