/* Membres — filtre popover */
.members-filter-popover {
  position: fixed;
  z-index: 10002;
  max-width: min(360px, calc(100vw - 32px));
}

.members-filter-popover[hidden] {
  display: none;
}

.members-filter-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

.members-filter-panel h3 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 700;
}

.members-filter-field {
  display: block;
  margin-bottom: 14px;
}

.members-filter-field span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}

.members-filter-field input,
.members-filter-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.members-filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.members-filter-actions .profile-btn-primary,
.members-filter-actions .profile-btn-outline {
  flex: 1;
  margin: 0;
}

.members-empty {
  padding: 48px 24px;
  text-align: center;
  color: #6b7280;
  font-size: 15px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px dashed #e5e7eb;
}

.members-toolbar {
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 640px) {
  .members-actions {
    width: 100%;
    justify-content: stretch;
  }

  .members-actions .action-btn,
  .members-actions .invite-btn {
    flex: 1;
    min-height: 44px;
  }
}

/* Calendrier */
.cal-event-dot {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--accent, #80348a);
  border-radius: 50%;
  margin: 4px auto 0;
}

.cal-cell.has-event .cal-event-dot,
.cal-cell.selected {
  cursor: pointer;
}

.cal-cell.selected:not(.today) {
  background: rgba(32, 58, 124, 0.08);
  border-radius: 8px;
}

.cal-cell[data-cal-day]:hover {
  background: rgba(32, 58, 124, 0.06);
  border-radius: 8px;
}

#page-calendar.cal-view-list .calendar-grid {
  display: none;
}

#page-calendar.cal-view-list .events-list {
  margin-top: 0;
}

.events-list {
  margin-top: 24px;
}

.events-list-empty {
  color: var(--text-muted, #6b7280);
  font-size: 14px;
  margin-top: 20px;
}

.events-list-day-hint {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-title, #22202b);
  margin-bottom: 12px;
}

.events-clear-day {
  border: none;
  background: none;
  color: var(--primary, #203a7c);
  font-weight: 600;
  cursor: pointer;
  margin-left: 8px;
  font-size: 13px;
}

.event-list-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
}

.event-list-card strong {
  display: block;
  margin-bottom: 4px;
}

.event-list-card small {
  color: var(--text-muted, #6b7280);
}

.event-list-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

.event-delete-btn {
  background: none;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

/* Carte — pins membres */
.map-pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-member-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

.map-member-pin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #203a7c, #80348a);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(32, 58, 124, 0.35);
  overflow: hidden;
}

.map-member-pin-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-member-pin-label {
  font-size: 11px;
  font-weight: 600;
  color: #203a7c;
  background: rgba(255, 255, 255, 0.95);
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-member-pin::before {
  content: "";
  position: absolute;
  bottom: 28px;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(32, 58, 124, 0.15);
  animation: mapPinPulse 2s ease-out infinite;
  z-index: -1;
}

@keyframes mapPinPulse {
  0% {
    transform: translateX(-50%) scale(0.5);
    opacity: 0.8;
  }
  100% {
    transform: translateX(-50%) scale(1.4);
    opacity: 0;
  }
}

.map-notice[hidden] {
  display: none;
}
