/* CSS complémentaire pour les effets de paliers de kilomètres */

/* Barre de progression vers le prochain palier */
.milestone-progress {
    position: fixed;
    top: 180px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 15px;
    width: 300px;
    color: white;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: translateX(350px);
    transition: transform 0.5s ease;
    z-index: 9999;
}

.milestone-progress.visible {
    transform: translateX(0);
}

.milestone-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.current-milestone {
    color: #ccc;
}

.progress-value {
    font-weight: bold;
    color: white;
}

.next-milestone {
    font-weight: bold;
}

.milestone-progress-bar {
    height: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.milestone-progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1s ease;
}

.milestone-km-info {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Écran de notification de palier atteint */
.milestone-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.milestone-transition.visible {
    opacity: 1;
    pointer-events: auto;
}

.milestone-achievement {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.achievement-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse-icon 2s infinite;
}

.achievement-text h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.achievement-km {
    font-size: 1.2rem;
    margin: 15px 0;
    opacity: 0.9;
}

.achievement-continue {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.achievement-continue:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-color);
}

@keyframes pulse-icon {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Animations pour le compteur flottant */
@keyframes floating-pulse {
    0% { box-shadow: 0 0 10px var(--primary-color); }
    50% { box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color); }
    100% { box-shadow: 0 0 10px var(--primary-color); }
}

@keyframes floating-glow {
    0% { box-shadow: 0 0 10px var(--primary-color); }
    50% { box-shadow: 0 0 15px var(--primary-color); }
    100% { box-shadow: 0 0 10px var(--primary-color); }
}

/* Bouton de progression des paliers */
.milestone-progress-button {
    transition: all 0.3s ease;
}

.milestone-progress-button:hover {
    background-color: var(--primary-color) !important;
    transform: scale(1.1);
}

/* Adaptation mobile */
@media screen and (max-width: 768px) {
    .milestone-progress {
        width: 250px;
        padding: 10px;
        top: 150px;
        right: 10px;
    }
    
    .milestone-badge {
        top: 70px;
        right: 10px;
        padding: 10px;
    }
    
    .milestone-progress-button {
        width: 40px !important;
        height: 40px !important;
        bottom: 80px !important;
        right: 10px !important;
    }
    
    .milestone-achievement {
        padding: 20px;
        max-width: 90%;
    }
    
    .achievement-icon {
        font-size: 3rem;
    }
    
    .achievement-text h3 {
        font-size: 1.5rem;
    }
}