/* Flash Messages CSS */
#flash-messages-container {
    position: fixed;
    top: calc(var(--height-header) + 1rem);
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.flash-message {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

.flash-message.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

/* Types de messages */
.flash-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.flash-error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.flash-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.flash-info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* Éléments internes */
.flash-icon {
    margin-right: 8px;
    font-size: 16px;
    flex-shrink: 0;
}

.flash-text {
    flex-grow: 1;
    word-wrap: break-word;
}

.flash-close {
    margin-left: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Animations */
@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;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #flash-messages-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .flash-message {
        margin-bottom: 8px;
        padding: 10px 12px;
        font-size: 13px;
    }
}