/* Toasts bas-droite (succès / erreur / info / warning) */
.pem-toast-root {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.pem-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  max-width: 420px;
  padding: 0.85rem 0.95rem 0.85rem 1.1rem;
  border-radius: 12px;
  color: #fff;
  background: #2b2b2b;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.pem-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pem-toast.is-hiding {
  opacity: 0;
  transform: translateY(8px);
}

.pem-toast--success {
  background: #1f7a45;
}

.pem-toast--error {
  background: #c0392b;
}

.pem-toast--warning {
  background: #b7791f;
}

.pem-toast--info {
  background: #2b2b2b;
}

.pem-toast__msg {
  flex: 1 1 auto;
  font-size: 0.925rem;
  line-height: 1.4;
  padding-top: 0.05rem;
}

.pem-toast__close {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.85;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0 0.15rem;
  cursor: pointer;
  margin-top: -0.1rem;
}

.pem-toast__close:hover,
.pem-toast__close:focus {
  opacity: 1;
  outline: none;
}

@media (max-width: 1199.98px) {
  .pem-toast-root {
    bottom: 4.75rem; /* au-dessus du footer mobile */
  }
}

@media (max-width: 575.98px) {
  .pem-toast-root {
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
    align-items: stretch;
  }

  .pem-toast {
    max-width: none;
  }
}
