/* Effets Mystiques Avancés - Antrefemme Enhanced */

/* === PARTICULES MAGIQUES AVANCÉES === */

/* Animation de particules flottantes */
@keyframes float-particles {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); opacity: 0.3; }
    25% { transform: translateY(-15px) translateX(5px) rotate(90deg); opacity: 0.7; }
    50% { transform: translateY(-8px) translateX(-3px) rotate(180deg); opacity: 1; }
    75% { transform: translateY(-20px) translateX(8px) rotate(270deg); opacity: 0.5; }
}

/* Effet de poussière d'étoiles */
.stardust-effect::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, rgba(212, 175, 55, 0.8), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(74, 103, 65, 0.6), transparent),
        radial-gradient(1px 1px at 90% 40%, rgba(212, 175, 55, 0.9), transparent),
        radial-gradient(1px 1px at 130% 80%, rgba(74, 103, 65, 0.7), transparent),
        radial-gradient(1px 1px at 160% 30%, rgba(212, 175, 55, 0.5), transparent);
    background-size: 200px 150px;
    animation: float-particles 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

/* === CRISTAUX EN ROTATION === */

@keyframes crystal-rotation {
    0% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(90deg) rotateX(15deg); }
    50% { transform: rotateY(180deg) rotateX(0deg); }
    75% { transform: rotateY(270deg) rotateX(-15deg); }
    100% { transform: rotateY(360deg) rotateX(0deg); }
}

.crystal-3d {
    transform-style: preserve-3d;
    animation: crystal-rotation 12s linear infinite;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

/* === AURA ÉNERGÉTIQUE === */

@keyframes aura-pulse {
    0%, 100% { 
        box-shadow: 
            0 0 20px rgba(212, 175, 55, 0.3),
            0 0 40px rgba(74, 103, 65, 0.2),
            0 0 60px rgba(212, 175, 55, 0.1);
    }
    50% { 
        box-shadow: 
            0 0 30px rgba(212, 175, 55, 0.6),
            0 0 60px rgba(74, 103, 65, 0.4),
            0 0 90px rgba(212, 175, 55, 0.2);
    }
}

.energy-aura {
    position: relative;
    animation: aura-pulse 4s ease-in-out infinite;
}

.energy-aura::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: inherit;
    z-index: -1;
    animation: gentle-rotate 20s linear infinite;
}

/* === EFFET HOLOGRAPHIQUE === */

@keyframes holographic-shift {
    0%, 100% { 
        background-position: 0% 50%; 
        filter: hue-rotate(0deg);
    }
    25% { 
        background-position: 25% 25%; 
        filter: hue-rotate(90deg);
    }
    50% { 
        background-position: 50% 0%; 
        filter: hue-rotate(180deg);
    }
    75% { 
        background-position: 75% 75%; 
        filter: hue-rotate(270deg);
    }
}

.holographic-card {
    background: linear-gradient(
        45deg,
        var(--primary-color) 0%,
        var(--accent-color) 25%,
        var(--secondary-color) 50%,
        var(--mystic-purple) 75%,
        var(--primary-color) 100%
    );
    background-size: 200% 200%;
    animation: holographic-shift 6s ease-in-out infinite;
    position: relative;
}

.holographic-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 45%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.1) 55%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: shimmer 3s linear infinite;
}

/* === MANDALA ROTATIF === */

@keyframes mandala-spin {
    from { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    to { transform: rotate(360deg) scale(1); }
}

.mandala-decoration {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0.3;
    animation: mandala-spin 15s linear infinite;
    background: radial-gradient(
        circle,
        var(--accent-color) 0%,
        transparent 30%,
        var(--primary-color) 60%,
        transparent 100%
    );
    border-radius: 50%;
}

.mandala-decoration::before {
    content: '✦ ❋ ◆ ❋ ✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-align: center;
    line-height: 1;
}

/* === VAGUES ÉNERGÉTIQUES === */

@keyframes energy-wave {
    0% { 
        transform: translateX(-100%) scaleY(1);
        opacity: 0;
    }
    50% { 
        transform: translateX(0%) scaleY(1.5);
        opacity: 0.8;
    }
    100% { 
        transform: translateX(100%) scaleY(1);
        opacity: 0;
    }
}

.energy-waves {
    position: relative;
    overflow: hidden;
}

.energy-waves::before,
.energy-waves::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: energy-wave 3s ease-in-out infinite;
}

.energy-waves::after {
    top: auto;
    bottom: 0;
    animation-delay: 1.5s;
}

