/* ============================================================
   HECM Parakou — Notifications "toast"
   Petites notifications flottantes, auto-disparition, empilables.
   Utilisation JS : hecmToast(message, type)  — type: success|error|warning|info
   ============================================================ */
.hecm-toast-stack {
    position: fixed;
    top: 84px;
    right: 18px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    width: calc(100vw - 36px);
    pointer-events: none;
}

.hecm-toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border-radius: 12px;
    padding: 13px 32px 13px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
    border-left: 4px solid #1a6b2f;
    transform: translateX(120%);
    opacity: 0;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .28s;
    overflow: hidden;
    font-family: 'Inter', Arial, sans-serif;
}
.hecm-toast.is-in { transform: translateX(0); opacity: 1; }
.hecm-toast.is-out { transform: translateX(120%); opacity: 0; }

.hecm-toast__icon {
    flex: none;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-top: 1px;
}
.hecm-toast__body { flex: 1; min-width: 0; }
.hecm-toast__title { font-size: .82rem; font-weight: 700; margin-bottom: 2px; color: #1a2e1d; }
.hecm-toast__msg { font-size: .8rem; color: #495057; line-height: 1.4; word-break: break-word; }

.hecm-toast__close {
    position: absolute; top: 8px; right: 8px;
    width: 22px; height: 22px; border: none; background: transparent;
    color: #adb5bd; font-size: 17px; line-height: 1; cursor: pointer;
    border-radius: 6px;
}
.hecm-toast__close:hover { background: #f1f3f5; color: #495057; }

.hecm-toast__bar {
    position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: currentColor; opacity: .35;
    transform-origin: left; animation: hecmToastShrink linear forwards;
}
@keyframes hecmToastShrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }

.hecm-toast--success { border-left-color: #1a6b2f; }
.hecm-toast--success .hecm-toast__icon { background: #e5f6ea; color: #1a6b2f; }
.hecm-toast--success .hecm-toast__bar { color: #1a6b2f; }

.hecm-toast--error { border-left-color: #d1373f; }
.hecm-toast--error .hecm-toast__icon { background: #fdeaea; color: #d1373f; }
.hecm-toast--error .hecm-toast__bar { color: #d1373f; }

.hecm-toast--warning { border-left-color: #c98a00; }
.hecm-toast--warning .hecm-toast__icon { background: #fff6e0; color: #c98a00; }
.hecm-toast--warning .hecm-toast__bar { color: #c98a00; }

.hecm-toast--info { border-left-color: #2b6cb0; }
.hecm-toast--info .hecm-toast__icon { background: #e8f1fb; color: #2b6cb0; }
.hecm-toast--info .hecm-toast__bar { color: #2b6cb0; }

@media print { .hecm-toast-stack { display: none !important; } }

@media (max-width: 480px) {
    .hecm-toast-stack { top: auto; bottom: 14px; right: 10px; left: 10px; max-width: none; width: auto; }
    .hecm-toast { transform: translateY(120%); }
    .hecm-toast.is-in { transform: translateY(0); }
    .hecm-toast.is-out { transform: translateY(120%); }
}
