/*
  Studio 36 — Notifications / toasts (design.md §5.9). Icone + couleur
  semantique + texte (jamais la couleur seule). Auto-dismiss et aria-live
  geres par toast.js.
*/

.toast-region {
  position: fixed;
  z-index: 300;
  bottom: var(--space-5);
  right: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: min(380px, calc(100vw - var(--space-8)));
}

@media (max-width: 767px) {
  .toast-region {
    right: var(--space-4);
    left: var(--space-4);
    bottom: var(--space-4);
    width: auto;
  }
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--elevation-3-shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-standard) var(--ease-out), transform var(--duration-standard) var(--ease-out);
}

.toast[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

.toast__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.toast__body {
  flex: 1;
  font-size: var(--text-body-sm-size);
  line-height: var(--text-body-sm-line);
  color: var(--text-primary);
}

.toast--success .toast__icon {
  color: var(--success);
}

.toast--error .toast__icon {
  color: var(--error);
}

.toast--warning .toast__icon {
  color: var(--warning);
}

.toast--info .toast__icon {
  color: var(--accent);
}

.toast__close {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: opacity 80ms linear;
    transform: none;
  }
}
