
/* =====================================================
   SORINE — FORME MYSTIQUE
   Rose • Cyan • Nuit magique
===================================================== */

/* =====================================================
   VARIABLES DU THÈME
===================================================== */

body.theme-mystique {

    /* FOND */

    --bg-primary: #171527;

    /* CARTE */

    --card-bg: rgba(35, 23, 43, 0.97);

    --card-border: rgba(
        244, 181, 206, 0.48
    );

    --card-shadow: rgba(
        0, 0, 0, 0.45
    );

    /* TEXTES */

    --text-primary: #fff6f1;
    --text-secondary: #e8c5d9;

    /* COULEURS PRINCIPALES */

    --accent-primary: #f4b5ce;
    --accent-secondary: #a5e9f8;

    /* BOUTONS */

    --button-bg: linear-gradient(
        135deg,
        rgba(60, 41, 75, 0.95),
        rgba(24, 38, 58, 0.95)
    );

    /* LIENS */

    --link-bg: rgba(
        57, 37, 57, 0.7
    );

    /* LUEURS */

    --glow-color: rgba(
        165, 233, 248, 0.28
    );

    --character-shadow: rgba(
        0, 0, 0, 0.4
    );

    /* VOILE DU FOND */

    --background-overlay: linear-gradient(
        180deg,
        rgba(8, 13, 27, 0.25),
        rgba(9, 18, 34, 0.55)
    );

    /* VOILE BANNIÈRE */

    --banner-overlay: linear-gradient(
        90deg,
        rgba(14, 15, 31, 0.05),
        rgba(17, 16, 34, 0.78)
    );

    --banner-title: #f4b5ce;

    /* =====================================
       OREILLES MYSTIQUES
    ===================================== */

    --ears-width: 640px;

    /* Plus négatif = plus haut */
    --ears-top: -245px;

    /* =====================================
       QUEUE MYSTIQUE
    ===================================== */

    --tail-width: 510px;

    /* Position verticale */
    --tail-top: 120px;

    /* Plus grand = vers la droite */
    --tail-left: -225px;
}

/* =====================================================
   CARTE MYSTIQUE
===================================================== */

.theme-mystique .profile-card {
    position: relative;

    z-index: 1;

    background: linear-gradient(
        145deg,
        rgba(65, 40, 65, 0.97),
        rgba(29, 24, 40, 0.98)
    );

    border-color: rgba(
        244, 181, 206, 0.55
    );

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45),
        0 0 25px rgba(165, 233, 248, 0.2);
}

/* =====================================================
   OREILLES
===================================================== */

.theme-mystique .decor-ears {
    width: var(--ears-width);

    top: var(--ears-top);
    left: 50%;

    z-index: 0;

    transform: translateX(-50%);

    filter: drop-shadow(
        0 0 12px rgba(165, 233, 248, 0.3)
    );
}

/* =====================================================
   QUEUE
===================================================== */

.theme-mystique .decor-tail {
    position: absolute;

    width: var(--tail-width);

    top: var(--tail-top);
    left: var(--tail-left);

    z-index: 0;

    transform-origin: 75% 65%;

    filter: drop-shadow(
        0 0 18px rgba(165, 233, 248, 0.45)
    );
}

/* =====================================================
   HALO DU PERSONNAGE
===================================================== */

.theme-mystique .character-glow {
    background: radial-gradient(
        circle,
        rgba(165, 233, 248, 0.4),
        rgba(244, 181, 206, 0.12) 55%,
        transparent 75%
    );
}

/* =====================================================
   TITRE
===================================================== */

.theme-mystique .profile-title {
    color: #f4b5ce;

    text-shadow:
        0 0 15px rgba(244, 181, 206, 0.25),
        0 0 25px rgba(165, 233, 248, 0.15);
}

/* =====================================================
   BOUTON MÉTAMORPHOSE
===================================================== */

.theme-mystique .transform-button {
    border-color: #a5e9f8;

    background: linear-gradient(
        135deg,
        rgba(65, 41, 78, 0.95),
        rgba(25, 42, 62, 0.95)
    );

    box-shadow:
        0 0 18px rgba(165, 233, 248, 0.22);
}

