/* =========================================================
   INTRODUCTION CINÉMATIQUE
========================================================= */

.cdv-welcome-experience,
.cdv-welcome-experience * {
    box-sizing: border-box;
}

.cdv-welcome-experience {
    position: fixed;
    z-index: 2147483000;
    inset: 0;

    display: grid;
    place-items: center;

    overflow: hidden;

    color: #ffffff;

    background:
        linear-gradient(
            180deg,
            rgba(2, 5, 18, .44),
            rgba(2, 3, 15, .76)
        ),
        url("/static/WALLPAPER.png")
        center / cover no-repeat;

    opacity: 1;
    visibility: visible;

    transition:
        opacity 1.25s ease,
        visibility 1.25s ease;
}

.cdv-welcome-experience::before {
    content: "";

    position: absolute;
    inset: -12%;

    background:
        radial-gradient(
            circle at 50% 42%,
            rgba(120, 153, 255, .24),
            transparent 28%
        ),
        radial-gradient(
            circle at 54% 50%,
            rgba(147, 91, 255, .18),
            transparent 43%
        );

    filter: blur(18px);

    animation:
        cdvWelcomeAtmosphere
        7s ease-in-out infinite alternate;
}

.cdv-welcome-experience::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, .52),
            transparent 27%,
            transparent 73%,
            rgba(0, 0, 0, .52)
        ),
        linear-gradient(
            180deg,
            rgba(0, 0, 0, .24),
            transparent 36%,
            rgba(0, 0, 0, .42)
        );
}

.cdv-welcome-experience.is-leaving {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cdv-welcome-experience.is-finished {
    display: none;
}

.cdv-welcome-stars {
    position: absolute;
    z-index: 1;
    inset: 0;

    overflow: hidden;
    pointer-events: none;
}

.cdv-welcome-star {
    position: absolute;

    width: var(--size);
    height: var(--size);

    left: var(--x);
    top: var(--y);

    border-radius: 50%;

    background: rgba(220, 236, 255, .92);

    box-shadow:
        0 0 8px rgba(122, 192, 255, .84),
        0 0 18px rgba(135, 102, 255, .44);

    opacity: 0;

    animation:
        cdvWelcomeStar
        var(--duration)
        var(--delay)
        ease-in-out infinite;
}

.cdv-welcome-center {
    position: relative;
    z-index: 3;

    width:
        min(
            920px,
            calc(100% - 40px)
        );

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

.cdv-welcome-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 25px;

    color:
        rgba(
            220,
            225,
            247,
            .62
        );

    font-size: 9px;
    font-weight: 900;
    letter-spacing: .30em;
    text-transform: uppercase;

    opacity: 0;

    animation:
        cdvWelcomeReveal
        .9s .35s ease forwards;
}

.cdv-welcome-status::before {
    content: "";

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #59eab2;

    box-shadow:
        0 0 0 5px rgba(89, 234, 178, .08),
        0 0 20px rgba(89, 234, 178, .72);
}

.cdv-welcome-title {
    position: relative;

    margin: 0;

    color: transparent;

    font-size:
        clamp(
            60px,
            10vw,
            154px
        );

    font-weight: 950;
    line-height: .82;
    letter-spacing: -.075em;

    background:
        linear-gradient(
            110deg,
            #ffffff 12%,
            #ede9ff 40%,
            #a78cff 70%,
            #70d8ff 100%
        );

    -webkit-background-clip: text;
    background-clip: text;

    filter:
        drop-shadow(
            0 22px 55px
            rgba(62, 71, 190, .30)
        );

    opacity: 0;
    transform:
        translateY(35px)
        scale(.96);

    animation:
        cdvWelcomeTitle
        1.45s .65s
        cubic-bezier(.17, .84, .28, 1)
        forwards;
}

.cdv-welcome-title::after {
    content: "";

    position: absolute;

    left: 12%;
    right: 12%;
    bottom: -25px;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(148, 119, 255, .90),
            rgba(105, 216, 255, .82),
            transparent
        );

    transform: scaleX(0);

    animation:
        cdvWelcomeLine
        1.35s 1.35s ease forwards;
}

.cdv-welcome-subtitle {
    margin: 55px 0 0;

    color:
        rgba(
            229,
            227,
            242,
            .50
        );

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .27em;
    text-transform: uppercase;

    opacity: 0;

    animation:
        cdvWelcomeReveal
        1s 1.7s ease forwards;
}

.cdv-welcome-enter {
    position: relative;

    min-width: 235px;
    min-height: 55px;

    margin-top: 34px;
    padding: 0 28px;

    overflow: hidden;

    border:
        1px solid
        rgba(
            148,
            137,
            255,
            .36
        );

    border-radius: 16px;

    color: #ffffff;
    cursor: pointer;

    background:
        linear-gradient(
            130deg,
            rgba(112, 83, 255, .30),
            rgba(52, 151, 255, .17)
        );

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, .12),
        0 20px 50px
        rgba(31, 36, 123, .25);

    font: inherit;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .20em;
    text-transform: uppercase;

    opacity: 0;
    transform: translateY(18px);

    animation:
        cdvWelcomeRevealButton
        1s 2s ease forwards;

    transition:
        transform .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}

