/* =========================================================
   Nuonat Core 2.0
   Members
   ========================================================= */

.nuonat-members-online,
.nuonat-members-online * {
  box-sizing: border-box;
}

.nuonat-members-online {
  --nm-primary: #5b72ea;
  --nm-primary-soft: rgba(91, 114, 234, 0.08);
  --nm-green: #28b76b;
  --nm-green-soft: rgba(40, 183, 107, 0.10);
  --nm-red: #ef4444;
  --nm-red-soft: rgba(239, 68, 68, 0.09);
  --nm-text: #202737;
  --nm-muted: #7b8497;
  --nm-border: #e8ebf2;
  --nm-bg: #ffffff;
}


/* =========================================================
   HERO
   ========================================================= */

.nm-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--nm-border);
  border-radius: 18px;
  box-shadow: 0 6px 22px rgba(30, 41, 59, 0.05);
}

.nm-hero-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.nm-hero-icon {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #fff;
  font-size: 20px;
  background: linear-gradient(135deg, #5b72ea, #45c985);
  box-shadow: 0 7px 18px rgba(91, 114, 234, 0.20);
}

.nm-hero-text {
  min-width: 0;
}

.nm-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--nm-primary);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.nm-hero-text h1 {
  margin: 0;
  color: var(--nm-text);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
}

.nm-hero-text p {
  margin: 4px 0 0;
  color: var(--nm-muted);
  font-size: 13px;
  line-height: 1.4;
}


/* =========================================================
   COMPTEURS
   ========================================================= */

.nm-stats {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-shrink: 0;
}

.nm-stat {
  min-width: 105px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--nm-border);
  border-radius: 13px;
  background: #fafbfe;
}

.nm-stat > i {
  width: 10px;
  color: var(--nm-primary);
  font-size: 10px;
  text-align: center;
}

.nm-stat-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  display: block;
  border-radius: 50%;
}

.nm-stat-dot-online {
  background: var(--nm-green);
  box-shadow: 0 0 0 4px var(--nm-green-soft);
}

.nm-stat-dot-live {
  background: var(--nm-red);
  box-shadow: 0 0 0 4px var(--nm-red-soft);
}

.nm-stat div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nm-stat strong {
  color: var(--nm-text);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 800;
}

.nm-stat span:not(.nm-stat-dot) {
  margin-top: 2px;
  color: var(--nm-muted);
  font-size: 10px;
  line-height: 1.1;
}


/* =========================================================
   FILTRES
   ========================================================= */

.nm-filter-card {
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--nm-border);
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(30, 41, 59, 0.04);
}

.nm-filter-form {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.7fr)
    minmax(110px, 0.8fr)
    minmax(115px, 0.9fr)
    minmax(115px, 0.9fr)
    minmax(130px, 1fr)
    auto;
  align-items: end;
  gap: 9px;
}

.nm-search {
  position: relative;
}

.nm-search > i {
  position: absolute;
  left: 13px;
  top: 50%;
  z-index: 2;
  color: #98a1b3;
  font-size: 13px;
  transform: translateY(-50%);
  pointer-events: none;
}

.nm-search input {
  width: 100%;
  height: 42px;
  padding: 0 13px 0 36px;
  color: var(--nm-text);
  font-size: 13px;
  background: #f8f9fc;
  border: 1px solid var(--nm-border);
  border-radius: 11px;
  outline: none;
  transition: 0.18s ease;
}

.nm-search input::placeholder {
  color: #a0a8b7;
}

.nm-search input:focus {
  background: #fff;
  border-color: rgba(91, 114, 234, 0.55);
  box-shadow: 0 0 0 3px var(--nm-primary-soft);
}

.nm-select {
  min-width: 0;
}

.nm-select label {
  display: block;
  margin: 0 0 5px 2px;
  color: #626c7f;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

.nm-select select {
  width: 100%;
  height: 42px;
  padding: 0 30px 0 11px;
  color: var(--nm-text);
  font-size: 12px;
  background-color: #f8f9fc;
  border: 1px solid var(--nm-border);
  border-radius: 11px;
  outline: none;
  cursor: pointer;
  transition: 0.18s ease;
}

.nm-select select:focus {
  background-color: #fff;
  border-color: rgba(91, 114, 234, 0.55);
  box-shadow: 0 0 0 3px var(--nm-primary-soft);
}

.nm-filter-submit {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 17px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--nm-primary);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(91, 114, 234, 0.18);
  transition: 0.18s ease;
}

