/* =============================
   STYLES POUR LES ÉVOLUTIONS DE CLASSEMENT
   ============================= */

.ranking-evolution {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 8px;
    transition: all 0.2s ease;
    cursor: help;
    user-select: none;
}

.ranking-evolution:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Flèche vers le haut (montée) */
.ranking-evolution.up {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.ranking-evolution.up:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.4);
}

/* Flèche vers le bas (descente) */
.ranking-evolution.down {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.ranking-evolution.down:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.4);
}

/* Point stable */
.ranking-evolution.stable {
    background: linear-gradient(135deg, #9E9E9E, #757575);
    color: white;
    box-shadow: 0 2px 4px rgba(158, 158, 158, 0.3);
}

.ranking-evolution.stable:hover {
    background: linear-gradient(135deg, #757575, #616161);
    box-shadow: 0 4px 8px rgba(158, 158, 158, 0.4);
}

/* Nouveau joueur - supprimé pour simplifier */

/* Icônes des flèches */
.evolution-arrow {
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.evolution-value {
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    min-width: 12px;
    text-align: center;
}

/* Animation d'entrée */
@keyframes evolutionSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.ranking-evolution {
    animation: evolutionSlideIn 0.3s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
    .ranking-evolution {
        font-size: 10px;
        padding: 1px 4px;
        margin-left: 4px;
        gap: 1px;
    }
    
    .evolution-arrow {
        font-size: 12px;
    }
    
    .evolution-value {
        font-size: 9px;
        min-width: 10px;
    }
}

@media (max-width: 480px) {
    .ranking-evolution {
        font-size: 9px;
        padding: 1px 3px;
        margin-left: 2px;
    }
    
    .evolution-arrow {
        font-size: 11px;
    }
    
    .evolution-value {
        font-size: 8px;
        min-width: 8px;
    }
}

/* Intégration dans le tableau de classement */
.rankings-table .ranking-evolution {
    margin-left: 8px;
    vertical-align: middle;
}

/* Style pour les cellules de rang avec évolution */
.rank-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.rank-cell .rank-badge {
    margin-right: 0;
}

/* Animation de pulsation pour les nouvelles évolutions - supprimée */

/* Tooltip personnalisé pour les évolutions */
.evolution-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.evolution-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* États spéciaux */
.ranking-evolution.up.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.4);
}

.ranking-evolution.up.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    box-shadow: 0 2px 4px rgba(192, 192, 192, 0.4);
}

.ranking-evolution.up.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
    box-shadow: 0 2px 4px rgba(205, 127, 50, 0.4);
}

/* Animation de célébration pour les grosses montées */
@keyframes celebrationUp {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    75% { transform: scale(1.15) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.ranking-evolution.up.big-change {
    animation: evolutionSlideIn 0.3s ease-out, celebrationUp 1s ease-in-out 0.5s;
}

.ranking-evolution.up.big-change .evolution-arrow {
    animation: celebrationUp 1s ease-in-out 0.5s;
}
