/* ==========================================================================
   Ligues page — layout locked to user mock_1.png
   Compact band under nav + two equal cards (map | panel) high on viewport
   ========================================================================== */

/* --- Nav row: full-width menu (breadcrumb only under menu via header-crumb-row) --- */
.nav-row-inner {
  gap: 0.75rem;
}
.nav-row-inner > .site-nav {
  width: 100%;
  flex: 1;
  min-width: 0;
}
/* Removed from layout — path lives under the menu only */
.ligues-crumb {
  display: none !important;
}
@media (max-width: 1099px) {
  .nav-row-inner > .site-nav {
    width: 100%;
    flex: none;
  }
}

/* --- Title band: title + single-line subtitle, dead center --- */
.ligues-context-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #050505;
  padding: 0.45rem 0 0.55rem;
}
.ligues-context-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ligues-context-title {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.ligues-context-title h1 {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.15;
  color: #f4f4f4;
  text-align: center;
}
/* Single row, dead center under title — no wrap */
.ligues-sub {
  display: block;
  margin: 0.32rem auto 0;
  padding: 0 0.5rem;
  max-width: 100%;
  font-size: clamp(0.68rem, 1.15vw, 0.78rem);
  line-height: 1.3;
  color: #8e8e8e;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 720px) {
  .ligues-sub {
    white-space: nowrap;
    font-size: 0.65rem;
  }
}

/* --- Main: map + panel immediately under band --- */
.ligues-main {
  padding: 0;
}
.ligues-map-section {
  padding: 0.55rem 0 0.85rem;
  border-bottom: none;
}
.ligues-map-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: stretch;
}
@media (min-width: 900px) {
  .ligues-map-layout {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    min-height: min(58vh, 460px);
    height: min(58vh, 460px);
  }
}

/* Shared card chrome (mock: dark rounded equal panels) */
.map-shell,
.league-panel {
  background: #0c0c0c;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.map-shell {
  position: relative;
  padding: 0.75rem 0.9rem 0.7rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 320px;
}
@media (min-width: 900px) {
  .map-shell {
    min-height: 0;
    height: 100%;
  }
}

.map-shell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}
.map-shell-head h2 {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e8c872;
  font-weight: 750;
  margin: 0;
}
.map-hint {
  font-size: 0.7rem;
  color: #6e6e6e;
  margin: 0;
  font-weight: 500;
}

/* Body: chips left + map right (mock) */
.map-body {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.55rem;
  min-height: 0;
}

/* Map fills the remaining space — real outline PNG + SVG region overlay */
.map-canvas {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  position: relative;
}
.map-stack {
  position: relative;
  width: auto;
  height: 100%;
  max-height: min(52vh, 400px);
  aspect-ratio: 473 / 710;
  max-width: 100%;
}
@media (min-width: 900px) {
  .map-stack {
    max-height: 100%;
    height: 100%;
  }
}

/* Base outline: real Cameroon admin map (transparent bg, gold borders) */
.cmr-outline-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  z-index: 2;
  opacity: 0.95;
}

/* Interactive regions sit under the outline so borders stay crisp.
   CSS mask = filled national silhouette so colours never spill outside the real outline. */