.nm-filter-submit:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(91, 114, 234, 0.24);
}
/* Bouton Réinitialiser */

.nm-filter-reset {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  color: var(--nm-primary);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(91, 114, 234, 0.22);
  border-radius: 11px;
  cursor: pointer;
  transition: 0.18s ease;
}

.nm-filter-reset:hover {
  color: var(--nm-primary);
  text-decoration: none;
  background: var(--nm-primary-soft);
  border-color: rgba(91, 114, 234, 0.38);
  transform: translateY(-1px);
}

.nm-filter-reset i {
  font-size: 12px;
}

/* =========================================================
   ENTÊTE RÉSULTATS
   ========================================================= */

.nm-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 3px 10px;
  color: var(--nm-muted);
  font-size: 11px;
}

.nm-results-head strong {
  color: var(--nm-text);
  font-size: 12px;
}


/* =========================================================
   GRILLE MEMBRES
   ========================================================= */

.nm-members-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.nm-member-card {
  position: relative;
  min-width: 0;
  min-height: 124px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 12px;
  row-gap: 8px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--nm-border);
  border-radius: 16px;
  box-shadow: 0 5px 16px rgba(30, 41, 59, 0.045);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.nm-member-card:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 114, 234, 0.20);
  box-shadow: 0 9px 24px rgba(30, 41, 59, 0.08);
}


/* =========================================================
   AVATAR
   ========================================================= */

.nm-member-avatar-wrap {
  position: relative;
  grid-row: 1;
  grid-column: 1;
  align-self: start;
}

.nm-member-avatar {
  position: relative;
  width: 62px;
  height: 62px;
  display: block;
}

.nm-member-avatar img {
  width: 62px;
  height: 62px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 3px 10px rgba(30, 41, 59, 0.12);
}

.nm-presence-dot {
  position: absolute;
  right: 1px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.nm-presence-dot.is-online {
  background: var(--nm-green);
}

.nm-presence-dot.is-live {
  background: var(--nm-red);
}

.nm-live-badge {
  position: absolute;
  top: -7px;
  left: -5px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  color: #fff;
  font-size: 7px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.4px;
  background: var(--nm-red);
  border: 2px solid #fff;
  border-radius: 7px;
}


/* =========================================================
   INFORMATIONS MEMBRE
   ========================================================= */

.nm-member-content {
  min-width: 0;
  align-self: center;
}

.nm-member-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.nm-member-name > a {
  min-width: 0;
  overflow: hidden;
  color: var(--nm-primary);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nm-member-name > a:hover {
  text-decoration: underline;
}

.nm-verified {
  flex: 0 0 auto;
  color: #1478ff;
  font-size: 13px;
}

.nm-member-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  color: #687386;
  font-size: 10px;
  line-height: 1.3;
}

.nm-meta-separator {
  color: #b5bcc8;
}

.nm-member-status {
  margin-top: 5px;
  font-size: 9px;
  font-weight: 700;
}

.nm-status-online,
.nm-status-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nm-status-online {
  color: var(--nm-green);
}

.nm-status-live {
  color: var(--nm-red);
}

.nm-status-online > span,
.nm-status-live > span {
  width: 6px;
  height: 6px;
  display: block;
  border-radius: 50%;
}

.nm-status-online > span {
  background: var(--nm-green);
}

.nm-status-live > span {
  background: var(--nm-red);
}


/* =========================================================
   ACTIONS
   ========================================================= */

.nm-member-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #f0f2f6;
}

.nm-action-profile,
.nm-action-icon {
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #657086;
  background: #f7f8fb;
  border: 1px solid #eceef3;
  border-radius: 9px;
  text-decoration: none;
  transition: 0.16s ease;
}

.nm-action-profile {
  flex: 1;
  gap: 6px;
  padding: 0 10px;
  font-size: 10px;
  font-weight: 700;
}

.nm-action-icon {
  width: 32px;
  flex: 0 0 32px;
  padding: 0;
  font-size: 11px;
  cursor: pointer;
}

.nm-action-profile:hover,
.nm-action-icon:hover {
  color: var(--nm-primary);
  background: var(--nm-primary-soft);
  border-color: rgba(91, 114, 234, 0.16);
  text-decoration: none;
}


/* =========================================================
   AUCUN RÉSULTAT
   ========================================================= */

