.flash-container {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    z-index: 9999;
}

.flash-message {
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 6px;
    color: rgb(255, 255, 255);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.flash-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.flash-icon {
    margin-right: 12px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.flash-text {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.flash-close {
    background: none;
    border: none;
    color: rgb(255, 255, 255);
    opacity: 0.7;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    margin-left: 10px;
    line-height: 1;
}

.flash-close:hover {
    opacity: 1;
}

.flash-success {
    background-color: #087f5b;
}

.flash-error,
.flash-danger {
    background-color: #d32f2f;
}

.flash-warning {
    background-color: #e68a00;
}

.flash-info {
    background-color: #0d47a1;
}

/* Animation d'entrée */
.animate-in {
    animation: slideIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Animation de sortie */
.animate-out {
    animation: slideOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

/* Barre de progression (auto-disparition) */
.flash-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.5);
    width: 100%;
    animation: countdown 5s linear forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes countdown {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .flash-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
