/* =============================================
   TOAST NOTIFICATIONS - Styles
   ============================================= */

/* Container des toasts */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

/* Toast de base */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: #f9fafb;
    font-size: 0.95rem;
    line-height: 1.4;
    pointer-events: all;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icône du toast */
.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Message du toast */
.toast-message {
    flex: 1;
    word-wrap: break-word;
}

/* Bouton fermer */
.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: -8px -8px -8px 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Types de toasts */
.toast-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
    border-left: 4px solid #10b981;
}

.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    border-left: 4px solid #ef4444;
}

.toast-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.95) 100%);
    border-left: 4px solid #f59e0b;
}

.toast-info {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.95) 0%, rgba(99, 102, 241, 0.95) 100%);
    border-left: 4px solid #818cf8;
}

/* Animations */
.toast-enter {
    transform: translateX(400px);
    opacity: 0;
}

.toast-enter-active {
    transform: translateX(0);
    opacity: 1;
}

.toast-exit {
    transform: translateX(400px);
    opacity: 0;
}

/* Barre de progression (optionnel) */
.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    animation: toast-progress 4s linear;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        font-size: 0.875rem;
        padding: 14px 16px;
    }
    
    .toast-icon {
        font-size: 1.125rem;
    }
}

/* Animation shake pour erreurs */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.toast-error {
    animation: shake 0.5s ease-in-out;
}

/* Dark mode déjà appliqué par défaut */