/* Page no-scroll helper */
html, body { height: 100%; }
body.auth-no-scroll { overflow: hidden; }

/* Mode compact pour l'inscription */
.auth-compact .auth-form-container { padding: var(--spacing-lg); }
.auth-compact .form-header { margin-bottom: var(--spacing-lg); }
.auth-compact .form-grid { gap: var(--spacing-md); margin-bottom: var(--spacing-md); }
.auth-compact .reg-progress { margin-bottom: var(--spacing-lg); }
.auth-compact .reg-actions { margin-top: var(--spacing-md); padding-top: var(--spacing-md); }
.auth-compact .password-strength { margin-top: 4px; }
.auth-compact .login-animation { width: 48px; height: 48px; margin-bottom: var(--spacing-sm); }
.auth-compact .login-animation i { font-size: 28px; }

/* Inputs small pour inscription (plus compact) */
.auth-compact .modern-auth-form input:not([type="checkbox"]),
.auth-compact .modern-auth-form select,
.auth-compact .modern-auth-form textarea {
    height: 42px; /* Réduit de 52px */
    padding: var(--spacing-sm) var(--spacing-md);
    padding-left: calc(var(--spacing-md) + 20px);
    font-size: var(--font-size-sm);
}

.auth-compact .input-icon {
    left: var(--spacing-sm);
    font-size: var(--font-size-sm);
}

.auth-compact .floating-label {
    left: calc(var(--spacing-md) + 20px);
    font-size: 0.75rem;
}

.auth-compact .modern-auth-form input:focus ~ .floating-label,
.auth-compact .modern-auth-form input:not(:placeholder-shown) ~ .floating-label,
.auth-compact .modern-auth-form select:focus ~ .floating-label,
.auth-compact .modern-auth-form select:not(:placeholder-shown) ~ .floating-label {
    font-size: 0.7rem;
}

.auth-compact .password-toggle {
    right: var(--spacing-sm);
}

.auth-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) 0;
    background: #ffffff;
    position: relative;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 1;
}

/* Large variant for wider forms like registration */
.auth-form-wrapper--wide {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Center the register grid within wide forms */
.auth-form-wrapper--wide .register-grid {
    justify-content: center; /* center grid tracks when there is extra space */
}

/* Ensure the wide wrapper itself is centered */
.auth-form-wrapper--wide {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
}

/* Make the inner container span the wrapper and stay centered */
.auth-form-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.auth-form-container {
    margin-left: auto;
    margin-right: auto;
    background-color: #ffffff;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.auth-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--color-primary) 0%,
        var(--color-primary-light) 50%,
        var(--color-primary) 100%
    );
    opacity: 0.7;
}

/* En-tête du formulaire */
.form-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.form-header h2 {
    font-size: var(--font-size-xl);
    margin-top: var(--spacing-md);
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Animation du login */
.login-animation {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-animation i {
    font-size: 32px;
    color: var(--color-primary);
    position: relative;
    z-index: 2;
    animation: shieldFloat 3s ease-in-out infinite;
}

.login-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.1;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes shieldFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
        color: var(--color-primary-light);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.2;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Animation d'entrée */
.login-animation {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effect */
.login-animation:hover i {
    animation: shieldBounce 0.5s ease-in-out;
}

@keyframes shieldBounce {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
        color: var(--color-primary-light);
    }
}

/* Grille du formulaire */
.form-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.login-grid {
    grid-template-columns: 1fr;
}

/* Responsive grid for registration: 3-4 items per row on wide screens */
.register-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    justify-items: stretch;
    align-items: start;
}

/* Ensure full-width items span all columns */
.full-width {
    grid-column: 1 / -1;
}

/* Groupe de formulaire */
.form-group {
    position: relative;
}

/* Wrapper d'input */
.input-wrapper {
    position: relative;
    background-color: var(--color-gray-50);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
}

.input-wrapper:focus-within {
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.input-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    transition: color var(--transition-normal);
    z-index: 1;
    flex-shrink: 0;
}

/* Styles d'input */
.modern-auth-form input:not([type="checkbox"]),
.modern-auth-form select {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    padding-left: calc(var(--spacing-lg) + 24px);
    border: none;
    border-radius: var(--border-radius-md);
    background-color: transparent;
    color: var(--color-text-primary);
    transition: all var(--transition-normal);
    height: 52px;
    box-sizing: border-box;
    font-size: var(--font-size-base);
}

.modern-auth-form input:focus {
    outline: none;
}

/* Label flottant */
.floating-label {
    position: absolute;
    left: calc(var(--spacing-lg) + 24px);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    transition: all var(--transition-normal);
    pointer-events: none;
    padding: 0 var(--spacing-xs);
    font-size: var(--font-size-sm);
}

.modern-auth-form input:focus ~ .floating-label,
.modern-auth-form input:not(:placeholder-shown) ~ .floating-label,
.modern-auth-form select:not(:placeholder-shown) ~ .floating-label {
    top: 0;
    left: var(--spacing-md);
    transform: translateY(-50%) scale(0.85);
    color: var(--color-primary);
    background-color: var(--color-background-primary);
}

/* Toggle mot de passe */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: var(--spacing-xs);
    transition: all var(--transition-normal);
    z-index: 1;
}

