/* ==========================================================================
   Sites 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.sites-page so Ligues keeps status colours.
 */
body.sites-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.sites-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.sites-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.sites-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.sites-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.sites-page .cmr-map .region.is-selected {
  fill: #1a7a4c !important;
  fill-opacity: 1 !important;
  stroke: #e8c872 !important;
  stroke-width: 1.25 !important;
  animation: sites-region-pulse 1.8s ease-in-out infinite !important;
}
@keyframes sites-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.sites-page .cmr-map .region.is-selected {
    animation: none !important;
    filter: drop-shadow(0 0 10px rgba(26, 122, 76, 0.5)) !important;
  }
}

.sites-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) */
#sites-panel.is-open {
  flex-direction: column;
}
.sites-panel-count {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--gold);
  margin: 0.35rem 0 0.5rem;
}
.sites-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;
}
.sites-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;
}
.sites-panel-pending-list {
  font-size: 0.84rem;
  color: #8a8a8a;
  margin: 0.5rem 0 0.85rem;
  line-height: 1.45;
}

/* Gallery */
.sites-gallery-section {
  padding: 1.75rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #050505;
}
.sites-gallery-section[hidden] {
  display: none !important;
}
.sites-gallery-head {
  text-align: center;
  margin-bottom: 1.25rem;
}
.sites-gallery-head h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: #f4f4f4;
}
.sites-gallery-sub {
  font-size: 0.88rem;
  color: #8a8a8a;
  margin: 0;
}
.sites-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.site-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;
}
.site-gallery-item:hover {
  border-color: rgba(232, 200, 114, 0.4);
  transform: translateY(-2px);
}
.site-gallery-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #080808;
  overflow: hidden;
}
.site-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.site-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;
}
.site-gallery-ph[hidden] {
  display: none !important;
}
.site-gallery-ph img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  opacity: 0.85;
}
.site-gallery-ph span {
  font-size: 0.82rem;
  font-weight: 650;
  color: #c8c8c8;
  line-height: 1.3;
}
.site-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;
}
.sites-gallery-empty {
  text-align: center;
  color: #7a7a7a;
  font-size: 0.92rem;
  padding: 2rem 1rem;
  margin: 0;
}
.sites-gallery-empty[hidden] {
  display: none !important;
}

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