/**
 * Styles pour le feedback utilisateur
 * Modals de confirmation, skeletons, spinners
 */

/* Modal de confirmation */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.confirmation-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.confirmation-modal-content {
    position: relative;
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    z-index: 1;
}

.confirmation-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--dark);
}

.confirmation-message {
    margin-bottom: 2rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.confirmation-actions .btn {
    min-width: 100px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skeletons de chargement */
.skeleton-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skeleton-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-content {
    padding: 1rem;
}

.skeleton-line {
    height: 1rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
    animation: shimmer 1.5s infinite;
}

.skeleton-line-title {
    width: 80%;
    height: 1.25rem;
}

.skeleton-line-text {
    width: 100%;
}

.skeleton-line-text:last-child {
    width: 60%;
    margin-bottom: 0;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Spinner de chargement */
.loading-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

.loading-message {
    color: var(--gray-600);
    font-size: 0.875rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Améliorer les messages d'erreur existants */
.error-message {
    padding: 1rem;
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.error-message::before {
    content: '⚠️';
    font-size: 1.25rem;
}

/* Messages de succès */
.success-message {
    padding: 1rem;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.success-message::before {
    content: '✓';
    font-size: 1.25rem;
    font-weight: bold;
}

/* Améliorer l'accessibilité des modals */
.confirmation-modal[aria-hidden="true"] {
    display: none;
}

.confirmation-modal:focus {
    outline: none;
}

.confirmation-modal-content:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}


