/* ==========================================================================
   Athletes page — reuses ligues top half; gallery bottom
   ========================================================================== */

/*
 * Bare dark theme (entry): chips + map regions dark by default.
 * Green only on .is-selected — Bureau org-chart style.
 * Scoped to body.athletes-page so Ligues keeps status colours.
 */
body.athletes-page .region-list-btn {
  background: rgba(14, 14, 14, 0.95) !important;
  color: #f0f0f0 !important;
  border: 1.5px solid #1a7a4c !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
}
body.athletes-page .region-list-btn:hover {
  border-color: #e8c872 !important;
  color: #fff !important;
  background: rgba(22, 22, 22, 0.98) !important;
  box-shadow: 0 0 0 1px rgba(232, 200, 114, 0.22), 0 0 14px rgba(232, 200, 114, 0.16) !important;
  filter: none !important;
}
body.athletes-page .region-list-btn.is-selected {
  background: #1a7a4c !important;
  color: #fff !important;
  border-color: #e8c872 !important;
  box-shadow:
    0 0 0 2px rgba(232, 200, 114, 0.55),
    0 0 16px rgba(26, 122, 76, 0.45) !important;
  transform: none !important;
  filter: none !important;
}

/* Map: bare dark; green only when selected */
body.athletes-page .cmr-map .region {
  fill: #1c1c1c !important;
  fill-opacity: 0.95 !important;
  stroke: rgba(232, 200, 114, 0.28) !important;
  stroke-width: 1 !important;
  filter: none !important;
  animation: none !important;
}
body.athletes-page .cmr-map .region:hover {
  fill: #2a2a2a !important;
  fill-opacity: 1 !important;
  stroke: rgba(232, 200, 114, 0.55) !important;
  filter: drop-shadow(0 0 8px rgba(232, 200, 114, 0.25)) !important;
}
body.athletes-page .cmr-map .region.is-selected {
  fill: #1a7a4c !important;
  fill-opacity: 1 !important;
  stroke: #e8c872 !important;
  stroke-width: 1.25 !important;
  animation: athletes-region-pulse 1.8s ease-in-out infinite !important;
}
@keyframes athletes-region-pulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(26, 122, 76, 0.55)) brightness(1.05); }
  50% { filter: drop-shadow(0 0 16px rgba(232, 200, 114, 0.45)) brightness(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  body.athletes-page .cmr-map .region.is-selected {
    animation: none !important;
    filter: drop-shadow(0 0 10px rgba(26, 122, 76, 0.5)) !important;
  }
}

/* Idle right panel: same login-slot catalog, A–Z, until a region is selected */
#athletes-panel.league-panel.is-login-rotate {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}
.ath-login-rotate {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 280px;
  background: #070907;
}
.ath-login-rotate__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.ath-login-rotate__img.is-on {
  opacity: 1;
}
.ath-login-rotate__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.55rem 0.8rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #f4f4f4;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}
.ath-login-rotate__cap[hidden] {
  display: none !important;
}

.athletes-panel-info-full {
  width: 100%;
  flex: 1;
  padding: 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 100%;
  box-sizing: border-box;
}
/* Clubs panel: single column (no president photo half) */
#athletes-panel.is-open {
  flex-direction: column;
}
.athletes-panel-count {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--gold);
  margin: 0.35rem 0 0.5rem;
}
.athletes-panel-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  max-height: min(38vh, 280px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.athletes-panel-list li {
  font-size: 0.88rem;
  color: #e8e8e8;
  padding: 0.45rem 0.65rem;
  background: rgba(8, 8, 8, 0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
  line-height: 1.3;
}
.athletes-panel-pending-list {
  font-size: 0.84rem;
  color: #8a8a8a;
  margin: 0.5rem 0 0.85rem;
  line-height: 1.45;
}

/* Gallery */
.athletes-gallery-section {
  padding: 1.75rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #050505;
}
.athletes-gallery-section[hidden] {
  display: none !important;
}
.athletes-gallery-head {
  text-align: center;
  margin-bottom: 1.25rem;
}
.athletes-gallery-head h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: #f4f4f4;
}
.athletes-gallery-sub {
  font-size: 0.88rem;
  color: #8a8a8a;
  margin: 0;
}
.athletes-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.ath-gallery-item {
  margin: 0;
  background: #0a0a0a;
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.ath-gallery-item:hover {
  border-color: rgba(232, 200, 114, 0.4);
  transform: translateY(-2px);
}
.ath-gallery-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #080808;
  overflow: hidden;
}
.ath-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.ath-gallery-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  background:
    linear-gradient(160deg, rgba(26, 122, 76, 0.12), transparent 55%),
    #0a0a0a;
  text-align: center;
}
.ath-gallery-ph[hidden] {
  display: none !important;
}
.ath-gallery-ph img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: 0.85;
}
.ath-gallery-ph span {
  font-size: 0.82rem;
  font-weight: 650;
  color: #c8c8c8;
  line-height: 1.3;
}
.ath-gallery-item figcaption {
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: #f0f0f0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.3;
}
.athletes-gallery-empty {
  text-align: center;
  color: #7a7a7a;
  font-size: 0.92rem;
  padding: 2rem 1rem;
  margin: 0;
}
.athletes-gallery-empty[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .athletes-gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .ath-gallery-item figcaption {
    font-size: 0.78rem;
    padding: 0.5rem 0.55rem;
  }
}
