/* ========================================
   STYLES POUR LES STATISTIQUES DES JOUEURS
   ======================================== */

.rucv-player-stats-container {
    margin: 20px 0;
    font-family: Arial, sans-serif;
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rucv-player-header {
    margin-bottom: 20px;
}

.rucv-player-header h3 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 0;
}

/* ========================================
   ONGLETS
   ======================================== */

.rucv-stats-tabs {
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.rucv-tab-button {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-bottom: none;
    padding: 12px 20px;
    cursor: pointer;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.rucv-tab-button:hover {
    background: #e0e0e0;
}

.rucv-tab-button.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* ========================================
   CONTENU DES ONGLETS
   ======================================== */

.rucv-stats-content {
    display: none;
    padding: 20px 0;
}

.rucv-stats-content.active {
    display: block;
}

/* ========================================
   SECTIONS DE STATISTIQUES
   ======================================== */

.rucv-stats-section {
    margin-bottom: 30px;
}

.rucv-stats-section h4 {
    color: #0073aa;
    margin-bottom: 15px;
    font-size: 16px;
    border-left: 4px solid #0073aa;
    padding-left: 10px;
}

/* ========================================
   RÉSUMÉ
   ======================================== */

.rucv-summary {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
    font-size: 14px;
}

.rucv-summary strong {
    color: #333;
}

/* ========================================
   TABLEAUX DE STATISTIQUES
   ======================================== */

.rucv-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: hidden;
}

.rucv-stats-table th,
.rucv-stats-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

.rucv-stats-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.rucv-stats-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.rucv-stats-table tbody tr:hover {
    background-color: #f0f8ff;
}

/* ========================================
   SECTIONS SPÉCIALES DANS LES TABLEAUX
   ======================================== */

.rucv-stats-table tr[colspan="2"] {
    background-color: #e8f4f8;
    font-weight: bold;
    color: #0073aa;
}

.rucv-stats-table tr[colspan="2"] td {
    padding: 10px 15px;
    border-top: 2px solid #0073aa;
    border-bottom: 1px solid #0073aa;
}

/* ========================================
   PIED DE TABLEAU
   ======================================== */

.rucv-stats-table tfoot {
    background-color: #f0f0f0;
    font-weight: bold;
}

.rucv-stats-table tfoot td {
    border-top: 2px solid #0073aa;
    color: #333;
}

/* ========================================
   LIENS
   ======================================== */

.rucv-stats-table a {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}

.rucv-stats-table a:hover {
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .rucv-stats-tabs {
        display: flex;
        flex-wrap: wrap;
    }
    
    .rucv-tab-button {
        flex: 1;
        min-width: 120px;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .rucv-stats-summary-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .MatchsJoues,
    .MatchsGagnes,
    .MatchsPerdus {
        max-width: 100%;
        width: 100%;
    }
    
    .rucv-stats-table {
        font-size: 12px;
    }
    
    .rucv-stats-table th,
    .rucv-stats-table td {
        padding: 8px 10px;
    }
    
    .rucv-summary {
        font-size: 12px;
        padding: 10px;
    }
}

/* ========================================
   ÉTATS VIDES
   ======================================== */

.rucv-no-stats {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
    background: #f9f9f9;
    border-radius: 5px;
    border: 2px dashed #ddd;
}

/* ========================================
   ANIMATIONS
   ======================================== */

.rucv-stats-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   COULEURS THÉMATIQUES
   ======================================== */

.rucv-stats-singles .rucv-tab-button.active {
    background: #28a745;
    border-color: #28a745;
}

.rucv-stats-doubles .rucv-tab-button.active {
    background: #dc3545;
    border-color: #dc3545;
}

/* ========================================
   INDICATEURS DE PERFORMANCE
   ======================================== */

.rucv-performance-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.rucv-performance-excellent {
    background-color: #28a745;
}

.rucv-performance-good {
    background-color: #ffc107;
}

.rucv-performance-average {
    background-color: #fd7e14;
}

.rucv-performance-poor {
    background-color: #dc3545;
}

/* ========================================
   CARTE D'IDENTITÉ DU JOUEUR
   ======================================== */

.rucv-player-identity-card {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
}

.PhotoJoueur {
    display: block;
    text-align: center;
    margin-bottom: 20px;
}

.imgJoueur {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    border: 3px solid #0073aa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gris {
    color: #666;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 15px;
}

.gris i {
    margin-right: 8px;
    color: #0073aa;
}

/* ========================================
   PANELS DE CLASSEMENT
   ======================================== */

.panel {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.05);
}

.panel-info {
    border-color: #bce8f1;
}

.panel-heading {
    padding: 10px 15px;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

.panel-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 14px;
    color: #31708f;
    font-weight: bold;
}

.panel-body {
    padding: 15px;
    background: white;
}

.points {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
    display: block;
    margin-bottom: 5px;
}

.categorie {
    font-size: 16px;
    color: #666;
    display: block;
}

/* ========================================
   STATISTIQUES RÉSUMÉES
   ======================================== */

.rucv-stats-summary-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: space-between;
}

