*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --purple: #7F77DD;
    --purple-light: #EEEDFE;
    --purple-mid: #AFA9EC;
    --purple-dark: #3C3489;
    --teal: #1D9E75;
    --teal-light: #E1F5EE;
    --teal-dark: #085041;
    --amber: #BA7517;
    --amber-light: #FAEEDA;
    --coral: #D85A30;
    --coral-light: #FAECE7;
    --red: #E24B4A;
    --red-light: #FCEBEB;
    --bg: #ffffff;
    --bg2: #f5f5f3;
    --bg3: #efeeec;
    --text: #1a1a18;
    --muted: #6b6b67;
    --border: rgba(0, 0, 0, 0.10);
    --border-focus: var(--purple);
    --radius: 10px;
    --radius-lg: 16px;
}

html,
body {
    min-height: 100%;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--bg2);
}

/* ── LAYOUT ─────────────────────────────────── */
.page {
    display: grid;
    grid-template-columns: 1fr 480px;
    min-height: 100vh;
}

/* ── LEFT PANEL ─────────────────────────────── */
.left-panel {
    background: var(--bg);
    border-right: 0.5px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 48px 56px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.panel-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    margin-bottom: auto;
}

.logo-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--purple);
}

.panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.panel-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--purple-light);
    color: var(--purple-dark);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 40px;
    margin-bottom: 28px;
    width: fit-content;
}

.panel-title {
    font-family: 'Syne', sans-serif;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.panel-title em {
    color: var(--purple);
    font-style: normal;
}

.panel-desc {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 380px;
}

/* Feature list */
.panel-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pf-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.pf-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.pf-text .label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.pf-text .sub {
    font-size: 13px;
    color: var(--muted);
}

/* Testimonial */
.panel-testimonial {
    margin-top: 48px;
    padding: 20px 22px;
    background: var(--bg2);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--purple);
}

.testi-text {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    margin-bottom: 12px;
    font-style: italic;
}

.testi-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.testi-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--purple-light);
    color: var(--purple-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 12px;
}

.testi-name {
    font-size: 13px;
    font-weight: 500;
}

.testi-role {
    font-size: 11px;
    color: var(--muted);
}

/* ── RIGHT PANEL (FORM) ─────────────────────── */
.right-panel {
    background: var(--bg2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 48px 40px 60px;
    overflow-y: auto;
}

.form-wrap {
    width: 100%;
    max-width: 400px;
}

.form-top {
    text-align: center;
    margin-bottom: 32px;
}

.form-top h2 {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
}

.form-top p {
    font-size: 14px;
    color: var(--muted);
}

.form-top a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 500;
}

.form-top a:hover {
    text-decoration: underline;
}

/* Role selector */
.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 24px;
}

.role-btn {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    background: var(--bg);
    transition: all 0.18s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.role-btn:hover {
    border-color: var(--purple-mid);
}

.role-btn.active.creator {
    border-color: var(--purple);
    background: var(--purple-light);
}

.role-btn.active.brand {
    border-color: var(--teal);
    background: var(--teal-light);
}

.role-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.18s;
}

.role-btn.active.creator .role-btn-icon {
    background: var(--purple);
    color: white;
}

.role-btn.active.brand .role-btn-icon {
    background: var(--teal);
    color: white;
}

.role-btn-label {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.role-btn.active.creator .role-btn-label {
    color: var(--purple-dark);
}

.role-btn.active.brand .role-btn-label {
    color: var(--teal-dark);
}

.role-btn-sub {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

/* FORM CARD */
.form-card {
    background: var(--bg);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 28px 24px;
    margin-bottom: 16px;
}

.form-section-title {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 12px;
    color: var(--muted);
    font-size: 16px;
    pointer-events: none;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(127, 119, 221, 0.12);
}

input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

/* Password strength */
.pw-strength {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.pw-bar {
    height: 3px;
    flex: 1;
    border-radius: 99px;
    background: var(--bg3);
    transition: background 0.3s;
}

.pw-bar.weak {
    background: var(--red);
}

.pw-bar.medium {
    background: var(--amber);
}

.pw-bar.strong {
    background: var(--teal);
}

.pw-label {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

/* Toggle password */
.pw-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}

.pw-toggle:hover {
    color: var(--text);
}

/* CGU checkbox */
.cgu-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
}

.cgu-wrap input[type="checkbox"] {
    width: 17px;
    height: 17px;
    padding: 0;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--purple);
}

.cgu-text {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.cgu-text a {
    color: var(--purple);
    text-decoration: none;
    font-weight: 500;
}

.cgu-text a:hover {
    text-decoration: underline;
}

/* SUBMIT */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--purple);
    color: white;
    border: none;
    border-radius: 40px;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.15s;
    margin-bottom: 14px;
}

.btn-submit:hover {
    opacity: 0.88;
}

/* OR divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--muted);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 0.5px;
    background: var(--border);
}

/* Google btn */
.btn-google {
    width: 100%;
    padding: 12px;
    background: var(--bg);
    border: 0.5px solid var(--border);
    border-radius: 40px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.15s;
    margin-bottom: 24px;
}

.btn-google:hover {
    background: var(--bg2);
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* bottom note */
.form-note {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.form-note a {
    color: var(--purple);
    text-decoration: none;
}

.form-note a:hover {
    text-decoration: underline;
}

/* Steps indicator */
.steps-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 28px;
    justify-content: center;
}

.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.2s;
}

.step-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--purple);
}

.step-dot.done {
    background: var(--teal);
}

/* Dynamic field section (creator-only or brand-only) */
.role-fields {
    display: none;
}

.role-fields.visible {
    display: block;
}

.pw-label.match {
    color: var(--teal);
}

.pw-label.no-match {
    color: var(--red);
}

.error-banner {
    display: none;
    align-items: center;
    gap: 10px;
    background: var(--red-light);
    border: 0.5px solid var(--red);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #791F1F;
}

.error-banner.visible {
    display: flex;
}

.error-banner i {
    font-size: 16px;
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
   Everything below adapts the layout above for
   tablet and phone widths. Nothing above this line
   was changed.
   ══════════════════════════════════════════════════ */

/* ── Tablet / large phone (≤768px): same stacking +
      form-first order as login.css, plus this page's
      own two-column bits (form-row, role-selector). ── */
@media (max-width: 768px) {
    .page {
        grid-template-columns: 1fr;
    }

    .right-panel {
        order: 1;
        padding: 32px 24px 28px;
    }

    .left-panel {
        order: 2;
        position: static;
        height: auto;
        overflow: visible;
        border-right: none;
        border-top: 0.5px solid var(--border);
        padding: 32px 24px;
    }

    .panel-logo {
        margin-bottom: 20px;
    }

    .panel-content {
        padding: 0;
    }

    .panel-title {
        font-size: 26px;
    }

    .panel-desc {
        max-width: none;
    }

    .panel-testimonial {
        margin-top: 32px;
    }

    /* Paired text fields (e.g. prénom/nom) stack —
       two narrow inputs side by side is cramped for
       typing on a phone keyboard. */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ── Small phones (≤480px) ───────────────────────── */
@media (max-width: 480px) {
    .right-panel {
        padding: 24px 16px 24px;
    }

    .left-panel {
        padding: 24px 16px;
    }

    .panel-title {
        font-size: 22px;
    }

    .form-card {
        padding: 22px 18px 20px;
    }

    /* Role selector stays 2-up even here — it's a
       deliberate side-by-side choice (créateur/marque),
       not a form field, so it keeps its comparison
       layout; just tightened a bit. */
    .role-selector {
        gap: 8px;
    }

    .role-btn {
        padding: 12px 10px;
    }
}