/* ─────────────────────────────────────────────────────────────────────────────
 * Scout — Notifications (smartphone-style toasts)
 * Conforme à first-design §18
 * ───────────────────────────────────────────────────────────────────────────── */

.notifications-stack {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    z-index: var(--z-notification);
    pointer-events: none;
}

@media (max-width: 640px) {
    .notifications-stack {
        top: var(--space-4);
        left: var(--space-4);
        right: var(--space-4);
    }
}

.notif {
    pointer-events: auto;
    position: relative;
    width: 360px;
    max-width: 100%;
    min-height: 64px;
    display: grid;
    grid-template-columns: 40px 1fr 32px;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-2xl);
    background: var(--surface-glass-strong);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slide-in-right 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top right;
}

@media (max-width: 640px) {
    .notif {
        width: 100%;
        animation-name: slide-in-down;
    }
}

.notif--leaving {
    animation: notif-out 200ms ease-in forwards;
}
@keyframes notif-out {
    to { opacity: 0; transform: scale(0.96); }
}

.notif__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}
.notif__icon--success { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.notif__icon--info    { background: rgba(59, 130, 246, 0.15); color: var(--color-info); }
.notif__icon--warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.notif__icon--danger  { background: rgba(244, 63, 94, 0.15);  color: var(--color-danger); }

.notif__body { min-width: 0; }
.notif__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.notif__desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif__close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}
.notif__close:hover {
    background: var(--surface-secondary);
    color: var(--text-primary);
}

.notif__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(to right, var(--color-brand-primary), rgba(99, 102, 241, 0.5));
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
    animation: shrink var(--notif-duration, 5000ms) linear forwards;
}
@keyframes shrink { from { width: 100%; } to { width: 0; } }