.password-toggle:hover {
    color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

/* Checkbox personnalisé */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.checkbox-mark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-gray-200, #E5E7EB);
    border-radius: var(--border-radius-sm, 4px);
    margin-right: var(--spacing-sm, 8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal, 0.2s ease);
    background-color: var(--color-gray-50, #F9FAFB);
    box-sizing: border-box;
}

.checkbox-mark i {
    color: #ffffff;
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-normal, 0.2s ease);
}

.checkbox-input:focus + .checkbox-mark {
    outline: 2px solid var(--color-primary, #6D28D9);
    outline-offset: 2px;
}

.checkbox-input:checked + .checkbox-mark {
    background-color: var(--color-primary, #6D28D9);
    border-color: var(--color-primary, #6D28D9);
    color: var(--color-text-light, #ffffff);
    animation: checkboxPop 0.3s ease-out;
}

.checkbox-input:checked + .checkbox-mark i {
    opacity: 1;
    transform: scale(1);
}

/* Hover effect */
.checkbox-wrapper:hover .checkbox-mark {
    border-color: var(--color-primary, #6D28D9);
}

/* Disabled */
.checkbox-input:disabled + .checkbox-mark {
    background-color: var(--color-gray-100, #F3F4F6);
    border-color: var(--color-gray-200, #E5E7EB);
    cursor: not-allowed;
}

.checkbox-input:disabled ~ .checkbox-text {
    color: var(--color-text-disabled, #9CA3AF);
    cursor: not-allowed;
}

.checkbox-text {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

/* Animation au clic */
.checkbox-mark {
    transform-origin: center;
}

.checkbox-input:checked + .checkbox-mark {
    animation: checkboxPop 0.3s ease-out;
}

@keyframes checkboxPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .checkbox-mark,
    .checkbox-input:checked + .checkbox-mark {
        animation: none !important;
        transition: none !important;
    }
}

/* Bouton de connexion */
.confirmation-actions-footer {
    margin-bottom: var(--spacing-lg);
}

.confirmation-actions-footer .btn {
    width: 100%;
    padding: var(--spacing-md);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-text-light);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.confirmation-actions-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.confirmation-actions-footer .btn:active {
    transform: translateY(0);
}

/* Liens du formulaire */
.form-links {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.form-links a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
}

.form-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-normal);
}

.form-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.auth-options {
    margin-bottom: var(--spacing-md);
}

/* Animations */
@keyframes glow {
    0%, 100% { 
        opacity: 0.3; 
        transform: translate(-50%, -50%) scale(1); 
    }
    50% { 
        opacity: 0.5; 
        transform: translate(-50%, -50%) scale(1.1); 
    }
}

.animate-field {
    animation: slideUp 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Messages d'erreur */
.field-validation-error {
    color: var(--color-danger);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-xs);
    display: block;
    opacity: 0;
    transform: translateY(-10px);
    animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles de liens d'authentification */
.forgot-password-link,
.back-connexion-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
}

.forgot-password-link:hover,
.back-connexion-link:hover {
    color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.forgot-password-link i,
.back-connexion-link i {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.forgot-password-link:hover i,
.back-connexion-link:hover i {
    transform: translateX(-2px);
}

/* Style du conteneur des liens */
.auth-options {
    text-align: center;
    margin: 1rem 0;
}

.form-links {
    margin-top: 1.5rem;
    text-align: center;
}

/* Animation au hover */
@keyframes linkPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.forgot-password-link:hover,
.back-connexion-link:hover {
    animation: linkPulse 0.3s ease;
}

/* Ajustements responsive */
@media (max-width: 480px) {
    .auth-content {
        align-items: flex-start;
        padding-top: 10vh;
    }

    .auth-form-wrapper {
        margin: 0;
        padding: var(--spacing-md);
    }

    .auth-form-container {
        padding: var(--spacing-lg);
    }

    .login-animation {
        width: 56px;
        height: 56px;
    }

    .login-animation i {
        font-size: 28px;
    }
}

/* Pour éviter le flottement sur les grands écrans */
@media (min-height: 800px) {
    .auth-content {
        padding: var(--spacing-xl) 0;
    }
}

/* Menu de navigation d'authentification */
.auth-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.auth-nav__container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
}

.auth-nav__logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.auth-nav__logo img {
    height: 32px;
    width: auto;
}

.auth-nav__logo span {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-nav__links {
    display: flex;
    gap: var(--spacing-md);
}

.auth-nav__link {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    color: var(--color-text-primary);
    transition: all var(--transition-normal);
    font-weight: 500;
}

.auth-nav__link i {
    font-size: var(--font-size-lg);
}

.auth-nav__link:hover {
    background-color: var(--color-gray-50);
    transform: translateY(-1px);
}

.auth-nav__link.active {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

/* Adjusting the grid layout for wider forms to be centered */
.auth-form-wrapper--wide {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Centering the register grid items within wide forms */
.auth-form-wrapper--wide .register-grid {
    justify-content: center; /* center grid tracks when there is extra space */
}

/* Inline subscription line - robust sizing */
.subscription-grid {
    display: grid;
    gap: var(--spacing-md);
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    grid-column: 1 / -1; /* full width in parent grid */
}

.subscription-grid .form-group {
    min-width: 0;
}

.subscription-grid .input-wrapper,
.subscription-grid .checkbox-wrapper {
    min-width: 0;
}

.subscription-grid input[type="date"],
.subscription-grid select {
    width: 100%;
}

@media (max-width: 992px) {
    .subscription-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 576px) {
    .subscription-grid { grid-template-columns: 1fr; }
}

/* File upload styles */
.file-upload-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.file-wrapper {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-placeholder {
    padding: var(--spacing-md) var(--spacing-lg);
    padding-left: calc(var(--spacing-lg) + 20px);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

/* Password strength meter */
.password-strength {
    margin-top: var(--spacing-xs);
}

.strength-bar {
    height: 4px;
    background-color: var(--color-gray-200);
    border-radius: var(--border-radius-full);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: var(--border-radius-full);
    transition: all var(--transition-normal);
}

.strength-text {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Required checkbox style */
.checkbox-wrapper.required .checkbox-text::after {
    content: ' *';
    color: var(--color-danger);
}

/* Wizard progress - modern design with enhanced animations */
.reg-progress { 
    display: flex; 
    gap: var(--spacing-xs); 
    margin-bottom: var(--spacing-xl); 
    position: relative;
    padding: 0;
    align-items: flex-start;
}

/* Ligne de connexion entre les étapes - animée */
.reg-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: var(--color-gray-200);
    z-index: 0;
    transform: translateY(-50%);
    border-radius: var(--border-radius-full);
}

/* Ligne de progression dynamique */
.reg-progress::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
    z-index: 0;
    transform: translateY(-50%);
    border-radius: var(--border-radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(109, 40, 217, 0.3);
}

/* Calcul dynamique de la largeur de progression */
.reg-progress[data-step="1"]::after { width: 0; }
.reg-progress[data-step="2"]::after { width: calc((100% - 80px) * 0.33); }
.reg-progress[data-step="3"]::after { width: calc((100% - 80px) * 0.66); }
.reg-progress[data-step="4"]::after { width: calc((100% - 80px) * 1); }

.reg-progress-item { 
    flex: 1; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    gap: var(--spacing-sm); 
    padding: 0 var(--spacing-sm);
    color: var(--color-text-secondary);
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

/* Numéro/Indicateur de l'étape */
.reg-progress-item .idx { 
    width: 40px; 
    height: 40px; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    background: var(--color-background-primary); 
    border: 3px solid var(--color-gray-200);
    color: var(--color-text-secondary); 
    font-weight: 700;
    font-size: var(--font-size-base);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 0 6px var(--color-background-primary);
    position: relative;
}

/* Effet de pulse sur l'indicateur */
.reg-progress-item .idx::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Label de l'étape */
.reg-progress-item span:not(.idx) {
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-align: center;
    max-width: 140px;
    line-height: 1.4;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* État actif */
.reg-progress-item.active { 
    color: var(--color-primary);
    transform: scale(1.05);
}

.reg-progress-item.active .idx { 
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    border-color: var(--color-primary);
    color: #fff;
    transform: scale(1.2);
    box-shadow: 
        0 0 0 6px var(--color-background-primary), 
        0 4px 16px rgba(109, 40, 217, 0.4),
        0 0 0 0 rgba(109, 40, 217, 0.4);
    animation: pulseRing 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.reg-progress-item.active .idx::before {
    background: rgba(109, 40, 217, 0.1);
    animation: pulseWave 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Animation de pulse */
@keyframes pulseRing {
    0%, 100% {
        box-shadow: 
            0 0 0 6px var(--color-background-primary), 
            0 4px 16px rgba(109, 40, 217, 0.4),
            0 0 0 0 rgba(109, 40, 217, 0.4);
    }
    50% {
        box-shadow: 
            0 0 0 6px var(--color-background-primary), 
            0 6px 20px rgba(109, 40, 217, 0.5),
            0 0 0 8px rgba(109, 40, 217, 0.2);
    }
}

@keyframes pulseWave {
    0% {
        transform: scale(1);
        opacity: 0;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.3;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* État complété */
.reg-progress-item.completed { 
    color: var(--color-success);
}

.reg-progress-item.completed .idx {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    color: #fff;
    animation: checkmarkBounce 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icône de checkmark pour les étapes complétées */
.reg-progress-item.completed .idx::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: checkmarkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.reg-progress-item.completed .idx span {
    opacity: 0;
}

@keyframes checkmarkBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Hover effect sur les étapes complétées */
.reg-progress-item.completed:hover {
    transform: scale(1.05);
}

.reg-progress-item.completed:hover .idx {
    box-shadow: 
        0 0 0 6px var(--color-background-primary), 
        0 4px 16px rgba(16, 185, 129, 0.4);
}

/* Steps */
.reg-step { 
    display: none;
    animation: stepFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.reg-step.active {
    display: block;
}

@keyframes stepFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.reg-actions { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    gap: var(--spacing-md); 
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

/* Uniform input/select sizing */
.input-wrapper select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

/* Ajustements pour le label flottant avec select */
.modern-auth-form select ~ .floating-label {
    background-color: transparent;
}

.modern-auth-form select:focus ~ .floating-label,
.modern-auth-form select:not(:placeholder-shown) ~ .floating-label {
    top: 0;
    left: var(--spacing-md);
    transform: translateY(-50%) scale(0.85);
    color: var(--color-primary);
    background-color: var(--color-background-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .reg-progress {
        gap: 0;
    }
    
    .reg-progress::before,
    .reg-progress::after {
        top: 16px;
        left: 24px;
        right: 24px;
    }
    
    .reg-progress-item {
        padding: var(--spacing-xs);
    }
    
    .reg-progress-item span:not(.idx) {
        font-size: 0.7rem;
        max-width: 70px;
        line-height: 1.2;
    }
    
    .reg-progress-item .idx {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        border-width: 2px;
    }
    
    .reg-progress-item.active .idx {
        transform: scale(1.15);
    }
}

@media (max-width: 480px) {
    .reg-progress-item span:not(.idx) {
        font-size: 0.65rem;
        max-width: 60px;
    }
    
    .reg-progress-item .idx {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .reg-progress::before,
    .reg-progress::after {
        top: 14px;
    }
}

/* Accessibilité - Réduction des mouvements */
@media (prefers-reduced-motion: reduce) {
    .reg-progress-item,
    .reg-progress-item .idx,
    .reg-progress::after,
    .reg-step {
        animation: none !important;
        transition: none !important;
    }
    
    .reg-progress-item.active .idx {
        animation: none !important;
    }
}

/* Centering adjustments for wide auth forms */
.auth-form-wrapper--wide {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Ensure the inner container is centered and spans the wrapper */
.auth-form-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Inline subscription line */
.subscription-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: end;
}

@media (max-width: 992px) {
    .subscription-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
    .subscription-grid { grid-template-columns: 1fr; }
}

/* ======================================
   REGISTRATION PROCESS CONSOLE STYLES
   ====================================== */

/* Console Wrapper */
.console-wrapper {
    margin: var(--spacing-xl) 0;
}

/* Console Shell Container */
.console-container {
    background: #000000; /* ✅ Noir pur */
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Console Header */
.console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.console-controls {
    display: flex;
    gap: 8px;
}

.console-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.console-dot-red {
    background: linear-gradient(135deg, #ff5f57 0%, #e04848 100%);
}

.console-dot-yellow {
    background: linear-gradient(135deg, #ffbd2e 0%, #e0a820 100%);
}

.console-dot-green {
    background: linear-gradient(135deg, #28ca42 0%, #20a836 100%);
}

.console-title {
    flex: 1;
    text-align: center;
    color: #ffffff; /* ✅ Blanc */
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.console-status {
    min-width: 120px;
    text-align: right;
}

.console-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64b5f6;
    font-size: 12px;
    font-weight: 500;
}

/* Console Content */
.console-content {
    padding: var(--spacing-lg);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    max-height: 450px;
    overflow-y: auto;
    background: #000000; /* ✅ Noir pur */
    color: #ffffff; /* ✅ Police blanche par défaut */
}

/* Console Lines */
.console-line {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-xs);
    border-radius: var(--border-radius-sm);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.console-line.visible {
    opacity: 1;
    transform: translateY(0);
}

.console-line:hover {
    background: rgba(255, 255, 255, 0.05);
}

.console-line-success {
    border-left: 3px solid #28ca42;
}

.console-line-error {
    border-left: 3px solid #ff5f57;
    background: rgba(255, 95, 87, 0.1);
}

.console-line-info {
    border-left: 3px solid #64b5f6;
}

.console-timestamp {
    color: #888888; /* ✅ Gris clair */
    font-size: 11px;
    flex-shrink: 0;
    min-width: 65px;
}

.console-icon {
    flex-shrink: 0;
    font-size: 14px;
}

.console-line-success .console-icon {
    color: #28ca42;
}

.console-line-error .console-icon {
    color: #ff5f57;
}

.console-line-info .console-icon {
    color: #64b5f6;
}

.console-service {
    color: #a78bfa; /* ✅ Violet clair */
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    min-width: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.console-message {
    color: #ffffff; /* ✅ Blanc */
    flex: 1;
}

.console-duration {
    color: #888888; /* ✅ Gris clair */
    font-size: 11px;
    margin-left: auto;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Console Cursor */
.console-cursor {
    display: inline-block;
    animation: blink 1s infinite;
    color: #28ca42;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Console Footer */
.console-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.console-stats {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.console-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: #cccccc; /* ✅ Blanc cassé */
    font-size: 12px;
    font-weight: 500;
}

.console-stat i {
    font-size: 14px;
}

/* Progress Bar Moderne */
.progress-bar-wrapper {
    position: relative;
    width: 100%;
}

.progress-bar-track {
    height: 10px;
    background: #1a1a1a; /* ✅ Noir très foncé */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill.progress-high {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.progress-bar-fill.progress-complete {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.progress-bar-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.progress-label {
    color: var(--color-text-secondary);
    font-weight: 500;
}

.progress-percentage {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 14px;
}

/* Console Scrollbar */
.console-content::-webkit-scrollbar {
    width: 8px;
}

.console-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.console-content::-webkit-scrollbar-thumb {
    background: rgba(100, 181, 246, 0.5);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.console-content::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 181, 246, 0.8);
}

/* Registration Indicator (animated dot) */
.register-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #9d4edd;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .console-container {
        margin: var(--spacing-md) 0;
    }
    
    .console-content {
        padding: var(--spacing-md);
        max-height: 350px;
        font-size: 12px;
    }
    
    .console-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .console-title {
        font-size: 12px;
    }
    
    .console-service {
        min-width: 80px;
        font-size: 11px;
    }
    
    .console-stats {
        gap: var(--spacing-md);
    }
    
    .console-stat {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .console-content {
        padding: var(--spacing-sm);
        max-height: 300px;
        font-size: 11px;
    }
    
    .console-line {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }
    
    .console-service {
        min-width: 70px;
        font-size: 10px;
    }
    
    .console-footer {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .console-stats {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-xs);
    }
}

/* Animations pour les transitions */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.console-container {
    animation: fadeInScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .console-line,
    .console-cursor,
    .progress-bar-fill,
    .progress-bar-shine,
    .register-indicator {
        animation: none !important;
        transition: none !important;
    }
}
