/* Animation du train en arrière-plan */
.train-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.magical-train {
    position: absolute;
    width: 400px;
    height: 150px;
    animation: trainOrbit 40s linear infinite;
}

@keyframes trainOrbit {
    0% {
        transform: rotate(0deg) translateX(300px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(300px) rotate(-360deg);
    }
}

.train-engine {
    position: absolute;
    width: 100px;
    height: 60px;
    background: #FF6B6B;
    border-radius: 15px 5px 5px 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: trainSmoke 2s infinite;
}

.train-carriage {
    position: absolute;
    width: 80px;
    height: 50px;
    background: #4ECDC4;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.train-carriage:nth-child(2) {
    left: 110px;
    background: #FFD166;
}

.train-carriage:nth-child(3) {
    left: 200px;
    background: #06D6A0;
}

@keyframes trainSmoke {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Effets de particules */
.world-globe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: url('../assets/images/earth-texture.jpg');
    background-size: cover;
    border-radius: 50%;
    box-shadow: 
        inset 0 0 50px rgba(255,255,255,0.5),
        0 0 60px rgba(100, 200, 255, 0.7);
    animation: earthRotate 30s linear infinite;
}

@keyframes earthRotate {
    from { background-position: 0 0; }
    to { background-position: 400px 0; }
}

/* Train sur la carte interactive */
.train-journey {
    position: absolute;
    z-index: 1000;
    transition: all 2s ease-in-out;
}

.train-with-guide {
    display: flex;
    align-items: center;
    animation: bounce 1s infinite alternate;
}

.guide-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    z-index: 2;
}

.vehicle {
    width: 80px;
    height: 40px;
    margin-left: -15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.vehicle.bicycle {
    background-image: url('../assets/vehicles/bicycle.png');
    animation: pedal 0.5s infinite linear;
}

.vehicle.scooter {
    background-image: url('../assets/vehicles/scooter.png');
    animation: scooterMove 0.3s infinite alternate;
}

.vehicle.car {
    background-image: url('../assets/vehicles/car.png');
    animation: carDrive 0.5s infinite alternate;
}

.vehicle.train {
    background-image: url('../assets/vehicles/train.png');
    width: 120px;
    animation: trainMove 1s infinite linear;
}

.vehicle.plane {
    background-image: url('../assets/vehicles/plane.png');
    animation: fly 2s infinite ease-in-out;
}

@keyframes pedal {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fly {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.train-trail {
    position: absolute;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.5));
    border-radius: 5px;
    top: 50%;
    left: -50px;
    animation: trailFade 1s forwards;
}

@keyframes trailFade {
    from { opacity: 0.8; }
    to { opacity: 0; }
}