.nm-empty {
  padding: 50px 20px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--nm-border);
  border-radius: 16px;
}

.nm-empty-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--nm-primary);
  font-size: 19px;
  background: var(--nm-primary-soft);
  border-radius: 50%;
}

.nm-empty strong {
  display: block;
  color: var(--nm-text);
  font-size: 15px;
}

.nm-empty p {
  margin: 5px 0 12px;
  color: var(--nm-muted);
  font-size: 12px;
}

.nm-empty a {
  color: var(--nm-primary);
  font-size: 11px;
  font-weight: 700;
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 1199.98px) {

  .nm-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .nm-stats {
    width: 100%;
  }

  .nm-stat {
    flex: 1;
  }

  .nm-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nm-search {
    grid-column: span 2;
  }

  .nm-members-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

  .nm-hero {
    padding: 16px;
    border-radius: 14px;
  }

  .nm-hero-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
  }

  .nm-hero-text h1 {
    font-size: 18px;
  }

  .nm-hero-text p {
    font-size: 11px;
  }

  .nm-stats {
    gap: 5px;
  }

  .nm-stat {
    min-width: 0;
    padding: 8px;
  }

  .nm-stat strong {
    font-size: 14px;
  }

  .nm-stat span:not(.nm-stat-dot) {
    font-size: 8px;
  }

  .nm-filter-card {
    padding: 10px;
  }

  .nm-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .nm-search {
    grid-column: 1 / -1;
  }

  .nm-filter-submit {
    width: 100%;
  }
.nm-filter-reset {
  width: 100%;
}
  .nm-results-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .nm-members-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   TRÈS PETITS ÉCRANS
   ========================================================= */

@media (max-width: 420px) {

  .nm-hero-main {
    align-items: flex-start;
  }

  .nm-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nm-stat {
    gap: 5px;
  }

  .nm-stat > i,
  .nm-stat-dot {
    display: none;
  }

  .nm-filter-form {
    grid-template-columns: 1fr;
  }

  .nm-search {
    grid-column: auto;
  }
	}
/* =========================================================
   CARTE DES MEMBRES
   ========================================================= */

.nuonat-members-map {
  position: relative;
  width: 100%;
  height: 620px;
  min-height: 620px;
  overflow: hidden;
  background: #eef1f6;
  border: 1px solid var(--nm-border);
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(30, 41, 59, 0.05);
}

.nuonat-members-map .leaflet-container {
  width: 100%;
  height: 100%;
}

.nuonat-members-map-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--nm-muted);
  font-size: 13px;
  background: #f7f8fb;
}

.nuonat-members-map.leaflet-container {
  width: 100%;
  height: 620px;
  min-height: 620px;
  font-family: inherit;
}

.nuonat-members-map .leaflet-popup-content-wrapper {
  border-radius: 14px;
}

.nuonat-members-map .leaflet-popup-content {
  margin: 12px 14px;
}

@media (max-width: 1199.98px) {
  .nuonat-members-map,
  .nuonat-members-map.leaflet-container {
    height: 560px;
    min-height: 560px;
  }
}

@media (max-width: 767.98px) {
  .nuonat-members-map,
  .nuonat-members-map.leaflet-container {
    height: 500px;
    min-height: 500px;
    border-radius: 14px;
  }
}

@media (max-width: 420px) {
  .nuonat-members-map,
  .nuonat-members-map.leaflet-container {
    height: 440px;
    min-height: 440px;
  }
}
/* =========================================================
   MARQUEURS AVATARS - CARTE DES MEMBRES
   ========================================================= */

.nuonat-map-div-icon {
  background: transparent !important;
  border: 0 !important;
}

.nuonat-map-member-marker {
  position: relative;
  width: 42px;
  height: 42px;
}

.nuonat-map-member-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 42px;
  max-height: 42px;
  overflow: hidden;
  background: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(91, 114, 234, 0.28);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.nuonat-map-member-marker:hover .nuonat-map-member-avatar {
  z-index: 10;
  transform: scale(1.15);
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.34),
    0 0 0 2px rgba(91, 114, 234, 0.38);
}

.nuonat-map-member-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.nuonat-map-member-status {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  display: block;
  background: #28b76b;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.20);
}

.nuonat-map-member-status.is-online {
  background: #28b76b;
}

.nuonat-map-member-status.is-live {
  background: #ef4444;
}

