/* Styles pour les statistiques des défis */

/* Grille des statistiques joueur */
.player-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 10px 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    /*align-items: center;*/
    min-width: 200px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    border-left: 3px solid #4CAF50;
}

.carousel_slide .Stat_joueur {
  max-width: 520px;   /* ajuste si besoin */
  margin: 0 auto;     /* centre horizontalement */
}

/* Centrer la grille interne et limiter sa largeur */
.player-stats-grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  justify-content: center;
  margin: 10px auto;  /* au lieu de 10px 0 */
}
.stat-label {
    font-size: 0.9em;
    color: #ffff00;
}

.stat-value {
    font-weight: bold;
    color: #fff;
}

.score-breakdown {
    margin-top: 10px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    text-align: center;
}

.score-breakdown small {
    color: #666;
    font-style: italic;
}

/* Message quand pas de stats */
.no-stats {
    text-align: center;
    padding: 20px;
    color: #666;
}

.no-stats p {
    margin: 5px 0;
}

/* Hall of Fame amélioré */
.hall-of-fame ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Style pour les numéros de rang (1er, 2ème, 3ème) */
.hof-rank-label {
    color: var(--color-yellow-vif);
    font-weight: bold;
    margin-right: 8px;
}

.hof-entry {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 5px;
    border-left: 3px solid #FFD700;
    transition: transform 0.2s ease;
}

.hof-entry:hover {
    transform: translateX(5px);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 255, 255, 0.2) 100%);
}

.hof-entry:first-child {
    border-left-color: #FFD700;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.hof-entry:nth-child(2) {
    border-left-color: #C0C0C0;
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.hof-entry:nth-child(3) {
    border-left-color: #CD7F32;
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
}

.hof-rank {
    display: flex;
    align-items: center;
    min-width: 40px;
    margin-right: 10px;
}

.rank-number {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--color-yellow-vif);
    margin-right: 5px;
}

.hof-player {
    flex: 1;
}

.hof-player strong {
    display: block;
    color: #333;
    margin-bottom: 2px;
}

.hof-details {
    display: flex;
    gap: 10px;
    font-size: 0.85em;
    color: #666;
}

.hof-score {
    color: #4CAF50;
    font-weight: bold;
}

.hof-time {
    color: #FF9800;
}

.hof-answers {
    color: #2196F3;
}

.no-scores {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Statistiques globales */
.global-stats {
    margin-top: 15px;
    padding: 15px;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.global-stats h4 {
    margin: 0 0 10px 0;
    color: #2196F3;
}

.global-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.global-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

.global-label {
    font-size: 0.85em;
    color: #666;
}

.global-value {
    font-weight: bold;
    color: #2196F3;
}

/* Responsive */
@media (max-width: 768px) {
    .player-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .global-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hof-details {
        flex-direction: column;
        gap: 2px;
    }
    
    .defis_stats {
        flex-direction: column !important;
        gap: 20px !important;
    }
}

/* Animation pour les nouvelles données */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.player-stats-grid,
.global-stats,
.hof-entry {
    animation: fadeInUp 0.5s ease-out;
}

/* Badges de performance */
.performance-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    margin-left: 5px;
}

.performance-excellent {
    background: #4CAF50;
    color: white;
}

.performance-good {
    background: #FF9800;
    color: white;
}

.performance-average {
    background: #757575;
    color: white;
}

/* Surbrillance pour le score personnel dans le leaderboard */
.hof-entry.user-score {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.2) 0%, rgba(255, 255, 255, 0.2) 100%) !important;
    border-left-color: #4CAF50 !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.hof-entry.user-score .hof-player strong::after {
    content: " (Vous)";
    color: #4CAF50;
    font-size: 0.8em;
}