/* 🌍 Style général */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: var(--bg, #121212);
  color: var(--text, #fff);
  transition: background 0.4s, color 0.4s;
}

#map {
  height: 100vh;
  width: 100%;
}

/* --- BARRE DU HAUT --- */
#controls {
  padding: 10px 16px;
  background: var(--panel, #1e1e1e);
  border-bottom: 2px solid var(--accent, #e91e63);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.left-controls,
.right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 🌍 Défilement bandeau pays */
#countryTicker {
  display: inline-block;
  white-space: nowrap;
  animation: scrollTicker 60s linear infinite;
}

@keyframes scrollTicker {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}


button {
  background: var(--accent, #e91e63);
  border: none;
  color: white;
  padding: 10px 18px;
  font-size: 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s;
}
button:hover {
  background: #c2185b;
  transform: scale(1.05);
}

/* --- CENTRE DU BANDEAU --- */
#info-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  gap: 4px;
  min-width: 200px;
}

#bandeau {
  background: var(--gradient, linear-gradient(90deg, #ff80ab, #ba68c8, #64b5f6));
  background-size: 300% 300%;
  color: white;
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  animation: gradientFlow 10s ease infinite alternate;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

#events {
  font-size: 13px;
  color: #ddd;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* --- NOTIFICATION --- */
#notif {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--accent, #e91e63), #9c27b0);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 999;
}
#notif.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}

/* --- THÈME MANUEL 🌗 --- */
:root[data-theme="light"] {
  --bg: #f3f3f3;
  --text: #111;
  --panel: #ffffff;
  --accent: #ff4081;
  --gradient: linear-gradient(90deg, #ff80ab, #ba68c8, #64b5f6);
}

:root[data-theme="dark"] {
  --bg: #121212;
  --text: #fff;
  --panel: #1e1e1e;
  --accent: #e91e63;
  --gradient: linear-gradient(90deg, #ff80ab, #ba68c8, #64b5f6);
}

/* 🌙 Bascule de thème */
#themeToggle {
  font-size: 18px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--accent, #e91e63);
  color: #fff;
  transition: 0.2s;
}
#themeToggle:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* 🟢🟠 Pastilles d’état */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.status-dot.waiting {
  background-color: #ffb300;
  animation: blink 1.2s infinite ease-in-out;
}
.status-dot.approved {
  background-color: #4caf50;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#countryScroll, #countryTicker {
  white-space: nowrap;
  overflow: hidden;
  display: block;
  color: #fff;
  font-size: 14px;
  animation: scrollFlags 40s linear infinite;
}

@keyframes scrollFlags {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}


/* 🌫️ Animation d’apparition */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 🗓️ Section des événements Discord */
#eventsSection {
  margin: 20px auto;
  max-width: 800px;
  background: var(--panel, #1e1e1e);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#eventsSection h2 {
  text-align: center;
  margin-bottom: 15px;
  color: var(--accent, #e91e63);
}

.events-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-card {
  background: rgba(255,255,255,0.05);
  border-left: 4px solid var(--accent, #e91e63);
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text, #fff);
  transition: 0.2s;
}
.event-card:hover {
  transform: scale(1.02);
  background: rgba(255,255,255,0.08);
}

/* 📱 Responsive */
@media (max-width: 768px) {
  #controls {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
  .left-controls,
  .right-controls {
    flex-wrap: wrap;
    justify-content: center;
  }
  button {
    padding: 8px 14px;
    font-size: 13px;
  }
  #info-center {
    order: -1;
    width: 100%;
    gap: 6px;
  }
  #bandeau {
    font-size: 13px;
    padding: 6px 10px;
  }
  #events {
    font-size: 12px;
  }
  #map {
    height: 80vh;
  }
}

#filters {
  background: #1e1e1e;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 2px solid #e91e63;
}
#filters select, #filters input, #filters button {
  background: #2b2b2b;
  color: white;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 5px 8px;
}
#filters button {
  background: #e91e63;
  cursor: pointer;
}
#filters button:hover {
  opacity: 0.9;
}
#countryStats {
  background: #151515;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 2px solid #e91e63;
  padding: 6px 0;
  font-size: 14px;
}
#countryScroll {
  display: inline-block;
  animation: scrollLeft 25s linear infinite;
}
@keyframes scrollLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

@media (max-width: 420px) {
  #bandeau { font-size: 12px; }
  #events { font-size: 11px; }
  button { font-size: 12px; padding: 6px 12px; }
}
#countryTickerContainer {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  background: linear-gradient(90deg, #1b1b1d, #222);
  border-top: 2px solid #e91e63;
  border-bottom: 2px solid #e91e63;
  padding: 8px 0;
}

#countryTicker {
  display: inline-block;
  animation: tickerScroll 35s linear infinite;
  color: white;
  font-size: 15px;
}

#countryScroll {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  font-size: 14px;
  color: #fff;
  padding: 6px 0;
  animation: scrollCountries 40s linear infinite;
}
#refreshInfoBtn {
  background: linear-gradient(90deg, #e91e63, #9c27b0);
  color: white;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.25s;
  display: none; /* caché par défaut */
}
#refreshInfoBtn:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

@keyframes scrollCountries {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}

@keyframes tickerScroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

