/* ============================================================================
   Wizard d'inscription publique — design systeme
   Reutilise la palette "stitch" de Landing.cshtml pour la coherence visuelle.
   ============================================================================ */

:root {
    --wiz-primary: #4b41e1;
    --wiz-primary-dark: #3730b8;
    --wiz-primary-light: #645efb;
    --wiz-accent: #27c38a;
    --wiz-accent-dark: #059669;
    --wiz-danger: #dc2626;
    --wiz-text-title: #0b1c30;
    --wiz-text-body: #444651;
    --wiz-text-muted: #757682;
    --wiz-surface: #ffffff;
    --wiz-surface-alt: #f5f7ff;
    --wiz-border: rgba(64, 89, 170, 0.12);
    --wiz-border-strong: rgba(75, 65, 225, 0.25);
    --wiz-shadow-sm: 0 1px 2px rgba(0, 35, 111, 0.04);
    --wiz-shadow-md: 0 10px 30px -5px rgba(0, 35, 111, 0.08), 0 4px 12px -2px rgba(0, 35, 111, 0.04);
    --wiz-shadow-lg: 0 25px 50px -12px rgba(75, 65, 225, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--wiz-text-body);
    line-height: 1.6;
    background:
        radial-gradient(circle at 15% 10%, rgba(75, 65, 225, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(39, 195, 138, 0.07) 0%, transparent 55%),
        linear-gradient(135deg, #eff4ff 0%, #f8f9ff 50%, #e5eeff 100%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, .brand-font {
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
    color: var(--wiz-text-title);
}

a { color: var(--wiz-primary); text-decoration: none; }
a:hover { color: var(--wiz-primary-dark); }

/* ---------- Shell / layout ---------- */

.wiz-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 16px 32px;
}

.wiz-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.wiz-brand .logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--wiz-primary) 0%, var(--wiz-primary-light) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(75, 65, 225, 0.3);
}

.wiz-brand .name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--wiz-text-title);
}

.wiz-brand .by {
    font-size: 12px;
    color: var(--wiz-text-muted);
    display: block;
    margin-top: -4px;
}

.wiz-card {
    max-width: 760px;
    width: 100%;
    margin: 0 auto;
    background: var(--wiz-surface);
    border-radius: 24px;
    box-shadow: var(--wiz-shadow-md);
    border: 1px solid var(--wiz-border);
    padding: 32px 32px 28px;
    animation: wiz-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wiz-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.wiz-card h1 {
    font-size: 26px;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wiz-card h1 i {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(75, 65, 225, 0.1) 0%, rgba(100, 94, 251, 0.15) 100%);
    color: var(--wiz-primary);
    font-size: 20px;
}

.wiz-card .subtitle {
    color: var(--wiz-text-muted);
    margin: 0 0 24px;
    font-size: 15px;
}

/* ---------- Stepper ---------- */

.wiz-stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 0 0 28px;
    position: relative;
}

.wiz-stepper::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(to right, var(--wiz-border) 0%, var(--wiz-border) 100%);
    z-index: 0;
}

.wiz-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.wiz-step .circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    background: white;
    color: var(--wiz-text-muted);
    border: 2px solid var(--wiz-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wiz-step .label {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--wiz-text-muted);
    font-weight: 500;
}

.wiz-step.done .circle {
    background: var(--wiz-accent);
    border-color: var(--wiz-accent);
    color: white;
}

.wiz-step.current .circle {
    background: linear-gradient(135deg, var(--wiz-primary) 0%, var(--wiz-primary-light) 100%);
    border-color: var(--wiz-primary);
    color: white;
    box-shadow: 0 0 0 6px rgba(75, 65, 225, 0.12);
    transform: scale(1.08);
}

.wiz-step.done .label,
.wiz-step.current .label {
    color: var(--wiz-text-title);
    font-weight: 600;
}

/* ---------- Forms ---------- */

