body {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    color: #333;
    margin: 0;
    padding: 0;
  }

/* ———————————————————————————————————— 
     Variables (issues du thème “gameday”) 
  ———————————————————————————————————— */
  :root {
    --bg-header: #22303f;
    --bg-row:    #19212b;
    --bg-panel:  #1b2530;
    --bg-hover:  #263447;
    --border:    #2c3a4a;
    --accent:    #00d6b4;
    --text-main: #e0e0e0;
    --text-gray: #A0A0A0;
    --loss-red:  #ff5b5b;
  }

  /* ============================
     Bouton “Delete Filter”
     ============================ */
  .btn-delete-filter {
    background: transparent;
    border: none;               /* plus de contour */
    padding: 0.25rem;           /* juste assez pour cliquer confortablement */
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .btn-delete-filter:focus {
    outline: none;              /* pas de contour au focus */
  }

  .btn-delete-filter .delete-icon {
    color: var(--accent);
    font-size: 1rem;            /* un peu plus petit */
    transition: color 0.2s;
  }
  .btn-delete-filter:hover .delete-icon {
    color: white;               /* l’icône devient blanche au survol */
  }

  /* ─────────────────────────────────────────── 
     Wrapper scrollable pour le tableau 
  ─────────────────────────────────────────── */
  .gameday-table-wrapper {
    background: var(--bg-panel);
    border-radius: 8px;
    border: 1px solid var(--border);
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    overflow-x: auto;
  }
  .gameday-table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  .gameday-table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
  }
  .gameday-table-wrapper::-webkit-scrollbar-track {
    background: var(--bg-panel);
  }

  /* ─────────────────────────────────────────── 
     Style général du tableau 
  ─────────────────────────────────────────── */
  .gameday-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    background: transparent;
    color: var(--text-gray);
    font-size: 0.9rem;
  }

  /* 1) PREMIÈRE LIGNE D’EN-TÊTE (sticky) */
  .gameday-table thead tr.header-row th {
    position: sticky;
    top: 0;
    z-index: 3; 
    background: var(--bg-header);
    color: var(--accent);
    font-weight: 400;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.9rem;
  }

  /* 2) DEUXIÈME LIGNE (Filtres), sticky sous la première */
  .gameday-table thead tr.filter-row th {
    position: sticky;
    top: 2.5rem; /* Hauteur approximative de la première ligne */
    z-index: 4;  
    background: var(--bg-header);
    padding: 0.25rem 0.5rem;
  }

  /* 3) Style des champs de filtre (select, input text, input number) */
  .filter-input {
    width: 100%;
    background-color: var(--bg-row);
    color: var(--text-main);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    box-sizing: border-box;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
  }
  .filter-input::-webkit-outer-spin-button,
  .filter-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .filter-input::placeholder {
    color: var(--text-gray);
    opacity: 1;
  }
  .filter-input:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 2px rgba(0, 214, 180, 0.3);
  }

  /* 4) Espacement vertical pour Min / Max (range-wrapper) */
  .range-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    justify-content: center;
  }
  .range-input {
    width: 100%;
  }

  /* 5) Zebra striping + Hover */
  .gameday-table tbody tr:nth-child(odd) {
    background: var(--bg-row);
  }
  .gameday-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
  }
  .gameday-table tbody tr:hover {
    background-color: var(--bg-hover);
    cursor: pointer;
  }
  .gameday-table td {
    padding: 0.5rem 0.75rem;
    text-align: center;
    vertical-align: middle;
    font-size: 0.85rem;
    color: var(--text-gray) !important;
    white-space: nowrap;
  }

  /* 6) Masquer toute colonne marquée “visibility:hidden” */
  .gameday-table thead th[style*="visibility: hidden"],
  .gameday-table td[style*="visibility: hidden"] {
    padding: 0;
    border: none;
    width: 0;
    overflow: hidden;
  }

  /* 7) Première colonne (photo) */
  .gameday-table tbody td:first-child {
    /* colonne POSTE désormais */
    width: 36px;
    height: 36px;
    padding: 0.5rem;
  }
  .gameday-table tbody td:nth-child(2) {
    /* colonne PHOTO */
    width: 60px;
    height: 60px;
    padding: 0.5rem;
  }
  .gameday-table tbody td:nth-child(2) .player-photo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
  }
  .player-photo {
    height: 100%;
    object-fit: contain;
    border-radius: 0 !important; /* Suppression de l'arrondi des photos */
  }
  .no-photo {
    display: inline-block;
    width: 100%;
    height: 100%;
    line-height: 60px;
    text-align: center;
    color: #777;
  }

  /* 8) Responsive (< 768px) – ajustements */
  @media screen and (max-width: 768px) {
    .gameday-table thead th,
    .gameday-table td {
      padding: 0.3rem 0.4rem;
      font-size: 0.7rem;
    }
    .gameday-table tbody td:first-child {
      width: 48px;
      height: 48px;
      padding: 0.3rem;
    }
   
    /* Rendre les filtres plus compacts */
    .filter-input {
      font-size: 0.7rem;
      padding: 1px 3px;
    }
    .range-input {
      width: 100%;
    }
  }

  /* 9) Grands écrans (> 1024px) : plus de scroll horizontal */
  @media screen and (min-width: 1024px) {
    .gameday-table-wrapper {
      overflow-x: visible !important;
    }
    .gameday-table {
      table-layout: auto;
    }
    .gameday-table td,
    .gameday-table th {
      white-space: normal;
    }
    .container,
    .content-wrapper {
      max-width: 100%;
      padding-left: 2rem;
      padding-right: 2rem;
    }
    #stats-table {
      width: 100%;
    }
  }

  /* 10) Dropdown “All teams” : texte aligné à gauche */
  .gameday-table thead tr.filter-row th select.filter-input {
    text-align: left;
    padding-left: 0.6rem;
    position: relative;
    z-index: 5; /* Au-dessus du <tbody> */
  }
  .gameday-table thead tr.filter-row th select.filter-input option {
    text-align: left;
  }
  .gameday-table thead tr.filter-row th select.filter-input::-webkit-scrollbar {
    width: 8px;
    background: transparent;
    height: 8px;
  }
  .gameday-table thead tr.filter-row th select.filter-input::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 4px;
  }
  .gameday-table thead tr.filter-row th select.filter-input::-webkit-scrollbar-track {
    background-color: var(--bg-panel);
  }
  @-moz-document url-prefix() {
    .gameday-table thead tr.filter-row th select.filter-input {
      scrollbar-width: thin;
      scrollbar-color: var(--border) var(--bg-panel);
    }
  }