.MatchsJoues,
.MatchsGagnes,
.MatchsPerdus {
    flex: 1;
    min-width: 150px;
    max-width: calc(33.333% - 10px);
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
    box-sizing: border-box;
}

.MatchsJoues {
    border-left-color: #0073aa;
}

.MatchsGagnes {
    border-left-color: #28a745;
}

.MatchsPerdus {
    border-left-color: #dc3545;
}

.MatchsJoues span,
.MatchsGagnes span,
.MatchsPerdus span {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.MatchsJoues {
    color: #0073aa;
}

.MatchsGagnes {
    color: #28a745;
}

.MatchsPerdus {
    color: #dc3545;
}

/* ========================================
   ONGLETS BOOTSTRAP (inspiré de W3Schools)
   ======================================== */

.tab-content {
    padding: 20px 0;
    min-height: 200px;
}

.rucv-stats-tabs {
    margin-bottom: 20px;
}

.nav-tabs {
    border-bottom: 2px solid #ddd;
    margin-bottom: 0;
    padding-left: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.nav-tabs > li {
    margin-bottom: -2px;
    margin-right: 2px;
}

.nav-tabs > li > a {
    display: block;
    line-height: 1.42857143;
    border: 1px solid #ccc;
    border-radius: 4px 4px 0 0;
    padding: 10px 18px;
    color: #888;
    text-decoration: none;
    background-color: #ebebeb;
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: 500;
}

.nav-tabs > li > a:hover {
    border-color: #bbb #bbb #ddd;
    background-color: #ddd;
    color: #444;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    color: #1a1a1a;
    cursor: default;
    background-color: #fff;
    border: 2px solid #555;
    border-bottom-color: #fff;
    font-weight: 700;
    padding-bottom: 11px;
}

.tab-pane {
    display: none;
}

.tab-pane.active,
.tab-pane.fade.in.active {
    display: block !important;
}

.tab-pane.fade {
    opacity: 0;
    transition: opacity .15s linear;
}

.tab-pane.fade.in {
    opacity: 1;
}

/* ========================================
   CLASSES BOOTSTRAP POUR LES TABLEAUX
   ======================================== */

.table {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    background-color: transparent;
}

.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
    padding: 5px;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f9f9f9;
}

.table-bordered {
    border: 1px solid #ddd;
}

.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
    border: 1px solid #ddd;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
    padding: 8px;
    line-height: 1.42857143;
    vertical-align: top;
    border-top: 1px solid #ddd;
}

.table > thead > tr > th {
    vertical-align: bottom;
    border-bottom: 2px solid #ddd;
}

/* Classes de couleur Bootstrap */
.success {
    background-color: #dff0d8 !important;
    color: #3c763d !important;
}

.danger {
    background-color: #f2dede !important;
    color: #a94442 !important;
}

.warning {
    background-color: #fcf8e3 !important;
    color: #8a6d3b !important;
}

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}
