/* =========================================================
   APOLLO - LIQUID BUTTON
   Composant reutilisable
   ========================================================= */

.apollo-liquid-button {
    position: relative;

    overflow: hidden;
    isolation: isolate;

    min-height: 58px;

    padding: 0 !important;

    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 10px;

    background:
        linear-gradient(
            115deg,
            #7045dd 0%,
            #9b45e5 45%,
            #d353ef 100%
        ) !important;

    box-shadow:
        0 10px 30px rgba(112,69,221,.15);

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


/* CONTENU */

.apollo-liquid-content {
    position: relative;
    z-index: 10;

    width: 100%;
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 34px;

    padding: 0 24px;

    color: #fff;

    pointer-events: none;
}


/* ZONE LIQUIDE */

.apollo-liquid-bg {
    position: absolute;
    z-index: 1;

    inset: -35%;

    overflow: hidden;

    opacity: 0;

    filter:
        blur(3px)
        saturate(1.18);

    transform: scale(.98);

    transition:
        opacity .25s ease,
        transform .35s ease;

    pointer-events: none;
}


/* BLOBS */

.apollo-liquid-blob {
    position: absolute;

    display: block;

    border-radius:
        55% 45% 60% 40%
        / 45% 60% 40% 55%;

    filter: blur(8px);

    mix-blend-mode: screen;

    will-change:
        transform,
        border-radius;
}


/* rose */
.apollo-liquid-button .blob-1 {
    width: 52%;
    height: 95%;

    left: -5%;
    top: 3%;

    background:
        radial-gradient(
            circle at 35% 35%,
            #ff79ee,
            #e069ff 55%,
            #be55ed 100%
        );
}


/* violet */
.apollo-liquid-button .blob-2 {
    width: 60%;
    height: 105%;

    right: -10%;
    top: -12%;

    background:
        radial-gradient(
            circle at 65% 30%,
            #8d64ff,
            #7045dd 55%,
            #5d38c4 100%
        );
}


/* magenta */
.apollo-liquid-button .blob-3 {
    width: 48%;
    height: 90%;

    left: 28%;
    bottom: -30%;

    background:
        radial-gradient(
            circle at 45% 45%,
            #ff5bd7,
            #c948e8 55%,
            #8e42dd 100%
        );
}


/* bleu-violet */
.apollo-liquid-button .blob-4 {
    width: 42%;
    height: 80%;

    right: 18%;
    bottom: -18%;

    background:
        radial-gradient(
            circle at 50% 50%,
            #00E5FF,
            #656cff 58%,
            #b845e0 100%
        );
}


/* HOVER */

.apollo-liquid-button:hover {
    transform:
        translateY(-2px)
        scale(1.01);

    box-shadow:
        0 16px 42px rgba(190,85,237,.24),
        0 0 30px rgba(224,105,255,.14);
}


.apollo-liquid-button:hover .apollo-liquid-bg {
    opacity: 1;

    transform: scale(1.05);
}


.apollo-liquid-button:hover .blob-1 {
    animation:
        apolloBlobOne
        3.2s
        ease-in-out
        infinite
        alternate;
}


.apollo-liquid-button:hover .blob-2 {
    animation:
        apolloBlobTwo
        3.9s
        ease-in-out
        infinite
        alternate;
}


.apollo-liquid-button:hover .blob-3 {
    animation:
        apolloBlobThree
        4.4s
        ease-in-out
        infinite
        alternate;
}


.apollo-liquid-button:hover .blob-4 {
    animation:
        apolloBlobFour
        3.6s
        ease-in-out
        infinite
        alternate;
}


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

@keyframes apolloBlobOne {

    0% {
        transform:
            translate3d(-6%, -4%, 0)
            rotate(-8deg)
            scale(1);

        border-radius:
            55% 45% 60% 40%
            / 45% 60% 40% 55%;
    }

    45% {
        transform:
            translate3d(35%, 18%, 0)
            rotate(14deg)
            scale(1.22);

        border-radius:
            40% 60% 42% 58%
            / 62% 38% 62% 38%;
    }

    100% {
        transform:
            translate3d(18%, -16%, 0)
            rotate(-18deg)
            scale(.94);

        border-radius:
            65% 35% 58% 42%
            / 38% 64% 36% 62%;
    }
}


@keyframes apolloBlobTwo {

    0% {
        transform:
            translate3d(8%, -12%, 0)
            rotate(7deg)
            scale(1.05);
    }

    52% {
        transform:
            translate3d(-38%, 30%, 0)
            rotate(-20deg)
            scale(1.18);
    }

    100% {
        transform:
            translate3d(-10%, 5%, 0)
            rotate(19deg)
            scale(.92);
    }
}


@keyframes apolloBlobThree {

    0% {
        transform:
            translate3d(-14%, 18%, 0)
            rotate(-14deg)
            scale(.95);
    }

    50% {
        transform:
            translate3d(30%, -35%, 0)
            rotate(22deg)
            scale(1.25);
    }

    100% {
        transform:
            translate3d(-4%, -8%, 0)
            rotate(-6deg)
            scale(1.05);
    }
}


@keyframes apolloBlobFour {

    0% {
        transform:
            translate3d(18%, 15%, 0)
            rotate(12deg)
            scale(.92);
    }

    55% {
        transform:
            translate3d(-28%, -28%, 0)
            rotate(-16deg)
            scale(1.28);
    }

    100% {
        transform:
            translate3d(10%, 8%, 0)
            rotate(20deg)
            scale(1);
    }
}


/* ACCESSIBILITE */

@media (prefers-reduced-motion: reduce) {

    .apollo-liquid-button:hover
    .apollo-liquid-blob {
        animation: none !important;
    }

}

/* =========================================================
   V4 FINAL - LIQUID BUTTON
   Etat idle identique a la frame 0 du hover
   ========================================================= */

.apollo-liquid-button {

    /*
     * Le fond principal devient seulement une base de secours.
     * La vraie matiere visuelle est deja presente via les blobs.
     */
    background:
        linear-gradient(
            115deg,
            #7045dd 0%,
            #9b45e5 45%,
            #d353ef 100%
        ) !important;
}


/* La couche liquide est visible en permanence */
.apollo-liquid-bg {
    opacity: 1 !important;

    transform: scale(1.05) !important;

    transition:
        opacity .25s ease,
        transform .35s ease;
}


/* =========================================================
   POSITIONS IDLE = FRAME 0 DES ANIMATIONS
   ========================================================= */

.apollo-liquid-button .blob-1 {
    transform:
        translate3d(-6%, -4%, 0)
        rotate(-8deg)
        scale(1);

    border-radius:
        55% 45% 60% 40%
        / 45% 60% 40% 55%;
}


.apollo-liquid-button .blob-2 {
    transform:
        translate3d(8%, -12%, 0)
        rotate(7deg)
        scale(1.05);
}


.apollo-liquid-button .blob-3 {
    transform:
        translate3d(-14%, 18%, 0)
        rotate(-14deg)
        scale(.95);
}


.apollo-liquid-button .blob-4 {
    transform:
        translate3d(18%, 15%, 0)
        rotate(12deg)
        scale(.92);
}


/* =========================================================
   HOVER
   La matiere ne change plus, elle commence simplement a bouger
   ========================================================= */

.apollo-liquid-button:hover .apollo-liquid-bg {
    opacity: 1 !important;
    transform: scale(1.05) !important;
}



/* =========================================================
   V4 - LIQUID BUTTON
   Suppression des zones blanches lors du mélange
   ========================================================= */

.apollo-liquid-blob {
    mix-blend-mode: normal !important;
}

.apollo-liquid-bg {
    filter:
        blur(3px)
        saturate(1.22) !important;
}

/* Conserve une excellente lisibilité du texte */
.apollo-liquid-content {
    color: #fff !important;
    text-shadow: 0 1px 8px rgba(0,0,0,.24);
}
