/* Base et conteneur */
.ranking-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ranking-container h1 {
  color: #2a7b9b;
  margin-bottom: 10px;
  text-align: center;
}

.scores-header div, .scores-header p {
  text-align: center;
  width: 100%;
}

.ranking-container h2 {
  color: #2a7b9b;
  margin-bottom: 10px;
  text-align: center;
  width: 100%;
}

.retour-btn {
  width: 170px;
  background: #2a7b9b;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.retour-btn:hover {
  background: #1d5c75;
}

/* Notes et mises à jour */
.last-update {
  color: #666;
  font-size: 0.85rem;
  font-style: italic;
}

.note-classement {
  color: #e67e22;
  font-size: 0.9rem;
  font-style: italic;
  margin-top: 0.5rem;
  text-align: center;
}

/* En-tête des scores */
.scores-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

/* Filtres */
.ranking-filters {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-select {
  padding: 0.35rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-width: 160px;
  font-size: 0.9rem;
}

.filter-button {
  padding: 0.35rem 0.75rem;
  background-color: #2a7b9b;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Sections de niveau */
.level-section {
  margin-bottom: 1.25rem;
  background: white;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.level-title {
  background: #f5f7fa;
  padding: 2px;
  margin: 0;
  color: #444;
  border-bottom: 1px solid #eee;
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  text-align: center;
}

/* Tableaux */
.ranking-table, thead {
  width: 100%;
  overflow-x: auto;
}

.ranking-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ranking-table th {
  background: #f8f9fa;
  font-weight: 500;
  color: #666;
  text-align: left;
  padding: 0;
  border-bottom: 1px solid #eee;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.ranking-table th.niv {
  padding: 0;
  margin: 0;
  color: #2a7b9b;
  font-size: 1.2em;
  font-weight: 600;
}

.ranking-table td {
  padding: 0;
  border-bottom: 1px solid #eee;
}

/* Rang et médailles */
.rank {
  font-weight: 600;
  width: 40px;
}

/* Styles pour les 3 premiers */
tr.rank-1 td, tr.rank-2 td, tr.rank-3 td {
  background: #f7f9fc;
}

tr.rank-1 .rank {
  color: #f1c40f;
}

tr.rank-2 .rank {
  color: #95a5a6;
}

tr.rank-3 .rank {
  color: #e67e22;
}

/* Joueurs */
.player {
  font-weight: 500;
  color: #2a7b9b;
  width: 150px;
}

/* Durée et date */
.duration, th.duration {
  color: #555;
  width: 250px;
  font-size: 1em;
  text-align: center;
}

.date, th.date {
  color: #777;
  font-size: 0.85rem;
  width: 80px;
  text-align: center;
}

/* Bouton voir plus */
.show-more-container {
  text-align: center;
  padding: 0.4rem;
  border-top: 1px solid #eee;
}

.show-more-btn {
  background: none;
  border: none;
  color: #2a7b9b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.arrow {
  display: inline-block;
  margin-right: 3px;
}

/* Section scores supplémentaires */
.more-scores {
  border-top: 1px solid #eee;
}

/* Message sans score */
.no-scores {
  background: white;
  border-radius: 4px;
  padding: 1rem;
  text-align: center;
  color: #666;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* Modale règlement */
.regle-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

.regle-modal-content {
  position: relative;
  background-color: white;
  margin: 5% auto;
  padding: 1.5rem;
  border-radius: 6px;
  max-width: 650px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.regle-modal-content>h3>span {
  font-size: 0.6em;
  font-style: italic;
}

.regle-modal h3 {
  color: #2a7b9b;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  text-align: center;
}

.regle-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  border: none;
  background: none;
}

.regle-list {
  padding-left: 1.5rem;
  margin: 0;
  font-size: 0.9rem;
}

.regle-list li {
  margin: 0 0 0 20px;
}

.regle-list ul {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.regle-link {
  color: #2a7b9b;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .ranking-container h1, .ranking-container h2 {
    font-size: 1.1rem;
  }
  
  .ranking-filters {
    flex-wrap: wrap;
  }
  
  .filter-select {
    flex: 1 0 100%;
  }
  
  .date {
    display: none;
  }
  
  .level-title {
    font-size: 0.9rem;
  }
  
  .ranking-table th {
    font-size: 0.75rem;
  }
  
  .ranking-table td {
    padding: 0.4rem;
    font-size: 0.85rem;
  }
  
  .regle-modal-content {
    margin: 10% 1rem;
    padding: 1rem;
    max-width: none;
  }
  
  .retour-btn {
    width: auto;
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}