:root {
    --primary: #FF6B00;
    --primary-light: #FF8C33;
    --primary-dark: #D95A00;
    --primary-glow: rgba(255, 107, 0, 0.12);
    --success: #00C896;
    --error: #FF4D6A;
    --warning: #FFB020;
    
    /* Light theme palette */
    --dark: #1A1A1A;              /* Pour textes principaux */
    --surface: #FFFFFF;           /* Blanc pur - fond principal */
    --surface2: #F8F7F5;          /* Gris très clair chaud - sections */
    --surface3: #F0EEEB;          /* Gris clair - inputs/éléments */
    --border: #E8E5E1;            /* Bordures subtiles */
    --border-light: #DDD9D4;      /* Bordures au survol */
    --text: #1A1A1A;              /* Texte principal presque noir */
    --text-muted: #6B6B6B;        /* Texte secondaire */
    --text-dim: #9B9B9B;          /* Texte tértiaire/grisé */
    --white: #FFFFFF;
    
    --radius: 14px;
    --radius-sm: 8px;
}

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

body {
    background: var(--surface2);  /* Fond général clair */
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

.layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    background: var(--surface);   /* Blanc */
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 48px 40px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 56px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
}

.sidebar-headline {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 30px;
    line-height: 1.15;
    color: var(--text);           /* Texte foncé au lieu de blanc */
    margin-bottom: 16px;
}

.sidebar-headline span { color: var(--primary); }

.sidebar-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 48px;
    line-height: 1.7;
}

.feat-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.feat-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.feat-dot {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface3);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.feat-item:hover .feat-dot {
    background: var(--primary-glow);
    border-color: var(--primary);
}

.feat-info h4 {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 3px;
}

.feat-info p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.sidebar-footer {
    margin-top: auto;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.sidebar-footer p { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }

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

.sidebar-footer a:hover { gap: 10px; }

.sidebar::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255,107,0,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ── Main ── */
.main {
    background: var(--surface2);  /* Gris très clair */
    padding: 48px 56px 80px;
    overflow-y: auto;
}

.main-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 48px;
}

.login-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 18px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.login-pill span { color: var(--primary); font-weight: 600; }
.login-pill:hover { border-color: var(--primary); color: var(--text); box-shadow: 0 4px 12px rgba(255,107,0,0.1); }

/* ── Steps ── */
.steps-nav {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.step-pill {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 100px;
    transition: background 0.4s ease;
}

.step-pill.active { background: var(--primary); }
.step-pill.done { background: var(--success); }

.steps-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.step-lbl {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-dim);
    transition: color 0.3s;
}

.step-lbl.active { color: var(--primary); }
.step-lbl.done { color: var(--success); }

/* ── Section title ── */
.section-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 26px;
    color: var(--text);           /* Texte foncé */
    margin-bottom: 6px;
}

.section-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 36px;
}

/* ── Form steps ── */
.form-step { display: none; animation: fadeUp 0.35s ease; }
.form-step.active { display: block; }

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

/* ── Form ── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 8px;
}

.form-group label.req::after { content: ' *'; color: var(--primary); }

.form-control {
    width: 100%;
    padding: 13px 16px;
    background: var(--surface);   /* Blanc pour les inputs */
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.form-control::placeholder { color: var(--text-dim); }
.form-control:hover { border-color: var(--border-light); }
.form-control:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-control.is-error { border-color: var(--error); }
.form-control.is-valid { border-color: var(--success); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6B6B' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

select.form-control option { background: var(--surface); color: var(--text); }

.input-wrap { position: relative; }

.toggle-pw {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    cursor: pointer;
    font-size: 15px;
    background: none;
    border: none;
    transition: color 0.2s;
    padding: 4px;
}

.toggle-pw:hover { color: var(--primary); }

.field-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 5px;
    display: none;
}

.form-group.has-error .field-error { display: block; }
.form-group.has-error .form-control { border-color: var(--error); }

/* ── Type selector ── */
.type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 22px;
}

.type-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.type-card:hover { border-color: var(--border-light); transform: translateY(-1px); }

.type-card.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 0, 0.05);
    box-shadow: 0 4px 12px rgba(255,107,0,0.08);
}

.type-card input[type="radio"] { display: none; }

