/* ============================================
   Radio Bandes Passantes — Elections 2026
   ============================================ */

/* Remove bottom player padding on this page */
.page-elections {
  padding-bottom: 0;
}

/* Override accent colors to neutral for political neutrality */
.page-elections .section-tag .line,
.page-elections .section-tag .line--purple {
  background: var(--text-primary);
}

.page-elections .section-tag span,
.page-elections .section-tag span.purple {
  color: var(--text-primary);
}

/* ============================
   ELECTIONS HERO
   ============================ */
.elections-hero {
  padding: 140px 120px 60px;
}

.elections-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.elections-hero__title {
  font-family: 'Sora', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -2px;
}

.elections-hero__subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 500px;
}

/* ============================
   PODCAST PLAYER WHITE VARIANT
   ============================ */
.podcast-player__play--white { background: var(--text-primary); color: var(--bg-dark); }
.podcast-player__bar-fill--white { background: var(--text-primary); }

/* ============================
   CANDIDATS GRID
   ============================ */
.candidats-section {
  padding: 40px 120px 80px;
}

.candidats-container {
  max-width: 1400px;
  margin: 0 auto;
}

.candidats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

/* ============================
   CANDIDAT CARD
   ============================ */
.candidat-card {
  background: var(--bg-elevated);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  width: calc(25% - 18px);
  min-width: 260px;
}

.candidat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--text-primary);
}

.candidat-image {
  width: 100%;
  height: 220px;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.candidat-image span {
  font-family: 'Sora', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.candidat-card:hover .candidat-image span {
  transform: scale(1.1);
}

.candidat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bg-dark);
}

.candidat-content {
  padding: 20px;
}

.candidat-nom {
  font-family: 'Sora', sans-serif;
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.candidat-parti {
  color: var(--bg-dark);
  background: var(--text-primary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
}

.view-more {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.3s;
}

.view-more::after {
  content: '\2192';
  transition: transform 0.3s ease;
}

.candidat-card:hover .view-more {
  color: var(--text-primary);
}

.candidat-card:hover .view-more::after {
  transform: translateX(5px);
}

/* ============================
   MODAL
   ============================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease, z-index 0s 0.4s;
  padding: 20px;
}

.modal-overlay.active {
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.4s ease, z-index 0s;
  backdrop-filter: blur(8px);
}

.modal-content {
  background: var(--bg-elevated);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  transform: scale(0.9) translateY(30px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 40px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.modal-image {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: 'Sora', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

.modal-info {
  flex: 1;
  padding-top: 10px;
}

.modal-nom {
  font-family: 'Sora', sans-serif;
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.modal-parti {
  color: var(--bg-dark);
  background: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.modal-description {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}

.modal-body {
  padding: 40px;
}

.modal-audio-section {
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border);
}

.modal-audio-title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-audio-section .podcast-player {
  margin-top: 0;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  color: var(--text-secondary);
}

.modal-close:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-dark);
  transform: rotate(90deg);
}

/* Modal scrollbar */
.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================
   CARTE INTERACTIVE
   ============================ */
.carte-section {
  padding: 80px 120px;
}

.carte-container {
  max-width: 1200px;
  margin: 0 auto;
}

.carte-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.carte-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

.carte-wrapper {
  background: var(--bg-elevated);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--border);
}

#map {
  width: 100%;
  height: 550px;
  border-radius: 16px;
  border: 1px solid var(--border);
  z-index: 1;
  position: relative;
}

#map .leaflet-tile-pane {
  filter: brightness(1.5);
}

.map-instruction {
  display: none;
  position: absolute;
  top: 12px;
  left: 77px;
  right: 12px;
  background: var(--bg-dark);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  z-index: 5;
  pointer-events: none;
  border: 1px solid var(--border);
  text-align: center;
}

.carte-legende {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  margin-top: 16px;
  letter-spacing: 0.5px;
}

/* Leaflet z-index fixes */
.leaflet-pane { z-index: 1 !important; }
.leaflet-top, .leaflet-bottom { z-index: 2 !important; }
.leaflet-control { z-index: 2 !important; }
.leaflet-popup { z-index: 3 !important; }
.leaflet-popup-pane { display: none !important; }
.leaflet-control-attribution { display: none !important; }

/* Custom markers */
.custom-marker-wrapper {
  background: none !important;
  border: none !important;
}

.custom-marker {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid var(--bg-dark);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.custom-marker:hover {
  transform: rotate(-45deg) scale(1.2);
  background: #ffffff;
}

.custom-marker.active {
  background: var(--text-secondary);
  box-shadow: 0 6px 20px rgba(160, 160, 184, 0.4);
  transform: rotate(-45deg) scale(1.3);
}

.marker-inner {
  width: 14px;
  height: 14px;
  background: var(--bg-dark);
  border-radius: 50%;
  transform: rotate(45deg);
}

.marker-number {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  background: var(--bg-dark);
  color: var(--text-primary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ============================
   INFO PANEL
   ============================ */
.info-panel {
  margin-top: 24px;
  background: var(--bg-surface);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  animation: fadeInPanel 0.4s ease;
}

.info-content {
  display: none;
}

.info-content.active {
  display: block;
  animation: fadeInPanel 0.5s ease;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.info-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.info-image-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: 'Sora', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid var(--border);
}

.info-details {
  flex: 1;
}

.info-nom {
  font-family: 'Sora', sans-serif;
  color: var(--text-primary);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.info-parti {
  color: var(--bg-dark);
  background: var(--text-primary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
}

.info-zone {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

.info-description {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.info-audio {
  background: var(--bg-dark);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--border);
}

.info-audio-label {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.info-audio .podcast-player {
  margin-top: 0;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1200px) {
  .candidat-card {
    width: calc(33.333% - 16px);
  }
}

@media (max-width: 980px) {
  .elections-hero {
    padding: 120px 48px 40px;
  }

  .candidats-section {
    padding: 40px 48px 60px;
  }

  .carte-section {
    padding: 60px 48px;
  }

  .candidat-card {
    width: calc(50% - 12px);
  }
}

@media (max-width: 768px) {
  .elections-hero {
    padding: 60px 24px 30px;
  }

  .elections-hero__title {
    font-size: 32px;
    letter-spacing: -1px;
  }

  .elections-hero__subtitle {
    font-size: 14px;
  }

  .candidats-section {
    padding: 30px 24px 50px;
  }

  .candidats-grid {
    gap: 16px;
  }

  .candidat-card {
    width: calc(50% - 8px);
    min-width: unset;
  }

  .carte-section {
    padding: 50px 24px;
  }

  .carte-wrapper {
    padding: 12px;
  }

  #map {
    height: 350px;
  }

  .map-instruction {
    display: block;
  }

  .info-header {
    flex-direction: column;
    text-align: center;
  }

  .info-panel {
    padding: 24px 16px;
  }

  .info-nom {
    font-size: 1.3rem;
  }

  /* Modal full screen mobile */
  .modal-overlay {
    padding: 0;
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-content {
    max-width: 100%;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    border: none;
    transform: scale(1) translateY(100%);
    overflow: visible;
  }

  .modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
  }

  .modal-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 70px 24px 30px;
  }

  .modal-image {
    width: 120px;
    height: 120px;
    font-size: 2.5rem;
  }

  .modal-nom {
    font-size: 1.6rem;
  }

  .modal-body {
    padding: 24px;
    background: var(--bg-elevated);
  }

  .modal-close {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    z-index: 10001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    background: var(--bg-dark);
  }
}

@media (max-width: 540px) {
  .candidat-card {
    width: 100%;
    max-width: 400px;
  }

  .candidat-image {
    height: 180px;
  }
}