.theme-mystique .transform-button:hover {
    box-shadow:
        0 0 30px rgba(165, 233, 248, 0.5);
}

/* =====================================================
   LIENS MYSTIQUES
===================================================== */

.theme-mystique .social-link {
    background: rgba(
        57, 37, 57, 0.75
    );

    border-color: rgba(
        244, 181, 206, 0.28
    );
}

.theme-mystique .social-link:hover {
    border-color: #a5e9f8;

    background: rgba(
        58, 47, 76, 0.95
    );

    box-shadow:
        0 8px 25px rgba(165, 233, 248, 0.2);
}

/* =====================================================
   PARTICULES CYAN CLASSIQUES
===================================================== */

.theme-mystique .particle {
    background: #a5e9f8;

    box-shadow:
        0 0 12px #a5e9f8;
}

/* =====================================================
   BANNIÈRES MYSTIQUES
===================================================== */

.theme-mystique .sorine-banner,
.theme-mystique .bottom-banner {
    border-color: #a5e9f8;

    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 20px rgba(165, 233, 248, 0.18);
}

/* =====================================================
   CRÉDITS
===================================================== */

.theme-mystique .site-footer a {
    color: #a5e9f8;
}

/* =====================================================
   SORINE MYSTIQUE — CADRAGE DES BANNIÈRES
===================================================== */

body.theme-mystique {

    /* BANNIÈRE SUPÉRIEURE */

    --banner-mystique-position: center 35%;

    /* BANNIÈRE INFÉRIEURE */

    --bottom-mystique-position: center 47%;
}

/* BANNIÈRE DU HAUT */

body.theme-mystique .banner-mystique {
    background-size: cover;

    background-position:
        var(--banner-mystique-position);
}

/* BANNIÈRE DU BAS */

body.theme-mystique .bottom-banner-image {
    background-size: cover;

    background-position:
        var(--bottom-mystique-position);
}


/* =====================================================
   SORINE MYSTIQUE — FEUX FOLLETS VIVANTS
===================================================== */

body.theme-mystique .celeste-particle {
    display: none;
}

/* =====================================================
   CONTENEUR DU FEU FOLLET
   Le déplacement est contrôlé par JavaScript.
===================================================== */

body.theme-mystique .mystique-wisp {
    position: absolute;
    display: block;

    width: 35px;
    height: 45px;

    overflow: visible;

    pointer-events: none;

    opacity: 1;

    z-index: 2;

    /* Pas d'animation CSS sur ce conteneur :
       JavaScript gère ses déplacements. */

    animation: none !important;

    will-change: transform;
}

/* =====================================================
   FLAMME PRINCIPALE
===================================================== */

body.theme-mystique .wisp-flame {
    position: absolute;

    left: 50%;
    top: 50%;

    width: var(--size, 10px);
    height: calc(var(--size, 10px) * 2.3);

    border-radius:
        70% 30% 65% 35% /
        85% 75% 25% 15%;

    background: radial-gradient(
        ellipse at 50% 75%,
        #ffffff 0%,
        #d9ffff 16%,
        #8afaff 35%,
        #00cfff 60%,
        rgba(0, 100, 255, 0.4) 85%,
        transparent 100%
    );

    box-shadow:
        0 0 8px 3px rgba(100, 255, 255, 0.8),
        0 0 18px 7px rgba(0, 210, 255, 0.5),
        0 0 35px 12px rgba(0, 100, 255, 0.2);

    transform-origin: center bottom;

    animation:
        wispFlicker 0.32s
        ease-in-out infinite alternate;

    will-change: transform, opacity, filter;
}

/* =====================================================
   LANGUE DE FLAMME
===================================================== */

body.theme-mystique .wisp-flame::before {
    content: "";

    position: absolute;

    width: 80%;
    height: 110%;

    left: 10%;
    bottom: 45%;

    border-radius:
        80% 20% 60% 40% /
        95% 75% 25% 10%;

    background: linear-gradient(
        to top,
        rgba(0, 210, 255, 0.9),
        rgba(80, 245, 255, 0.5) 40%,
        transparent 100%
    );

    filter: blur(2px);

    transform-origin: bottom center;

    animation:
        wispTongue 0.45s
        ease-in-out infinite alternate;
}