/* === CONSTELLATION INTERACTIVE === */

.constellation-bg {
    position: relative;
    overflow: hidden;
}

.constellation-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 10% 20%, rgba(212, 175, 55, 0.8), transparent),
        radial-gradient(1px 1px at 30% 70%, rgba(212, 175, 55, 0.6), transparent),
        radial-gradient(2px 2px at 80% 30%, rgba(212, 175, 55, 0.9), transparent),
        radial-gradient(1px 1px at 60% 90%, rgba(212, 175, 55, 0.5), transparent),
        radial-gradient(2px 2px at 90% 10%, rgba(212, 175, 55, 0.7), transparent);
    background-size: 300px 200px;
    animation: constellation-twinkle 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes constellation-twinkle {
    0%, 100% { opacity: 0.6; background-size: 300px 200px; }
    50% { opacity: 1; background-size: 320px 220px; }
}

/* Lignes de constellation */
.constellation-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(45deg, transparent 48%, rgba(212, 175, 55, 0.2) 49%, rgba(212, 175, 55, 0.2) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(212, 175, 55, 0.2) 49%, rgba(212, 175, 55, 0.2) 51%, transparent 52%);
    background-size: 100px 100px;
    opacity: 0.3;
    animation: gentle-rotate 30s linear infinite;
    pointer-events: none;
}

/* === EFFET BRUME MYSTIQUE === */

@keyframes mystic-mist {
    0%, 100% { 
        transform: translateX(0%) scale(1);
        opacity: 0.1;
    }
    50% { 
        transform: translateX(20%) scale(1.2);
        opacity: 0.3;
    }
}

.mystic-mist {
    position: relative;
    overflow: hidden;
}

.mystic-mist::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at center,
        rgba(74, 103, 65, 0.1) 0%,
        rgba(212, 175, 55, 0.05) 30%,
        transparent 70%
    );
    animation: mystic-mist 8s ease-in-out infinite;
    pointer-events: none;
}

/* === CHAKRAS ÉNERGÉTIQUES === */

.chakra-effect {
    position: relative;
    display: inline-block;
}

.chakra-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: conic-gradient(
        var(--accent-color) 0deg,
        var(--primary-color) 72deg,
        var(--secondary-color) 144deg,
        var(--mystic-purple) 216deg,
        var(--accent-color) 288deg,
        var(--accent-color) 360deg
    );
    border-radius: 50%;
    animation: gentle-rotate 10s linear infinite;
    opacity: 0.4;
    z-index: -1;
}

/* === RUNES MYSTIQUES === */

.runic-border {
    border: 2px solid var(--accent-color);
    position: relative;
}

.runic-border::before {
    content: '᚛ ᚐ ᚅ ᚈ ᚏ ᚓ ᚃ ᚓ ᚋ ᚋ ᚓ ᚜';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--cream-mystic);
    padding: 0 var(--spacing-sm);
    font-size: 0.8rem;
    color: var(--accent-color);
    letter-spacing: 2px;
    opacity: 0.7;
}

/* === RESPONSIVE POUR EFFETS AVANCÉS === */

@media (max-width: 768px) {
    .mandala-decoration {
        width: 40px;
        height: 40px;
    }
    
    .stardust-effect::before {
        background-size: 150px 100px;
        animation-duration: 10s;
    }
    
    .constellation-bg::before {
        background-size: 200px 150px;
    }
    
    .crystal-3d {
        animation-duration: 15s;
    }
}

@media (max-width: 480px) {
    .holographic-card {
        animation: none;
        background: var(--gradient-primary);
    }
    
    .energy-aura {
        animation: none;
    }
    
    .mystic-mist::before {
        animation: none;
        opacity: 0.05;
    }
    
    .mandala-decoration {
        display: none;
    }
}

/* === CLASSES UTILITAIRES AVANCÉES === */

.enhance-on-hover:hover .stardust-effect::before {
    animation-duration: 4s;
    opacity: 1;
}

.enhance-on-hover:hover .crystal-3d {
    animation-duration: 6s;
}

.enhance-on-hover:hover .energy-aura {
    animation-duration: 2s;
}

/* Désactiver les animations selon les préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
    .stardust-effect::before,
    .crystal-3d,
    .energy-aura,
    .holographic-card,
    .mandala-decoration,
    .constellation-bg::before,
    .constellation-bg::after,
    .mystic-mist::before,
    .chakra-effect::before {
        animation: none !important;
    }
}