/* Système de notifications toaster */

.toaster_conteneur {
    position: fixed;
    top: 20px;
    right: 20px;
    /* Au-dessus des modales (ex. facturation AE ~10050, modales.css ~10000) */
    z-index: 10200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toaster {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: all;
    animation: toaster_entree 0.3s ease-out;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.toaster.toaster_sortie {
    opacity: 0;
    transform: translateX(400px);
}

/* Animations */
@keyframes toaster_entree {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Icône */
.toaster_icone {
    font-size: 24px;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Contenu */
.toaster_contenu {
    flex: 1;
    color: var(--text-color);
}

.toaster_titre {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.toaster_message {
    font-size: 13px;
    line-height: 1.4;
    color: var(--secondary-color);
}

/* Bouton fermeture */
.toaster_fermer {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toaster_fermer:hover {
    color: var(--text-color);
}

/* Types de toaster */
.toaster.toaster_success {
    border-left: 4px solid #22c55e;
}

.toaster.toaster_success .toaster_icone {
    color: #22c55e;
}

.toaster.toaster_error {
    border-left: 4px solid #ef4444;
}

.toaster.toaster_error .toaster_icone {
    color: #ef4444;
}

.toaster.toaster_warning {
    border-left: 4px solid #f59e0b;
}

.toaster.toaster_warning .toaster_icone {
    color: #f59e0b;
}

.toaster.toaster_info {
    border-left: 4px solid #3b82f6;
}

.toaster.toaster_info .toaster_icone {
    color: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
    .toaster_conteneur {
        top: 10px;
        right: 10px;
        left: 10px;
        align-items: stretch;
    }

    .toaster {
        min-width: auto;
        max-width: none;
    }
}
