/* effectif.css — styles CSVE organisés par responsabilité. */

.player-card-list {
  display: grid;
  gap: 1.4rem;
}
.roster-position-sticky-sentinel {
  height: 1px;
  margin-bottom: -1px;
  pointer-events: none;
}

.roster-position-filters {
  position: sticky;
  top: calc(var(--app-header-block-size) + var(--app-notice-block-size) + .5rem);
  z-index: 20;
  display: flex;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: .15rem;
  margin: .35rem 0 1rem;
  padding: 0 .15rem;
  touch-action: auto;
  justify-content: center;
  justify-content: safe center;
}

.roster-position-filters.is-dragging {
  will-change: transform;
  user-select: none;
}

/* Équipe : liste compacte, la fiche collector reste disponible au tap. */
.team-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin: .4rem 0 .85rem;
  border-bottom: 1px solid var(--surface-content-border);
}
.team-tab {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 0;
  padding: 0 .5rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.team-tab.is-active {
  color: var(--ink);
  box-shadow: none;
}
.team-tab.is-active::after {
  position: absolute;
  right: 25%;
  bottom: -1px;
  left: 25%;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  content: "";
}
.team-tab:focus-visible,
.team-player-row:focus-visible,
.roster-position-filter:focus-visible {
  outline: 2px solid rgba(255,255,255,.9);
  outline-offset: 2px;
}
.team-player-list { display: grid; gap: 8px; }
.team-player-item { display: grid; gap: 8px; }
.team-player-item[hidden] { display: none; }
.team-player-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: rgba(28,30,31,.78);
  color: #f6f6f6;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.team-player-row:hover,
.team-player-row[aria-expanded="true"] { background: rgba(55,62,61,.8); border-color: rgba(255,255,255,.26); }
.team-player-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: #293231;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  font-weight: 800;
}
.team-player-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-player-copy { display: grid; gap: 2px; min-width: 0; margin-left: 12px; }
.team-player-name { display: -webkit-box; overflow: hidden; color: #f5f5f5; font-size: 15px; overflow-wrap: anywhere; text-overflow: ellipsis; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.team-player-position { color: rgba(255,255,255,.58); font-size: 13px; }
.team-player-chevron { margin-left: auto; padding: 10px; color: rgba(255,255,255,.58); font-size: 18px; line-height: 1; transition: transform .2s ease; }
.team-player-row[aria-expanded="true"] .team-player-chevron { transform: rotate(180deg); color: #fff; }
.team-player-item > .player-card-shell { display: none; }
.team-player-item > .player-card-shell:has(.player-details.open) { display: block; }
.team-player-item .player-card { margin-top: 0; }
.team-stats { margin-top: 8px; }
.team-stats h2 { margin: 0 0 10px; font-size: 18px; }
.team-stats-scroll { overflow-x: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(27,30,30,.78); }
.team-stats-scroll:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: 2px; }
.team-stats table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; font-size: 12px; font-variant-numeric: tabular-nums; }
.team-stats th, .team-stats td { padding: 9px 2px; border-bottom: 1px solid rgba(255,255,255,.1); text-align: center; white-space: nowrap; }
.team-stats th:first-child, .team-stats td:first-child { width: 40%; min-width: 0; padding-inline: 6px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.team-stats-player-name { display: flex; min-width: 0; align-items: baseline; gap: .25rem; }
.team-stats-surname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-stats-initial { flex: 0 0 auto; }
.team-stats thead th { color: rgba(255,255,255,.58); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.team-stats tbody th { color: #f5f5f5; font-weight: 650; }
.team-stats tbody tr:last-child th, .team-stats tbody tr:last-child td { border-bottom: 0; }
.team-stats-note { margin: 12px 4px 0; color: rgba(255,255,255,.55); font-size: 12px; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) {
  .team-player-row, .team-player-chevron { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .team-player-row, .team-stats-scroll { background: #1c1c1e; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .team-tabs { border-bottom-color: rgba(255,255,255,.42); }
  .team-player-row, .team-stats-scroll { background: #1c1c1e; border-color: rgba(255,255,255,.42); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .team-player-position, .team-player-chevron, .team-stats-note { color: rgba(255,255,255,.78); }
}
