/* Toast de notification pour les mises à jour - NvsDevs Portfolio */

.update-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #1a2425 0%, #2a3435 50%, #1a2425 100%);
  color: #e8b377;
  padding: 16px 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 400px;
  z-index: 999999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
  backdrop-filter: blur(10px);
  border: 2px solid #e8b377;
  outline: none;
}

.update-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.update-toast.hide {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
}

/* Icône de mise à jour */
.update-toast-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: rgba(232, 179, 119, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-update 2s ease-in-out infinite;
}

.update-toast-icon svg {
  width: 18px;
  height: 18px;
  fill: #e8b377;
}

@keyframes pulse-update {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Contenu */
.update-toast-content {
  flex: 1;
  min-width: 0;
}

.update-toast-title {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px 0;
  line-height: 1.4;
  color: #e8b377;
}

.update-toast-message {
  font-size: 13px;
  margin: 0;
  opacity: 0.9;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

/* Bouton d'action */
.update-toast-action {
  flex-shrink: 0;
}

.update-toast-btn {
  background: #e8b377;
  color: #1a2425;
  border: none;
  outline: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.update-toast-btn:hover {
  background: #f0c18e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 179, 119, 0.3);
}

.update-toast-btn:active {
  transform: translateY(0);
  background: #d9a566;
  box-shadow: 0 2px 6px rgba(232, 179, 119, 0.2);
}

/* Bouton de fermeture */
.update-toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: #e8b377;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0.7;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-toast-close:hover {
  opacity: 1;
  background: rgba(232, 179, 119, 0.15);
}

.update-toast-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Variantes de couleur */
.update-toast.success {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  border-color: #38ef7d;
}

.update-toast.info {
  background: linear-gradient(135deg, #1a2425 0%, #2a3435 50%, #1a2425 100%);
  border-color: #e8b377;
}

.update-toast.warning {
  background: linear-gradient(135deg, #1a2425 0%, #3a2a1a 50%, #1a2425 100%);
  border-color: #f09364;
}

/* Barre de progression */
.update-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(232, 179, 119, 0.2);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.update-toast-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #e8b377 0%, #f0c18e 100%);
  width: 100%;
  transform-origin: left;
  animation: progress-shrink 10s linear forwards;
}

@keyframes progress-shrink {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .update-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
    padding: 14px 16px;
  }

  .update-toast-title {
    font-size: 13px;
  }

  .update-toast-message {
    font-size: 12px;
  }

  .update-toast-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Animation d'entrée alternative */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mode sombre automatique */
@media (prefers-color-scheme: dark) {
  .update-toast {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  }
}

/* Réduction des animations pour les utilisateurs qui préfèrent */
@media (prefers-reduced-motion: reduce) {
  .update-toast,
  .update-toast.show,
  .update-toast.hide {
    transition: opacity 0.2s ease;
    transform: none;
  }

  .update-toast-icon {
    animation: none;
  }

  .update-toast-progress-bar {
    animation: none;
  }
}
