/* admin/src/styles/loader.css */

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.loader-content {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 24px 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 200px;
    border: 1px solid #e5e7eb;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animation d'apparition */
.global-loader {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 640px) {
    .loader-content {
        margin: 20px;
        padding: 20px 24px;
        min-width: auto;
        width: calc(100% - 40px);
    }
    
    .loader-spinner {
        width: 32px;
        height: 32px;
        border-width: 3px;
    }
    
    .loader-text {
        font-size: 13px;
    }
}

/* Thème sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    .loader-content {
        background: #1f2937;
        border-color: #374151;
    }
    
    .loader-text {
        color: #f9fafb;
    }
    
    .loader-spinner {
        border-color: #374151;
        border-top-color: #3b82f6;
    }
}
