/* toast.css — pile de notifications légères en bas à droite. */

#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100100;          /* au-dessus de la nav (100000) */
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;     /* container pass-through, chaque toast réactive */
    max-width: calc(100vw - 40px);
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 420px;
    padding: 12px 14px 12px 14px;
    border-radius: 10px;
    background: var(--surface-1, #1a1a1d);
    color: var(--text-primary, #f5f5f5);
    border: 1px solid var(--border, #333);
    border-left-width: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    font-size: 0.92rem;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    cursor: pointer;
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.toast.toast-visible { transform: translateX(0); opacity: 1; }
.toast.toast-leaving { transform: translateX(110%); opacity: 0; }

.toast i.fas { font-size: 1.05rem; flex-shrink: 0; line-height: 1; }
.toast .toast-text { flex: 1; line-height: 1.35; word-break: break-word; }

.toast-close {
    background: transparent;
    border: 0;
    color: inherit;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.15s;
}
.toast-close:hover { opacity: 1; }

/* Variantes couleur (bordure gauche + icône) */
.toast-info    { border-left-color: var(--info, #3498db); }
.toast-info    i.fas { color: var(--info, #3498db); }

.toast-success { border-left-color: var(--success, #2ecc71); }
.toast-success i.fas { color: var(--success, #2ecc71); }

.toast-warning { border-left-color: var(--warning, #f1c40f); }
.toast-warning i.fas { color: var(--warning, #f1c40f); }

.toast-error   { border-left-color: var(--danger, #e74c3c); }
.toast-error   i.fas { color: var(--danger, #e74c3c); }

/* Mobile : pleine largeur, ancré en bas */
@media (max-width: 600px) {
    #toast-container {
        bottom: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }
    .toast { min-width: 0; max-width: none; width: 100%; }
}
