/* =============================
   STYLES POUR LES PRÉDICTIONS DE VICTOIRE
   ============================= */

.victory-prediction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 6px;
    transition: all 0.2s ease;
    cursor: help;
    user-select: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.victory-prediction:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

/* Variations selon les chances */
.victory-prediction.high-chance {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.victory-prediction.high-chance:hover {
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
}

.victory-prediction.medium-chance {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    box-shadow: 0 2px 4px rgba(254, 202, 87, 0.3);
}

.victory-prediction.medium-chance:hover {
    box-shadow: 0 4px 8px rgba(254, 202, 87, 0.4);
}

.victory-prediction.balanced-chance {
    background: linear-gradient(135deg, #48dbfb, #0abde3);
    box-shadow: 0 2px 4px rgba(72, 219, 251, 0.3);
}

.victory-prediction.balanced-chance:hover {
    box-shadow: 0 4px 8px rgba(72, 219, 251, 0.4);
}

/* Icônes des prédictions */
.victory-icon {
    font-size: 12px;
    line-height: 1;
}

.victory-percentage {
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

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

.victory-prediction {
    animation: victorySlideIn 0.3s ease-out;
}

/* Responsive design */
@media (max-width: 768px) {
    .victory-prediction {
        font-size: 10px;
        padding: 1px 4px;
        margin-left: 4px;
        gap: 2px;
    }
    
    .victory-icon {
        font-size: 11px;
    }
    
    .victory-percentage {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .victory-prediction {
        font-size: 9px;
        padding: 1px 3px;
        margin-left: 2px;
    }
    
    .victory-icon {
        font-size: 10px;
    }
    
    .victory-percentage {
        font-size: 8px;
    }
}

/* Intégration dans le formulaire de saisie */
.match-form .victory-prediction {
    margin-left: 6px;
    vertical-align: middle;
}

/* Style pour les cellules avec prédiction */
.player-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
}

/* Badges de chance de victoire dans les infos joueur - Style harmonisé avec ELO/rang */
.player-chance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
    margin-left: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.01em;
    cursor: help;
}

.player-chance.high-chance {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

.player-chance.high-chance:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(248, 113, 113, 0.35);
}

.player-chance.medium-chance {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.player-chance.medium-chance:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.35);
}

.player-chance.balanced-chance {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.player-chance.balanced-chance:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(96, 165, 250, 0.35);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .player-chance {
        font-size: 0.75rem;
        padding: 4px 8px;
        margin-left: 4px;
        min-width: 80px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .player-chance {
        font-size: 0.7rem;
        padding: 4px 6px;
        margin-left: 2px;
        min-width: 70px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Container principal des prédictions */
.victory-prediction-container {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: victorySlideIn 0.3s ease-out;
}

.prediction-header h4 {
    margin: 0 0 12px 0;
    color: white;
    font-size: 16px;
    text-align: center;
}

.prediction-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.team-prediction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

.team-prediction.team1 {
    border-left: 4px solid #ff6b6b;
}

.team-prediction.team2 {
    border-left: 4px solid #4ecdc4;
}

.team-name {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.team-chance {
    color: white;
    font-weight: 900;
    font-size: 18px;
}

.vs-separator {
    color: white;
    font-weight: bold;
    font-size: 14px;
    opacity: 0.8;
}

.favorite-prediction {
    text-align: center;
    margin-top: 8px;
}

.favorite-prediction .victory-prediction {
    font-size: 14px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .victory-prediction-container {
        margin: 12px 0;
        padding: 12px;
    }
    
    .prediction-header h4 {
        font-size: 14px;
    }
    
    .team-prediction {
        min-width: 160px;
        padding: 6px 12px;
    }
    
    .team-name {
        font-size: 12px;
    }
    
    .team-chance {
        font-size: 16px;
    }
    
    .favorite-prediction .victory-prediction {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Tooltip pour les détails des prédictions */
.victory-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: normal;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    max-width: 250px;
}

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

.victory-tooltip .factor {
    display: flex;
    justify-content: space-between;
    margin: 2px 0;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.victory-tooltip .factor:last-child {
    border-bottom: none;
}

.victory-tooltip .factor-label {
    color: #ccc;
}

.victory-tooltip .factor-value {
    color: #fff;
    font-weight: bold;
}

/* Animation de pulsation pour les hautes chances */
@keyframes victoryPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.victory-prediction.high-chance {
    animation: victorySlideIn 0.3s ease-out, victoryPulse 2s ease-in-out 0.5s;
}

/* États spéciaux */
.victory-prediction.very-high {
    background: linear-gradient(135deg, #ff3838, #ff6b6b);
    box-shadow: 0 2px 6px rgba(255, 56, 56, 0.4);
}

.victory-prediction.very-high:hover {
    box-shadow: 0 4px 12px rgba(255, 56, 56, 0.6);
}

.victory-prediction.very-balanced {
    background: linear-gradient(135deg, #a4b0be, #747d8c);
    box-shadow: 0 2px 4px rgba(164, 176, 190, 0.3);
}

/* Animation de célébration pour les prédictions correctes */
@keyframes victoryCelebration {
    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); }
}

.victory-prediction.correct-prediction {
    animation: victoryCelebration 1s ease-in-out;
}
