/* Styles des messages flash - TopoclimbCH */
.flash-messages-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 1050;
    max-width: 400px;
    width: 100%;
}

.alert-modern {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-lg);
    border: none;
    margin-bottom: 0.75rem;
    font-weight: var(--font-weight-medium);
    box-shadow: var(--shadow-lg);
    position: relative;
    backdrop-filter: blur(10px);
    animation: slideInRight 0.4s ease-out;
}

.alert-modern .icon {
    font-size: 1.25rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.alert-modern .content {
    flex-grow: 1;
    min-width: 0;
}

.alert-modern .message {
    margin: 0;
    line-height: 1.4;
}

.alert-modern .error-list {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
    line-height: 1.4;
}

.alert-modern .error-list li {
    margin-bottom: 0.25rem;
}

.alert-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
}

.alert-close i {
    font-size: 0.875rem;
}

/* Types d'alertes avec gradients */
.alert-info-modern {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.95), rgba(162, 155, 254, 0.95));
    color: white;
}

.alert-success-modern {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.95), rgba(0, 160, 133, 0.95));
    color: white;
}

.alert-warning-modern {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.95), rgba(243, 156, 18, 0.95));
    color: white;
}

.alert-danger-modern,
.alert-error-modern {
    background: linear-gradient(135deg, rgba(253, 121, 168, 0.95), rgba(232, 67, 147, 0.95));
    color: white;
}

/* Animation spéciale pour les succès */
.special-success {
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: slideInRight 0.4s ease-out, pulse 0.6s ease-in-out 0.4s;
}

/* Animations */
@keyframes slideInRight {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
        max-height: 200px;
        margin-bottom: 0.75rem;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

.alert-dismissing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .flash-messages-container {
        top: 70px;
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    .alert-modern {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .alert-modern .icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .flash-messages-container {
        top: 60px;
        left: 0.5rem;
        right: 0.5rem;
    }
    
    .alert-modern {
        padding: 0.75rem;
    }
    
    .alert-close {
        top: 0.5rem;
        right: 0.5rem;
    }
}