/* =============================================================================
   Amphyx — inscription simplifiée (onboarding.html, signup_code.html)
   ============================================================================= */
.su-page {
    min-height: calc(100vh - 64px);
    padding: 28px 14px 48px;
    background: linear-gradient(180deg, #f3f6fb 0%, #ffffff 60%);
}
.su-card {
    max-width: 480px;
    margin: 0 auto;
    padding: 26px 22px 24px;
    border: 1px solid #e6ebf2;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 18px 40px -24px rgba(12, 46, 96, 0.35);
}
.su-head { text-align: center; margin-bottom: 18px; }
.su-logo { display: block; margin: 0 auto 10px; }
.su-title { margin: 0 0 6px; color: #0c2e60; font-size: 25px; font-weight: 800; letter-spacing: -0.3px; }
.su-sub { margin: 0; color: #5b6b82; font-size: 14.5px; line-height: 1.5; }
.su-sub a { color: #ee390f; font-weight: 600; }
.su-mail-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; margin-bottom: 10px;
    border-radius: 16px; background: #fff4ef; color: #ee390f; font-size: 24px;
}

/* Étapes */
.su-steps { display: flex; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.su-steps li {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 4px; border-radius: 10px; background: #f1f5f9;
    color: #7a8aa0; font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.su-steps li span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; background: #dde4ee; color: #4b5b72; font-size: 11px;
}
.su-steps li.is-active { background: #0c2e60; color: #ffffff; }
.su-steps li.is-active span { background: #ee390f; color: #ffffff; }
.su-steps li.is-done { background: #ecfdf3; color: #157347; }
.su-steps li.is-done span { background: #22a06b; color: #ffffff; }

.su-step { display: none; }
.su-step.is-active { display: block; animation: suIn 0.2s ease-out; }
@keyframes suIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Champs */
.su-row { display: flex; gap: 10px; }
.su-row > .su-field { flex: 1; min-width: 0; }
.su-field { margin: 0 0 14px; border: 0; padding: 0; }
.su-field label, .su-field legend {
    display: block; margin-bottom: 6px; color: #1c2b40; font-size: 13.5px; font-weight: 700;
}
.su-field label small { color: #8090a6; font-weight: 500; margin-left: 4px; }
.su-field input[type=text], .su-field input[type=email], .su-field input[type=password] {
    width: 100%; height: 50px; padding: 0 14px;
    border: 1.5px solid #dbe3ee; border-radius: 13px; background: #fbfcfe;
    color: #0f1d33; font-size: 16px; outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.su-field input:focus { border-color: #0c2e60; background: #ffffff; box-shadow: 0 0 0 3px rgba(12, 46, 96, 0.12); }
.su-field.has-error input[type=text], .su-field.has-error input[type=email], .su-field.has-error input[type=password] {
    border-color: #dc3545; background: #fff8f8;
}
.su-err { margin: 6px 2px 0; color: #c62839; font-size: 13px; font-weight: 600; }
.su-ok { margin: 6px 2px 0; color: #157347; font-size: 13px; font-weight: 600; }
.su-pass { position: relative; }
.su-pass input { padding-right: 50px !important; }
.su-eye {
    position: absolute; top: 5px; right: 5px; width: 40px; height: 40px;
    border: 0; border-radius: 10px; background: transparent; color: #5b6b82;
}
.su-prefix { position: relative; }
.su-prefix span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8090a6; font-weight: 700; }
.su-prefix input { padding-left: 30px !important; }

/* Niveau : puces */
.su-levels { display: flex; flex-wrap: wrap; gap: 8px; }
.su-levels legend { width: 100%; }
.su-chip { margin: 0; cursor: pointer; }
.su-chip input { position: absolute; opacity: 0; pointer-events: none; }
.su-chip span {
    display: inline-block; min-width: 50px; padding: 9px 12px; text-align: center;
    border: 1.5px solid #dbe3ee; border-radius: 999px; background: #ffffff;
    color: #33445c; font-size: 14px; font-weight: 700;
}
.su-chip input:checked + span { border-color: #0c2e60; background: #0c2e60; color: #ffffff; }
.su-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(238, 57, 15, 0.35); }
.su-levels.has-error .su-chip span { border-color: #f1a7ae; }
.su-levels .su-err { width: 100%; }

/* Parrainage, conditions */
.su-ref { margin: 0 0 14px; }
.su-ref summary { cursor: pointer; color: #0c2e60; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.su-terms {
    display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; padding: 12px 14px;
    border: 1.5px solid #e6ebf2; border-radius: 13px; background: #f8fafc;
    color: #33445c; font-size: 13.5px; line-height: 1.5; cursor: pointer; flex-wrap: wrap;
}
.su-terms input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 20px; accent-color: #ee390f; }
.su-terms span { flex: 1; min-width: 0; }
.su-terms a { color: #0c2e60; font-weight: 700; text-decoration: underline; }
.su-terms.has-error { border-color: #dc3545; background: #fff8f8; }
.su-terms .su-err { width: 100%; margin: 0 0 0 30px; }

/* Boutons */
.su-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 52px; border: 0; border-radius: 14px;
    background: #ee390f; color: #ffffff; font-size: 16px; font-weight: 800;
    box-shadow: 0 10px 22px -12px rgba(238, 57, 15, 0.8); cursor: pointer;
}
.su-btn:hover { background: #d93008; color: #ffffff; }
.su-btn:disabled { opacity: 0.85; cursor: wait; }
.su-btn--ghost { background: #ffffff; color: #0c2e60; border: 1.5px solid #dbe3ee; box-shadow: none; }
.su-btn--ghost:hover { background: #f4f7fb; color: #0c2e60; }
.su-actions { display: flex; gap: 10px; }
.su-actions .su-btn--ghost { flex: 0 0 34%; }
.su-spinner {
    display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff; border-radius: 50%; animation: suSpin 0.7s linear infinite;
}
.su-btn.is-busy .su-spinner { display: inline-block; }
@keyframes suSpin { to { transform: rotate(360deg); } }

.su-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    height: 50px; margin-bottom: 14px; border: 1.5px solid #dbe3ee; border-radius: 13px;
    background: #ffffff; color: #1c2b40 !important; font-size: 15.5px; font-weight: 700; text-decoration: none !important;
}
.su-google:hover { background: #f8fafc; }
.su-or { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: #8090a6; font-size: 13px; }
.su-or::before, .su-or::after { content: ""; flex: 1; height: 1px; background: #e6ebf2; }
.su-google-id {
    display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px;
    border-radius: 14px; background: #f0f7ff;
}
.su-google-id img { border-radius: 50%; }
.su-google-id b { display: block; color: #0c2e60; font-size: 14.5px; word-break: break-all; }
.su-google-id small { color: #157347; font-weight: 600; }

.su-alert {
    display: flex; gap: 10px; margin-bottom: 16px; padding: 12px 14px;
    border-radius: 13px; background: #fff1f2; border: 1px solid #fecdd3; color: #9f1239; font-size: 14px;
}
.su-alert i { margin-top: 3px; }
.su-alert p { margin: 0; }
.su-alert-links { margin-top: 6px !important; font-weight: 700; }
.su-alert-links a { color: #0c2e60; text-decoration: underline; }
.su-note { margin: 12px 0 0; color: #5b6b82; font-size: 13px; line-height: 1.5; }
.su-note--center { text-align: center; }

/* Page du code */
.su-code {
    width: 100%; height: 64px !important; text-align: center;
    font-size: 30px !important; font-weight: 800; letter-spacing: 10px;
}
.su-code-links { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 18px; }
.su-code-links form { margin: 0; }
.su-link { border: 0; background: none; padding: 4px; color: #0c2e60; font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; }

@media (max-width: 380px) {
    .su-card { padding: 22px 16px 20px; border-radius: 16px; }
    .su-row { flex-direction: column; gap: 0; }
    .su-steps li { font-size: 11.5px; }
}

/* Code PIN : deux cases côte à côte, chiffres espacés */
.su-pin .su-row input { text-align: center; letter-spacing: 8px; font-weight: 800; }
.su-pin .su-row input::placeholder { letter-spacing: 0; font-weight: 500; }
@media (max-width: 380px) { .su-pin .su-row { flex-direction: row; gap: 10px; } }