.wiz-field {
    margin-bottom: 18px;
}

.wiz-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wiz-text-title);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.wiz-field .hint {
    font-size: 12px;
    color: var(--wiz-text-muted);
    margin-top: 6px;
}

.wiz-input,
.wiz-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--wiz-text-title);
    background: var(--wiz-surface-alt);
    border: 1.5px solid var(--wiz-border);
    border-radius: 12px;
    transition: all 0.2s ease;
    outline: none;
}

.wiz-input:focus,
.wiz-select:focus {
    background: white;
    border-color: var(--wiz-primary);
    box-shadow: 0 0 0 4px rgba(75, 65, 225, 0.1);
}

.wiz-input::placeholder { color: var(--wiz-text-muted); }

.wiz-input.otp {
    text-align: center;
    letter-spacing: 12px;
    font-size: 28px;
    font-family: 'Space Grotesk', monospace;
    font-weight: 700;
    padding: 18px 12px;
}

.wiz-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .wiz-grid-2 { grid-template-columns: 1fr 1fr; }
    .wiz-grid-7-5 { grid-template-columns: 7fr 5fr; }
    .wiz-grid-6-6 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Buttons ---------- */

.wiz-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.wiz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    white-space: nowrap;
}

.wiz-btn-primary {
    background: linear-gradient(135deg, var(--wiz-primary) 0%, var(--wiz-primary-light) 100%);
    color: white;
    box-shadow: 0 10px 22px rgba(75, 65, 225, 0.3);
}

.wiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(75, 65, 225, 0.4);
    color: white;
}

.wiz-btn-success {
    background: linear-gradient(135deg, var(--wiz-accent) 0%, #10d394 100%);
    color: white;
    box-shadow: 0 10px 22px rgba(39, 195, 138, 0.3);
}

.wiz-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(39, 195, 138, 0.4);
    color: white;
}

.wiz-btn-outline {
    background: white;
    color: var(--wiz-primary);
    border: 2px solid var(--wiz-border-strong);
}

.wiz-btn-outline:hover {
    background: var(--wiz-surface-alt);
    border-color: var(--wiz-primary);
    color: var(--wiz-primary-dark);
}

.wiz-btn-link {
    background: transparent;
    color: var(--wiz-primary);
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
}

.wiz-btn-link:hover {
    color: var(--wiz-primary-dark);
    text-decoration: underline;
}

/* ---------- Alerts ---------- */

.wiz-alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.wiz-alert i { font-size: 18px; margin-top: 1px; }

.wiz-alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.wiz-alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid rgba(22, 101, 52, 0.2);
}

.wiz-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid rgba(146, 64, 14, 0.2);
}

.wiz-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid rgba(30, 64, 175, 0.2);
}

/* ---------- Plan cards (step 2) ---------- */

.wiz-plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

@media (min-width: 640px) {
    .wiz-plan-grid { grid-template-columns: repeat(3, 1fr); }
}

