/* ===== Page « Nos joueurs » (SEPQ-37) : templates/main/nos_joueurs/index.html.twig — classes préfixées nj- ===== */

/* --- En-tête bleu : blason en filigrane, champ de recherche, vague --- */
.nj-entete {
  background: radial-gradient(circle at 20% 20%, #1e5fa8 0%, #0b3a75 55%, #0b2a55 100%);
  overflow: hidden;
  padding: 96px 16px 70px;
  position: relative;
}
.nj-entete-blason {
  height: 100%;
  opacity: .1;
  pointer-events: none;
  position: absolute;
  right: -4%;
  top: 20%;
  width: auto;
}
.nj-recherche {
  align-items: center;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  display: flex;
  gap: 4px;
  margin: 0 auto;
  max-width: 720px;
  padding: 2px;
  position: relative;
  z-index: 1;
}
.nj-recherche-icone {
  align-items: center;
  background: #e8eef7;
  border-radius: 50%;
  color: #0b2a55;
  display: flex;
  flex: 0 0 42px;
  font-size: 18px;
  height: 42px;
  justify-content: center;
}
input.nj-recherche-champ {
  background: transparent;
  border: none;
  color: #0b2a55;
  flex: 1;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px; /* 14 px : pas de zoom automatique sur iPhone */
  height: 40px;
  min-width: 0;
  outline: none;
  padding: 0 12px;
}
input.nj-recherche-champ::placeholder {
  color: #64748b;
}
.nj-recherche:focus-within {
  box-shadow: 0 0 0 3px rgba(125, 184, 240, .7), 0 8px 24px rgba(0, 0, 0, .25);
}
.nj-entete-vague {
  bottom: -1px;
  display: block;
  height: 50px;
  left: 0;
  position: absolute;
  width: 100%;
}
.nj-entete-vague path:first-child {
  fill: var(--fond-page, #f4f7fb);
}

/* --- Page --- */
.nj-page {
  color: var(--texte, #0b2a55);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0 auto;
  max-width: 820px;
  padding: 6px 16px 30px;
}
.nj-titre-bloc {
  align-items: center;
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  margin-top: 14px;
}
.nj-titre-icone {
  color: var(--texte, #0b2a55);
  font-size: 36px;
}
.nj-titre-textes {
  min-width: 0;
}
.nj-page h1.nj-titre {
  color: var(--texte, #0b2a55);
  font-family: inherit;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 2px;
}
.nj-saison {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
}
.nj-saison label {
  color: var(--texte-2, #334866);
  font-size: 16px;
  font-weight: 400;
  margin: 0;
}
select.nj-saison-select {
  -webkit-appearance: none;
  appearance: none;
  background: #e3ecf8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230b2a55' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid #d3e0f2;
  border-radius: 18px;
  color: #0b2a55;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  height: auto;
  margin: 0;
  padding: 3px 34px 3px 14px;
  width: auto;
}
select.nj-saison-select:focus-visible {
  outline: 2px solid #1e5fa8;
  outline-offset: 2px;
}

/* --- Filtres par poste : pastilles, défilement horizontal sur mobile --- */
.nj-postes {
  display: flex;
  gap: 10px;
  margin: 0 -16px 8px;
  overflow-x: auto;
  padding: 2px 16px 8px;
  scrollbar-width: none;
}
.nj-postes::-webkit-scrollbar {
  display: none;
}
/* Neutralise le style générique des boutons de styleMain.css (fond rouge, coins arrondis) */
.nj-page button.nj-poste,
.nj-page button.nj-poste:hover,
.nj-page button.nj-poste:focus {
  align-items: center;
  background: var(--fond-carte, #fff);
  border: 1px solid var(--bordure-2, #d6e0ec);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(11, 42, 85, .06);
  color: var(--texte, #0b2a55);
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  gap: 8px;
  margin: 0;
  padding: 9px 18px;
  transition: background-color .15s, border-color .15s;
  white-space: nowrap;
}
.nj-page button.nj-poste:hover {
  border-color: #1e5fa8;
}
.nj-page button.nj-poste.active,
.nj-page button.nj-poste.active:hover,
.nj-page button.nj-poste.active:focus {
  background: #1e5fa8;
  border-color: #1e5fa8;
  box-shadow: 0 4px 12px rgba(30, 95, 168, .35);
  color: #fff;
}
.nj-page button.nj-poste:focus-visible {
  outline: 2px solid #1e5fa8;
  outline-offset: 2px;
}
.nj-page p.nj-compteur {
  color: var(--texte-doux, #64748b);
  font-size: 13px;
  margin: 0 0 10px;
}

/* --- Cartes des joueurs --- */
.nj-liste {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  scroll-margin-top: 90px;
}
.nj-carte[hidden] {
  display: none;
}
a.nj-carte-lien,
a.nj-carte-lien:visited,
a.nj-carte-lien:hover,
a.nj-carte-lien:focus {
  align-items: stretch;
  background: var(--fond-carte, #fff);
  border: 1px solid var(--bordure, #e6ecf3);
  border-left: 6px solid #1e5fa8;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(11, 42, 85, .07);
  color: var(--texte, #0b2a55);
  display: flex;
  gap: 16px;
  min-height: 112px;
  overflow: hidden;
  padding: 8px 14px 8px 8px;
  text-decoration: none;
  transition: box-shadow .15s, transform .15s;
}
.nj-carte--feminin a.nj-carte-lien {
  border-left-color: #e0458a;
}
a.nj-carte-lien:hover,
a.nj-carte-lien:focus-visible {
  box-shadow: 0 6px 18px rgba(11, 42, 85, .14);
  transform: translateY(-1px);
}
.nj-photo {
  border-radius: 12px;
  flex: 0 0 120px;
  overflow: hidden;
}
.nj-photo img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  width: 100%;
}
/* Photo par défaut (logo du club) : affichée en entier sur fond bleu pâle */
.nj-photo--logo {
  background: #e8eef7;
}
.nj-photo--logo img {
  object-fit: contain;
  padding: 10px;
}
.nj-infos {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  min-width: 0;
}
.nj-nom {
  color: var(--texte, #0b2a55);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nj-ligne {
  align-items: center;
  color: var(--texte-2, #334866);
  display: flex;
  font-size: 14px;
  gap: 10px;
}
.nj-ligne i {
  color: var(--texte, #0b2a55);
  flex: 0 0 16px;
  font-size: 13px;
  text-align: center;
}
/* Matchs joués + chevron, séparés par un trait vertical */
.nj-droite {
  align-items: center;
  border-left: 1px solid var(--bordure, #e6ecf3);
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
  margin: 10px 0;
  padding-left: 16px;
}
.nj-matchs {
  background: #e3ecf8;
  border-radius: 999px;
  color: #0b2a55;
  font-size: 14px;
  font-weight: 700;
  padding: 5px 14px;
  white-space: nowrap;
}
.nj-chevron {
  color: var(--texte, #0b2a55);
  font-size: 16px;
}

.nj-page p.nj-vide {
  background: var(--fond-carte, #fff);
  border-radius: 14px;
  color: var(--texte-doux, #64748b);
  margin: 10px 0;
  padding: 18px;
  text-align: center;
}

/* --- Pagination --- */
.nj-pagination {
  align-items: center;
  background: var(--fond-carte, #fff);
  border: 1px solid var(--bordure, #e6ecf3);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(11, 42, 85, .07);
  display: flex;
  gap: 6px;
  margin: 22px auto 0;
  padding: 6px;
  width: fit-content;
}
.nj-pagination[hidden] {
  display: none;
}
.nj-page button.nj-page-btn,
.nj-page button.nj-page-btn:hover,
.nj-page button.nj-page-btn:focus {
  align-items: center;
  background: #e8eef7;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  color: #0b2a55;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  margin: 0;
  padding: 0;
  width: 38px;
}
.nj-page button.nj-page-btn--fleche,
.nj-page button.nj-page-btn--fleche:hover,
.nj-page button.nj-page-btn--fleche:focus {
  background: transparent;
}
.nj-page button.nj-page-btn.active {
  background: #0b2a55;
  color: #fff;
}
.nj-page button.nj-page-btn:disabled {
  cursor: default;
  opacity: .35;
}

/* --- Mobile --- */
@media (max-width: 575px) {
  .nj-entete {
    padding: 78px 12px 52px;
  }
  .nj-entete-blason {
    right: -13%;
  }
  .nj-page {
    padding: 2px 12px 24px;
  }
  .nj-postes {
    margin: 0 -12px 6px;
    padding: 2px 12px 8px;
  }
  .nj-titre-icone {
    font-size: 30px;
  }
  .nj-page h1.nj-titre {
    font-size: 26px;
  }
  .nj-saison label {
    font-size: 14px;
  }
  .nj-page button.nj-poste,
  .nj-page button.nj-poste:hover,
  .nj-page button.nj-poste:focus {
    font-size: 14px;
    padding: 8px 14px;
  }
  a.nj-carte-lien,
  a.nj-carte-lien:visited,
  a.nj-carte-lien:hover,
  a.nj-carte-lien:focus {
    gap: 12px;
    min-height: 100px;
    padding: 6px 10px 6px 6px;
  }
  .nj-photo {
    flex-basis: 88px;
  }
  .nj-nom {
    font-size: 16px;
  }
  .nj-ligne {
    font-size: 13px;
    gap: 8px;
  }
  .nj-droite {
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    padding-left: 10px;
  }
  .nj-matchs {
    font-size: 12px;
    padding: 4px 10px;
  }
}

/* --- Thème sombre (SEPQ-36) --- */
[data-theme="dark"] .nj-entete {
  background: radial-gradient(circle at 20% 20%, #1b4f8c 0%, #0b2f5f 55%, #06193a 100%);
}
[data-theme="dark"] .nj-recherche {
  background: var(--fond-carte);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
[data-theme="dark"] .nj-recherche-icone {
  background: var(--fond-accent);
  color: #7db8f0;
}
[data-theme="dark"] input.nj-recherche-champ {
  color: var(--texte);
}
[data-theme="dark"] input.nj-recherche-champ::placeholder {
  color: var(--texte-doux);
}
[data-theme="dark"] select.nj-saison-select {
  background: var(--fond-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237db8f0' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center;
  border-color: var(--bordure-2);
  color: var(--texte);
}
[data-theme="dark"] .nj-titre-icone,
[data-theme="dark"] .nj-ligne i,
[data-theme="dark"] .nj-chevron {
  color: #7db8f0;
}
[data-theme="dark"] a.nj-carte-lien,
[data-theme="dark"] .nj-pagination {
  box-shadow: 0 3px 12px rgba(0, 0, 0, .35);
}
[data-theme="dark"] .nj-carte:not(.nj-carte--feminin) a.nj-carte-lien {
  border-left-color: #4c9be8;
}
[data-theme="dark"] .nj-matchs,
[data-theme="dark"] .nj-photo--logo {
  background: var(--fond-accent);
  color: var(--texte);
}
[data-theme="dark"] .nj-page button.nj-page-btn {
  background: var(--fond-accent);
  color: var(--texte);
}
[data-theme="dark"] .nj-page button.nj-page-btn--fleche {
  background: transparent;
}
[data-theme="dark"] .nj-page button.nj-page-btn.active {
  background: #4c9be8;
  color: #fff;
}

/* Pagination compacte (« … ») et jamais plus large que l'écran */
.nj-pagination {
  max-width: 100%;
}
.nj-page-points {
  color: var(--texte-doux, #64748b);
  font-weight: 700;
  padding: 0 2px;
}
/* Photo introuvable : le texte alternatif ne déborde pas le temps que le logo la remplace */
.nj-photo img {
  color: transparent;
  font-size: 0;
}
@media (max-width: 575px) {
  .nj-pagination {
    gap: 4px;
    padding: 5px;
  }
  .nj-page button.nj-page-btn,
  .nj-page button.nj-page-btn:hover,
  .nj-page button.nj-page-btn:focus {
    font-size: 14px;
    height: 34px;
    width: 34px;
  }
}

/* Vague inversée (comme la maquette) : le bleu descend moins à gauche, du côté du titre, et plus à droite */
.nj-entete-vague {
  transform: scaleX(-1);
}

/* Saison : pastille centrée à cheval sur la vague de l'en-tête (comme la fiche joueur) */
.nj-page form.nj-saison {
  display: flex;
  justify-content: center;
  margin: -34px 0 12px;
  position: relative;
  z-index: 2;
}
.nj-page select.nj-saison-select {
  box-shadow: 0 3px 10px rgba(11, 42, 85, .16);
  font-size: 13px;
  padding: 5px 36px 5px 16px;
}
.nj-page p.nj-sous-titre {
  color: var(--texte-2, #334866);
  font-size: 16px;
  margin: 0;
}
@media (max-width: 575px) {
  .nj-page form.nj-saison {
    margin-top: -28px;
  }
  .nj-page p.nj-sous-titre {
    font-size: 13px;
  }
}
[data-theme="dark"] .nj-page select.nj-saison-select {
  box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}

/* ===== Retours du designer (12/11/2026) ===== */
/* 1. Bloc nom + informations plus compact ; nom bleu foncé, informations plus discrètes */
.nj-infos {
  gap: 1px;
}
.nj-nom {
  margin-bottom: 1px;
}
.nj-ligne {
  color: #536278;
  line-height: 1.35;
}
.nj-ligne i {
  color: var(--texte-pale, #94a3b8);
}
/* 2. Badge des matchs : même largeur pour tous (« 1 match » comme « 12 matchs ») */
.nj-matchs {
  box-sizing: border-box;
  min-width: 92px;
  text-align: center;
}
/* Photo de taille identique pour tout le monde, quelle que soit la hauteur de la carte */
.nj-photo {
  align-self: center;
  height: 96px;
}
/* 3. Filtres par poste : fondu sur le bord droit tant qu'il reste des choix à faire défiler */
.nj-postes-cadre {
  position: relative;
}
.nj-postes-cadre::after {
  background: linear-gradient(90deg, rgba(244, 247, 251, 0), var(--fond-page, #f4f7fb) 85%);
  bottom: 8px;
  content: "";
  pointer-events: none;
  position: absolute;
  right: -16px;
  top: 0;
  transition: opacity .2s;
  width: 56px;
}
.nj-postes-cadre--fin::after {
  opacity: 0;
}
@media (max-width: 575px) {
  .nj-matchs {
    min-width: 76px;
  }
  .nj-photo {
    height: 88px;
  }
  .nj-postes-cadre::after {
    right: -12px;
  }
}
[data-theme="dark"] .nj-ligne i {
  color: var(--texte-doux);
}
[data-theme="dark"] .nj-postes-cadre::after {
  background: linear-gradient(90deg, rgba(7, 26, 51, 0), var(--fond-page) 85%);
}
/* Thème sombre : informations secondaires (poste, âge, genre) plus lisibles */
[data-theme="dark"] .nj-ligne {
  color: var(--texte-2);
}
[data-theme="dark"] .nj-ligne i {
  color: #7db8f0;
}
