.single {
    .hdp__breadcrumb {
        * {
            color: var(--white) !important;
        }
    }
}

.single-reference {
    .hdp {
        height: fit-content !important;

        @media (min-width: 992px) {
            padding: 150px 0 !important;
        }
    }
}

.single-post {
    .hdp {
        display: flex;
        align-items: center;
        padding: 80px 0 20px 0;
        margin-bottom: 60px;
    }

    .cpt {
        position: relative;
        text-align: center;

        &:has(>.reference) {
            padding-top: 80px !important;
        }

        .container {
            position: relative;

            .teaser {
                place-items: center;

                .teaser__item {
                    background: var(--white);
                    border-radius: var(--border-radius);
                    position: relative;
                    height: 100%;

                    .teaser__date {
                        position: absolute;
                        background: var(--light-purple);
                        color: var(--white);
                        padding: 8px 16px;
                        border-radius: calc(var(--border-radius) / 2);
                        top: 20px;
                        left: 20px;
                        z-index: 10;
                    }

                    .teaser__link {
                        color: var(--dark);

                        &:hover {
                            color: var(--light-blue);
                        }

                        .teaser__text {
                            padding: 32px 40px;
                        }

                        .teaser__image {
                            overflow: hidden;
                            border-top-left-radius: var(--border-radius);
                            border-top-right-radius: var(--border-radius);

                            img {
                                border-top-left-radius: var(--border-radius);
                                border-top-right-radius: var(--border-radius);
                            }
                        }
                    }
                }

                &:not(.slider_cpt) {
                    &.type_reference {
                        margin-top: 20px;

                        .teaser__item {

                            .teaser__image {
                                border-radius: var(--border-radius);

                                img {
                                    border-radius: var(--border-radius);
                                }
                            }

                            .teaser__text {
                                .teaser__title {
                                    display: flex;
                                    justify-content: start;
                                    align-items: center;
                                    color: var(--dark);
                                    font-size: 20px;
                                    margin: 0;
                                    gap: 10px;
                                }

                                .teaser__date {
                                    color: var(--light-purple);
                                    margin: 0;
                                    margin-left: auto;

                                    &:before {
                                        content: '';
                                        background: url('../../img/calendar.svg') no-repeat center;
                                        display: inline-block;
                                        margin-right: 10px;
                                        width: 13px;
                                        height: 13px;
                                    }
                                }

                                img {
                                    border-radius: 100px;
                                }
                            }
                        }
                    }
                }

                &.slider_cpt {
                    position: relative;

                    .splide__track {
                        overflow: visible !important;
                    }

                    &:not(.reference) {
                        .teaser__item {
                            &:not(.is-visible) {
                                opacity: 0;
                                transition: var(--transition);
                            }

                            &.is-next+&.teaser__item {
                                opacity: 0.3 !important;
                                transition: var(--transition);
                            }

                            @media (max-width: 991px) {
                                &.is-next {
                                    opacity: 0.3 !important;
                                    transition: var(--transition);
                                }
                            }
                        }
                    }
                }
            }

            &:not(.reference) {
                .bouton {
                    margin: 10px auto 0 auto;

                    @media (min-width: 992px) {
                        position: absolute;
                        bottom: 0;
                        left: 50px;
                    }

                    @media (min-width: 1200px) {
                        left: 90px;
                    }

                    @media (min-width: 1400px) {
                        left: 175px;
                    }
                }
            }

            &.reference {
                display: flex;
                flex-direction: column;
                align-items: center;
                position: relative;

                &:has(.infos_ref) {
                    margin-top: -80px;
                }

                ul {
                    padding: 0;
                    margin: 0;
                    width: 100%;
                    display: flex;
                    justify-content: center;
                    gap: 10px;
                    margin: 20px 0;
                    flex-wrap: wrap;

                    li {
                        list-style: none;
                        background: transparent !important;
                        border: 1px solid var(--light-blue) !important;
                        color: var(--light-blue) !important;
                        cursor: pointer;
                        margin: 0;

                        &:hover,
                        &.active {
                            background: var(--light-blue) !important;
                            color: var(--white) !important;
                        }

                        &:before {
                            display: none;
                        }

                        &.reset {
                            border: 1px solid var(--light-purple) !important;
                            color: var(--light-purple) !important;
                            background-color: rgba(127, 17, 224, 0.1) !important;

                            p {
                                margin: 0;
                                transition: transform 0.3s ease;
                            }

                            &:hover {
                                background: var(--light-purple) !important;
                                color: var(--white) !important;

                                p {
                                    transform: rotate(-45deg);
                                }
                            }
                        }
                    }
                }

                .no-results {
                    h3 {
                        span {
                            color: var(--light-blue);
                            font-family: var(--title-font);
                        }
                    }

                    h4 {
                        font-weight: 400;
                    }
                }
            }

            .teaser__item {
                position: relative;
                text-align: left;
                z-index: 2;
                transition: var(--transition);
                max-width: 320px;

                &.is-hidden {
                    display: none;
                }

                &.nopostsfound {
                    justify-self: center;
                    text-align: center;
                    width: 100%;
                }
            }

            .teaser__link {
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                -ms-flex-direction: column;
                flex-direction: column;
                height: 100%;
                overflow: hidden;
                position: relative;

                &:hover .teaser__image img {
                    -webkit-transform: scale(1.1);
                    transform: scale(1.1);
                }
            }

            .teaser__image {
                overflow: hidden;

                img {
                    aspect-ratio: 16/9;
                    display: block;
                    -o-object-fit: cover;
                    object-fit: cover;
                    -webkit-transition: all 0.3s;
                    transition: all 0.3s;
                    width: 100%;
                }
            }

            .teaser__text {
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
                -webkit-box-flex: 1;
                -ms-flex: 1;
                flex: 1;
                -webkit-box-orient: vertical;
                -webkit-box-direction: normal;
                -ms-flex-direction: column;
                flex-direction: column;
                padding: 12px 0;

                p {
                    margin-bottom: 20px;
                    -webkit-transition: all 0.3s;
                    transition: all 0.3s;
                }

                .teaser__title {
                    margin-bottom: 12px;
                    -webkit-transition: all 0.3s;
                    transition: all 0.3s;
                }
            }
        }

        .notfound {
            text-align: center;
        }
    }
}