/*!
 * demo.css — Styles du kit de démonstration (bandeau + notifications).
 * À copier dans <demo>/assets/css/demo.css et à charger APRÈS styles.css.
 * Personnalisation facultative par site, sur :root :
 *   --msd-accent   couleur d'accent (défaut : la couleur d'accent du site si elle s'appelle --color-accent)
 *   --msd-font     police (défaut : celle du site)
 */
.msd-badge {
  --_accent: var(--msd-accent, var(--color-accent, #e0a526));
  position: fixed;
  inset-inline-start: 12px;
  inset-block-end: 12px;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-inline-size: min(560px, calc(100vw - 24px));
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: rgb(17 19 24 / 0.92);
  color: #f5f3ee;
  font: 500 13px/1.3 var(--msd-font, inherit);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25), 0 0 0 1px rgb(255 255 255 / 0.08) inset;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: msd-in 0.5s 0.6s both cubic-bezier(0.2, 0.8, 0.2, 1);
}
.msd-badge__text { display: flex; align-items: center; gap: 8px; margin: 0; }
.msd-badge__text strong { font-weight: 700; }
.msd-badge__name { white-space: nowrap; font-weight: 700; color: var(--_accent); }
.msd-badge__dot {
  flex: none;
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--_accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--_accent) 25%, transparent);
}
.msd-badge__link {
  flex: none;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--_accent);
  color: #111318;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.msd-badge__link:hover { filter: brightness(1.08); }
.msd-badge__close {
  flex: none;
  display: grid;
  place-items: center;
  inline-size: 30px;
  block-size: 30px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  color: inherit;
  cursor: pointer;
}
.msd-badge__close:hover { background: rgb(255 255 255 / 0.2); }
.msd-badge :focus-visible,
.msd-toast :focus-visible { outline: 2px solid var(--_accent, #e0a526); outline-offset: 2px; }

@media (max-width: 560px) {
  .msd-badge { inset-inline-end: 12px; border-radius: 16px; flex-wrap: wrap; padding: 10px 10px 10px 14px; }
  .msd-badge__text { flex: 1 1 100%; padding-inline-end: 34px; }
  .msd-badge__close { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; }
}

.msd-toasts {
  position: fixed;
  inset-block-start: 16px;
  inset-inline-end: 16px;
  z-index: 2147483001;
  display: grid;
  gap: 10px;
  inline-size: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.msd-toast {
  --_accent: var(--msd-accent, var(--color-accent, #e0a526));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 14px;
  background: #fff;
  color: #1b1d22;
  font: 400 14px/1.45 var(--msd-font, inherit);
  box-shadow: 0 18px 40px rgb(0 0 0 / 0.18), 0 0 0 1px rgb(0 0 0 / 0.06);
  pointer-events: auto;
  animation: msd-in 0.35s both cubic-bezier(0.2, 0.8, 0.2, 1);
}
.msd-toast.is-leaving { animation: msd-out 0.22s both ease-in; }
.msd-toast__icon { display: grid; place-items: center; inline-size: 34px; block-size: 34px; border-radius: 10px; background: #eef2ff; color: #3949ab; }
.msd-toast--success .msd-toast__icon { background: #e6f6ec; color: #1b7a43; }
.msd-toast--error .msd-toast__icon { background: #fdecec; color: #b42318; }
.msd-toast__body strong { display: block; font-weight: 700; margin-block-end: 2px; }
.msd-toast__body p { margin: 0; color: #4a4f59; }
.msd-toast__close { display: grid; place-items: center; inline-size: 28px; block-size: 28px; border: 0; border-radius: 8px; background: transparent; color: #4a4f59; cursor: pointer; }
.msd-toast__close:hover { background: #f1f2f4; }

@keyframes msd-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes msd-out { to { opacity: 0; transform: translateY(-6px) scale(0.98); } }

@media (prefers-reduced-motion: reduce) {
  .msd-badge, .msd-toast, .msd-toast.is-leaving { animation: none; }
}
@media print { .msd-badge, .msd-toasts { display: none !important; } }
