/* === Conteneur global des toasts === */
#toast-wrapper,
.toast-container {
    position: fixed !important;
    bottom: 20px !important;   /* ✅ en bas de l'écran */
    right: 20px !important;    /* ✅ collé à droite */
    z-index: 999999 !important;
    overflow: visible !important;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 15px; /* espacement entre toasts */
}

/* === Toast individuel === */
.toast {
    position: relative !important;
    opacity: 0; /* invisible au départ */
    transform: translateY(100px); /* ✅ commence plus bas */
    pointer-events: auto;
    display: block !important;
    background: #fff !important;
    border-left: 6px solid #4070f4 !important;
    box-shadow: 0 5px 10px rgba(0,0,0,0.15) !important;
    border-radius: 12px;
    padding: 20px 35px 20px 25px;
    min-width: 280px;
    transition:
            transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.35),
            opacity 0.5s ease;
}

/* ✅ Apparition fluide */
.toast.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ✅ Disparition fluide vers le bas */
.toast.hide {
    opacity: 0 !important;
    transform: translateY(100px) !important;
    transition: transform 0.6s ease, opacity 0.5s ease;
}

/* === Contenu du toast === */
.toast .toast-content {
    display: flex;
    align-items: center;
}

.toast-content .check {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    width: 35px;
    background-color: #4070f4;
    color: #fff;
    font-size: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast-content .message {
    display: flex;
    flex-direction: column;
    margin: 0 20px;
}

.message .text {
    font-size: 18px;
    font-weight: 400;
    color: #666666;
}

.message .text.text-1 {
    font-weight: 600;
    color: #333;
}

/* === Bouton fermer === */
.toast .close {
    position: absolute;
    top: 10px;
    right: 15px;
    padding: 5px;
    cursor: pointer;
    opacity: 0.7;
    font-size: 18px;
    transition: opacity 0.2s;
}
.toast .close:hover { opacity: 1; }

/* === Barre de progression === */
.toast .progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #ddd;
    overflow: hidden;
}
.toast .progress:before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background-color: #4070f4;
    animation: progress 5s linear forwards;
}
@keyframes progress {
    100% { right: 100%; }
}

/* === Couleurs par type de message === */
.toast.success { border-left-color: #28a745; }
.toast.success .check,
.toast.success .progress:before { background-color: #28a745; }

.toast.error { border-left-color: #dc3545; }
.toast.error .check,
.toast.error .progress:before { background-color: #dc3545; }

.toast.warning { border-left-color: #ffc107; }
.toast.warning .check,
.toast.warning .progress:before {
    background-color: #ffc107;
    color: #333;
}

.toast.info { border-left-color: #17a2b8; }
.toast.info .check,
.toast.info .progress:before { background-color: #17a2b8; }