.wiz-plan {
    display: block;
    cursor: pointer;
    background: white;
    border: 2px solid var(--wiz-border);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.wiz-plan:hover {
    border-color: var(--wiz-border-strong);
    transform: translateY(-3px);
    box-shadow: var(--wiz-shadow-md);
}

.wiz-plan.selected {
    border-color: var(--wiz-primary);
    background: linear-gradient(135deg, rgba(75, 65, 225, 0.05) 0%, rgba(100, 94, 251, 0.08) 100%);
    box-shadow: 0 0 0 4px rgba(75, 65, 225, 0.12), var(--wiz-shadow-md);
}

.wiz-plan h3 {
    font-size: 18px;
    margin: 0 0 4px;
}

.wiz-plan .price {
    font-size: 28px;
    font-weight: 800;
    color: var(--wiz-primary);
    font-family: 'Space Grotesk', monospace;
}

.wiz-plan .per {
    font-size: 13px;
    color: var(--wiz-text-muted);
}

.wiz-plan .desc {
    font-size: 13px;
    color: var(--wiz-text-body);
    margin-top: 10px;
    line-height: 1.5;
}

.wiz-plan .badge {
    position: absolute;
    top: -10px;
    right: 16px;
    background: linear-gradient(135deg, var(--wiz-accent) 0%, #10d394 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(39, 195, 138, 0.4);
}

/* ---------- Payment option cards (step 5) ---------- */

.wiz-option {
    display: block;
    cursor: pointer;
    background: white;
    border: 2px solid var(--wiz-border);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 12px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wiz-option:hover {
    border-color: var(--wiz-border-strong);
    transform: translateX(2px);
}

.wiz-option.selected {
    border-color: var(--wiz-primary);
    background: linear-gradient(135deg, rgba(75, 65, 225, 0.04) 0%, rgba(100, 94, 251, 0.08) 100%);
    box-shadow: 0 0 0 4px rgba(75, 65, 225, 0.1);
}

.wiz-option.trial {
    border-color: var(--wiz-accent);
    background: linear-gradient(135deg, rgba(39, 195, 138, 0.04) 0%, rgba(39, 195, 138, 0.08) 100%);
    position: relative;
}

.wiz-option.trial.selected {
    border-color: var(--wiz-accent-dark);
    background: linear-gradient(135deg, rgba(39, 195, 138, 0.08) 0%, rgba(39, 195, 138, 0.14) 100%);
    box-shadow: 0 0 0 4px rgba(39, 195, 138, 0.15);
}

.wiz-option-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.wiz-option .title {
    font-weight: 700;
    font-size: 16px;
    color: var(--wiz-text-title);
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wiz-option .title i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.wiz-option.trial .title i {
    background: linear-gradient(135deg, var(--wiz-accent) 0%, #10d394 100%);
    color: white;
}

.wiz-option:not(.trial) .title i {
    background: linear-gradient(135deg, rgba(75, 65, 225, 0.1) 0%, rgba(100, 94, 251, 0.18) 100%);
    color: var(--wiz-primary);
}

.wiz-option .desc {
    font-size: 14px;
    color: var(--wiz-text-muted);
    margin: 0;
    line-height: 1.55;
    padding-left: 46px;
}

.wiz-option .radio {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--wiz-border-strong);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin-top: 8px;
}

.wiz-option.selected .radio {
    border-color: var(--wiz-primary);
}

.wiz-option.trial.selected .radio {
    border-color: var(--wiz-accent-dark);
}

.wiz-option.selected .radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--wiz-primary);
}

.wiz-option.trial.selected .radio::after {
    background: var(--wiz-accent-dark);
}

.wiz-trial-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--wiz-accent) 0%, #10d394 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 8px;
    box-shadow: 0 4px 10px rgba(39, 195, 138, 0.35);
}

.wiz-paynow-details {
    margin-top: 12px;
    padding: 16px;
    background: var(--wiz-surface-alt);
    border-radius: 12px;
    border: 1px dashed var(--wiz-border-strong);
}

/* ---------- Footer links ---------- */

.wiz-footnote {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--wiz-text-muted);
}

/* ---------- Mobile adjustments ---------- */

@media (max-width: 640px) {
    .wiz-card {
        padding: 24px 20px;
        border-radius: 20px;
    }
    .wiz-card h1 { font-size: 22px; }
    .wiz-card h1 i { width: 36px; height: 36px; font-size: 16px; }
    .wiz-stepper .label { font-size: 10px; }
    .wiz-step .circle { width: 32px; height: 32px; font-size: 12px; }
    .wiz-btn { padding: 11px 20px; font-size: 14px; width: 100%; justify-content: center; }
    .wiz-actions { flex-direction: column-reverse; }
    .wiz-input.otp { letter-spacing: 8px; font-size: 24px; }
    .wiz-option .desc { padding-left: 0; margin-top: 8px; }
}
