/* 
 * Notification System - CINEHOME
 * Basé sur les principes d'usabilité de Nielsen
 * 1. Visibility of system status
 * 2. User control and freedom
 * 3. Consistency and standards
 */

.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.notification {
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left: 4px solid #5555FF;
  min-width: 320px;
  max-width: 400px;
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.3s ease;
}

.notification.hiding {
  animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateX(450px);
}

/* Types de notifications */
.notification.success {
  border-left-color: #22c55e;
}

.notification.error {
  border-left-color: #ef4444;
}

.notification.warning {
  border-left-color: #f59e0b;
}

.notification.info {
  border-left-color: #3b82f6;
}

/* Icône */
.notification-icon {
  width: 24px;
  height: 24px;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-top: 2px;
}

.notification.success .notification-icon {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.notification.error .notification-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.notification.warning .notification-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.notification.info .notification-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.notification-icon svg {
  width: 16px;
  height: 16px;
}

/* Contenu */
.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.notification-message {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

/* Bouton de fermeture */
.notification-close {
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-top: 2px;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.notification-close svg {
  width: 14px;
  height: 14px;
}

/* Barre de progression */
.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #5555FF, #7676f7);
  border-radius: 0 0 12px 12px;
  animation: progressBar 5s linear;
}

.notification.success .notification-progress {
  background: linear-gradient(90deg, #22c55e, #10b981);
}

.notification.error .notification-progress {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.notification.warning .notification-progress {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.notification.info .notification-progress {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

/* Animations */
@keyframes slideInRight {
  from {
    transform: translateX(450px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(450px);
    opacity: 0;
  }
}

@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Hover state */
.notification:hover .notification-progress {
  animation-play-state: paused;
}

/* Responsive */
@media (max-width: 768px) {
  .notification-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .notification {
    min-width: auto;
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .notification {
    padding: 14px 16px;
    gap: 10px;
  }

  .notification-title {
    font-size: 13px;
  }

  .notification-message {
    font-size: 12px;
  }

  .notification-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }

  .notification-icon svg {
    width: 14px;
    height: 14px;
  }
}
