.single-agence {
    @media(width < 991px) {
        padding-bottom: 62px;

        header {
            &.sticky {
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                background-color: var(--wp--preset--color--secondary) !important;
                opacity: 1;
                width: 100vw;

                #top_bar {
                    display: none;
                }
            }
        }
    }

    .single-agence__hero {
        position: relative;
        min-height: 780px;
        overflow: hidden;
        margin: 0 !important;

        @media(width < 991px) {
            margin: 0;
            min-height: 300px;

            .bouton-back {
                display: none;
            }
        }

        .single-agence__hero__wrap {
            position: relative;

            &:after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: #231E34;
                background: linear-gradient(180deg, rgba(35, 30, 52, 1) 0%, rgba(35, 30, 52, 0) 43%, rgba(35, 30, 52, 0) 62%, rgba(35, 30, 52, 1) 100%);
                z-index: 0;
                width: 100%;
                height: 780px;

                @media(width < 991px) {
                    height: 300px;
                }
            }

            .single-agence__hero__content {
                position: absolute;
                z-index: 2;
                min-height: 780px;
                top: 0;
                left: 0;
                right: 0;
                padding-top: 170px;

                @media(width < 991px) {
                    padding: 11px 15px 15px;
                    /* height: calc(100vh - 60px); */
                }

                >.wp-block-group {
                    height: calc(618px - 89px);

                    @media(width < 991px) {
                        height: calc(100% - 120px);
                    }
                }

                .single-agence__infos {
                    margin: auto 0 76px;

                    @media(width < 820px) {
                        margin: 0;
                    }

                    .single-agence__prix {
                        @media(width < 820px) {
                            margin-top: 0 !important;
                        }
                    }
                }

                .single-agence__actions {
                    margin-top: auto;
                }

                .wp-block-post-title {
                    color: #fff;
                    margin-top: auto;
                    max-width: 692px;

                    @media(width < 991px) {
                        margin-top: 0 !important;
                    }
                }

            }

            .wp-block-post-featured-image {
                position: absolute;
                z-index: 0;
                left: 0;
                bottom: 0;
                right: 0;
                top: 0;
                min-height: 780px;

                @media(width < 991px) {
                    min-height: 300px;
                }

                img {
                    height: 100%;
                    object-fit: cover;
                }
            }
        }
    }

    .single-agence__stick {
        position: sticky;
        top: 20px;
        margin-top: calc(-100% + 20px);
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(7px);
        z-index: 2;
        padding: 30px 25px;
        box-shadow: 0 0 34px 0 rgba(30, 32, 52, 0.15);

        @media(width < 991px) {
            position: inherit;
            margin-top: 0;
            background-color: transparent;
            backdrop-filter: none;
            color: #fff;
            padding: 30px 0;
        }

        .titre {
            font-family: var(--wp--preset--font-family--secondary);
            font-size: var(--wp--preset--font-size--medium);
            font-weight: 800;
            line-height: 1;
            color: var(--wp--preset--color--secondary);
            margin-bottom: .875rem;

            @media(width < 991px) {
                color: #fff;
            }
        }

        .localisation {
            display: flex;
            color: var(--wp--preset--color--secondary);
            font-size: var(--wp--preset--font-size--x-base);
            line-height: normal;
            margin-bottom: 8px;

            @media(width < 991px) {
                color: #fff;
            }

            i {
                margin-right: 6px;
                color: var(--wp--preset--color--primary);
            }
        }

        .localisation__map {
            font-family: var(--wp--preset--font-family--secondary);
            font-weight: bold;
            color: var(--wp--preset--color--primary);
        }

        .contact {
            border-top: solid 1px rgba(146, 148, 169, 0.3);
            padding-top: 30px;
            margin-top: 30px;
            display: flex;
            justify-content: space-between;

            .js-phone-reveal {
                i {
                    display: none;
                }
            }

            @media(width < 991px) {
                display: none;
            }
        }

        .horaires {
            display: flex;
            border-top: solid 1px rgba(146, 148, 169, 0.3);
            padding-top: 30px;
            margin-top: 30px;

            .title {
                display: block;
                width: 100%;
                font-weight: var(--wp--custom--font-weight--semi-bold);
                color: var(--wp--preset--color--secondary);
                margin-bottom: 8px;
            }

            .icon {
                flex: 0 0 19px;
                margin-right: 6px;

                svg {
                    margin-top: 7px;
                }
            }

            .text {
                color: var(--wp--preset--color--secondary);
                font-size: .875rem;

                @media(width < 991px) {
                    color: #fff;
                }

                b {
                    font-size: 1rem;
                    display: block;
                }
            }
        }

        @media(width < 991px) {
            position: inherit;
            margin: 0;
        }
    }

    .mobile-contact {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 2;
        background-color: #fff;
        padding: 14px 15px !important;
        text-align: center;
        align-items: center;
        justify-content: center;
        display: flex;
        gap: 22px;

        .wp-block-button__link {
            flex: 1 0 0;

            .wp-element-button {
                width: 100%;
            }
        }

        .js-phone-reveal {
            font-size: 26px;
            padding: 0;
            height: 46px;
            width: 58px;
            flex: 58px 0 0;

            i {
                display: block;
            }

            span {
                display: none;
            }
        }
    }

    .single-agence__content {
        @media(width < 991px) {
            margin-top: 0;

            .col-contact {
                background-color: var(--wp--preset--color--secondary);
                color: #fff
            }
        }

        .single-agence-galerie {
            .swiper-slide {
                iframe {
                    width: 100% !important;
                    min-height: 405px !important;
                }
            }
        }

        .single-agence-galerie--thumb {
            position: relative;
            padding: 0 60px;

            .swiper-button-next {
                right: 0;
                bottom: 0 !important;
                top: 0 !important;
                margin: auto !important;
            }

            .swiper-button-prev {
                left: 0;
                bottom: 0 !important;
                top: 0 !important;
                margin: auto !important;
            }

            .swiper-slide {
                &:hover {
                    cursor: pointer;
                }

                img {
                    aspect-ratio: 16/9;
                    object-fit: cover;
                }

                &:not(.swiper-slide-visible) {
                    opacity: 0;
                }

                .play {
                    display: block;
                    width: 100%;
                    height: 116px;
                    background-color: #f7f7f7;
                    position: relative;

                    &:hover {
                        cursor: pointer;
                    }

                    span {
                        position: absolute;
                        padding: 0;
                        margin: auto;
                        top: 0;
                        bottom: 0;
                        left: 0;
                        right: 0;
                        width: 70px;
                        height: 70px;
                        border-radius: 50%;
                        background-color: rgba(255, 255, 255, 0.7);
                        backdrop-filter: blur(7px);
                        display: flex;
                        align-items: center;
                        justify-content: center;

                        &:before {
                            display: inline-block;
                            content: '';
                            height: 0;
                            width: 0;
                            border-top: 13px solid transparent;
                            border-bottom: 17px solid transparent;
                            border-left: 30px solid var(--wp--preset--color--secondary);
                            transform: translateX(3px);
                        }
                    }


                    @media(width < 991px) {
                        height: 62px;
                    }

                }
            }
        }
    }
}