.type-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 17px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.type-card.selected .type-icon { background: var(--primary); color: white; }

.type-info h4 {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 2px;
}

.type-info p { font-size: 12px; color: var(--text-muted); }

/* ── Password strength ── */
.pw-strength {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.pw-bar {
    flex: 1;
    height: 3px;
    background: var(--border);
    border-radius: 100px;
    overflow: hidden;
}

.pw-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 100px;
    transition: all 0.3s;
}

.pw-label {
    font-size: 11px;
    color: var(--text-dim);
    width: 56px;
    text-align: right;
}

/* ── File drop ── */
.file-drop {
    border: 1.5px dashed var(--border-light);
    border-radius: var(--radius-sm);
    padding: 28px 20px;
    text-align: center;
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s;
}

.file-drop:hover {
    border-color: var(--primary);
    background: rgba(255, 107, 0, 0.02);
}

.file-drop i { font-size: 28px; color: var(--primary); margin-bottom: 10px; display: block; }
.file-drop p { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.file-drop .hint { font-size: 12px; color: var(--text-dim); }

/* ── CNI ── */
.cni-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.cni-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.cni-card h4 {
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
}

.camera-box {
    aspect-ratio: 3/2;
    background: var(--surface3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-box video, .camera-box img { width: 100%; height: 100%; object-fit: cover; }

.cam-placeholder { color: var(--text-dim); font-size: 12px; padding: 16px; text-align: center; }
.cam-placeholder i { font-size: 24px; display: block; margin-bottom: 8px; color: var(--border-light); }

.cni-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ── Biometric ── */
.bio-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.bio-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-glow);
    border: 1px solid rgba(255,107,0,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary);
    font-size: 24px;
}

.bio-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 17px; margin-bottom: 8px; color: var(--text); }
.bio-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }

.bio-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.bio-badge.avail { background: rgba(0,200,150,0.12); color: var(--success); }
.bio-badge.unavail { background: rgba(255,77,106,0.12); color: var(--error); }

/* ── Review ── */
.review-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.review-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface3);
}

.review-header i { color: var(--primary); }
.review-header span { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 14px; color: var(--text); }

.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
}

.review-row:last-child { border-bottom: none; }
.review-key { font-size: 13px; color: var(--text-muted); }
.review-val { font-size: 14px; font-weight: 600; color: var(--text); } /* Texte foncé au lieu de blanc */

/* ── Terms ── */
.terms-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 28px;
}

.terms-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.terms-row label { font-size: 13px; color: var(--text-muted); line-height: 1.6; cursor: pointer; }
.terms-row a { color: var(--primary); font-weight: 600; text-decoration: none; }
.terms-row a:hover { text-decoration: underline; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary { 
    background: var(--primary); 
    color: white;
    box-shadow: 0 4px 12px rgba(255,107,0,0.2);
}
.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,107,0,0.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: var(--surface);
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}

.btn-ghost:hover { 
    border-color: var(--border-light); 
    color: var(--text);
    background: var(--surface2);
}

.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Form nav ── */
.form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

/* ── Check circle ── */
.check-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0,200,150,0.1);
    border: 1px solid rgba(0,200,150,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 30px;
    color: var(--success);
}

/* ── Notifications ── */
#notifs {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 340px;
    width: 100%;
}

.notif {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    animation: slideIn 0.3s ease;
}

.notif.success { border-left: 3px solid var(--success); }
.notif.error { border-left: 3px solid var(--error); }
.notif.info { border-left: 3px solid var(--primary); }

@keyframes slideIn {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        padding: 28px 24px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .sidebar::after { display: none; }
    .sidebar-headline { font-size: 22px; }
    .feat-list { display: none; }
    .main { padding: 32px 24px 60px; }
}

@media (max-width: 640px) {
    .main { padding: 24px 16px 60px; }
    .form-row { grid-template-columns: 1fr; }
    .cni-grid { grid-template-columns: 1fr; }
    .type-selector { grid-template-columns: 1fr; }
    .steps-labels { display: none; }
    .form-nav { flex-direction: column-reverse; gap: 10px; }
    .form-nav .btn { width: 100%; }
    #notifs { left: 12px; right: 12px; max-width: none; }
}