/* Toasts globaux TalentGN (public, zadmin, backoffice) */
.tg-toast-stack {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  z-index: 10050;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  max-width: 100%;
}

.tg-toast {
  pointer-events: auto;
  width: 100%;
  max-width: min(400px, calc(100vw - 40px));
  background: var(--tg-surface-elevated, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.tg-toast--entering {
  transform: translateX(24px);
  opacity: 0;
}

.tg-toast--leaving {
  transform: translateX(16px);
  opacity: 0;
  pointer-events: none;
}

.tg-toast--clickable {
  cursor: pointer;
}

.tg-toast--clickable:hover {
  border-color: rgba(20, 184, 166, 0.45);
}

.tg-toast-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}

.tg-toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tg-toast--success .tg-toast-icon {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.tg-toast--success {
  border-color: rgba(34, 197, 94, 0.35);
}

.tg-toast--error .tg-toast-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.tg-toast--error {
  border-color: rgba(239, 68, 68, 0.35);
}

.tg-toast--warning .tg-toast-icon {
  background: rgba(250, 204, 21, 0.12);
  color: #facc15;
}
.tg-toast--warning {
  border-color: rgba(250, 204, 21, 0.3);
}

.tg-toast--info .tg-toast-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}
.tg-toast--info {
  border-color: rgba(59, 130, 246, 0.3);
}

.tg-toast-content {
  flex: 1;
  min-width: 0;
}

.tg-toast-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tg-white, #f8fafc);
  letter-spacing: 0.02em;
}

.tg-toast-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--tg-muted-light, #cbd5e1);
  word-break: break-word;
}

.tg-toast-close {
  background: none;
  border: none;
  color: var(--tg-muted, #94a3b8);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 4px;
}

.tg-toast-close:hover {
  color: var(--tg-white, #fff);
  background: rgba(255, 255, 255, 0.06);
}

/* zAdmin / backoffice variables */
.zadmin-body .tg-toast,
body[class*="backoffice"] .tg-toast {
  background: var(--za-surface-2, #161b22);
  border-color: rgba(255, 255, 255, 0.08);
}

.zadmin-body .tg-toast-title,
body[class*="backoffice"] .tg-toast-title {
  color: var(--za-text, #e6edf3);
}

.zadmin-body .tg-toast-body,
body[class*="backoffice"] .tg-toast-body {
  color: var(--za-muted, #8b949e);
}

/* Anciens bandeaux messages — masqués si le JS charge */
.site-messages,
.za-messages,
.content > .messages,
.auth-page-msg,
.kyc-flash:not(.kyc-flash--keep),
.ob-alerts,
.lf-alert,
.signup-errors:not(.signup-errors--keep),
.login-box .errorlist {
  display: none !important;
}

@media (max-width: 640px) {
  .tg-toast-stack {
    bottom: 12px;
    right: 12px;
    left: 12px;
    align-items: stretch;
  }
  .tg-toast {
    max-width: none;
  }
}
