/* Toast Hostrix partagé : conserver ce fichier identique sur web, panel et admin. */
/* Les anciens retours Bootstrap sont consommés par toasts.js. On les masque dès
   le premier rendu pour éviter qu'un grand bandeau ne clignote avant le toast. */
html.hx-js .alert:not([data-hx-alert-static]) { display:none !important; }
.hx-toast-source { display:none !important; }

.hx-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12000;
  display: flex;
  width: min(360px, calc(100vw - 24px));
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.hx-toast {
  --hx-toast-accent: #0d6efd;
  --hx-toast-soft: #e8f1ff;
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px 12px 14px;
  overflow: hidden;
  color: #182033;
  background: #fff;
  border: 1px solid rgba(24,32,51,.08);
  border-radius: 13px;
  box-shadow: 0 10px 30px rgba(24,32,51,.18);
  pointer-events: auto;
  animation: hx-toast-in .22s ease-out both;
}
.hx-toast[data-type="success"] { --hx-toast-accent:#17a673; --hx-toast-soft:#e4f7f0; }
.hx-toast[data-type="danger"],
.hx-toast[data-type="error"] { --hx-toast-accent:#ff4057; --hx-toast-soft:#fde8ec; }
.hx-toast[data-type="warning"] { --hx-toast-accent:#e79a10; --hx-toast-soft:#fff2d8; }
.hx-toast[data-type="info"] { --hx-toast-accent:#1677ff; --hx-toast-soft:#e8f1ff; }
.hx-toast__icon {
  display:grid; place-items:center; width:42px; height:42px;
  color:var(--hx-toast-accent); background:var(--hx-toast-soft);
  border-radius:10px; font-size:20px;
}
.hx-toast__content { min-width:0; }
.hx-toast__title { margin:0 0 3px; font-size:14px; font-weight:700; line-height:1.25; }
.hx-toast__message { margin:0; color:#6d7687; font-size:13px; line-height:1.35; overflow-wrap:anywhere; }
.hx-toast__close {
  align-self:start; display:grid; place-items:center; width:28px; height:28px;
  padding:0; color:#737d8c; background:transparent; border:0; border-radius:7px;
  font-size:19px; cursor:pointer;
}
.hx-toast__close:hover { color:#182033; background:rgba(24,32,51,.06); }
.hx-toast__progress {
  position:absolute; right:0; bottom:0; left:0; height:3px;
  background:var(--hx-toast-accent); transform-origin:left center;
  animation:hx-toast-progress var(--hx-toast-duration) linear forwards;
}
.hx-toast.is-paused .hx-toast__progress { animation-play-state:paused; }
.hx-toast.is-leaving { animation:hx-toast-out .18s ease-in both; }
@keyframes hx-toast-in { from { opacity:0; transform:translateY(12px) scale(.98); } }
@keyframes hx-toast-out { to { opacity:0; transform:translateX(18px) scale(.98); } }
@keyframes hx-toast-progress { from { transform:scaleX(1); } to { transform:scaleX(0); } }
[data-bs-theme="dark"] .hx-toast {
  color:#f3f5f8; background:#17191d; border-color:rgba(255,255,255,.09);
  box-shadow:0 12px 34px rgba(0,0,0,.42);
}
[data-bs-theme="dark"] .hx-toast__message { color:#9ca5b5; }
[data-bs-theme="dark"] .hx-toast__close { color:#aab2bf; }
[data-bs-theme="dark"] .hx-toast__close:hover { color:#fff; background:rgba(255,255,255,.08); }
[data-bs-theme="dark"] .hx-toast[data-type="success"] { --hx-toast-soft:rgba(23,166,115,.16); }
[data-bs-theme="dark"] .hx-toast[data-type="danger"],
[data-bs-theme="dark"] .hx-toast[data-type="error"] { --hx-toast-soft:rgba(255,64,87,.16); }
[data-bs-theme="dark"] .hx-toast[data-type="warning"] { --hx-toast-soft:rgba(231,154,16,.16); }
[data-bs-theme="dark"] .hx-toast[data-type="info"] { --hx-toast-soft:rgba(22,119,255,.16); }
@media (max-width:575.98px) { .hx-toast-stack { right:12px; bottom:12px; left:12px; width:auto; } }
@media (prefers-reduced-motion:reduce) { .hx-toast,.hx-toast.is-leaving { animation-duration:.01ms; } }
