/* Teamazo · Avant-match : tes compos, terrain & tactique, rapport d’équilibrage, face-à-face, vestiaire. */

/* ---- Tes compos : des « sauvegardes » avec la vignette du terrain ---- */
.coach-bar,
.tactic-panel {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.coach-bar {
  padding: 12px;
}
.coach-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.coach-title,
.tactic-label,
.report-title {
  color: var(--muted);
  font: 800 italic 14px/1 var(--display);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.coach-title::before,
.tactic-label::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 13px;
  margin-right: 8px;
  background: var(--lime);
  transform: skewX(-14deg);
  vertical-align: -1px;
}
.coach-tools {
  display: flex;
  gap: 6px;
}
.coach-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  color: var(--white);
  font: 700 12px var(--font);
}
.coach-tool .icon {
  width: 15px;
  height: 15px;
}
.coach-tool:hover {
  border-color: var(--lime);
}
.compo-slots {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
}
.compo-slot-list {
  display: flex;
  /* Sans ça, avec beaucoup de compos, la liste se tassait et « Nouvelle compo » chevauchait la dernière. */
  flex: none;
  gap: 8px;
}
.compo-slot {
  position: relative;
  display: flex;
  flex: none;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
  transition:
    border-color 0.15s,
    transform 0.2s var(--ease-snap);
}
.compo-slot:hover {
  transform: translateY(-2px);
}
.compo-slot.active {
  border-color: var(--lime);
  box-shadow:
    0 0 0 1px var(--lime),
    0 6px 18px #0005;
}
.compo-slot-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 7px;
  border: 0;
  background: none;
  color: var(--white);
  text-align: left;
}
.compo-thumb svg {
  display: block;
  width: 72px;
  height: 46px;
  border-radius: 5px;
}
.compo-slot-text strong {
  display: block;
  max-width: 130px;
  overflow: hidden;
  font: 800 italic 16px/1.1 var(--display);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.compo-slot-text small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.compo-slot.active .compo-slot-text strong {
  color: var(--lime);
}
/* ⋯ de la compo active : Renommer, Supprimer (menu #pop-menu). */
.compo-more {
  display: grid;
  flex: none;
  place-items: center;
  align-self: center;
  width: 32px;
  height: 32px;
  margin-right: 6px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  transition:
    background 0.15s,
    color 0.15s;
}
.compo-more:hover,
.compo-more[aria-expanded='true'] {
  background: var(--panel);
  color: var(--white);
}
.compo-more .icon {
  width: 18px;
  height: 18px;
}
.compo-slot-new {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 104px;
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: 800 italic 13px/1.1 var(--display);
  text-transform: uppercase;
}
.compo-slot-new:hover {
  border-color: var(--lime);
  color: var(--lime);
}
.compo-slot-new .icon {
  width: 20px;
  height: 20px;
}

/* ---- Terrain & tactique : cartes avec aperçu du terrain ---- */
.tactic-panel {
  overflow: hidden;
}
.tactic-panel > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  cursor: pointer;
  list-style: none;
}
.tactic-panel > summary::-webkit-details-marker {
  display: none;
}
.tactic-thumb svg {
  display: block;
  width: 84px;
  height: 53px;
  border-radius: 6px;
  box-shadow: 0 4px 12px #0006;
}
.tactic-summary {
  flex: 1;
  min-width: 0;
}
.tactic-summary small {
  display: block;
  color: var(--muted);
  font: 800 italic 12px/1 var(--display);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tactic-summary strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font: 800 italic 20px/1.1 var(--display);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.tactic-change {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--raised);
  color: var(--lime);
  font: 800 italic 13px/1 var(--display);
  text-transform: uppercase;
}
.tactic-panel[open] .tactic-change {
  display: none;
}
.tactic-panel > summary .summary-chevron {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 0.25s var(--ease-snap);
}
.tactic-panel[open] > summary .summary-chevron {
  transform: rotate(180deg);
}
.tactic-body {
  padding: 2px 14px 14px;
  border-top: 1px solid var(--line);
}
.tactic-label {
  margin: 12px 0 8px;
  font-size: 13px;
}
.tactic-label small {
  margin-left: 4px;
  font: 600 11px var(--font);
  letter-spacing: 0;
  text-transform: none;
}
.format-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
}
.tactic-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 172px));
  gap: 8px;
}
.format-card,
.tactic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 6px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
  color: var(--white);
  text-align: left;
  transition:
    transform 0.2s var(--ease-snap),
    border-color 0.15s;
}
.format-card:hover,
.tactic-card:hover {
  border-color: #ffffff40;
  transform: translateY(-3px);
}
.format-thumb svg,
.tactic-thumb-big svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.format-card strong,
.tactic-card strong {
  padding: 2px 4px 0;
  font: 800 italic 17px/1 var(--display);
  text-transform: uppercase;
}
.tactic-card strong {
  font-size: 20px;
}
.format-card small,
.tactic-card small {
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}
.format-card.active,
.tactic-card.active {
  border-color: var(--lime);
  box-shadow:
    0 0 0 1px var(--lime),
    0 8px 22px #0006;
}
.format-card.active strong,
.tactic-card.active strong {
  color: var(--lime);
}
.format-card.active::after,
.tactic-card.active::after {
  content: '✓';
  position: absolute;
  top: 11px;
  right: 11px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--accent-ink, #15200e);
  font: 800 12px/1 var(--font);
}
.tactic-panel .custom-size {
  margin-top: 10px;
}
.tactic-free {
  color: var(--muted);
  font-size: 13px;
}
.spot-a {
  fill: var(--lime);
  stroke: #0009;
  stroke-width: 1;
}
.spot-b {
  fill: #f2f6ee;
  stroke: #0009;
  stroke-width: 1;
}
.field-reset {
  padding-inline: 10px;
}
.field-expanded .field-panel .coach-bar,
.field-expanded .field-panel .tactic-panel {
  display: none !important;
}
@media (max-width: 760px) {
  .format-cards,
  .tactic-cards {
    display: grid;
    grid-auto-columns: 132px;
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .tactic-thumb svg {
    width: 70px;
    height: 44px;
  }
  .tactic-summary strong {
    font-size: 17px;
  }
  .coach-tool {
    padding: 0 8px;
  }
}

/* ---- Rapport d’équilibrage ---- */
.balance-report {
  margin: 10px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--raised), var(--panel));
}
.report-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.report-title {
  font-size: 13px;
}
.balance-mode {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}
.balance-mode button {
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 700 11px var(--font);
}
.balance-mode button[aria-pressed='true'] {
  background: var(--lime);
  color: var(--accent-ink, #15200e);
}
.tug {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tug-avg {
  min-width: 2.4ch;
  font: 800 italic 26px/1 var(--display);
}
#avg-a {
  color: var(--team-a-ui);
}
#avg-b {
  color: var(--team-b-ui);
  text-align: right;
}
.tug-bar {
  position: relative;
  display: flex;
  flex: 1;
  height: 12px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line);
  transform: skewX(-14deg);
}
.tug-bar span {
  height: 100%;
  transition: width 0.5s var(--ease-out);
}
#bar-a {
  background: var(--team-a-ui);
}
#bar-b {
  background: var(--team-b-ui);
}
.tug-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 1px);
  width: 2px;
  background: var(--bg);
}
.report-verdict {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px 8px;
  margin: 10px 0 0;
}
.report-verdict strong {
  font: 800 italic 21px/1 var(--display);
  text-transform: uppercase;
}
.report-verdict span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.report-verdict[data-level='ok'] strong {
  color: var(--lime);
}
.report-verdict[data-level='close'] strong {
  color: var(--gold);
}
.report-verdict[data-level='off'] strong {
  color: #ff6d75;
}
.report-verdict[data-level='none'] strong {
  color: var(--muted);
}
.role-duels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.role-duel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.role-duel b {
  font: 800 italic 15px/1.2 var(--display);
}
.role-duel b:first-child {
  color: var(--team-a-ui);
}
.role-duel b:last-child {
  color: var(--team-b-ui);
}
.role-duel em {
  color: var(--muted);
  font: 700 10px var(--font);
  font-style: normal;
  letter-spacing: 0.5px;
}
.role-duel.uneven {
  border-color: var(--gold);
}
.report-power {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.report-power b {
  color: var(--white);
}
.report-detail {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.report-detail[hidden] {
  display: none;
}

/* ---- Face-à-face : l’équipe A à gauche, la B à droite ---- */
.versus-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 6px;
}
.vs-mid {
  margin-top: 22px;
  color: var(--muted);
  font: 800 italic 18px/1 var(--display);
}
.vs-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 8px 7px;
  border: 0;
  border-bottom: 3px solid var(--team);
  border-radius: 8px 8px 0 0;
  background: var(--raised);
  color: var(--white);
  text-align: left;
}
.vs-b .vs-head {
  align-items: flex-end;
  text-align: right;
}
.vs-shirt svg {
  display: block;
  width: 30px;
  height: 28px;
}
.vs-head strong {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  font: 800 italic 16px/1.05 var(--display);
  text-transform: uppercase;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.vs-head small {
  color: var(--muted);
  font-size: 11px;
}
.vs-list {
  display: grid;
  gap: 4px;
}
.vs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--team);
  border-radius: 7px;
  background: var(--panel);
  color: var(--white);
  text-align: left;
  transition:
    transform 0.15s var(--ease-snap),
    border-color 0.15s;
}
.vs-b .vs-row {
  flex-direction: row-reverse;
  border-left: 1px solid var(--line);
  border-right: 3px solid var(--team);
  text-align: right;
}
.vs-row:hover {
  border-color: var(--team);
  transform: translateX(2px);
}
.vs-b .vs-row:hover {
  transform: translateX(-2px);
}
.vs-player {
  flex: 1;
  min-width: 0;
}
.vs-player strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vs-player small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.vs-rating {
  flex: none;
  min-width: 34px;
  padding: 3px 5px;
  border-radius: 5px;
  background: #c9d1d8;
  color: #1b2227;
  font: 800 italic 15px/1 var(--display);
  text-align: center;
}
.tier-gold .vs-rating {
  background: #f2c14e;
  color: #2b1d02;
}
.tier-bronze .vs-rating {
  background: #cf8e59;
  color: #2a1407;
}
.vs-empty {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
/* Ordinateur : le terrain montre déjà les joueurs. La colonne de droite garde le duel des équipes
   (maillot, nom, effectif, moyenne) et le rapport d’équilibrage ; la liste complète reste sur téléphone
   et dans le tiroir du Mode Match. */
@media (min-width: 761px) {
  .teams-panel:not(.drawer-open) .vs-list {
    display: none;
  }
  .teams-panel:not(.drawer-open) .versus-teams {
    align-items: stretch;
    margin-top: 4px;
  }
  .teams-panel:not(.drawer-open) .vs-head {
    height: 100%;
    margin-bottom: 0;
    padding: 12px 10px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    border-bottom: 3px solid var(--team);
    background: linear-gradient(180deg, var(--raised), var(--panel));
  }
  .teams-panel:not(.drawer-open) .vs-shirt svg {
    width: 42px;
    height: 39px;
  }
  .teams-panel:not(.drawer-open) .vs-mid {
    align-self: center;
    margin-top: 0;
  }
}

/* Vestiaire et carte joueur : plus d’option « Absent » (la case de présence suffit). */
.assignment-pills,
.locker-dock {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.share-link-tools {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.share-link-tools .tactic-label {
  margin-top: 0;
}
.share-link-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.share-link-row button {
  flex: 1;
}

/* ---- Vestiaire : le groupe de potes, une ligne compacte par joueur ---- */
.squad-group {
  padding: 2px 0 8px;
  border-radius: 10px;
}
.squad-group.drag-over {
  background: var(--soft);
  outline: 2px dashed var(--lime);
  outline-offset: -2px;
}
.squad-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 6px;
  background: var(--panel);
  color: var(--muted);
  font: 800 italic 14px/1 var(--display);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.squad-head b {
  min-width: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--white);
  font: 800 italic 13px/1.1 var(--display);
  text-align: center;
}
.squad-group:not(.squad-away) .squad-head b {
  background: var(--lime);
  color: var(--accent-ink, #15200e);
}
.squad-split {
  display: flex;
  gap: 2px;
  height: 6px;
  margin: 2px 6px 6px;
  overflow: hidden;
  border-radius: 2px;
  transform: skewX(-14deg);
}
.squad-split i {
  min-width: 6px;
}
.squad-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 4px 8px;
  color: var(--muted);
  font-size: 11px;
}
.squad-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.squad-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: skewX(-14deg);
}
.squad-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px 22px minmax(0, 1fr) 44px 28px;
  align-items: center;
  gap: 6px;
  min-height: 50px;
  margin-bottom: 4px;
  padding: 4px 4px 4px 6px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--spot);
  border-radius: 8px;
  background: var(--raised);
  transition: border-color 0.15s;
}
.squad-row:hover {
  border-color: #ffffff2e;
  border-left-color: var(--spot);
}
.squad-row.away {
  border-left-color: var(--line);
  opacity: 0.6;
}
.squad-row.locker-source-dragging {
  opacity: 0.35;
}
.squad-row .locker-grip {
  display: grid;
  place-items: center;
  width: 18px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
}
.squad-row .locker-grip .icon {
  width: 16px;
  height: 16px;
}
.squad-row .squad-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  cursor: pointer;
  appearance: none;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.squad-row .squad-check:checked {
  border-color: var(--lime);
  background: var(--lime);
}
.squad-row .squad-check:checked::after {
  content: '';
  width: 6px;
  height: 11px;
  border: solid var(--accent-ink, #15200e);
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-1px) rotate(45deg);
}
.squad-row .squad-check:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.squad-main {
  min-width: 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--white);
  text-align: left;
}
.squad-main strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.squad-main small {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.squad-role {
  flex: none;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--white);
  font: 800 italic 11px/1.3 var(--display);
  letter-spacing: 0.3px;
}
.squad-spot {
  overflow: hidden;
  color: var(--spot);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.squad-row .squad-rating {
  width: 44px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #c9d1d8;
  color: #1b2227;
  font: 800 italic 16px var(--display);
  text-align: center;
  appearance: textfield;
}
.squad-row .squad-rating.tier-gold {
  background: #f2c14e;
  color: #2b1d02;
}
.squad-row .squad-rating.tier-bronze {
  background: #cf8e59;
  color: #2a1407;
}
.squad-row .squad-rating::-webkit-inner-spin-button,
.squad-row .squad-rating::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}
.squad-row .squad-rating:focus {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
}
.squad-row .player-menu {
  width: 28px;
  height: 32px;
}
.squad-empty {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.legal-list li + li {
  margin-top: 6px;
}
.privacy-content strong {
  color: var(--white);
}
.vs-col.drag-over {
  border-radius: 8px;
  outline: 2px dashed var(--team);
  outline-offset: 3px;
}
