/* Loader overlay simplifié */
#registration-loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#registration-loader-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}

.registration-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.registration-loader-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.registration-loader-logo-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    object-fit: contain;
    z-index: 3;
    display: block;
}

/* Cercle de chargement harmonisé avec le style de génération */
.registration-loader-circle {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid rgba(224, 195, 240, 0.3);
    border-top: 5px solid transparent;
    box-sizing: border-box;
    z-index: 1;
    overflow: visible;
    background: linear-gradient(45deg, #faadc7, #e0c3f0, #55c7f6);
    -webkit-mask: radial-gradient(circle, transparent 55%, black 55%);
    mask: radial-gradient(circle, transparent 55%, black 55%);
    animation: loader-rotate 1s linear infinite;
}

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

/* Texte de chargement */
.registration-loader-text {
    text-align: center;
    margin-bottom: 1.5rem;
}

.registration-loader-text .main-text {
    background: linear-gradient(45deg, #faadc7, #e0c3f0, #55c7f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: 'Questrial', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.registration-loader-text .sub-text {
    color: #888;
    font-family: 'Questrial', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Container des étapes simplifié */
.registration-steps-container {
    width: 100%;
    max-width: 350px;
    margin-bottom: 1rem;
}

.registration-steps-title {
    background: linear-gradient(45deg, #faadc7, #e0c3f0, #55c7f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: 'Questrial', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

#registration-steps-list {
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
}

.registration-step-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
    animation: slideIn 0.5s ease forwards;
}

.registration-step-item:last-child {
    margin-bottom: 0;
}

.registration-step-item.done {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

.registration-step-label {
    font-family: 'Questrial', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    flex: 1;
    text-align: left;
}

.registration-step-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(156, 163, 175, 0.3);
    transition: all 0.3s ease;
}

.registration-step-item {
    animation-delay: 0.1s;
}

.registration-step-item:nth-child(1) { animation-delay: 0.1s; }
.registration-step-item:nth-child(2) { animation-delay: 0.2s; }
.registration-step-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Conseils et astuces */
.registration-loader-tips {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.registration-tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-family: 'Questrial', sans-serif;
    font-size: 0.85rem;
    color: #6b7280;
}

.registration-tip-item:last-child {
    margin-bottom: 0;
}

.registration-tip-item i {
    color: #6366f1;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.registration-tip-item span {
    flex: 1;
    line-height: 1.4;
}

/* Barre de progression globale */
.registration-global-progress {
    width: 100%;
    max-width: 300px;
    margin-top: 1.5rem;
}

.registration-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(156, 163, 175, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.registration-progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #faadc7, #e0c3f0, #55c7f6);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.registration-progress-text {
    font-family: 'Questrial', sans-serif;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}

#registration-progress-percentage {
    font-weight: 600;
    color: #6366f1;
}

/* Responsive pour le loader agrandi */
@media (max-width: 768px) {
    .registration-loader-content {
        padding: 1.5rem;
        max-width: 350px;
    }
    
    .registration-loader-container {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }
    
    .registration-loader-logo-img {
        width: 50px;
        height: 50px;
    }
    
    .registration-loader-circle {
        width: 80px;
        height: 80px;
    }
    
    .registration-step-label {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .registration-loader-content {
        padding: 1rem;
        max-width: 300px;
    }
    
    .registration-loader-container {
        width: 70px;
        height: 70px;
        margin-bottom: 1.2rem;
    }
    
    .registration-loader-logo-img {
        width: 45px;
        height: 45px;
    }
    
    .registration-loader-circle {
        width: 70px;
        height: 70px;
    }
}

/* État de chargement global */
body.loading {
    overflow: hidden;
}

.registration-dashboard {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.registration-dashboard.loaded {
    opacity: 1;
}

/* Mode ultra-simplifié pour les écrans très petits */
@media (max-width: 360px) {
    .registration-loader-tips, .registration-global-progress { display: none !important; }
}

/* Animation d'apparition ultra-rapide du loader */
#registration-loader-wrapper {
    opacity: 0;
    animation: fadeInLoader 0.1s ease-out forwards;
}

#registration-loader-wrapper[style*="display: flex"] {
    opacity: 1;
    animation: none;
}

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

/* Responsive pour le loader agrandi */
@media (max-width: 768px) {
    .registration-loader-container {
        width: 90px;
        height: 90px;
    }
    
    .registration-loader-logo-img {
        width: 55px;
        height: 55px;
    }
    
    .registration-loader-circle {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 480px) {
    .registration-loader-container {
        width: 80px;
        height: 80px;
    }
    
    .registration-loader-logo-img {
        width: 50px;
        height: 50px;
    }
    
    .registration-loader-circle {
        width: 80px;
        height: 80px;
    }
}

/* Loader overlay pour les pages générales */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 300px;
    padding: 2rem;
}

.loader-logo-text {
    font-family: 'Questrial', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #faadc7, #e0c3f0, #55c7f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.2rem;
    letter-spacing: 1.5px;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(224, 195, 240, 0.3);
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: loader-rotate 1s linear infinite;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #faadc7, #e0c3f0, #55c7f6);
    -webkit-mask: radial-gradient(circle, transparent 55%, black 55%);
    mask: radial-gradient(circle, transparent 55%, black 55%);
}

/* Texte retiré */

/* Loader pour le backoffice */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loader-wrapper.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    object-fit: contain;
    z-index: 3;
    display: block;
}

.loader-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid rgba(224, 195, 240, 0.3);
    border-top: 5px solid transparent;
    box-sizing: border-box;
    z-index: 1;
    overflow: visible;
    background: linear-gradient(45deg, #faadc7, #e0c3f0, #55c7f6);
    -webkit-mask: radial-gradient(circle, transparent 55%, black 55%);
    mask: radial-gradient(circle, transparent 55%, black 55%);
    animation: loader-rotate 1s linear infinite;
} 