/* Salon du master, largages, ralliement, alertes, parties de la session. (chargé après 04-theme-dark.css, l'ordre compte pour la cascade) */

/* ---------- Salon du master : mode, durée, terrain, réglages avancés ---------- */
.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mode-card {
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  min-height: 88px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-align: center;
}
.mode-card .ic {
  width: 26px;
  height: 26px;
  color: var(--text);
}
.mode-card .mode-label {
  font: 800 0.9rem var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mode-card .mode-desc {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}
.mode-card:hover {
  background: var(--surface-2);
}
.mode-card.active {
  background: var(--accent-50);
  border-color: var(--accent);
  color: var(--text);
}
.mode-card.active .ic {
  color: var(--accent);
}

.seg {
  display: inline-flex;
  flex: none;
  border: 1.5px solid var(--text);
  border-radius: var(--radius);
  overflow: hidden;
}
.seg-btn {
  font: 800 0.8rem var(--cond);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 10px;
  border: none;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.seg-btn + .seg-btn {
  border-left: 1.5px solid var(--text);
}
.seg-btn.active {
  background: var(--text);
  color: var(--bg);
}

.summary-title {
  color: var(--text);
  font-weight: 700;
}
.sub-head {
  padding-top: 6px;
}

/* Sections repliables (liste des points, réglages avancés, dernière partie) */
details.fold > summary {
  list-style: none;
  cursor: pointer;
}
details.fold > summary::-webkit-details-marker {
  display: none;
}
details.fold > summary .section-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
details.fold > summary .section-title .ic {
  width: 16px;
  height: 16px;
}
.fold-ic {
  display: flex;
  color: var(--muted);
  transition: transform 0.2s;
}
.fold-ic .ic {
  width: 20px;
  height: 20px;
}
details.fold[open] > summary .fold-ic {
  transform: rotate(180deg);
}
details.fold.inner {
  padding: 4px 0 0;
  border-bottom: none;
}
details.fold.inner > summary .section-title {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  color: var(--text);
}
.setting select {
  flex: none;
  max-width: 52%;
  padding: 8px 10px;
}
.btn-row.compact .btn {
  flex: none;
}

/* Modes : 4 cartes en 2 × 2 */
.mode-cards {
  grid-template-columns: repeat(2, 1fr);
}
.mode-card {
  min-height: 76px;
}
.section-title .ic {
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  margin-right: 4px;
}

/* Largages */
.drop-pin {
  color: var(--ev-drop);
  align-items: center;
  justify-content: center;
}
.sprint-pin {
  color: var(--ev-sprint);
  align-items: center;
  justify-content: center;
}

/* ---------- Largages : étiquette discrète ---------- */
.pin-label.sm {
  font-size: 10px;
  font-weight: 600;
  padding: 0 4px;
  opacity: 0.85;
}

/* ---------- Point de ralliement ---------- */
.rally-pin {
  color: var(--rally);
}
.rally-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rally-box .btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Alertes de présence du tracké ---------- */
.banner.alert {
  background: var(--danger);
  color: #fff;
}
.banner.alert .muted {
  color: #f6e4df;
}
.chip.alert {
  background: var(--danger);
  color: #fff;
}

/* ---------- Parties de la session ---------- */
.history-row .row-sub {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.history-row .btn-row {
  display: flex;
  gap: 6px;
}
.video-progress {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
  margin-top: 6px;
}
.video-progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0;
  transition: width 0.2s;
}
.compass-arrow {
  display: flex;
  transition: transform 0.3s;
}
/* Pouvoirs activables un par un */
.setting-sub {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--surface-2);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.power-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0 10px;
}
.power-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 9px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}
.power-chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.power-chip .ic {
  width: 18px;
  height: 18px;
}
.power-chip.on {
  background: var(--accent-50);
  border-color: var(--accent);
  color: var(--text);
}
.power-chip:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.bomb-pin {
  color: var(--danger);
  align-items: center;
  justify-content: center;
}
.bomb-pin:not(.hit) {
  animation: bomb-blink 1s infinite;
}
.bomb-pin .ic {
  width: 16px;
  height: 16px;
}
@keyframes bomb-blink {
  50% {
    opacity: 0.45;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bomb-pin:not(.hit) {
    animation: none;
  }
}
/* Repère posé par un joueur : un petit drapeau (encre pour l'équipe, couleur du rôle pour le mien), plus petit que l'objectif */
.ping-pin {
  color: var(--text);
}
.ping-pin .ic {
  stroke-width: 2.4;
}
.ping-pin.mine {
  color: var(--role);
}
#replayHeat.on {
  background: var(--danger);
  color: #fff;
}
.rank {
  display: inline-block;
  min-width: 1.6em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.replay-controls #replayHeat,
.replay-controls #replayVideo {
  min-width: 44px;
  padding-left: 10px;
  padding-right: 10px;
  flex: none;
}
.replay-controls .btn.primary {
  min-width: 0;
}
@media (max-width: 380px) {
  .replay-controls .btn.tonal {
    min-width: 52px;
  }
  .replay-controls {
    gap: 6px;
  }
}
/* Équipes rivales */
select.team-select {
  margin-left: 6px;
  padding: 6px 26px 6px 10px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2374787C' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E")
    no-repeat right 4px center / 18px;
  border-color: transparent;
  cursor: pointer;
}
/* une couleur par équipe (8 au plus), dans l'ordre de création */
.team-c0 {
  --team-bg: #e3e9f4;
  --team-fg: #2f4e85;
}
.team-c1 {
  --team-bg: #e6eee7;
  --team-fg: #2e6b3a;
}
.team-c2 {
  --team-bg: #f6e4df;
  --team-fg: #9a3b24;
}
.team-c3 {
  --team-bg: #f3eee2;
  --team-fg: #7a5a12;
}
.team-c4 {
  --team-bg: #ede4f3;
  --team-fg: #61358a;
}
.team-c5 {
  --team-bg: #e0f0f0;
  --team-fg: #1f6666;
}
.team-c6 {
  --team-bg: #f5e3ec;
  --team-fg: #8c2f5c;
}
.team-c7 {
  --team-bg: #ecece8;
  --team-fg: #44474a;
}
select.team-select[class*='team-c'],
.chip[class*='team-c'] {
  background-color: var(--team-bg);
  color: var(--team-fg);
}
.team-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
  background: var(--team-fg, var(--text));
}
.team-row {
  gap: 10px;
}
.team-row .team-name {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-weight: 600;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: inherit;
}
.team-row .team-name:focus {
  border-color: var(--accent-strong);
  outline: none;
}
.team-row .count {
  white-space: nowrap;
}
/* contrôles du master sur un joueur : rôle (+ équipe) + retrait */
.row-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
/* équipes rivales : 2e ligne sous le nom, colonnes identiques pour tous les joueurs */
.player-row:has(.row-controls.stacked) {
  flex-wrap: wrap;
  row-gap: 8px;
}
.row-controls.stacked {
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
  padding-left: 48px;
}
.row-controls.stacked select {
  width: 100%;
  min-width: 0;
  margin: 0;
  text-overflow: ellipsis;
}
.row-controls.stacked .icon-btn {
  justify-self: center;
}
