/* ============================================
   Notification Styles
   Toast / notification d'arrivée (optionnel)
   ============================================ */
.notification {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification[style*="display: block"] {
  display: flex !important;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes notificationPopIn {
  from {
    transform: scale(0.7) rotate(-5deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) rotate(2deg);
  }
  to {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.notification-content {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
  backdrop-filter: blur(30px);
  padding: 48px 40px;
  border-radius: 20px;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: notificationPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 420px;
  width: 90%;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

.notification-content h3 {
  margin-bottom: 16px;
  font-size: 28px;
  font-weight: 700;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.notification-content p {
  margin-bottom: 32px;
  font-size: 16px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  opacity: 0.95;
}

.notification-content .btn {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.notification-content .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Popup libellé lieu – affiche le libellé puis disparaît */
.location-label-popup {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  max-width: 90%;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.location-label-popup.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.location-label-popup.fade-out {
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
}

/* ============================================
   Error / Information Popup
   Popup d'erreur ou d'information (ex. "Vous êtes déjà dans Accueil")
   ============================================ */
.error-popup-overlay {
  position: fixed;
  z-index: 1003;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.error-popup-overlay[style*="display: flex"] {
  display: flex !important;
}

.error-popup {
  background: linear-gradient(135deg, rgba(26, 29, 41, 0.98) 0%, rgba(30, 33, 50, 0.98) 100%);
  backdrop-filter: blur(24px);
  padding: 32px 36px;
  border-radius: 0 0 20px 20px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-color);
  border: 1px solid var(--border-color);
  animation: modalSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.error-popup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e74c3c, #e67e22);
  border-radius: 0;
}

.error-popup-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.95;
}

.error-popup-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.error-popup-message {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.error-popup-close {
  min-width: 120px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Tags loading overlay
   Affiché pendant la création ou la suppression des repères (tags)
   ============================================ */
.tags-loading-overlay {
  position: fixed;
  z-index: 1002;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.tags-loading-overlay[style*="display: flex"] {
  display: flex !important;
}

.tags-loading-box {
  background: rgba(26, 29, 41, 0.95);
  backdrop-filter: blur(16px);
  padding: 24px 32px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-color);
  border: 1px solid var(--border-color);
  min-width: 260px;
}

.tags-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--primary-color, #4a90d9);
  border-radius: 50%;
  animation: rotate 0.8s linear infinite;
}

.tags-loading-message {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}