/* =====================================================
   HALO LUMINEUX
===================================================== */

body.theme-mystique .wisp-flame::after {
    content: "";

    position: absolute;

    inset: -14px;

    border-radius: 50%;

    background: radial-gradient(
        ellipse,
        rgba(0, 225, 255, 0.35),
        rgba(0, 130, 255, 0.12) 50%,
        transparent 75%
    );

    filter: blur(8px);

    animation:
        wispGlow 1.2s
        ease-in-out infinite alternate;
}

/* =====================================================
   ÉTINCELLES
===================================================== */

body.theme-mystique .wisp-spark {
    position: absolute;

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: #baffff;

    box-shadow:
        0 0 6px #7cffff,
        0 0 12px #00cfff;

    pointer-events: none;

    opacity: 0;
}

body.theme-mystique .spark-one {
    left: 20%;
    top: 0;

    animation:
        wispSparkOne 1.1s
        ease-out infinite;
}

body.theme-mystique .spark-two {
    right: 10%;
    top: 15%;

    animation:
        wispSparkTwo 1.6s
        ease-out infinite;

    animation-delay: -0.7s;
}

/* =====================================================
   CRÉPITEMENT RAPIDE
===================================================== */

@keyframes wispFlicker {

    0% {
        transform:
            translate(-50%, -50%)
            rotate(-12deg)
            scaleX(0.85)
            scaleY(0.9);

        opacity: 0.75;

        filter: brightness(0.9);
    }

    50% {
        transform:
            translate(-50%, -50%)
            rotate(6deg)
            scaleX(1.15)
            scaleY(1.2);

        opacity: 1;

        filter: brightness(1.3);
    }

    100% {
        transform:
            translate(-50%, -50%)
            rotate(15deg)
            scaleX(0.9)
            scaleY(1.05);

        opacity: 0.85;

        filter: brightness(1.1);
    }
}

/* =====================================================
   LANGUE DE FLAMME IRRÉGULIÈRE
===================================================== */

@keyframes wispTongue {

    0% {
        transform:
            rotate(-22deg)
            scaleY(0.7);
    }

    50% {
        transform:
            rotate(12deg)
            scaleY(1.25);
    }

    100% {
        transform:
            rotate(-8deg)
            scaleY(0.9);
    }
}

/* =====================================================
   PULSATION LUMINEUSE
===================================================== */

@keyframes wispGlow {

    0% {
        opacity: 0.45;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* =====================================================
   ÉTINCELLES QUI S'ÉCHAPPENT
===================================================== */

@keyframes wispSparkOne {

    0% {
        transform: translate(0, 0) scale(0.4);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform:
            translate(-12px, -24px)
            scale(0);

        opacity: 0;
    }
}

@keyframes wispSparkTwo {

    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 0;
    }

    25% {
        opacity: 0.9;
    }

    100% {
        transform:
            translate(15px, -30px)
            scale(0);

        opacity: 0;
    }
}

/* =====================================================
   AFFICHAGE SELON LE THÈME
===================================================== */

body:not(.theme-mystique) .mystique-wisp {
    display: none;
}


/* =====================================================
   SORINE MYSTIQUE — CRÉPITEMENT PERMANENT
===================================================== */

body.theme-mystique .wisp-flame {
    animation:
        wispFlicker 0.32s
        ease-in-out infinite alternate !important;
}

body.theme-mystique .wisp-flame::before {
    animation:
        wispTongue 0.45s
        ease-in-out infinite alternate !important;
}

body.theme-mystique .wisp-flame::after {
    animation:
        wispGlow 1.2s
        ease-in-out infinite alternate !important;
}

body.theme-mystique .spark-one {
    animation:
        wispSparkOne 1.1s
        ease-out infinite !important;
}

body.theme-mystique .spark-two {
    animation:
        wispSparkTwo 1.6s
        ease-out infinite !important;
    animation-delay: -0.7s !important;
}