.single-agence__navigation {
    z-index: 5;
    margin-top: auto;
    height: auto !important;

    .agence-navigation {
        max-width: var(--wp--style--global--wide-size) !important;
    }

    @media(width < 991px) {
        background-color: var(--wp--preset--color--secondary-accent) !important;
        opacity: 0;

        .agence-navigation {
            position: relative;
            z-index: 0;
            padding: 11px 0;
            width: 100vw;
            height: 54px !important;
            background-color: var(--wp--preset--color--secondary-accent) !important;
            overflow: hidden;

            ul {
                overflow-x: scroll;
                margin-left: 15px;
                display: flex;
                flex-direction: row;
                width: auto;

                li {
                    flex: 0 0 auto;
                    padding: 0;

                    a {
                        word-wrap: nowrap;
                        font-size: 14px;
                    }
                }
            }

            +.wp-block-group {
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                padding: 8px;
                background: #fff;
                margin: 0;
                padding: 8px !important;
                text-align: center;
                justify-content: center;

                .wp-block-button-obf {
                    flex: 1 0 0;

                    .wp-element-button {
                        width: 100%;
                    }
                }

                .m-telephone {
                    .wp-element-button {
                        font-size: 26px;
                        padding: 0;
                        height: 46px;
                        width: 58px;
                    }

                    i {
                        display: block;
                    }

                    span {
                        display: none;
                    }
                }
            }
        }
    }

    &.stick {
        position: fixed;
        left: 0;
        right: 0;
        top: 0;

        @media(width < 991px) {
            position: relative;
            top: inherit;
            z-index: 1;
            height: 54px;
        }
    }
}

/* fixe quand menu mobile ouvert */
body.is-open {
    .single-agence__navigation {
        display: none;
    }
}