/* ============================================================
   LegalPass — Formulaires (wizard multi-étapes)
   ============================================================ */

.form-page {
    background: var(--bg-soft);
    min-height: 100vh;
    padding: 32px 0 80px;
}

.form-page .container { max-width: 940px; }

/* ---------- En-tête formulaire ---------- */
.form-header {
    text-align: center;
    margin-bottom: 28px;
}
.form-header .crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 14px;
}
.form-header .crumb a {
    color: var(--primary);
    font-weight: 600;
}
.form-header h1 {
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 8px;
}
.form-header .lead {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 620px;
    margin: 0 auto;
}

/* Bandeau de réassurance */
.form-trust {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-xs);
}
.form-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}
.form-trust-item svg { color: var(--trust-green); }

/* ---------- Barre de progression ---------- */
.wizard-progress {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    margin: 36px 0 32px;
    padding: 24px 28px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    position: relative;
    box-shadow: var(--shadow-xs);
}
.wizard-step {
    flex: 1;
    text-align: center;
    position: relative;
    min-width: 0;
}
.wizard-step + .wizard-step::before {
    content: '';
    position: absolute;
    top: 18px;
    left: -50%;
    right: 50%;
    height: 3px;
    background: var(--border);
    z-index: 0;
}
.wizard-step.done + .wizard-step::before,
.wizard-step.done::before { background: var(--primary); }
.wizard-step.active + .wizard-step::before { background: linear-gradient(90deg, var(--primary), var(--border)); }

.wizard-step-bullet {
    position: relative;
    z-index: 1;
    width: 38px; height: 38px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--border);
    color: var(--text-muted);
    display: grid; place-items: center;
    font-weight: 700;
    font-size: 14px;
    transition: all .2s;
}
.wizard-step.active .wizard-step-bullet {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 5px var(--primary-soft);
}
.wizard-step.done .wizard-step-bullet {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.wizard-step-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.3;
    padding: 0 4px;
}
.wizard-step.active .wizard-step-label { color: var(--primary); font-weight: 700; }
.wizard-step.done .wizard-step-label { color: var(--text); }

/* ---------- Section / Card ---------- */
.form-section {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
}
.form-section-head {
    padding: 28px 32px 20px;
    border-bottom: 1px solid var(--border-soft);
    background: linear-gradient(180deg, var(--primary-soft) 0%, #fff 100%);
}
.form-section-head h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.3px;
    margin-bottom: 6px;
}
.form-section-head p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.55;
}
.form-section-body {
    padding: 28px 32px;
}

/* ---------- Fields ---------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 18px;
}
.form-field { margin-bottom: 18px; }
.form-field-half { margin-bottom: 0; }
.form-field label,
.form-question {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.form-field .req { color: #DC2626; }

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="password"],
.form-field input[type="search"],
.form-field input[type="url"],
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 13px 16px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text);
    transition: all .15s;
    appearance: none;
    -webkit-appearance: none;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-soft);
}

.form-select-wrap { position: relative; }
.form-select-arrow {
    position: absolute;
    top: 50%; right: 14px;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
}

.form-help {
    display: block;
    color: var(--text-muted);
    font-size: 12.5px;
    margin-top: 6px;
    line-height: 1.5;
}

/* ---------- Radio cards (gros boutons type LegalPlace) ---------- */
.radio-cards {
    display: grid;
    grid-template-columns: repeat(var(--cols, 2), 1fr);
    gap: 12px;
}
.radio-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 18px 18px 50px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all .15s;
}
.radio-card:hover { border-color: var(--primary); background: var(--primary-soft); }
.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.radio-card::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 18px;
    width: 18px; height: 18px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: #fff;
    transition: all .15s;
}
.radio-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.radio-card:has(input:checked)::before {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: inset 0 0 0 4px #fff;
}
.radio-card-content { flex: 1; }
.radio-card-content strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}
.radio-card-content small {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}
.radio-card-check {
    display: none;
    color: var(--primary);
}

/* ---------- Checkbox ---------- */
.form-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text);
}
.form-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}
.checkbox-box {
    width: 22px; height: 22px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: #fff;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    margin-top: 1px;
    transition: all .15s;
}
.checkbox-box::after {
    content: '';
    width: 12px; height: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center;
    opacity: 0;
    transition: opacity .15s;
}
.form-checkbox input:checked + .checkbox-box {
    background: var(--primary);
    border-color: var(--primary);
}
.form-checkbox input:checked + .checkbox-box::after { opacity: 1; }
.checkbox-text {
    font-size: 14px;
    line-height: 1.55;
}

/* ---------- Upload de fichiers ---------- */
.form-file-field .file-drop {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    background: var(--bg-soft);
    cursor: pointer;
    transition: all .15s;
    position: relative;
}
.form-file-field .file-drop:hover,
.form-file-field .file-drop.drag {
    border-color: var(--primary);
    background: var(--primary-soft);
}
.form-file-field .file-drop.has-file {
    border-style: solid;
    border-color: var(--trust-green);
    background: rgba(0, 182, 122, .06);
}
.file-drop-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: #fff;
    color: var(--primary);
    display: grid; place-items: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.file-drop.has-file .file-drop-icon {
    background: var(--trust-green);
    color: #fff;
    border-color: var(--trust-green);
}
.file-drop-text { flex: 1; min-width: 0; }
.file-drop-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.file-drop-text small {
    font-size: 12px;
    color: var(--text-muted);
}
.file-input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

