/* === Style public cohérent + affichage en CUBES (grille) === */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background: #121212;
  color: #fff;
}

/* Conteneur principal */
body > .container {
  flex: 1;
  display: block;
  width: 90%;
  max-width: 1000px;
  margin: 20px auto;
}

* { box-sizing: border-box; }
a { text-decoration: none; color: inherit; }

/* === Deux blocs de filtres (comme demandé) === */
.duo-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.filter-block .title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 8px;
}

.bar-row {
  display: flex;
  gap: 10px;
}

/* Barre de recherche (identique esprit à tournois.css) */
.search-bar {
  display: flex;
  flex: 1 1 auto;
  border: 1px solid #444;
  border-radius: 5px;
  overflow: hidden;
  min-width: 160px;
}
.search-bar button {
  background: #333;
  color: #fff;
  border: none;
  padding: 0 12px;
  cursor: pointer;
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 8px 10px;
  outline: none;
  background: #1e1e1e;
  color: #fff;
}

/* Sélecteur "Trier par" */
.select-bar {
  display: flex;
  align-items: center;
  border: 1px solid #444;
  border-radius: 5px;
  overflow: hidden;
  background: #1e1e1e;
}
.select-bar select {
  background: #1e1e1e;
  color: #fff;
  border: none;
  padding: 8px 10px;
  outline: none;
  appearance: none;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

/* === Grille de cartes (CUBES) === */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding-bottom: 24px;
}

.team-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform .15s ease, background .2s ease;
}
.team-card:hover {
  background: #2a2a2a;
  transform: translateY(-2px);
}

.team-card .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;          /* carré */
  background: #2a2a2a;
  border-radius: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 10px;
}
.team-card .thumb img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.team-name {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin: 2px 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.team-meta {
  font-size: 0.85rem;
  color: #bbb;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: #777;
  padding: 20px 0;
}

/* === Responsive === */
@media (max-width: 900px) {
  .duo-filters { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .team-card .thumb { aspect-ratio: 4 / 3; } /* un peu plus rectangulaire sur petits écrans */
}
