.hdp {
    color: #fff;

    .container {
        >img {
            height: 100%;
            left: 0;
            -o-object-fit: cover;
            object-fit: cover;
            opacity: 1;
            position: absolute;
            top: 0;
            width: 100%;
            z-index: 1;
        }
    }
}

.hdp--head {
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    
    @media (min-width: 992px) {
        margin-top: -65px;
    }
    
    &:not(.form) {
        height: 640px;
    }

    &.form {
        margin-top: 200px;
    }

    @media (max-width: 991px) {
        padding: 130px 0 70px 0;
    }

    &.home {
        height: 96vh;

        @media (max-width: 768px) {
            height: fit-content;
        }

        @media (min-width: 1400px) {
            height: 97.2vh;
        }
    }

    &:not(.home) {
        @media (max-width: 991px) {
            height: fit-content;
            padding: 20px 0;
            min-height: 540px;
        }
    }

    .container.has-realisations {
        .hdp__content {
            gap: 25px;
        }

        .hdp__title {
            gap: 15px;
        }
    }

    .container.has-article {
        .hdp__title {
            gap: 10px;
            margin-bottom: 0;

            .article_date {
                border: 1px solid var(--white);
                padding: 5px 10px;
                font-size: 14px;
            }
        }
    }
}

.hdp--section .container {
    background: #141c2d;
    position: relative;
}

.hdp__content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    gap: 90px;

    .hdp__title {
        max-width: 720px;
        margin: auto;
        text-align: center;
        display: flex;
        align-items: center;
        flex-direction: column;
        gap: 35px;

        &:has(>.logo_hdp_title) {
            margin: auto auto 0 auto;
        }

        h1 {
            margin: 0;
        }

        .hdp_realisations {
            display: flex;
            flex-direction: column;
            gap: 10px;
            justify-content: center;
            align-items: center;

            .domaines {
                display: flex;
                gap: 10px;

                .domaine {
                    border: 1px solid var(--white);
                    padding: 5px 10px;
                    font-size: 14px;
                }
            }
        }
    }

    .hdp__cartes {
        &:not(.has-logo) {
            display: flex;
            flex-direction: row;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;

            @media (max-width: 568px) {
                gap: 5px;
            }

            .hdp__carte {
                width: 220px;
                height: 120px;
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                gap: 10px;

                @media (max-width: 568px) {
                    margin: -5px;
                    width: 50%;
                    padding: 10px;
                }

                &.blur {
                    background: rgba(255, 255, 255, 0.2);
                    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
                    backdrop-filter: blur(9px);
                    border: 1px solid rgba(255, 255, 255, 0.12);
                }

                .hdp__carte__title {
                    margin: 0;
                    font-weight: var(--bold);
                    text-transform: uppercase;
                    font-size: 14px;

                    @media (max-width: 568px) {
                        line-height: 1;
                        text-align: center;
                    }
                }
            }
        }

        &.has-logo {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 15px 40px;

            .hdp__carte {
                display: flex;
                flex-direction: column;
                align-items: start;
                background: rgba(255, 255, 255, 0.2);
                box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
                backdrop-filter: blur(9px);
                border: 1px solid rgba(255, 255, 255, 0.12);
                padding: 33px;
                margin: 0;
                z-index: 1;
                position: relative;
                max-width: 320px;

                &:after {
                    content: '';
                    display: block;
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 0%;
                    height: 100%;
                    z-index: 0;
                    background: var(--dark);
                    transition: var(--transition);
                }

                &:hover {
                    &:after {
                        width: 100%;
                    }

                    .hdp__carte__content {
                        .hdp__carte__arrow {

                            .arrow_white {
                                transform: translateX(150px);
                                opacity: 0;
                            }

                            .arrow_blue {
                                opacity: 1;
                                transform: translateX(0px);
                            }
                        }
                    }
                }

                .hdp__carte__content {
                    z-index: 2;
                    display: flex;
                    flex-direction: column;
                    align-items: start;
                    width: 100%;

                    .hdp__carte__title {
                        border-top: 1px solid var(--white);
                        font-size: 14px;
                        font-weight: var(--bold);
                        color: var(--white);
                        padding-top: 10px;
                        margin-top: 15px;
                        margin-bottom: 0;
                        text-transform: uppercase;
                    }

                    .hdp__carte__text {
                        font-size: 14px;
                        font-weight: var(--light);
                        color: var(--white);
                    }

                    .hdp__carte__arrow {
                        display: flex;
                        justify-content: space-between;
                        margin-top: 15px;
                        width: 100%;
                        align-items: center;

                        .arrow_white {
                            opacity: 1;
                            transform: translateX(0px);
                            transition: all 0.15s ease;
                        }

                        .arrow_blue {
                            opacity: 0;
                            transform: translateX(-150px);
                            transition: all 0.15s ease;
                        }
                    }
                }

                .hdp__carte__img {
                    z-index: 2;
                    width: 160px;
                    height: 28px;

                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: contain;
                    }
                }

                .hdp__carte__icone {
                    width: 36px;
                    height: 36px;

                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: contain;
                    }
                }
            }
        }
    }
}

@media (min-width: 1200px) {
    .hdp__content {
        min-height: 350px;
    }
}

.hdp .mx-auto {
    text-align: center;
}

.hdp .ms-auto {
    text-align: right;
}