/* Riing — affinage des toasts (rails_toastify), chargé après rails_toastify.css */

:root {
  --toastify-toast-width: min(26rem, calc(100vw - 2rem));
  --toastify-toast-min-height: 3.25rem;
  --toastify-toast-bd-radius: 0.75rem;
  --toastify-toast-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 12px 32px -8px rgba(15, 23, 42, 0.14);
  --toastify-font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
  --toastify-color-success: #15803d;
  --toastify-color-error: #b91c1c;
  --toastify-color-info: #1d4ed8;
  --toastify-color-warning: #c2410c;
  /* barre de progression par défaut : discret au lieu du dégradé arc-en-ciel */
  --toastify-color-progress-light: rgba(15, 23, 42, 0.12);
}

.toast {
  padding: 0.75rem 0.875rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.toast-body {
  padding: 0.25rem 0.375rem 0.25rem 0.125rem;
  gap: 0.75rem;
}

.toast-message {
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 500;
  color: inherit;
}

.toast-icon {
  width: 1.375rem;
  height: 1.375rem;
}

/* Thème clair + type : fond légèrement teinté, texte lisible */
.toast-light.toast-type-success {
  background: #f0fdf4;
  color: #14532d;
  border-color: #bbf7d0;
}

.toast-light.toast-type-error {
  background: #fef2f2;
  color: #7f1d1d;
  border-color: #fecaca;
}

.toast-light.toast-type-info {
  background: #eff6ff;
  color: #1e3a8a;
  border-color: #bfdbfe;
}

.toast-light.toast-type-warning {
  background: #fffbeb;
  color: #78350f;
  border-color: #fde68a;
}

.toast-light .close-icon {
  color: rgba(15, 23, 42, 0.45);
  opacity: 1;
  border-radius: 0.375rem;
}

.toast-light .close-icon:hover,
.toast-light .close-icon:focus {
  color: rgba(15, 23, 42, 0.75);
  background: rgba(15, 23, 42, 0.06);
  opacity: 1;
}

.toast-light .progress-bar-success {
  background: linear-gradient(90deg, rgba(21, 128, 61, 0.35), rgba(21, 128, 61, 0.65));
}

.toast-light .progress-bar-error {
  background: linear-gradient(90deg, rgba(185, 28, 28, 0.35), rgba(185, 28, 28, 0.65));
}

.toast-light .progress-bar-info {
  background: linear-gradient(90deg, rgba(29, 78, 216, 0.35), rgba(29, 78, 216, 0.65));
}

.toast-light .progress-bar-warning {
  background: linear-gradient(90deg, rgba(194, 65, 12, 0.35), rgba(194, 65, 12, 0.65));
}
