/* ========================================
   Modern Authentication Styles
   ======================================== */

:root {
    --primary-blue: #0066FF;
    --primary-dark: #1a1a2e;
    --primary-purple: #2d1b4e;
    --teal-primary: #16a085;
    --teal-dark: #138871;
    --gradient-blue: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-teal: linear-gradient(135deg, #16a085 0%, #0e7c68 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
    --text-dark: #1a1a1a;
    --text-gray: #6c757d;
    --bg-light: #f9fcff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   Auth Container
   ======================================== */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrapper {
    width: 100%;
    max-width: 1200px;
    display: flex;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 600px;
}

/* ========================================
   Left Panel (Illustration Side)
   ======================================== */

.auth-left-panel {
    /* flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden; */


    width: 40%;
    /* background: #0a1128; */
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* .auth-left-panel::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: #526ad6;
    border-radius: 50%;
    bottom: -200px;
    left: -100px;
}

.auth-left-panel::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: #526ad6;
    border-radius: 50%;
    top: -100px;
    right: -50px;
} */

.auth-logo {
    position: relative;
    z-index: 2;
}

.auth-logo img {
    height: 40px;
    filter: brightness(0) invert(1);
}

.auth-illustration {
    position: relative;
    z-index: 2;
    text-align: center;
    margin: 40px 0;
}

.auth-illustration img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
}

.auth-testimonial {
    position: relative;
    z-index: 2;
    color: white;
}

.auth-testimonial-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.auth-testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.auth-testimonial-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.auth-testimonial-info p {
    font-size: 13px;
    opacity: 0.7;
}

.auth-stats {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.auth-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 13px;
}

.auth-stat-item i {
    font-size: 16px;
    opacity: 0.8;
}

/* ========================================
   Right Panel (Form Side)
   ======================================== */

.auth-right-panel {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.auth-header {
    margin-bottom: 40px;
}

.auth-step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-gray);
}

.auth-step-indicator i {
    font-size: 18px;
}

.auth-progress {
    text-align: right;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 16px;
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* ========================================
   Form Elements
   ======================================== */

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
}

/* Form Row pour champs côte à côte */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.form-group-half {
    flex: 1;
    margin-bottom: 0;
}

/* Responsive pour form-row */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group-half {
        margin-bottom: 24px;
    }

    .form-group-half:last-child {
        margin-bottom: 0;
    }
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-dark);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--text-dark);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    display: flex;
    gap: 4px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    transition: background 0.3s ease;
}

.strength-bar.active-weak {
    background: #dc3545;
}

.strength-bar.active-medium {
    background: #ffc107;
}

.strength-bar.active-strong {
    background: #28a745;
}

.password-requirements {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-gray);
}

.password-requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.password-requirement i {
    font-size: 12px;
}

.password-requirement.met {
    color: #28a745;
}

.password-requirement.met i {
    color: #28a745;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-gray);
    cursor: pointer;
}

.form-check-label a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

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

/* ========================================
   Buttons
   ======================================== */

.btn {
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #0052cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-outline {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    width: 100%;
}

.btn-outline:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-google {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    width: 100%;
    gap: 12px;
}

.btn-google:hover {
    background: var(--bg-light);
    border-color: var(--text-gray);
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* ========================================
   Divider
   ======================================== */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-gray);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ========================================
   Footer Links
   ======================================== */

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-gray);
}

.auth-footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

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

/* ========================================
   Role Selection Cards
   ======================================== */

.role-selection-container {
    min-height: 100vh;
    display: flex;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.role-selection-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    bottom: -300px;
    left: -200px;
}

.role-selection-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 2;
}

.role-header {
    text-align: center;
    margin-bottom: 60px;
}

.role-logo {
    margin-bottom: 40px;
}

.role-logo img {
    height: 50px;
    filter: brightness(0) invert(1);
}

.role-title {
    font-size: 42px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    line-height: 1.2;
}

.role-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 800px;
    width: 100%;
}

.role-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
}

.role-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.role-card.freelance {
    border-color: var(--primary-blue);
}

.role-card.freelance:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.3);
}

.role-card.entreprise {
    border-color: var(--teal-primary);
}

.role-card.entreprise:hover {
    border-color: var(--teal-primary);
    box-shadow: 0 12px 40px rgba(22, 160, 133, 0.3);
}

.role-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.role-card.freelance .role-icon {
    color: var(--primary-blue);
}

.role-card.entreprise .role-icon {
    color: var(--teal-primary);
}

.role-card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.role-card-description {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.6;
}

.role-footer {
    margin-top: 60px;
    text-align: center;
}

.role-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.role-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
}

.role-stat i {
    font-size: 18px;
    opacity: 0.8;
}

.role-links {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.role-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    margin: 0 8px;
}

.role-links a:hover {
    text-decoration: underline;
}

/* ========================================
   Password Reset Screens
   ======================================== */

.reset-card {
    background: white;
    border-radius: 24px;
    padding: 48px;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.reset-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.reset-icon.lock {
    color: #ffc107;
}

.reset-icon.email {
    color: var(--primary-blue);
}

.reset-icon.success {
    color: #28a745;
}

.reset-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.reset-description {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 32px;
    line-height: 1.6;
}

.reset-email-display {
    background: var(--bg-light);
    padding: 16px;
    border-radius: 12px;
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 24px;
    font-weight: 500;
}

.reset-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.reset-footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.reset-timer {
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 16px;
}

/* ========================================
   Breadcrumb
   ======================================== */

.auth-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 24px;
}

.auth-breadcrumb a {
    color: var(--text-gray);
    text-decoration: none;
}

.auth-breadcrumb a:hover {
    color: var(--primary-blue);
}

.auth-breadcrumb i {
    font-size: 10px;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 992px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-left-panel {
        padding: 40px;
        min-height: 300px;
    }

    .auth-right-panel {
        padding: 40px;
    }

    .auth-illustration img {
        max-height: 200px;
    }

    .role-title {
        font-size: 32px;
    }

    .role-cards {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 0;
    }

    .auth-wrapper {
        border-radius: 0;
        min-height: 100vh;
    }

    .auth-left-panel {
        padding: 30px;
    }

    .auth-right-panel {
        padding: 30px;
    }

    .auth-title {
        font-size: 26px;
    }

    .reset-card {
        padding: 32px;
        border-radius: 0;
    }

    .role-selection-wrapper {
        padding: 20px;
    }

    .role-title {
        font-size: 28px;
    }

    .role-cards {
        gap: 20px;
    }

    .role-stats {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .auth-left-panel {
        display: none;
    }

    .auth-right-panel {
        padding: 24px;
    }

    .form-control,
    .form-select {
        padding: 12px 14px;
        font-size: 14px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .reset-card {
        padding: 24px;
    }

    .reset-title {
        font-size: 24px;
    }
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-left-panel {
    animation: slideInLeft 0.6s ease;
}

.auth-right-panel {
    animation: slideInRight 0.6s ease;
}

.role-card {
    animation: fadeIn 0.6s ease;
}

.role-card:nth-child(1) {
    animation-delay: 0.1s;
}

.role-card:nth-child(2) {
    animation-delay: 0.2s;
}

/* ========================================
   Loading State
   ======================================== */

.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Alert Messages
   ======================================== */

.auth-alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auth-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.auth-alert i {
    font-size: 18px;
}
