/* ═══════════════════════════════════════ */
/* NOTIFICATIONS & TOASTS                 */
/* ═══════════════════════════════════════ */

.notifications-container {
    /* Valeurs de repli pour les pages hors dashboard (ex. formulaire public)
       où ces variables ne sont pas définies. Sur le dashboard, :root garde la priorité. */
    --green: #16a34a;    --green-bg: #f0fdf4;
    --red: #dc2626;      --red-bg: #fef2f2;
    --orange: #ea580c;   --orange-bg: #fff7ed;
    --navy: #044074;     --navy-xlight: #e8f1fa;

    position: fixed;
    top: calc(var(--header-h, 64px) + 16px);
    right: 16px;
    z-index: 1000;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
    animation-fill-mode: forwards;
}

.notification.notification-exit {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* Status variants */
.notification-success {
    background: var(--green-bg);
    border-color: rgba(22, 163, 74, 0.2);
    color: var(--green);
}

.notification-success .notification-icon {
    color: var(--green);
}

.notification-error {
    background: var(--red-bg);
    border-color: rgba(220, 38, 38, 0.2);
    color: var(--red);
}

.notification-error .notification-icon {
    color: var(--red);
}

.notification-info {
    background: var(--navy-xlight);
    border-color: rgba(4, 64, 116, 0.2);
    color: var(--navy);
}

.notification-info .notification-icon {
    color: var(--navy);
}

.notification-warning {
    background: var(--orange-bg);
    border-color: rgba(234, 88, 12, 0.2);
    color: var(--orange);
}

.notification-warning .notification-icon {
    color: var(--orange);
}

.notification-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.notification-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.2;
}

.notification-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-title {
    font-weight: 600;
    font-size: 13px;
}

.notification-message {
    font-size: 12px;
    opacity: 0.9;
}

.notification-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

.notification-close svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Responsive */
@media (max-width: 640px) {
    .notifications-container {
        left: 16px;
        right: 16px;
        max-width: none;
    }

    .notification {
        padding: 10px 14px;
    }
}