.nuonat-map-member-marker.is-self .nuonat-map-member-avatar {
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.28),
    0 0 0 3px #5b72ea;
}

/* Popup */

.nuonat-member-popup {
  min-width: 190px;
}

.nuonat-member-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nuonat-member-popup-avatar {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.nuonat-member-popup-content {
  min-width: 0;
}

.nuonat-member-popup-name {
  display: block;
  overflow: hidden;
  color: #202737;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nuonat-member-popup-meta {
  margin-top: 3px;
  color: #7b8497;
  font-size: 11px;
}

.nuonat-member-popup-status {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 9px;
}
/* =========================================================
   VISIBILITÉ PERSONNELLE - CARTE DES MEMBRES
   ========================================================= */

.nm-map-visibility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--nm-border);
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(30, 41, 59, 0.05);
}

.nm-map-visibility-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nm-map-visibility-indicator {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #aab1bf;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.nm-map-visibility-indicator.is-visible {
  background: #28b76b;
}

.nm-map-visibility-indicator.is-hidden {
  background: #aab1bf;
}

.nm-map-visibility-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.nm-map-visibility-text strong {
  color: #202737;
  font-size: 14px;
  font-weight: 800;
}

.nm-map-visibility-text span {
  color: var(--nm-muted);
  font-size: 12px;
  line-height: 1.4;
}

.nm-map-visibility-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease;
}

.nm-map-visibility-button.is-visible {
  color: #b42318;
  background: #fff1f0;
}

.nm-map-visibility-button.is-hidden {
  color: #137a46;
  background: #edf9f2;
}

.nm-map-visibility-button:hover {
  transform: translateY(-1px);
}

.nm-map-visibility-button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.nm-map-visibility.has-error {
  border-color: #e45858;
}

@media (max-width: 767.98px) {
  .nm-map-visibility {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .nm-map-visibility-button {
    width: 100%;
  }
}

/* =========================================================
   SNGINE 4.3 — MODE SOMBRE
   ========================================================= */
body.night-mode .nuonat-members-online {
  --nm-text: var(--body-color-dark, #d9e2ea);
  --nm-muted: #9ea9b4;
  --nm-border: var(--card-dark-divider, #36414a);
  --nm-bg: var(--card-dark-color, #20272d);
}
body.night-mode .nuonat-members-online .nm-hero,
body.night-mode .nuonat-members-online .nm-filter-card,
body.night-mode .nuonat-members-online .nm-member-card,
body.night-mode .nuonat-members-online .nm-empty {
  background: var(--card-dark-color, #20272d);
  border-color: var(--nm-border);
}
body.night-mode .nuonat-members-online .nm-stat,
body.night-mode .nuonat-members-online .nm-search input,
body.night-mode .nuonat-members-online .nm-select select,
body.night-mode .nuonat-members-online .nm-action-profile,
body.night-mode .nuonat-members-online .nm-action-icon {
  background: var(--card-dark-input, #263039);
  border-color: var(--nm-border);
  color: var(--nm-text);
}
body.night-mode .nuonat-members-online .nm-search input:focus,
body.night-mode .nuonat-members-online .nm-select select:focus {
  background: var(--card-dark-input, #263039);
}
body.night-mode .nuonat-members-online .nm-hero-text h1,
body.night-mode .nuonat-members-online .nm-stat strong,
body.night-mode .nuonat-members-online .nm-results-head strong,
body.night-mode .nuonat-members-online .nm-empty strong {
  color: var(--nm-text);
}
body.night-mode .nuonat-members-online .nm-select label,
body.night-mode .nuonat-members-online .nm-member-meta {
  color: var(--nm-muted);
}
body.night-mode .nuonat-members-online .nm-member-actions {
  border-color: var(--nm-border);
}
body.night-mode .nuonat-members-online .nm-member-avatar img,
body.night-mode .nuonat-members-online .nm-presence-dot,
body.night-mode .nuonat-members-online .nm-live-badge {
  border-color: var(--card-dark-color, #20272d);
}
body.night-mode .nuonat-members-online .nm-filter-reset {
  background: var(--card-dark-input, #263039);
  border-color: var(--nm-border);
}
body.night-mode .nuonat-members-online .nm-action-profile:hover,
body.night-mode .nuonat-members-online .nm-action-icon:hover,
body.night-mode .nuonat-members-online .nm-filter-reset:hover {
  background: var(--card-dark-hover, #303a43);
}