@media screen and (max-width: 768px) {
  /* 1) Enlève le padding du wrapper global */
  .content-wrapper,
  .content-wrapper .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 2) Si tu utilises .container de Bootstrap, neutralise aussi ses paddings */
  .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }

  /* 3) Étends la zone scrollable du tableau sur toute la largeur */
  .gameday-table-wrapper {
    margin-left: 0;
    margin-right: 0;
    border-radius: 0; /* si tu veux aussi écraser les coins arrondis */
  }
}

@media screen and (max-width: 767px) {
  /* 1) On enlève tout padding/gutter sur le container principal */
  .player-stats-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 2) On force le wrapper du tableau à prendre toute la largeur */
  .players-table-wrapper {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0;   /* si tu veux aussi virer les coins arrondis */
  }

  /* 3) Si tu as un .content-wrapper ou .container global, idem */
  .content-wrapper,
  .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ————————————————————————————————————————————————————————————————————
   Sur mobile, on enlève tous les paddings/margins latéraux pour coller à 100% de la largeur
   ———————————————————————————————————————————————————————————————————— */
@media screen and (max-width: 767px) {
  /* 1) Le container global (row / container Bootstrap) */
  .row,
  .container,
  .col-12,
  .col-md-6.container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 2) La carte équipe */
  .team-card {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 3) Le graphique */
  #team-graph {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* 4) Les tableaux Est / Ouest */
  .players-table-wrapper {
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0 !important; /* optionnel : coins carrés */
  }
}
/* icône gomme via mask avec taille en rem */
.btn-delete-filter .delete-icon {
  display: inline-block;
  width: 1.2rem;              /* ~24px → 1.5rem */
  height: 1.2rem;             /* même hauteur */
  background-color: var(--text-gray);
  -webkit-mask: url("/static/images/icones/eraser.0c3bdea74383.svg") no-repeat center / contain;
          mask: url("/static/images/icones/eraser.0c3bdea74383.svg") no-repeat center / contain;
  transition: background-color 0.2s;
}

.btn-delete-filter:hover .delete-icon,
.btn-delete-filter:focus-within .delete-icon {
  background-color: #00d6b4;
}
