/* ========================================================= DESKTOP ONLY – AJUSTEMENTS POUR LE DESIGN DES FILTRES ========================================================= */
@media (min-width: 769px) {
  /* Réduire la marge en bas de la page entre la dernière carte et le footer */
  body.stats-page main.main-content {
    padding-bottom: 10px !important;
    padding-top: 40px !important;
  }

  body.team-page main.main-content {
    padding-bottom: 100px !important;
    padding-top: 0px !important;
  }

  body.results-page main.main-content {
    padding-bottom: 40px !important;
    padding-top: 50px !important;
  }

  /* =========================== STYLES GÉNÉRAUX DES FILTRES =========================== */
  .stats-filters {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    justify-content: flex-start !important;
    margin-bottom: 20px !important;
    padding: 0 16px !important;
  }

  /* =========================== STYLES POUR LE PREMIER FILTRE (CHOIX DE L'ÉQUIPE) =========================== */
  .stats-filters .filter-group:nth-child(1) {
    flex: 1 1 15%;
  }

  /* =========================== STYLES POUR LE DEUXIÈME FILTRE (CHOIX DES MATCHS) =========================== */
  .stats-filters .filter-group:nth-child(2) {
    flex: 1 1 15%;
    order: 1;
  }

  /* =========================== STYLES DES LABELS DES FILTRES =========================== */
  .stats-filters .filter-group label {
    font-size: 0.95rem !important;
    margin-bottom: 6px !important;
    font-weight: 600 !important;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  }

  /* =========================== STYLES DES SELECTS =========================== */
  .stats-filters .filter-group select {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    position: relative !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 12px !important;
    transition: background 0.2s ease !important;
  }

  /* Flèche visible même au focus / hover / active */
  .stats-filters .filter-group select:focus,
  .stats-filters .filter-group select:hover,
  .stats-filters .filter-group select:active {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #fff !important;
    outline: none !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 12px !important;
  }

  /* ========================================================= PLAYER PAGE ONLY (player.html) ========================================================= */

  /* Appliquer uniquement sur la page player.html */
  body.player-page .charts-podium-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* Deux colonnes égales */
    gap: 24px !important; /* Espace entre les colonnes */
    margin: 10px auto !important;
  }

  /* Première colonne : Graphique */
  body.player-page .charts-panel {
    flex: 1 1 30% !important; /* Graphique limité à 30% de la largeur */
    min-width: 320px !important;
    max-width: 400px !important; /* Limité à 400px */
    margin: 0 auto !important; /* Centré horizontalement */
  }

  /* Deuxième colonne : Classements et Détails des performances */
  body.player-page .player-details-container {
    flex: 1 1 70% !important; /* La deuxième colonne prend 70% de la largeur */
    display: flex !important;
    flex-direction: column !important; /* Disposition en colonne */
    gap: 24px !important;
  }

  /* Section des classements du joueur */
  body.player-page .podium-panel {
    flex: 1 1 100% !important;
    min-width: 320px !important;
    margin-top: 100px !important; /* Ajout de la marge pour descendre la section */
    margin-bottom: 100px !important;
  }

  /* Section "Détails des performances" */
  body.player-page .player-details-container .player-stats-grid {
    display: grid !important;
    grid-template-columns: 1fr !important; /* Mettre les cartes en colonne */
    gap: 20px !important;
  }

  /* Section "Détails des performances" : Titre */
  body.player-page .player-details-container h3 {
    font-size: 20px !important;
    margin-bottom: 18px !important;
    text-transform: uppercase !important;
  }

  /* =========================== CHANGER L'ORDRE DES CARTES POUR LA SECTION DÉTAILS =========================== */
  body.player-page .player-stats-grid .stat-card {
    margin-bottom: 18px !important;
  }

  /* =========================== ÉVITER LA DERNIÈRE CARTE PLUS PETITE =========================== */
  body.player-page .player-stats-grid .stat-card:last-child {
    min-height: 150px !important;
    flex: 1 1 100% !important;
    height: auto !important;
  }
  
  .ranking-button {
    width: 300px !important;
  }
}
