/**
 * Toast Notifications - Cercle Ichimoku France
 * Style moderne pour les messages système
 */

/* Container des toasts - en bas à droite */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    max-width: 400px;
    pointer-events: none;
}

/* Toast individuel */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out forwards;
    max-width: 100%;
    border-left: 4px solid #666;
}

.toast.toast-hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

/* Animations */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Icône du toast */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-icon svg {
    width: 16px;
    height: 16px;
}

/* Contenu du toast */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1a1a1a;
}

.toast-message {
    font-size: 14px;
    color: #4a4a4a;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Bouton fermer */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
    line-height: 1;
}

.toast-close:hover {
    color: #333;
}

.toast-close svg {
    width: 14px;
    height: 14px;
}

/* Barre de progression */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    border-radius: 0 0 0 8px;
    animation: toastProgress 5s linear forwards;
}

@keyframes toastProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Types de toast */

/* Success - Vert */
.toast-success {
    border-left-color: #10b981;
}

.toast-success .toast-icon {
    background: #d1fae5;
    color: #10b981;
}

.toast-success .toast-progress {
    background: #10b981;
}

/* Error - Rouge */
.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    background: #fee2e2;
    color: #ef4444;
}

.toast-error .toast-progress {
    background: #ef4444;
}

/* Warning - Orange */
.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.toast-warning .toast-progress {
    background: #f59e0b;
}

/* Info - Bleu */
.toast-info {
    border-left-color: #3b82f6;
}

.toast-info .toast-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.toast-info .toast-progress {
    background: #3b82f6;
}

/* Responsive */
@media (max-width: 480px) {
    .toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }

    .toast {
        padding: 12px 16px;
    }
}

/* Mode sombre (optionnel, si vous l'utilisez) */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f2937;
    }

    .toast-title {
        color: #f3f4f6;
    }

    .toast-message {
        color: #d1d5db;
    }

    .toast-close {
        color: #9ca3af;
    }

    .toast-close:hover {
        color: #f3f4f6;
    }
}
