/* ============================
   IMPORT FONTS
   ============================ */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&display=swap');

/* ============================
   VARIABLES & RESET
   ============================ */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-body: #5F7392;
    --title-color: #132549;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-body);
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
}

/* ============================
   TYPOGRAPHY - TITRES H
   ============================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--title-color);
    text-align: center;
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    line-height: 48px;
}

h1, h2, h3 {
    font-size: 40px;
}

/* ============================
   CONTAINER & LAYOUT
   ============================ */
.onboarding-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.onboarding-header {
    background: var(--surface);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 40px;
}

.logo h1 {
    color: var(--primary-color);
}

.onboarding-main {
    flex: 1;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.onboarding-footer {
    background: var(--surface);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}

/* ============================
   PROGRESS BAR
   ============================ */
.progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 500px;
    margin-left: 2rem;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.progress-step.completed {
    background: linear-gradient(180deg, rgb(70, 228, 85) 0%, rgb(0, 153, 19) 100%);
    color: white;
}

.progress-step.active {
    background: #132549;
    color: white;
    transform: scale(1.1);
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 100%;
    width: 1rem;
    height: 2px;
    background: var(--border-color);
}

.progress-step.completed:not(:last-child)::after {
    background: linear-gradient(180deg, rgb(70, 228, 85) 0%, rgb(0, 153, 19) 100%);
}

/* ============================
   STEP CONTAINER
   ============================ */
.step-container {
    background: var(--surface);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.step-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.step-header h2 {
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.vrp-badge {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ============================
   FORMS
   ============================ */
.onboarding-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 35px;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border: 2px solid transparent;
    border-image: linear-gradient(180deg, #3CB0E3 0%, #158DB7 100%) 1;
    border-radius: 8px;
}

.form-group.has-error input,
.form-group.has-error select {
    border-color: var(--error-color);
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-with-button {
    display: flex;
    gap: 0.5rem;
}

.input-with-button input {
    flex: 1;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* ============================
   BUTTONS
   ============================ */
.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary.btn-gradient-green {
    background: linear-gradient(180deg, rgb(70, 228, 85) 0%, rgb(0, 153, 19) 100%);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary.btn-gradient-green:hover:not(:disabled) {
    background: linear-gradient(180deg, rgb(60, 218, 75) 0%, rgb(0, 143, 15) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: linear-gradient(180deg, #3CB0E3 0%, #158DB7 100%);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(180deg, #35A5D1 0%, #127FA3 100%);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn .arrow {
    margin-left: 0.5rem;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* ============================
   FORM ACTIONS
   ============================ */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.form-footer a {
    background: linear-gradient(180deg, #3CB0E3 0%, #158DB7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-weight: 600;
}

/* ============================
   COUNTER SELECTOR (STEP 3)
   ============================ */
.counter-selector {
    text-align: center;
    padding: 2rem 0;
}

.counter-display {
    margin-bottom: 2rem;
}

.counter-value {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(180deg, #3CB0E3 0%, #158DB7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.counter-label {
    display: block;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.counter-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.counter-slider {
    width: 300px;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #C1D4EB;
    border-radius: 50px;
    outline: none;
}

.counter-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(180deg, #3CB0E3 0%, #158DB7 100%);
    border-radius: 50%;
    cursor: pointer;
}

.counter-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(180deg, #3CB0E3 0%, #158DB7 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.counter-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #132549;
    background: white;
    color: #132549;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.counter-btn:hover {
    background: #132549;
    color: white;
}

.counter-info {
    background: #eff6ff;
    padding: 1rem;
    border-radius: 8px;
    color: #1e40af;
}

/* ============================
   PRICING (STEP 4)
   ============================ */
.pricing-info {
    margin-bottom: 2rem;
}

.pricing-card {
    background: linear-gradient(180deg, rgb(60, 176, 227) 0%, rgb(21, 141, 183) 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.pricing-card h3 {
    margin-bottom: 1.5rem;
    color: white;
}

.price-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.price-detail:last-of-type {
    border-bottom: none;
}

.price-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.price-value.primary {
    font-size: 1.5rem;
}

.trial-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    line-height: 1.8;
}

.mandate-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
}

.mandate-status.hidden {
    display: none;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
}

.mandate-details {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.sepa-info {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================
   QR CODE (STEP 5)
   ============================ */
.qr-info-card {
    background: linear-gradient(180deg, rgb(60, 176, 227) 0%, rgb(21, 141, 183) 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.qr-id-display {
    text-align: center;
    margin-bottom: 2rem;
}

.qr-id-display h3 {
    margin-bottom: 1rem;
    color: white;
}

.code-box {
    background: white;
    color: var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.code-value {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

.info-text {
    margin-top: 1rem;
    opacity: 0.9;
}

.qr-benefits {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
}

.qr-benefits h4 {
    margin-bottom: 1rem;
    color: white;
    text-align: left;
}

.qr-benefits ul {
    list-style: none;
}

.qr-benefits li {
    padding: 0.5rem 0;
    font-size: 1rem;
}

/* ============================
   TRAINING MODULES (STEP 6)
   ============================ */
.training-modules {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.module-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.module-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.module-header {
    margin-bottom: 1rem;
}

.module-number {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.module-header h3 {
    text-align: left;
}

.training-video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.module-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.module-validation {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.completion-status {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.warning-text {
    color: var(--warning-color);
    font-weight: 600;
}

.success-text {
    color: var(--success-color);
    font-weight: 600;
    font-size: 1.125rem;
}

/* ============================
   SUCCESS PAGE
   ============================ */
.success-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.success-container h1 {
    margin-bottom: 0.5rem;
}

.success-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.success-details {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
    text-align: left;
}

.detail-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.detail-card.highlight {
    background: linear-gradient(180deg, rgb(60, 176, 227) 0%, rgb(21, 141, 183) 100%);
    color: white;
}

.detail-card h3 {
    margin-bottom: 1rem;
    text-align: left;
}

.detail-card ul, .detail-card ol {
    margin-left: 1.5rem;
}

.detail-card li {
    margin-bottom: 0.5rem;
}

.trial-date {
    font-size: 1.125rem;
    margin-top: 0.5rem;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.contact-info {
    color: var(--text-secondary);
    margin-top: 2rem;
}

.contact-info a {
    background: linear-gradient(180deg, #3CB0E3 0%, #158DB7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    h1, h2, h3 {
        font-size: 28px;
        line-height: 36px;
    }
    
    .onboarding-header {
        padding: 0.75rem 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .progress-bar {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .logo img {
        height: 32px;
    }
    
    .onboarding-main {
        padding: 1rem;
    }
    
    .step-container {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .input-with-button {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .progress-bar {
        gap: 0.5rem;
    }
    
    .progress-step {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .counter-slider {
        width: 200px;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
    }
}

/* ============================
   PASSWORD STRENGTH INDICATOR
   ============================ */
.password-strength {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    background: var(--border-color);
}

.strength-text {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
}

/* ============================
   SPINNER
   ============================ */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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