/* ============================================
   UNERS - Authentication Styles
   ============================================ */

/* Auth Layout */
.auth-layout {
    min-height: 100vh;
    display: flex;
}

.auth-side {
    flex: 1;
    display: none;
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-700) 50%, var(--primary-600) 100%);
    position: relative;
    padding: var(--space-3xl);
    overflow: hidden;
}

@media (min-width: 1024px) {
    .auth-side {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.auth-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-side-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.auth-side-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-3xl);
}

.auth-side-logo .logo-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.auth-side-logo .logo-text {
    color: var(--white);
    font-size: 2rem;
}

/* Logo Image pour Auth */
.auth-logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 12px;
}

.auth-mobile-logo .auth-logo-img {
    height: 65px;
    background: transparent;
    padding: 0;
}

@media (max-width: 480px) {
    .auth-mobile-logo .auth-logo-img {
        height: 55px;
    }
}

.auth-side h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: var(--space-lg);
}

.auth-side p {
    color: var(--primary-100);
    font-size: 1.125rem;
    margin-bottom: var(--space-2xl);
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-400);
    flex-shrink: 0;
}

.auth-feature-content h4 {
    color: var(--white);
    font-size: 1rem;
    font-family: var(--font-body);
    margin-bottom: var(--space-xs);
}

.auth-feature-content p {
    color: var(--primary-200);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Auth Main */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background: var(--gray-50);
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

/* Container plus large pour inscription */
#register-form {
    max-width: 100%;
}

@media (min-width: 481px) {
    .auth-container:has(#register-form) {
        max-width: 500px;
    }
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

@media (min-width: 1024px) {
    .auth-mobile-logo {
        display: none;
    }
}

.auth-header h2 {
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
}

.auth-header p {
    color: var(--gray-500);
}

/* Auth Form */
.auth-form {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Password Field */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field .form-input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    padding: var(--space-xs);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--gray-600);
}

.password-toggle:focus {
    outline: none;
}

/* Password Strength */
.password-strength {
    margin-top: var(--space-sm);
}

.password-strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
    display: flex;
    gap: 2px;
}

.password-strength-segment {
    flex: 1;
    height: 100%;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

.password-strength[data-strength="weak"] .password-strength-segment:nth-child(1) {
    background: var(--error-500);
}

.password-strength[data-strength="medium"] .password-strength-segment:nth-child(1),
.password-strength[data-strength="medium"] .password-strength-segment:nth-child(2) {
    background: var(--warning-500);
}

.password-strength[data-strength="strong"] .password-strength-segment {
    background: var(--success-500);
}

.password-strength-text {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: var(--space-xs);
}

/* Form Footer */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.form-footer a {
    color: var(--primary-500);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Submit Button */
.auth-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

/* Auth Link */
.auth-link {
    text-align: center;
    margin-top: var(--space-xl);
    color: var(--gray-500);
}

.auth-link a {
    color: var(--primary-500);
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
    transition: all var(--transition-fast);
}

.step-dot.active {
    background: var(--primary-500);
    width: 30px;
    border-radius: var(--radius-full);
}

.step-dot.completed {
    background: var(--success-500);
}

/* Multi-step Form */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xl);
}

/* Photo Upload */
.photo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-400);
    overflow: hidden;
    border: 3px dashed var(--gray-300);
    transition: all var(--transition-fast);
}

.photo-preview:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview.has-image {
    border-style: solid;
    border-color: var(--primary-400);
}

/* Decorations */
.auth-decoration {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-decoration:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.auth-decoration:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: 100px;
    right: 50px;
}

.auth-decoration:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: -50px;
    left: 100px;
}

/* ============================================
   RESPONSIVE MOBILE - Connexion & Inscription
   ============================================ */

/* Tablettes et petits écrans */
@media (max-width: 768px) {
    .auth-main {
        padding: var(--space-lg);
    }
    
    .auth-form {
        padding: var(--space-lg);
    }
    
    .auth-header {
        margin-bottom: var(--space-xl);
    }
    
    .auth-mobile-logo {
        margin-bottom: var(--space-lg);
    }
    
    .auth-link {
        margin-top: var(--space-lg);
    }
    
    .form-footer {
        margin-bottom: var(--space-md);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .auth-main {
        padding: var(--space-sm);
        align-items: flex-start;
        padding-top: var(--space-lg);
    }
    
    .auth-container {
        max-width: 100%;
    }
    
    .auth-form {
        padding: var(--space-md);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
    
    .auth-header {
        margin-bottom: var(--space-lg);
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
        margin-bottom: var(--space-xs);
    }
    
    .auth-header p {
        font-size: 0.875rem;
    }
    
    .auth-mobile-logo {
        margin-bottom: var(--space-md);
    }
    
    .auth-mobile-logo .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .auth-mobile-logo .logo-text {
        font-size: 1.25rem;
    }
    
    .form-group {
        margin-bottom: var(--space-sm);
    }
    
    .form-label {
        margin-bottom: var(--space-xs);
        font-size: 0.875rem;
    }
    
    .form-input {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        margin-bottom: var(--space-md);
    }
    
    .form-footer a {
        font-size: 0.8125rem;
    }
    
    .form-check label {
        font-size: 0.875rem;
    }
    
    .auth-submit {
        padding: 0.75rem;
        font-size: 0.9375rem;
    }
    
    .auth-link {
        margin-top: var(--space-md);
        font-size: 0.875rem;
    }
    
    .alert {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.875rem;
        margin-bottom: var(--space-md);
    }
    
    .alert-info {
        margin-top: var(--space-lg) !important;
        padding: var(--space-sm);
    }
    
    .alert-info small {
        font-size: 0.75rem;
    }
    
    /* Step indicator mobile */
    .step-indicator {
        margin-bottom: var(--space-lg);
    }
    
    .step-navigation {
        margin-top: var(--space-lg);
        gap: var(--space-sm);
    }
    
    .step-navigation .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Photo upload mobile */
    .photo-upload {
        gap: var(--space-sm);
    }
    
    .photo-preview {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .auth-main {
        padding: var(--space-xs);
        padding-top: var(--space-md);
    }
    
    .auth-form {
        padding: var(--space-sm);
    }
    
    .auth-header h2 {
        font-size: 1.25rem;
    }
    
    .form-input {
        padding: 0.5rem 0.625rem;
        font-size: 0.875rem;
    }
    
    .auth-submit {
        padding: 0.625rem;
        font-size: 0.875rem;
    }
    
    .form-footer {
        gap: var(--space-xs);
    }
}