.file-preview {
    display: none;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
}
.file-drop.has-file .file-preview { display: flex; }
.file-preview-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.file-preview-thumb {
    width: 28px; height: 28px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-soft);
}

/* ---------- Personnes (associés / gérants) — bloc dynamique ---------- */
.person-list { display: grid; gap: 16px; }
.person-card {
    border: 1.5px dashed var(--border);
    border-radius: 14px;
    padding: 24px;
    background: var(--bg-soft);
    position: relative;
}
.person-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.person-card-head h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}
.person-remove {
    color: #DC2626;
    background: #FEF2F2;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #FECACA;
    transition: all .15s;
}
.person-remove:hover { background: #DC2626; color: #fff; }
.person-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1.5px dashed var(--primary);
    border-radius: 12px;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 14px;
    width: 100%;
    justify-content: center;
    margin-top: 16px;
    transition: all .15s;
}
.person-add:hover { background: var(--primary); color: #fff; }

/* ---------- Panneaux du wizard (un seul visible à la fois) ---------- */
.wizard-pane { display: none; }
.wizard-pane.active { display: block; animation: panefade .25s ease; }
@keyframes panefade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Actions du wizard ---------- */
.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-top: 8px;
}
.wizard-actions .spacer { flex: 1; }
.wizard-actions .btn { min-width: 140px; justify-content: center; }
.wizard-back {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .15s;
}
.wizard-back:hover { background: #fff; border-color: var(--primary); color: var(--primary); }

/* ---------- Notice latérale (encadré info) ---------- */
.info-box {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: 12px;
    margin: 0 0 24px;
    font-size: 14px;
    color: #7C5400;
    line-height: 1.5;
}
.info-box svg { flex-shrink: 0; color: #C68400; margin-top: 2px; }

.tip-box {
    display: flex;
    gap: 12px;
    padding: 16px 18px;
    background: var(--primary-soft);
    border: 1px solid var(--primary-light);
    border-radius: 12px;
    margin: 0 0 24px;
    font-size: 14px;
    color: var(--primary-dark);
    line-height: 1.5;
}
.tip-box svg { flex-shrink: 0; color: var(--primary); margin-top: 2px; }
.tip-box strong { color: var(--primary); }

/* ---------- Récap ---------- */
.recap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.recap-item {
    background: var(--bg-soft);
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border);
}
.recap-item .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}
.recap-item .value {
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
}

/* ---------- Page "en cours de développement" ---------- */
.under-construction {
    background: var(--bg-soft);
    padding: 80px 0 100px;
    min-height: 60vh;
}
.under-construction .container {
    max-width: 720px;
    text-align: center;
}
.under-construction-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.under-construction-icon {
    width: 90px; height: 90px;
    background: var(--accent);
    border-radius: 24px;
    margin: 0 auto 24px;
    display: grid; place-items: center;
    color: var(--text);
    transform: rotate(-8deg);
}
.under-construction h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 14px;
}
.under-construction p {
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* ---------- Page de choix de la forme juridique ---------- */
.entity-choice {
    background: var(--bg-soft);
    padding: 60px 0 80px;
}
.entity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 40px;
}
.entity-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    text-decoration: none;
    color: inherit;
    transition: all .2s;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}
.entity-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.entity-card .badge-popular {
    position: absolute;
    top: 16px; right: 16px;
    background: var(--accent);
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: .5px;
}
.entity-card-icon {
    width: 54px; height: 54px;
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: 14px;
    display: grid; place-items: center;
    margin-bottom: 18px;
}
.entity-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -.2px;
}
.entity-card p {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.55;
    margin-bottom: 20px;
    flex: 1;
}
.entity-card .price {
    color: var(--primary);
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 14px;
    display: block;
}
.entity-card .cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
    transition: gap .2s;
}
.entity-card:hover .cta { color: var(--primary); gap: 10px; }

/* ---------- Page Thank You ---------- */
.thank-you-page {
    min-height: 80vh;
    background: var(--bg-soft);
    padding: 60px 0;
    display: flex;
    align-items: center;
}
.thank-you-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    box-shadow: var(--shadow);
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}
.thank-you-icon {
    width: 88px; height: 88px;
    background: var(--trust-green);
    color: #fff;
    border-radius: 50%;
    margin: 0 auto 28px;
    display: grid; place-items: center;
    box-shadow: 0 0 0 8px rgba(0, 182, 122, .15);
}
.thank-you-card h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 12px;
}
.thank-you-card .lead {
    color: var(--text-muted);
    font-size: 17px;
    margin-bottom: 26px;
}
.thank-you-reference {
    background: var(--primary-soft);
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 32px;
    border: 1px dashed var(--primary);
}
.thank-you-reference .label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: block;
}
.thank-you-reference .ref {
    font-family: 'Courier New', monospace;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1.5px;
}
.thank-you-next {
    text-align: left;
    background: var(--bg-soft);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}
.thank-you-next h3 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.thank-you-next ol { padding-left: 22px; }
.thank-you-next li { margin-bottom: 8px; color: var(--text); font-size: 14.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .form-grid, .form-grid-3, .recap-grid { grid-template-columns: 1fr; }
    .entity-grid { grid-template-columns: 1fr; }
    .form-section-body { padding: 22px 20px; }
    .form-section-head { padding: 22px 20px 16px; }
    .wizard-progress { padding: 16px 8px; }
    .wizard-step-label { font-size: 11px; }
    .radio-cards { grid-template-columns: 1fr !important; }
    .wizard-actions { flex-direction: column-reverse; }
    .wizard-actions .btn, .wizard-back { width: 100%; }
}