.cdv-welcome-enter::before {
    content: "";

    position: absolute;
    inset: -2px;

    background:
        linear-gradient(
            110deg,
            transparent 25%,
            rgba(255, 255, 255, .28),
            transparent 72%
        );

    transform: translateX(-120%);

    animation:
        cdvWelcomeButtonLight
        3.4s 2.6s ease-in-out infinite;
}

.cdv-welcome-enter span {
    position: relative;
    z-index: 1;
}

.cdv-welcome-enter:hover {
    transform: translateY(-3px);

    border-color:
        rgba(
            126,
            211,
            255,
            .67
        );

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, .16),
        0 24px 60px
        rgba(62, 76, 198, .34),
        0 0 35px
        rgba(103, 154, 255, .14);
}

.cdv-welcome-progress {
    width:
        min(
            440px,
            calc(100% - 60px)
        );

    height: 1px;

    margin-top: 34px;

    overflow: hidden;

    background:
        rgba(
            255,
            255,
            255,
            .09
        );

    opacity: 0;

    transition:
        opacity .4s ease;
}

.cdv-welcome-progress-fill {
    width: 0;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            #8166ff,
            #6fdcff
        );

    box-shadow:
        0 0 18px
        rgba(
            101,
            207,
            255,
            .70
        );
}

.cdv-welcome-experience.is-running
.cdv-welcome-enter {
    pointer-events: none;
}

.cdv-welcome-experience.is-running
.cdv-welcome-progress {
    opacity: 1;
}

.cdv-welcome-experience.is-running
.cdv-welcome-progress-fill {
    animation:
        cdvWelcomeProgress
        7.2s linear forwards;
}


/* =========================================================
   BOUTON AUDIO GLOBAL
========================================================= */

.cdv-global-audio-control {
    position: fixed;
    z-index: 2147482000;

    right: 23px;
    bottom: 23px;

    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    padding: 0;

    border:
        1px solid
        rgba(
            145,
            132,
            255,
            .28
        );

    border-radius: 15px;

    color: rgba(245, 245, 255, .90);
    cursor: pointer;

    background:
        linear-gradient(
            145deg,
            rgba(10, 12, 32, .91),
            rgba(12, 20, 42, .88)
        );

    box-shadow:
        inset 0 1px 0
        rgba(255, 255, 255, .08),
        0 15px 38px
        rgba(0, 0, 0, .31);

    -webkit-backdrop-filter:
        blur(18px)
        saturate(130%);

    backdrop-filter:
        blur(18px)
        saturate(130%);

    opacity: 0;
    transform:
        translateY(12px)
        scale(.94);

    pointer-events: none;

    transition:
        opacity .35s ease,
        transform .35s ease,
        color .3s ease,
        border-color .3s ease;
}

.cdv-global-audio-control.is-visible {
    opacity: 1;
    transform:
        translateY(0)
        scale(1);

    pointer-events: auto;
}

.cdv-global-audio-control:hover {
    color: #ffffff;

    border-color:
        rgba(
            108,
            212,
            255,
            .56
        );

    transform:
        translateY(-3px)
        scale(1.03);
}

.cdv-global-audio-control svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cdv-global-audio-control .cdv-sound-off {
    display: none;
}

.cdv-global-audio-control.is-muted
.cdv-sound-on {
    display: none;
}

.cdv-global-audio-control.is-muted
.cdv-sound-off {
    display: block;
}


/* lecteur YouTube invisible */

.cdv-youtube-audio-shell {
    position: fixed;

    width: 1px;
    height: 1px;

    left: -10000px;
    bottom: -10000px;

    overflow: hidden;
    pointer-events: none;
}


/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes cdvWelcomeAtmosphere {
    from {
        transform:
            scale(1)
            translate3d(-1%, -1%, 0);
    }

    to {
        transform:
            scale(1.07)
            translate3d(1%, 1%, 0);
    }
}

@keyframes cdvWelcomeStar {
    0%,
    100% {
        opacity: .08;
        transform: scale(.65);
    }

    45% {
        opacity: .88;
        transform: scale(1.25);
    }
}

@keyframes cdvWelcomeReveal {
    to {
        opacity: 1;
    }
}

@keyframes cdvWelcomeRevealButton {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cdvWelcomeTitle {
    to {
        opacity: 1;
        transform:
            translateY(0)
            scale(1);
    }
}

@keyframes cdvWelcomeLine {
    to {
        transform: scaleX(1);
    }
}

@keyframes cdvWelcomeButtonLight {
    0%,
    22% {
        transform: translateX(-120%);
    }

    60%,
    100% {
        transform: translateX(120%);
    }
}

@keyframes cdvWelcomeProgress {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 700px) {
    .cdv-welcome-center {
        width:
            calc(
                100% - 28px
            );
    }

    .cdv-welcome-title {
        font-size:
            clamp(
                47px,
                18vw,
                82px
            );

        letter-spacing:
            -.065em;
    }

    .cdv-welcome-subtitle {
        max-width: 290px;
        line-height: 1.7;
    }

    .cdv-global-audio-control {
        right: 14px;
        bottom: 14px;

        width: 45px;
        height: 45px;

        border-radius: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cdv-welcome-experience *,
    .cdv-welcome-experience::before,
    .cdv-welcome-experience::after {
        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;
    }
}
