/* Toasts globaux — chargé par layouts/client-popup ; recopié dans app-layout.css pour le layout principal. */
#toast-container {
        position: fixed;
        top: max(1.15rem, env(safe-area-inset-top, 0px));
        left: 50%;
        transform: translateX(-50%);
        z-index: 10050;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.65rem;
        width: min(92vw, 26rem);
        max-width: 96vw;
        pointer-events: none;
    }
    @media (min-width: 769px) {
        #toast-container {
            width: min(88vw, 28rem);
        }
        .toast-notification {
            padding: 0.85rem 0.65rem 0.85rem 1rem;
        }
        .toast-notification .toast-notification__message {
            font-size: 1rem;
        }
    }
    .toast-notification {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 0.65rem;
        width: 100%;
        padding: 0.72rem 0.55rem 0.72rem 0.85rem;
        border-radius: 999px;
        color: #fff;
        background: rgba(34, 36, 32, 0.541);
        border: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow:
            0 14px 38px rgba(0, 0, 0, 0.28),
            0 1px 0 rgba(255, 255, 255, 0.08) inset;
        backdrop-filter: blur(22px) saturate(180%);
        -webkit-backdrop-filter: blur(22px) saturate(180%);
        animation: toastGlassIn 0.42s cubic-bezier(0.22, 1, 0.36, 1);
        pointer-events: auto;
    }
    .toast-notification.toast-error {
        background: rgba(36, 32, 32, 0.541);
        border-color: rgba(255, 255, 255, 0.14);
    }
    .toast-notification.toast-info {
        background: rgba(36, 35, 32, 0.541);
        border-color: rgba(255, 255, 255, 0.14);
    }
    .toast-notification .toast-notification__icon {
        flex-shrink: 0;
        width: 1.55rem;
        height: 1.55rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
    .toast-notification .toast-notification__icon--success {
        background: rgba(52, 199, 89, 0.22);
        color: #4cd964;
    }
    .toast-notification .toast-notification__icon--error {
        background: rgba(255, 59, 48, 0.22);
        color: #ff6961;
    }
    .toast-notification .toast-notification__icon--info {
        background: rgba(255, 149, 0, 0.22);
        color: #ffb340;
    }
    .toast-notification .toast-notification__icon svg {
        width: 0.95rem;
        height: 0.95rem;
        display: block;
    }
    .toast-notification .toast-notification__message {
        flex: 1;
        min-width: 0;
        font-size: 0.9375rem;
        font-weight: 600;
        letter-spacing: -0.01em;
        line-height: 1.25;
    }
    .toast-notification__close {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.5rem;
        height: 1.5rem;
        margin-left: 0.1rem;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: transparent;
        color: rgba(255, 255, 255, 0.45);
        font-size: 1.05rem;
        line-height: 1;
        cursor: pointer;
        transition: color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    }
    .toast-notification__close:hover,
    .toast-notification__close:focus {
        color: rgba(255, 255, 255, 0.85);
        background: rgba(255, 255, 255, 0.1);
        outline: none;
    }
    .toast-notification.slide-out {
        animation: toastGlassOut 0.32s cubic-bezier(0.4, 0, 1, 1) forwards;
    }
    @keyframes toastGlassIn {
        from {
            opacity: 0;
            transform: translateY(-14px) scale(0.94);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    @keyframes toastGlassOut {
        from {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
        to {
            opacity: 0;
            transform: translateY(-10px) scale(0.96);
        }
    }
    @media (max-width: 768px) {
        #toast-container {
            top: max(0.85rem, env(safe-area-inset-top, 0px));
            width: 96vw;
            min-width: min(88vw, 20rem);
            gap: 0.75rem;
        }
        .toast-notification {
            gap: 0.75rem;
            padding: 0.95rem 0.6rem 0.95rem 1rem;
            min-height: 3.25rem;
        }
        .toast-notification .toast-notification__icon {
            width: 1.75rem;
            height: 1.75rem;
        }
        .toast-notification .toast-notification__icon svg {
            width: 1.05rem;
            height: 1.05rem;
        }
        .toast-notification .toast-notification__message {
            font-size: 0.975rem;
            line-height: 1.35;
        }
        .toast-notification__close {
            width: 1.65rem;
            height: 1.65rem;
            font-size: 1.15rem;
        }
    }