/* ======================================================
   🌈 STYLE — Fenêtre de profil utilisateur
   ====================================================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #141418;
  border: 2px solid rgba(255, 0, 124, 0.6);
  border-radius: 16px;
  box-shadow: 0 0 25px rgba(255, 0, 124, 0.5);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  color: #fff;
  font-family: "Poppins", sans-serif;
}

.modal-content h2 {
  text-align: center;
  font-family: "Orbitron", sans-serif;
  color: #ff007c;
  margin-top: 0;
}

.modal-content h3 {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 1.5rem;
  color: #00e5ff;
  font-family: "Orbitron", sans-serif;
  font-weight: 500;
}

/* Formulaires */
.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-row label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #ddd;
  margin-bottom: 0.3rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border 0.3s, background 0.3s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #ff007c;
  background: #23232a;
}

.form-row textarea {
  resize: vertical;
  min-height: 60px;
  max-height: 160px;
}

/* Boutons */
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.save-btn,
.close-btn {
  flex: 1;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.save-btn {
  background: linear-gradient(90deg, #ff007c, #ff5cf0);
  color: white;
}

.save-btn:hover {
  background: linear-gradient(90deg, #ff5cf0, #ff007c);
  transform: scale(1.03);
}

.close-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.03);
}

/* Scroll stylé */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff007c, #00e5ff);
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 600px) {
  .modal-content {
    padding: 1.2rem;
  }
  .form-row label {
    font-size: 0.85rem;
  }
  .form-row input,
  .form-row select,
  .form-row textarea {
    font-size: 0.9rem;
  }
  .modal-actions {
    flex-direction: column;
  }
}
select[multiple] {
  height: auto;
  min-height: 80px;
  background: #1c1c22;
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
}

select[multiple] option {
  padding: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

select[multiple] option:checked {
  background: linear-gradient(90deg, #ff007c, #00e5ff);
  color: #fff;
  font-weight: 600;
}
select[multiple] {
  height: auto;
  min-height: 100px;
  background: #1c1c22;
  color: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px;
}

select[multiple] option {
  padding: 8px;
  margin: 2px 0;
  border-radius: 6px;
}

select[multiple] option:checked {
  background: linear-gradient(90deg, #ff007c, #00e5ff);
  color: #fff;
  font-weight: 600;
}

.hint {
  font-size: 0.8rem;
  color: #aaa;
  display: block;
  margin-top: 4px;
}

.profile-popup .leaflet-popup-content-wrapper {
  background: linear-gradient(145deg, #111016, #191922);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: #fff;
  box-shadow: 0 0 25px rgba(255, 0, 124, 0.4);
}

.profile-card {
  font-family: 'Poppins', sans-serif;
  text-align: center;
  padding: 10px 6px;
  color: #fff;
  animation: fadeIn 0.4s ease;
}

.profile-header {
  margin-bottom: 10px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid #ff007c;
  box-shadow: 0 0 10px #ff007c;
  margin-bottom: 6px;
}

.profile-name {
  font-family: 'Orbitron', sans-serif;
  color: #ff007c;
  font-size: 1.1rem;
  margin: 0;
}

.profile-discord {
  color: #00e5ff;
  font-size: 0.8rem;
  text-decoration: none;
}

.profile-body {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 10px 0;
  text-align: left;
  padding: 0 10px;
}

.profile-body b {
  color: #ff007c;
}

.profile-socials {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 1.4rem;
}

.profile-socials a,
.profile-socials span {
  color: #fff;
  transition: 0.3s;
}

.profile-socials a:hover { transform: scale(1.2); }

.profile-socials .ig { color: #e1306c; }
.profile-socials .tw { color: #1da1f2; }
.profile-socials .sc { color: #ffeb3b; font-size:0.9rem; }
.profile-socials .sp { color: #1db954; }

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(10px);}
  to {opacity: 1; transform: translateY(0);}
}
/* ===========================
   Popup profil style "maquette"
   =========================== */

.leaflet-popup-content-wrapper.lf-profile-popup {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  padding: 0;
}

.leaflet-popup-content {
  margin: 0;
}

.lf-profile-container {
  width: 260px;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111;
  padding: 10px 10px 12px;
}

.lf-profile-header {
  text-align: center;
  margin-bottom: 8px;
}

.lf-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid #ff007c;
  object-fit: cover;
}

.lf-username {
  margin-top: 4px;
  font-weight: 600;
  color: #ff007c;
  font-size: 14px;
}

.lf-discord-btn {
  display: inline-block;
  margin-top: 2px;
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 999px;
  background: #5865f2;
  color: #fff;
  text-decoration: none;
}

.lf-profile-title {
  text-align: center;
  margin: 4px 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.lf-profile-card {
  background: #202124;
  color: #f1f1f1;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
}

.lf-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.lf-label {
  font-weight: 600;
}

.lf-value {
  text-align: right;
  margin-left: 8px;
}

.lf-socials {
  margin-top: 6px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.lf-socials a,
.lf-socials span {
  font-size: 11px;
  text-decoration: none;
}

.lf-socials .ig { color: #e1306c; }
.lf-socials .tw { color: #1da1f2; }
.lf-socials .sc { color: #ffeb3b; }
.lf-socials .sp { color: #1db954; }

.lf-bio-block {
  margin-top: 10px;
  font-size: 12px;
}

.lf-bio-title {
  font-style: italic;
  font-weight: 600;
  margin-bottom: 3px;
}

.lf-bio-text {
  padding: 6px 8px;
  border-radius: 8px;
  background: #f5f5f5;
  max-height: 120px;
  overflow-y: auto;
}

.lf-member-status {
  margin-top: 8px;
  font-size: 11px;
  text-align: center;
}

.lf-member-status.ok {
  color: #2e7d32;
}

.lf-member-status.ko {
  color: #c62828;
}
