/* --- Style Général --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    margin: 0;
    padding: 20px;
}
.container {
    max-width: 900px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h1, h2, h3 {
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* --- Style pour la liste des matchs --- */
.match-list .match-item {
    display: block;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}
.match-list .match-item:hover {
    background-color: #f8f9fa;
}
.match-item .match-details {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
}
.match-details .team { flex: 1; }
.match-details .home { text-align: right; }
.match-details .away { text-align: left; }
.match-details .score { padding: 0 20px; }
.match-item .match-type, .match-item .match-date {
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    display: block;
}

/* --- Style pour la page de détails --- */
/* (Vous pouvez copier les styles de .scoreboard, .compositions, etc. depuis style.css) */
.compositions {
    display: flex;
    gap: 20px;
}
.equipe-container {
    flex: 1;
}
.equipe-container ul {
    list-style-type: none;
    padding-left: 0;
}

/* Dans analyse.css ou style.css */

.equipe-container li {
    display: flex;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px solid #f0f0f0;
}

.equipe-container li.reserviste {
    color: #888;
    font-style: italic;
}

.player-events {
    margin-left: auto; /* Pousse les icônes à droite */
    display: flex;
    gap: 5px;
}

/* Dans analyse.css ou style.css */

.player-events span {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    margin: 0 2px;
}

/* Vert pour un but normal */
.player-events .event-but {
    background-color: #28a745; 
}

/* Orange pour une passe décisive */
.player-events .event-passe {
    background-color: #fd7e14;
}

/* Rouge pour un CSC (c'est un événement négatif pour le joueur) */
.player-events .event-csc {
    background-color: #dc3545;
}
/* Dans analyse.css */

/* Bleu pour les remplacements */
.player-events .event-sub {
    background-color: #007bff;
}
/* Dans analyse.css */
#stats-list {
    border-top: 1px solid #ddd;
    margin-top: 20px;
    padding-top: 10px;
}
.stat-item {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
}
.stat-item:last-child {
    border-bottom: none;
}
/* Dans analyse.css */

/* --- Légende de la carte --- */
#field-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.legend-item {
    display: flex;
    align-items: center;
    font-size: 14px;
}
.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #ccc;
}

/* --- Tableau résumé des stats --- */
#stats-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
#stats-summary-table td {
    padding: 10px;
    border: 1px solid #eee;
}
#stats-summary-table td:first-child {
    font-weight: bold;
    width: 70%;
}
#stats-summary-table td:last-child {
    text-align: center;
    font-size: 18px;
}
/* Dans analyse.css */

.explanation-page {
    line-height: 1.6;
}

.explanation-page h2 {
    color: #1877f2;
    border-color: #1877f2;
}

.table-container {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.table-container table {
    flex: 1;
    border-collapse: collapse;
}

.table-container th, .table-container td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.table-container th {
    background-color: #f2f2f2;
}

.points-pos {
    color: #28a745;
    font-weight: bold;
}

.points-neg {
    color: #dc3545;
    font-weight: bold;
}

.summary {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 8px;
    font-style: italic;
    text-align: center;
}
.player-rating {
    display: inline-block;
    padding: 5px 15px;
    font-size: 24px;
    background-color: #1877f2;
    color: white;
    border-radius: 8px;
    vertical-align: middle;
}
/* Dans analyse.css */

/* --- Couleurs des points sur la carte --- */
.point-but { background-color: #28a745; }                  /* Vert vif */
.point-passe { background-color: #17a2b8; }                 /* Cyan */
.point-tir-cadre { background-color: #ffc107; }             /* Jaune */
.point-tir-non-cadre { background-color: #adb5bd; }         /* Gris clair */
.point-faute-subie { background-color: #007bff; }           /* Bleu */
.point-faute-provoquee { background-color: #fd7e14; }       /* Orange */
.point-penalty-obtenu { background-color: #20c997; }        /* Vert d'eau */
.point-penalty-concede { background-color: #dc3545; }       /* Rouge */
.point-balle-gagnee { background-color: #90ee90; }          /* Vert clair */
.point-balle-perdue { background-color: #e83e8c; }          /* Rose */
.point-coup-de-pied-arrete { background-color: #6f42c1; } /* Violet */
.point-hors-jeu { background-color: #663300; }            /* Marron */
.point-autre { background-color: #343a40; }                 /* Noir doux */
/* Dans analyse.css */

/* Style pour les points cachés sur la carte */
.event-point.point-hidden {
    display: none;
}

/* Style pour la légende cliquable */
.legend-item {
    cursor: pointer;
    transition: opacity 0.2s;
}

/* Style pour un élément de la légende qui est "désactivé" */
.legend-item.legend-item-inactive {
    opacity: 0.4;
    text-decoration: line-through;
}
/* --- Style pour les Onglets de Connexion --- */
.form-container {
    width: 100%;
    max-width: 400px;
}
.tab-buttons {
    display: flex;
    margin-bottom: 20px;
}
.tab-btn {
    flex: 1;
    padding: 15px;
    background-color: #e9ecef;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #495057;
    border-bottom: 3px solid transparent;
}
.tab-btn.active {
    background-color: #fff;
    border-bottom: 3px solid #1877f2;
    color: #1877f2;
}

/* Cacher le formulaire inactif */
form.hidden {
    display: none;
}

/* Message d'erreur pour le mot de passe */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 10px;
    min-height: 1em;
}

/* Désactiver le bouton si les mots de passe ne correspondent pas */
form input[type="submit"]:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* --- Style pour la page de détails v2 --- */

.scoreboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    padding: 10px;
    background-color: #333;
    color: white;
    border-radius: 8px;
}
.score-team { flex: 1; }
.score-points { padding: 0 20px; }
.match-meta { text-align: center; color: #666; margin-top: 5px; }

.compositions { display: flex; gap: 20px; }
.equipe-container { flex: 1; }
.equipe-container ul { list-style-type: none; padding-left: 0; }
.equipe-container li { padding: 4px 0; border-bottom: 1px solid #f0f0f0; }

.timeline { margin-top: 20px; }
.timeline-event {
    padding: 8px;
    border-bottom: 1px solid #eee;
}
.timeline-event:nth-child(even) {
    background-color: #f9f9f9;
}
/* Dans analyse.css */

.player-rating-small {
    display: inline-block;
    width: 32px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background-color: #6c757d; /* Gris neutre */
    color: white;
    font-weight: bold;
    border-radius: 4px;
    margin-right: 8px;
    font-size: 14px;
}
/* --- Style pour la page de Profil du Joueur --- */
.btn-back {
    display: inline-block;
    margin-bottom: 20px;
    color: #6c757d;
    text-decoration: none;
}
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    text-align: center;
}
.card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}
.card-value {
    font-size: 36px;
    font-weight: bold;
    color: #1877f2;
}
.card-label {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}
.match-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.match-history-table th, .match-history-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}
.match-history-table thead {
    background-color: #f2f2f2;
}
/* Dans analyse.css */

.view-selector {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.view-selector label {
    font-weight: bold;
    margin-right: 10px;
}

.view-selector select {
    padding: 8px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.point-csc { background-color: #6a0dad; }
/* --- Adaptation pour les écrans mobiles --- */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column; /* Passe les formulaires l'un en dessous de l'autre */
        gap: 30px;
        padding: 20px;
    }
}