/**
 * TOAST NOTIFICATIONS - Remplace les alert() agaçants
 * Notifications discrètes en haut à droite qui disparaissent automatiquement
 */

/* Conteneur des toasts (en haut à droite) */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Toast individuel */
.toast {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    pointer-events: all;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s ease;
    transition: all 0.3s ease;
}

.toast:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.3);
}

.toast.removing {
    animation: toastSlideOut 0.3s ease forwards;
}

/* Animations */
@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Icône du toast */
.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Contenu du toast */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.toast-message {
    font-size: 13px;
    color: #aaa;
    line-height: 1.4;
}

/* Types de toasts */
.toast.success {
    border-color: rgba(0, 255, 153, 0.5);
}

.toast.success .toast-icon {
    background: rgba(0, 255, 153, 0.2);
    color: #00ff99;
}

.toast.error {
    border-color: rgba(255, 68, 68, 0.5);
}

.toast.error .toast-icon {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
}

.toast.info {
    border-color: rgba(0, 217, 255, 0.5);
}

.toast.info .toast-icon {
    background: rgba(0, 217, 255, 0.2);
    color: #00d9ff;
}

.toast.warning {
    border-color: rgba(255, 193, 7, 0.5);
}

.toast.warning .toast-icon {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* Barre de progression */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d9ff, #00ff99);
    border-radius: 0 0 12px 12px;
    animation: toastProgress 3s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}
