/* Effets visuels pour les paliers de kilomètres */

/* Badge de palier */
.milestone-badge {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transition: all 0.5s ease;
    animation: badge-appear 1s ease;
}

.milestone-badge.fade-out {
    opacity: 0;
    transform: translateX(50px);
}

.milestone-icon {
    font-size: 2rem;
    margin-right: 15px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.milestone-text {
    display: flex;
    flex-direction: column;
}

.milestone-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.milestone-km {
    font-size: 0.9rem;
    opacity: 0.8;
}

@keyframes badge-appear {
    0% { opacity: 0; transform: translateX(50px); }
    100% { opacity: 1; transform: translateX(0); }
}

/* Conteneur pour les effets visuels */
#visual-effect-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Effet Bronze - Subtle Glow */
.effect-subtle-glow .section-title,
.effect-subtle-glow .primary-btn,
.effect-subtle-glow .feature-card i {
    text-shadow: 0 0 10px var(--primary-color);
    transition: text-shadow 0.5s ease;
}

/* Effet Silver - Rain Effect */
.rain-drop {
    position: absolute;
    width: 2px;
    height: 15px;
    background-color: rgba(192, 192, 192, 0.7);
    border-radius: 0 0 5px 5px;
    animation: rain-fall linear infinite;
    opacity: 0.7;
}

@keyframes rain-fall {
    0% { transform: translateY(-100px); }
    100% { transform: translateY(100vh); }
}

/* Effet Gold - Particles */
.floating-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: rgba(255, 215, 0, 0.7);
    border-radius: 50%;
    opacity: 0.7;
    animation: float-around linear infinite;
}

@keyframes float-around {
    0% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(20px); }
    50% { transform: translateY(0) translateX(40px); }
    75% { transform: translateY(20px) translateX(20px); }
    100% { transform: translateY(0) translateX(0); }
}

/* Effet Platinum - Stars */
.star {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: twinkle ease-in-out infinite;
}

@keyframes twinkle {
    0% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.5); }
    100% { opacity: 0.1; transform: scale(1); }
}

/* Effet Diamond - Sparkles */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: rgba(185, 242, 255, 0.8);
    border-radius: 50%;
    animation: sparkle ease-in-out infinite;
}

@keyframes sparkle {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.5) rotate(45deg); }
    100% { opacity: 0; transform: scale(0) rotate(90deg); }
}

/* Effet Neon - Pulse */
.effect-neon-pulse .primary-btn,
.effect-neon-pulse .hero h2,
.effect-neon-pulse .section-title {
    animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes neon-pulse {
    0% { text-shadow: 0 0 10px var(--primary-color); }
    50% { text-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
    100% { text-shadow: 0 0 10px var(--primary-color); }
}

/* Effet Apocalypse - Fire */
.ember {
    position: absolute;
    bottom: -10px;
    width: 6px;
    height: 6px;
    background-color: orange;
    border-radius: 50%;
    animation: ember-rise ease-out infinite;
    opacity: 0.8;
}

@keyframes ember-rise {
    0% { transform: translateY(0) scale(1); background-color: red; }
    50% { background-color: orange; }
    100% { transform: translateY(-100px) scale(0); background-color: yellow; opacity: 0; }
}

/* Effet Cyber - Glitch */
.glitch-text {
    position: relative;
    animation: glitch 0.5s linear;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #00ffff;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-1 5s linear infinite alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: 2px 0 #ff00ff;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim-2 5s linear infinite alternate-reverse;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Effet Celestial - Cosmic */
.cosmic-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1b2735 0%, #090a0f 100%);
    opacity: 0.3;
}

.nebula {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(ellipse at center, rgba(75, 0, 130, 0.2) 0%, rgba(138, 43, 226, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(20px);
    animation: nebula-pulse 10s infinite alternate;
}

@keyframes nebula-pulse {
    0% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.4; }
    100% { transform: scale(1); opacity: 0.3; }
}

/* Effet Legendary - Aurora */
.aurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    overflow: hidden;
    opacity: 0.3;
}

.aurora-layer {
    position: absolute;
    width: 200%;
    height: 100px;
    background: linear-gradient(90deg, var(--primary-color), #6a0dad, #00bfff, var(--primary-color));
    background-size: 400% 100%;
    left: -50%;
    animation: aurora-wave 15s ease infinite, aurora-color 10s ease infinite;
    border-radius: 50%;
    filter: blur(20px);
}

@keyframes aurora-wave {
    0% { transform: translateX(0) scaleY(1); }
    50% { transform: translateX(25%) scaleY(0.5); }
    100% { transform: translateX(0) scaleY(1); }
}

@keyframes aurora-color {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Styles spécifiques pour les paliers */
.effect-subtle-glow .cta-buttons .primary-btn {
    box-shadow: 0 0 15px var(--primary-color);
}

.effect-rain-effect .hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
    z-index: 2;
}

.effect-particles .hero h2,
.effect-stars .hero h2,
.effect-diamond-sparkle .hero h2,
.effect-neon-pulse .hero h2,
.effect-fire-effect .hero h2,
.effect-glitch .hero h2,
.effect-cosmic .hero h2,
.effect-aurora .hero h2 {
    animation: text-glow 2s ease-in-out infinite;
}

@keyframes text-glow {
    0% { text-shadow: 0 0 10px var(--primary-color); }
    50% { text-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
    100% { text-shadow: 0 0 10px var(--primary-color); }
}

/* Media Queries pour les appareils mobiles */
@media screen and (max-width: 768px) {
    .milestone-badge {
        top: 70px;
        right: 10px;
        padding: 10px;
    }
    
    .milestone-icon {
        font-size: 1.5rem;
        margin-right: 10px;
    }
    
    .milestone-title {
        font-size: 1rem;
    }
    
    .milestone-km {
        font-size: 0.8rem;
    }
}