/* Styles for Toast Notifications */
.toast-container {
    position: fixed;
    top: 10px;
    display: flex;
    right: 0;
    z-index: 1050; /* Assurez-vous qu'il est suffisamment élevé pour apparaître au-dessus des autres éléments */
}
#toastBox {
    position: fixed;
    top: 10px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 20px;
    z-index: 1000; /* Ensure it's above other content */
}

@media (max-width: 430px) {
    #toastBox {
        right: 5%;
        transform: translateX(5%);
        width: 350px;
        max-height: 500px;
    }

    .toast {
        width: 100px;
        height: 100px;
    }
}

.toast {
    width: 400px; /* Largeur d'origine */
    height: 80px; /* Hauteur d'origine */
    background: #fff;
    font-weight: 500;
    margin: 15px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    position: relative;
    text-wrap: wrap;
    flex-wrap: wrap;
    border-radius: 5px;
    transform: translateX(100%);
    animation: moveLeft 2.4s ease forwards, fadeOut 0.4s ease forwards 7.6s;
    /* 4.6s = 0.4s (animation duration) + 4.5s (show duration) */
}

@keyframes moveLeft {
    100% {
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.toast i {
    margin: 0 20px;
    font-size: 35px; /* Taille d'icône d'origine */
}

.toast.success {
    color: green;
}

.toast.error {
    color: red;
}

.toast.invalid {
    color: orange;
}

.toast.info {
    color: #4070f4;
}

.toast.success::after {
    background: green;
}

.toast.error::after {
    background: red;
}

.toast.invalid::after {
    background: orange;
}

.toast.info::after {
    background: #4070f4;
}

.toast::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 5px;
    animation: anim 4.5s linear;
}

@keyframes anim {
    100% {
        width: 0;
    }
}

/* Hidden class to completely remove toast after animation */
.toast.hidden {
    display: none;
}
