/**
 * 💎 BOUTONS DYNAMIQUES CARTE PHYSIQUE - Design Premium EMOCARD
 * Styles pour les boutons conditionnels (QR détecté vs Standard)
 * Avec système de particules guidées style Elden Ring
 */

/* 🎯 BASE COMMUNE */
.btn-emocard-unique,
.btn-find-emocard {
    margin: 24px auto 0;
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: fit-content;
    max-width: 420px;
    position: relative;
    overflow: visible;
    display: block;
    text-align: center;
    line-height: 1.4;
}

/* ✨ BOUTON QR UNIQUE : Effet constellations dorées premium */
.btn-emocard-unique {
    background: linear-gradient(135deg, #aa7b4c 0%, #d4af37 50%, #c9a961 100%);
    background-size: 200% 200%;
    color: #ffffff;
    border: 2px solid rgba(212, 175, 55, 0.6);
    box-shadow: 
        0 8px 32px rgba(170, 123, 76, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 60px rgba(212, 175, 55, 0.2);
    animation: shimmerGlow 4s ease-in-out infinite, gentlePulse 3s ease-in-out infinite;
}

.btn-emocard-unique:hover {
    transform: scale(1.08) translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(170, 123, 76, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        0 0 80px rgba(212, 175, 55, 0.4);
    animation: shimmerGlow 2s ease-in-out infinite, breathe 1.5s ease-in-out infinite;
}

/* 🌟 CONSTELLATIONS INTÉRIEURES */
.btn-emocard-unique::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 60% 70%, rgba(255, 255, 255, 0.6) 1.5px, transparent 1.5px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.7) 1px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.5) 1px, transparent 1px),
        radial-gradient(circle at 90% 60%, rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 15% 70%, rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 100% 100%;
    animation: twinkleStars 4s ease-in-out infinite;
    border-radius: inherit;
    opacity: 0.9;
    z-index: 1;
}

/* ✨ SHIMMER GLISSANT - DÉSACTIVÉ (trop voyant) */
.btn-emocard-unique::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: transparent; /* Effet désactivé */
    transform: rotate(45deg);
    z-index: 2;
    pointer-events: none;
}

/* 🔍 BOUTON STANDARD : Design argenté premium élégant */
.btn-find-emocard {
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 50%, #d9d9d9 100%);
    background-size: 200% 200%;
    color: #2c2c2c;
    border: 2px solid rgba(192, 192, 192, 0.6);
    box-shadow: 
        0 8px 32px rgba(100, 100, 100, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 60px rgba(192, 192, 192, 0.15);
    animation: shimmerGlowSilver 4s ease-in-out infinite, gentlePulseSilver 3s ease-in-out infinite;
}

.btn-find-emocard:hover {
    transform: scale(1.08) translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(100, 100, 100, 0.35),
        inset 0 2px 0 rgba(255, 255, 255, 0.6),
        0 0 80px rgba(192, 192, 192, 0.3);
    animation: shimmerGlowSilver 2s ease-in-out infinite, breatheSilver 1.5s ease-in-out infinite;
}

/* 🌟 CONSTELLATIONS INTÉRIEURES ARGENTÉES */
.btn-find-emocard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 35%, rgba(255, 255, 255, 0.9) 1px, transparent 1px),
        radial-gradient(circle at 65% 65%, rgba(240, 240, 240, 0.7) 1.5px, transparent 1.5px),
        radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
        radial-gradient(circle at 35% 75%, rgba(230, 230, 230, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 85% 55%, rgba(255, 255, 255, 0.7) 1px, transparent 1px),
        radial-gradient(circle at 20% 75%, rgba(240, 240, 240, 0.5) 1px, transparent 1px);
    background-size: 100% 100%;
    animation: twinkleStars 4s ease-in-out infinite;
    border-radius: inherit;
    opacity: 0.85;
    z-index: 1;
}

/* ✨ SHIMMER GLISSANT ARGENTÉ - DÉSACTIVÉ (trop voyant) */
.btn-find-emocard::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: transparent; /* Effet désactivé */
    transform: rotate(45deg);
    z-index: 2;
    pointer-events: none;
}

.btn-text {
    position: relative;
    z-index: 3;
}

/* 🌌 SYSTÈME DE PARTICULES STYLE ELDEN RING */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#particle-canvas.active {
    opacity: 1;
}

/* 🎨 ANIMATIONS */
@keyframes shimmerGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes shimmerGlowSilver {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes shimmerSlide {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(170, 123, 76, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 60px rgba(212, 175, 55, 0.2);
    }
    50% {
        box-shadow: 
            0 12px 40px rgba(170, 123, 76, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 80px rgba(212, 175, 55, 0.35);
    }
}

@keyframes gentlePulseSilver {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(100, 100, 100, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            0 0 60px rgba(192, 192, 192, 0.15);
    }
    50% {
        box-shadow: 
            0 12px 40px rgba(100, 100, 100, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 0.6),
            0 0 80px rgba(192, 192, 192, 0.25);
    }
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1.08) translateY(-4px);
    }
    50% {
        transform: scale(1.12) translateY(-6px);
    }
}

@keyframes breatheSilver {
    0%, 100% {
        transform: scale(1.08) translateY(-4px);
    }
    50% {
        transform: scale(1.12) translateY(-6px);
    }
}

@keyframes twinkleStars {
    0%, 100% {
        opacity: 0.9;
    }
    25% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    75% {
        opacity: 0.7;
    }
}

/* 📱 RESPONSIVE MOBILE */
@media (max-width: 768px) {
    .btn-emocard-unique,
    .btn-find-emocard {
        padding: 16px 32px;
        font-size: 15px;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .btn-emocard-unique,
    .btn-find-emocard {
        padding: 14px 28px;
        font-size: 14px;
        max-width: 95%;
    }
}

/* 🖥️ DESKTOP : Centrage parfait */
@media (min-width: 769px) {
    .btn-emocard-unique,
    .btn-find-emocard {
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
}
