/* Loading Screen Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    color: white;
}

.loading-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    position: relative;
    animation: logoPulse 2s ease-in-out infinite;
}

.loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #f39c12;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.loading-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    opacity: 0.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.loading-dots {
    display: inline-block;
    animation: dots 1.5s infinite;
}

/* Animations */
@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(243, 156, 18, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(243, 156, 18, 0.5);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes dots {
    0%, 20% {
        content: "";
    }
    40% {
        content: ".";
    }
    60% {
        content: "..";
    }
    80%, 100% {
        content: "...";
    }
}

/* Loading pour les pages spécifiques */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    transition: opacity 0.3s ease-out;
}

.page-loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.page-loading .loading-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Loading pour les formulaires */
.form-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: inherit;
}

.form-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(52, 73, 94, 0.3);
    border-top: 3px solid #e74c3c;
}

/* Loading pour les tableaux */
.table-loading {
    position: relative;
    min-height: 200px;
}

.table-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(52, 73, 94, 0.3);
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 101;
}

/* Responsive */
@media (max-width: 768px) {
    .loading-logo {
        width: 80px;
        height: 80px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    .loading-text {
        font-size: 1rem;
    }
    
    .loading-subtitle {
        font-size: 0.8rem;
    }
}