.cmr-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  -webkit-mask-image: url("../img/cameroon_map_mask.png");
  mask-image: url("../img/cameroon_map_mask.png");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.cmr-map .region {
  cursor: pointer;
  stroke: transparent;
  stroke-width: 0;
  fill-opacity: 0.82;
  transition: fill 0.2s ease, fill-opacity 0.2s ease, filter 0.2s ease;
}
.cmr-map .region.status-active { fill: #1a7a4c; }
.cmr-map .region.status-coordination { fill: #e8c872; }
/* Sub-leagues — mild yellow, softer than coordination gold */
.cmr-map .region.status-subleague { fill: #b8a86a; }
.cmr-map .region.status-pending,
.cmr-map .region.status-structuring { fill: #3a3a3a; }
.cmr-map .region:hover {
  fill-opacity: 0.95;
  filter: brightness(1.12) drop-shadow(0 0 8px rgba(232, 200, 114, 0.4));
}
.cmr-map .region.is-selected {
  fill-opacity: 1;
  animation: region-pulse 1.8s ease-in-out infinite;
}
@keyframes region-pulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(26, 122, 76, 0.55)) brightness(1.06); }
  50% { filter: drop-shadow(0 0 16px rgba(232, 200, 114, 0.55)) brightness(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .cmr-map .region.is-selected {
    animation: none;
    filter: drop-shadow(0 0 10px rgba(26, 122, 76, 0.5));
  }
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  padding: 0.28rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 650;
  color: #fff;
  background: rgba(12, 12, 12, 0.94);
  border: 1px solid rgba(232, 200, 114, 0.4);
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -120%);
  transition: opacity 0.15s ease;
}
.map-tooltip.is-on { opacity: 1; }

/* Legend — subtle under map (not in mock; keep tiny) */
.map-legend {
  display: none;
}

/* Right panel — full-height photo | role · name · bio + badge (mock) */
.league-panel {
  padding: 0;
  min-height: 320px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
@media (min-width: 900px) {
  .league-panel {
    min-height: 0;
    height: 100%;
  }
}
.league-panel.is-open {
  border-color: rgba(232, 200, 114, 0.35);
}
.league-panel:not(.is-open) {
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.league-panel-empty {
  margin: auto;
  text-align: center;
  color: #5a5a5a;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 2rem 1rem;
}
.league-panel-pending {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 1.15rem 1.25rem;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
}
.league-panel-pending h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 750;
}
.league-panel-media {
  flex: 0 0 46%;
  max-width: 46%;
  min-width: 0;
  align-self: stretch;
  background: #0a0a0a;
  position: relative;
}
.league-panel-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.league-panel-photo-ph {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(26, 122, 76, 0.2), #111);
  color: var(--text-dim);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.league-panel-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1rem 1.1rem 1.15rem;
  position: relative;
}
.league-panel-info .status-badge {
  align-self: flex-end;
  margin-bottom: 0.35rem;
}
.league-panel-role {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: #e8c872;
  line-height: 1.3;
}
.league-panel-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f4f4f4;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.league-panel-bio {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #9a9a9a;
}
/* CTA: dead-center near bottom of bio column — FECABI green + gold (Members style) */
.league-panel-cta-wrap {
  width: 100%;
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.league-panel-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem 0.65rem 1.45rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #fff !important;
  background: var(--green);
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  cursor: pointer;
  box-shadow:
    0 4px 16px rgba(26, 122, 76, 0.35),
    0 0 0 1px rgba(232, 200, 114, 0.12);
  transition:
    background 0.18s ease,
    transform 0.15s ease,
    box-shadow 0.18s ease;
}
.league-panel-cta:hover {
  background: var(--green-hover);
  color: #fff !important;
  box-shadow:
    0 6px 22px rgba(26, 122, 76, 0.45),
    0 0 18px rgba(232, 200, 114, 0.22);
}
.league-panel-cta:active {
  transform: scale(0.98);
}
.league-panel-cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.league-panel-cta-icon {
  display: inline-flex;
  color: var(--gold);
  margin-top: 1px;
}
.league-panel-cta:hover .league-panel-cta-icon {
  animation: league-cta-bounce 0.9s ease infinite;
}
@keyframes league-cta-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
@media (prefers-reduced-motion: reduce) {
  .league-panel-cta:hover .league-panel-cta-icon {
    animation: none;
  }
}
.league-panel-pending .league-panel-cta-wrap {
  margin-top: auto;
  padding-top: 1rem;
}
.league-panel-secondary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
}
.league-panel-photo-sm {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(232, 200, 114, 0.4);
  flex-shrink: 0;
}
.league-panel-role-sm {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}
.league-panel-name-sm {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e8e8e8;
}
@media (max-width: 640px) {
  .league-panel.is-open {
    flex-direction: column;
  }
  .league-panel-media {
    flex: none;
    max-width: none;
    width: 100%;
    height: 200px;
  }
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-badge.active {
  color: #b8e6c8;
  background: rgba(26, 122, 76, 0.22);
  border-color: rgba(26, 122, 76, 0.5);
}
.status-badge.coordination {
  color: #1a1508;
  background: rgba(232, 200, 114, 0.85);
  border-color: rgba(232, 200, 114, 0.9);
}
.status-badge.subleague {
  color: #1a1508;
  background: rgba(184, 168, 106, 0.9);
  border-color: rgba(184, 168, 106, 0.95);
}
.status-badge.pending,
.status-badge.structuring {
  color: #c0c0c0;
  background: rgba(80, 80, 80, 0.45);
  border-color: rgba(120, 120, 120, 0.45);
}

.president-block {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0.65rem 0.85rem;
  padding: 0.7rem;
  background: rgba(8, 8, 8, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.president-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(232, 200, 114, 0.4);
  background: #0d0d0d;
}
.president-photo-ph {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(232, 200, 114, 0.35);
  background: linear-gradient(145deg, rgba(26, 122, 76, 0.2), #111);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  padding: 0.2rem;
}
.president-meta .label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.president-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}
.president-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}
.president-bio {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.clubs-block .label,
.activity-block .label {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.clubs-scroll {
  max-height: 110px;
  overflow-y: auto;
}
.clubs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.club-chip {
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 550;
  color: var(--text);
  background: rgba(26, 122, 76, 0.12);
  border: 1px solid rgba(26, 122, 76, 0.35);
  border-radius: 999px;
}
.clubs-note {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 0.35rem;
}
.activity-list {
  list-style: none;
  display: grid;
  gap: 0.28rem;
  padding: 0;
  margin: 0;
}
.activity-list li {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-left: 0.85rem;
  position: relative;
  line-height: 1.35;
}
.activity-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.struct-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0.65rem;
  background: rgba(8, 8, 8, 0.5);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-mid);
}

/* Far-left region chips inside map box — sized so all 10 fit without scroll */
.region-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.22rem;
  flex-shrink: 0;
  width: 6.15rem;
  max-height: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0.05rem 0.05rem 0.05rem 0;
}
.region-list-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  padding: 0.22rem 0.4rem;
  text-align: center;
  border: 1.5px solid rgba(232, 200, 114, 0.55);
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
/* Status fills — match map colours */
.region-list-btn.status-active {
  background: #1a7a4c;
  color: #f4fff8;
  border-color: rgba(232, 200, 114, 0.65);
}
.region-list-btn.status-coordination {
  background: #e8c872;
  color: #1a1508;
  border-color: rgba(232, 200, 114, 0.9);
}
.region-list-btn.status-subleague {
  background: #b8a86a;
  color: #1a1508;
  border-color: rgba(184, 168, 106, 0.85);
}
.region-list-btn.status-pending,
.region-list-btn.status-structuring {
  background: #3a3a3a;
  color: #d0d0d0;
  border-color: rgba(232, 200, 114, 0.35);
}
.region-list-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 10px rgba(232, 200, 114, 0.28);
}
.region-list-btn.is-selected {
  box-shadow: 0 0 0 2px #fff, 0 0 12px rgba(232, 200, 114, 0.45);
  transform: translateX(1px);
}
.region-list-btn .mini-status {
  display: none; /* mock shows name only in the pill */
}

@media (max-width: 560px) {
  .map-body {
    flex-direction: column;
  }
  .region-list {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    gap: 0.25rem;
    padding: 0 0 0.3rem;
  }
  .region-list-btn {
    width: auto;
    flex: 0 0 auto;
    min-height: auto;
    padding: 0.28rem 0.48rem;
    font-size: 0.62rem;
  }
}

/* ---------- Bottom league stage: subject | carousel ----------
   Same .container + same 1fr|1fr + same gap as .ligues-map-layout
   so carousel right edge lines up with president panel above. */
.league-stage {
  padding: 0.35rem 0 2rem;
  border-top: none;
  background: #050505;
}
.league-stage[hidden] {
  display: none !important;
}
.league-stage-grid {
  display: grid;
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
}
@media (min-width: 900px) {
  .league-stage-grid {
    /* Match .ligues-map-layout exactly */
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    align-items: stretch;
  }
}
.league-stage-copy {
  display: grid;
  grid-template-rows: 48px minmax(0, auto);
  row-gap: 0.75rem;
  max-width: none;
  min-width: 0;
  align-content: start;
  padding: 0.35rem 0.15rem 0 0;
}
.league-stage-body h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f4f4f4;
  line-height: 1.2;
}
/* Right column: fixed viewport height so large posters don't blow the layout */
.league-stage-carousel.stage-carousel,
.league-stage-carousel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: min(52vh, 420px);
  max-height: min(52vh, 420px);
  min-height: 240px;
  aspect-ratio: auto;
  justify-self: stretch;
  box-sizing: border-box;
}
.league-stage-carousel .stage-viewport {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1e1e1e;
  background: #0a0a0a;
}
.league-stage-carousel .stage-slide-card {
  min-height: 240px;
  height: 100%;
}
/* Contained posters (letterbox) — double-click/tap opens full size */
.league-stage-carousel .stage-slide-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
}
.league-stage-carousel .league-stage-slide-img {
  width: 100%;
  height: 100%;
  max-height: min(52vh, 420px);
  object-fit: contain;
  object-position: center;
  display: block;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.league-stage-carousel .stage-slide {
  background: #0a0a0a;
  height: 100%;
}

/* Full-size image lightbox */
.league-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
}
.league-lightbox[hidden] {
  display: none !important;
}
body.league-lightbox-open {
  overflow: hidden;
}
.league-lightbox-img {
  max-width: min(96vw, 1100px);
  max-height: min(86vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
  cursor: default;
}
.league-lightbox-close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(232, 200, 114, 0.45);
  background: rgba(12, 12, 12, 0.9);
  color: #e8c872;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.league-lightbox-close:hover {
  background: var(--gold);
  color: #050505;
}
.league-lightbox-hint {
  margin: 0;
  font-size: 0.72rem;
  color: #8a8a8a;
}
