@import url(../style.css);

#ecoazur {
    position: relative;

    .bloc1 {
        position: relative;
        height: 120vh;
        background-image: var(--ecoazur-hero);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: right;
        background-attachment: fixed;
        z-index: 1;
        isolation: isolate;

        @media screen and (max-width: 1000px) {
            height: 125vh;
        }

        @media screen and (max-width: 1000px) {
            background-image: none;
            background-attachment: scroll;
        }

        .bloc1-hero-media {
            position: absolute;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
            z-index: 0;
            display: none;
            width: 100%;
            height: 100%;
            pointer-events: none;
            overflow: hidden;

            @media screen and (max-width: 1000px) {
                display: block;
                height: calc(var(--bloc1-hero-vh, 1vh) * 100);
            }

            img {
                display: block;
                width: 100%;
                height: 100%;
                object-fit: cover;
                object-position: right center;
                transform: none;
            }
        }

        .contenu {
            position: sticky;
            top: 0;
            z-index: 2;
            padding-top: calc(70vh - 200px);
            padding-bottom: 20vh;
            
            @media screen and (max-width: 1000px) {
                padding-top: calc(50vh - 50px);
            }
              @media screen and (max-width: 1000px) {
                padding-bottom: 25vh;
            }


            svg {
                @media screen and (min-width: 1920px) {
                    width: fit-content;
                    height: 45px;
                }
            }

            h1 {
                color: #fff;

                sup {
                    font-size: 25px;
                    margin-left: 4px;
                }
            }

            h2 {
                color: white;
                margin-top: 23px;
                letter-spacing: 0;
            }
        }
    }

    .bloc2 {
        position: relative;
        background-color: var(--bleu);
        margin-top: -20vh;
        z-index: 2;

        @media screen and (max-width: 1280px) {
            margin-top: -23vh;
        }

        @media screen and (max-width: 1000px) {
            margin-top: -25vh;
        }

        .container {
            padding-top: 80px;
            padding-bottom: 134px;
            display: grid;
            grid-template-columns: minmax(0, 43%) minmax(360px, 1fr);
            gap: 90px;
            align-items: center;

            @media screen and (max-width: 1000px) {
                display: block;
                padding-bottom: 40px;
            }

            .introContent {
                min-width: 0;
            }

            > .videoContainer {
                position: relative;
                justify-self: start;
                width: min(100%, 760px);
                aspect-ratio: 16 / 9;
                overflow: hidden;
                margin-top: 75px;

                @media screen and (max-width: 1000px) {
                    width: 100%;
                    max-width: calc(100vw - 48px);
                    margin: 40px auto 0 auto;
                }

                @media screen and (max-width: 420px) {
                    max-width: calc(100vw - 32px);
                }

                iframe {
                    position: absolute;
                    inset: 0;
                    display: block;
                    width: 100%;
                    height: 100%;
                }
            }

            p {
                color: white;
                width: 100%;
                padding: 20px 0 0 0;

                @media screen and (max-width: 1024px) {
                    width: 100%;
                }

                @media screen and (max-width: 600px) {
                    width: 100%;
                }
            }
        }
    }

    .bloc3 {
        position: relative;
        background-color: black;

        .schemaContainer {
            text-align: center;
            position: relative;

            .schema {
                width: 80%;
                height: auto;
            }

            #plus1 {
                position: absolute;
                top: 51%;
                left: 28.1%;
                transform: translate(-50%, -50%);
                width: 1.5%;
                height: auto;
                min-width: 24px;
                z-index: 2;
            }

            #plus1.rotated {
                transform: translate(-50%, -50%) rotate(45deg);
            }

            #plus2 {
                position: absolute;
                top: 66%;
                left: 63%;
                transform: translate(-50%, -50%);
                width: 1.5%;
                height: auto;
                min-width: 24px;
                z-index: 2;
            }

             #plus2.rotated {
                transform: translate(-50%, -50%) rotate(45deg);
            }

            #plus3 {
                position: absolute;
                top: 51%;
                left: 22%;
                transform: translate(-50%, -50%);
                width: 1.5%;
                height: auto;
                min-width: 24px;
                z-index: 2;
            }

            @media screen and (max-width: 700px) {
                .schema {
                    width: 96%;
                }

                #plus1,
                #plus2,
                #plus3 {
                    width: 30px;
                    min-width: 30px;
                }

                #plus1 {
                    left: clamp(27%, calc(23.8% + 0.9vw), 30%);
                }

                #plus3 {
                    left: clamp(16%, calc(19.2% - 0.9vw), 19%);
                }
            }

             #plus3.rotated {
                transform: translate(-50%, -50%) rotate(45deg);
            }
        }

        .modal {
            display: none;
            position: fixed;
            z-index: 30;
            left: 50%;
            top: 50%;
            width: min(1180px, 90vw);
            height: min(760px, 86vh);
            max-height: 86vh;
            background-color: var(--gris-blanc);
            border-radius: 16px;
            transform: translate(-50%, -50%);
            overflow: hidden;

                .modalContainer {
                    position: relative;
                    width: 100%;
                    height: 100%;
                    padding: 80px 60px 100px 60px;
                    box-sizing: border-box;
                }

                .close {
                    position: absolute;
                    right: 28px;
                    top: 28px;
                    cursor: pointer;
                    z-index: 40;
                    pointer-events: auto;
                }

                .close:hover,
                .close:focus {
                    color: black;
                    text-decoration: none;
                    cursor: pointer;
                }

                .iris-bleue {
                    position: absolute;
                    left: 8%;
                    top: 80px;
                    width: 22%;
                    height: calc(100% - 180px);
                    max-width: 260px;
                    object-fit: contain;
                }

                .volet-rect {
                    position: absolute;
                    left: 6%;
                    top: 40px;
                    width: 24%;
                    height: 220px;
                    max-width: 280px;
                    object-fit: contain;
                }

                .volet-oval {
                    position: absolute;
                    left: 6%;
                    top: 280px;
                    width: 22%;
                    height: 220px;
                    max-width: 250px;
                    object-fit: contain;
                }

                .control {
                    position: absolute;
                    left: 6%;
                    top: 80px;
                    width: 26%;
                    height: calc(100% - 180px);
                    max-width: 320px;
                    object-fit: contain;
                }


                .textContainer1 {
                        position: absolute;
                        top: 80px;
                        left: 34%;
                        width: 56%;
                        bottom: 40px;
                        overflow: visible;
                    h2 {
                        color: var(--bleu);
                        margin-bottom: 32px;
                    }

                    ul {
                        list-style-position: inside;
                    }

                    p,
                    li {
                        color: var(--gris);
                    }
                }
                .textContainer2 {
                        position: absolute;
                        top: 80px;
                        left: 34%;
                        width: 56%;
                        bottom: 100px;
                        overflow: auto;
                    h2 {
                        color: var(--bleu);
                        margin-bottom: 32px;
                    }
                }
                .textContainer3 {
                        position: absolute;
                        top: 80px;
                        left: 38%;
                        width: 50%;
                        bottom: 40px;
                        overflow: visible;
                    h2 {
                        color: var(--bleu);
                        margin-bottom: 32px;
                    }
                }

                @media screen and (max-width: 1200px) {
                    .modalContainer {
                        padding: 72px 40px 80px 40px;
                    }

                    .textContainer1,
                    .textContainer2,
                    .textContainer3 {
                        left: 40%;
                        width: 47%;
                        top: 72px;
                        bottom: 80px;
                    }

                    .iris-bleue,
                    .control {
                        top: 72px;
                        height: calc(100% - 152px);
                    }

                    .volet-rect {
                        top: 72px;
                        height: 190px;
                    }

                    .volet-oval {
                        top: 300px;
                        height: 190px;
                    }
                }

                @media screen and (max-width: 900px) {
                    left: 0;
                    top: 0;
                    width: 100vw;
                    height: 100vh;
                    max-height: 100vh;
                    border-radius: 0;
                    transform: none;

                    .modalContainer {
                        height: 100vh;
                        padding: 72px 16px 96px 16px;
                        overflow-y: auto;
                        -webkit-overflow-scrolling: touch;
                    }

                    .iris-bleue,
                    .control {
                        position: relative;
                        left: auto;
                        top: auto;
                        bottom: auto;
                        height: 180px;
                        width: 100%;
                        max-width: 100%;
                        margin: 0 auto 20px auto;
                    }

                    .volet-rect,
                    .volet-oval {
                        position: relative;
                        left: auto;
                        top: auto;
                        bottom: auto;
                        height: 130px;
                        width: 100%;
                        max-width: 100%;
                        margin: 0 auto 16px auto;
                    }

                    .textContainer1,
                    .textContainer2,
                    .textContainer3 {
                        position: relative;
                        width: 100%;
                        left: auto;
                        top: auto;
                        bottom: auto;
                        padding-bottom: 96px;
                    }

                    .textContainer1 h2,
                    .textContainer2 h2,
                    .textContainer3 h2 {
                        margin-bottom: 20px;
                    }

                    .textContainer1 p,
                    .textContainer1 li,
                    .textContainer2 p,
                    .textContainer3 p {
                        font-size: 15px;
                        line-height: 1.5;
                    }

                    .close {
                        right: 14px;
                        top: 14px;
                    }
                }

            }
        }

  


    .bloc4 {
        .container {
            margin-top: 91px;

            .hrTop {
                margin-bottom: 8px;
            }

            hr {
                width: 100%;
                border: 1px solid var(--gris);
                margin: 48px 0;
            }

            h2 {
                margin: 28px 0 87px 0;
                color: var(--gris);
            }

            .benefice {
                display: flex;
                gap: 125px;

                @media screen and (max-width: 1439px) {
                    flex-flow: column;
                }

                img {
                    border-radius: 8px;

                    @media screen and (max-width: 1000px) {
                        width: 70%;
                        height: auto;
                        align-self: center;
                    }

                    @media screen and (max-width: 500px) {
                        width: 90%;
                    }
                }

                .contenu {
                    h3 {
                        margin-bottom: 28px;
                    }

                    p {
                        color: var(--gris);
                        width: 75%;

                        @media screen and (max-width: 500px) {
                            width: 100%;
                        }
                    }
                }
            }

            .videoContainer {
                position: relative;
                padding-bottom: 56.25%;
                /* 9/16 aspect ratio (height/width) */
                height: 0;
                overflow: hidden;
                margin-top: 75px;
                width: 100%;
                max-width: 620px;
                justify-self: end;

                @media screen and (max-width: 1000px) {
                    max-width: none;
                    margin-top: 40px;
                }

                .videoScrollShield {
                    position: absolute;
                    inset: 0;
                    z-index: 3;
                    background: transparent;
                    pointer-events: none;
                }

                iframe {
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    z-index: 1;
                    pointer-events: none;
                }
            }
        }
    }

}

@media screen and (max-width: 1000px) {
    #ecoazur .bloc2 .container > .videoContainer {
        display: block;
        position: relative !important;
        width: calc(100vw - 32px) !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 40px auto 0 auto !important;
        aspect-ratio: auto;
        height: 0 !important;
        padding-bottom: calc((100vw - 32px) * 0.5625) !important;
        box-sizing: border-box;
        overflow: hidden;
    }

    #ecoazur .bloc2 .container > .videoContainer iframe {
        position: absolute !important;
        inset: 0 !important;
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 100% !important;
        aspect-ratio: auto;
    }
}
