/* =============================================================================
   Questionnaire client — design system Ploovers V9
   -----------------------------------------------------------------------------
   Feuille dédiée à /dashboard/cdata (templates/home/dashboard-megaform.html).
   Scope : tout est préfixé `.qv9` (racine posée sur #app) pour ne rien fuir
   vers le shell connecté ni vers l'ancienne UI.

   Tokens V9 (source : templates/home/design-system.html, public-refonte.css)
   — jamais approximés. Pas d'ombres, pas de gradients. Inter partout.
   Radius : 30 cartes, 100 boutons/pastilles, 16 lignes de choix, 12 champs.
   ============================================================================= */

.qv9 {
    --plr-navy: #242E4C;
    --plr-beige: #F2F1EF;
    --plr-white: #FFFFFF;
    --plr-grey-light: #EEEEEE;
    --plr-grey-neutral: #F1F1F1;
    --plr-accent: #EFF7FF;
    --plr-text: #111111;
    --plr-text-2: #3D434E;
    --plr-text-3: #8B94A5;
    --plr-border: #EEEEEE;
    --plr-blue: #AFC8E9;
    --plr-bar-grey: #BEBFC2;
    --plr-r-card-lg: 50px;
    --plr-r-card: 30px;
    --plr-r-btn: 100px;
    --plr-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* États de saisie : rouge et vert ne sont pas des couleurs de marque, ils
       ne servent QUE la donnée (erreur / validé), jamais l'habillage. */
    --qv9-error: #B42318;
    --qv9-error-bg: #FEF3F2;
    --qv9-ok: #1F6F4A;

    font-family: var(--plr-font);
    color: var(--plr-text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.qv9 *,
.qv9 *::before,
.qv9 *::after { box-sizing: border-box; }

.qv9 p { color: var(--plr-text-2); font-size: 15px; line-height: 1.6; margin: 0 0 12px; }
.qv9 a { color: var(--plr-navy); }
.qv9 hr, .qv9 hr.hr-thin { border: 0; border-top: 1px solid var(--plr-grey-light); margin: 10px 0; opacity: 1; }
.qv9 strong { font-weight: 600; color: var(--plr-text); }

/* -----------------------------------------------------------------------------
   Layout : rail d'étapes (gauche, sticky) + carte de l'étape (droite)
   ----------------------------------------------------------------------------- */
.qv9-page { max-width: 1120px; margin: 0 auto; padding: 8px 0 40px; }

.qv9-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 22px; }
.qv9-head h1 { font-family: var(--plr-font); font-size: 28px; font-weight: 600; line-height: 1.25; color: var(--plr-text); margin: 6px 0 0; letter-spacing: -0.3px; }
.qv9-head .qv9-head-sub { color: var(--plr-text-2); font-size: 15px; margin: 6px 0 0; }
.qv9-head-tools { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.qv9-eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--plr-text-3); }
.qv9-eyebrow-blue { color: var(--plr-blue); }

.qv9-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 36px; align-items: start; }

/* Rail */
.qv9-rail { position: sticky; top: 8px; }
.qv9-rail-card { background: var(--plr-grey-neutral); border-radius: var(--plr-r-card); padding: 22px 20px 18px; }
.qv9-progress { margin-bottom: 14px; }
.qv9-progress-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--plr-text-2); margin-bottom: 8px; }
.qv9-progress-top strong { font-size: 13px; }
.qv9-progress-bar { height: 8px; border-radius: 100px; background: var(--plr-white); overflow: hidden; }
.qv9-progress-bar > span { display: block; height: 100%; border-radius: 100px; background: var(--plr-navy); transition: width .35s ease; }
.qv9-progress-meta { font-size: 12px; color: var(--plr-text-3); margin-top: 8px; }
/* Champs manquants nommés à côté de l'étape qui bloque : une pastille « 1 » sur
   une étape qui paraît remplie n'apprend rien. Teinte plus discrète que le nom
   de l'étape, qui reste le lien cliquable. */
.qv9-missing-fields { color: var(--plr-text-3); opacity: .85; }

.qv9-jump { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 14px; padding: 0; background: none; border: 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--plr-navy); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.qv9-jump:hover { color: var(--plr-text); }

.qv9-group { margin-top: 10px; }
.qv9-group-title { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--plr-text-3); margin: 6px 0 4px 8px; }
.qv9-step { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 8px; border: 0; border-radius: 12px; background: transparent; font: inherit; font-size: 13.5px; color: var(--plr-text-2); cursor: pointer; transition: background .12s ease; }
.qv9-step:hover { background: var(--plr-white); }
.qv9-step.is-current { background: var(--plr-white); color: var(--plr-text); font-weight: 600; }
.qv9-step-dot { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--plr-bar-grey); background: var(--plr-white); display: inline-grid; place-items: center; font-size: 10px; color: var(--plr-white); }
.qv9-step.is-done .qv9-step-dot { background: var(--plr-navy); border-color: var(--plr-navy); }
.qv9-step.is-current .qv9-step-dot { border-color: var(--plr-navy); }
.qv9-step.is-current .qv9-step-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--plr-navy); }
.qv9-step.has-attention .qv9-step-dot { border-color: var(--qv9-error); }
.qv9-step-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qv9-step-tag { font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--plr-text-3); }
.qv9-step-count { font-size: 11px; font-weight: 600; color: var(--qv9-error); }

/* Sections optionnelles activables depuis le rail */
.qv9-group-optional { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--plr-white); }
.qv9-step-add { color: var(--plr-text-3); }
.qv9-step-add:hover { color: var(--plr-text); }
.qv9-step-plus { border-style: dashed; color: var(--plr-text-3); font-size: 9px; }
.qv9-step-add:hover .qv9-step-plus { border-color: var(--plr-navy); color: var(--plr-navy); }

.qv9-step-remove { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--plr-text-3); font-size: 11px; flex: 0 0 auto; }
.qv9-step-remove:hover { background: var(--plr-white); color: var(--qv9-error); }
.qv9-card-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qv9-card-head-row .qv9-btn-link { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--plr-text-3); text-decoration: none; }
.qv9-card-head-row .qv9-btn-link:hover { color: var(--qv9-error); }

/* Mobile head (remplace le rail sous 992px) */
.qv9-mobile-head { display: none; }

/* -----------------------------------------------------------------------------
   Carte d'étape
   ----------------------------------------------------------------------------- */
.qv9-card { background: var(--plr-white); border: 1px solid var(--plr-border); border-radius: var(--plr-r-card); padding: 40px 44px 28px; }
.qv9-card-head { margin-bottom: 26px; }
.qv9-card-head h2 { font-family: var(--plr-font); font-size: 26px; font-weight: 600; line-height: 1.25; letter-spacing: -0.3px; color: var(--plr-text); margin: 8px 0 0; }
.qv9-card-head h2 .qv9-done-ico { font-size: 16px; color: var(--qv9-ok); margin-left: 8px; vertical-align: middle; }
.qv9-intro { color: var(--plr-text-2); font-size: 15px; margin: 10px 0 0; max-width: 640px; }
.qv9-updated { font-size: 12px; color: var(--plr-text-3); margin-top: 6px; }

/* Sous-titres des écrans fusionnés (Identité, Situation, Patrimoine) */
.qv9-subhead { font-size: 16px; font-weight: 600; color: var(--plr-text); margin: 0 0 16px; padding-top: 26px; border-top: 1px solid var(--plr-grey-light); }
.qv9-subhead-first { padding-top: 0; border-top: 0; }

/* Callouts (remplacent .alert-*) */
.qv9-callout { background: var(--plr-beige); border-radius: 18px; padding: 14px 18px; font-size: 14px; color: var(--plr-text); margin: 0 0 18px; display: flex; gap: 12px; align-items: flex-start; }
.qv9-callout .fa-solid, .qv9-callout .fas, .qv9-callout .far { margin-top: 3px; color: var(--plr-navy); }
.qv9-callout-title { display: block; font-weight: 600; margin-bottom: 2px; }
.qv9-callout-error { background: var(--qv9-error-bg); color: var(--qv9-error); }
.qv9-callout-error .fa-solid, .qv9-callout-error .fas { color: var(--qv9-error); }
.qv9-callout-accent { background: var(--plr-accent); }
.qv9-callout .qv9-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* -----------------------------------------------------------------------------
   Champs
   ----------------------------------------------------------------------------- */
.qv9 .qv9-field, .qv9 .col-auto.mb-3, .qv9 .col-12.mb-3, .qv9 .col-12.mb-4 { margin-bottom: 22px !important; }
.qv9 .row.mb-3 { margin-bottom: 22px !important; }
.qv9 .row.mb-3 > [class^="col-"], .qv9 .row.g-3 > [class^="col-"] { margin-bottom: 0; }
.qv9 .row.mb-3 > [class^="col-"] + [class^="col-"] { padding-left: 12px; }

.qv9 label, .qv9 .form-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--plr-text); margin-bottom: 8px; line-height: 1.4; }
.qv9 label .far.fa-question-circle, .qv9 label .fa-circle-question { color: var(--plr-text-3); cursor: pointer; margin-left: 4px; font-size: 13px; }
.qv9 label .far.fa-question-circle:hover { color: var(--plr-navy); }
.qv9-help { display: block; font-size: 13px; color: var(--plr-text-3); margin: -4px 0 10px; font-weight: 400; }
/* Listes d'enregistrements (#2873 : contrats hors Ploovers, donations) : une fiche par ligne,
   champs étiquetés sur deux rangées — neuf colonnes ne tiennent pas dans la carte. */
.qv9-record { border: 1px solid var(--plr-border); border-radius: 18px; padding: 12px 14px 14px; margin: 0 0 10px; background: var(--plr-white); }
.qv9-record-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.qv9-record-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--plr-text-3); }
.qv9-record-head .qv9-btn-link { font-size: 12px; font-weight: 500; text-decoration: none; color: var(--plr-text-3); }
.qv9-record-head .qv9-btn-link:hover { color: var(--qv9-error); }
.qv9-record label { display: block; font-size: 12px; color: var(--plr-text-3); margin: 0 0 3px; font-weight: 400; }
.qv9-record .form-control-sm, .qv9-record .form-select-sm { font-family: var(--plr-font); font-size: 13.5px; min-height: 36px; }
.qv9 small.text-muted, .qv9 .text-muted { color: var(--plr-text-3) !important; font-size: 13px; }
.qv9 small.text-warning { color: #8A5A00 !important; font-size: 13px; }

.qv9 .form-control,
.qv9 .form-select,
.qv9 textarea.form-control {
    width: 100%;
    font-family: var(--plr-font);
    font-size: 15px;
    line-height: 1.4;
    color: var(--plr-text);
    background-color: var(--plr-white);
    border: 1px solid var(--plr-grey-light);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: none;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.qv9 .form-control:hover, .qv9 .form-select:hover { border-color: var(--plr-bar-grey); }
.qv9 .form-control:focus, .qv9 .form-select:focus, .qv9 textarea.form-control:focus { outline: none; border-color: var(--plr-navy); box-shadow: 0 0 0 3px rgba(36, 46, 76, 0.10); }
.qv9 .form-control::placeholder { color: var(--plr-text-3); }
.qv9 .form-control:disabled, .qv9 .form-select:disabled { background-color: var(--plr-grey-neutral); color: var(--plr-text-2); border-color: transparent; }
.qv9 .form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233D434E' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M3 6l5 5 5-5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
.qv9 textarea.form-control { min-height: 110px; resize: vertical; }
.qv9 .input-group { display: flex; flex-wrap: nowrap; align-items: stretch; }
.qv9 .input-group > .form-control { flex: 1 1 auto; width: 1%; min-width: 0; }
.qv9 .input-group .input-group-text { background: var(--plr-grey-neutral); border: 1px solid var(--plr-grey-light); border-right: 0; border-radius: 12px 0 0 12px; color: var(--plr-text-2); font-size: 14px; padding: 0 14px; display: flex; align-items: center; }
.qv9 .input-group .form-control { border-radius: 0 12px 12px 0; }
.qv9 .input-group .form-control:first-child { border-radius: 12px 0 0 12px; }
.qv9 .input-group .input-group-text:last-child { border-left: 0; border-right: 1px solid var(--plr-grey-light); border-radius: 0 12px 12px 0; }

/* États : validé = neutre (le vert ne « décore » pas), invalide = rouge calme */
.qv9 .form-control.is-valid, .qv9 .form-select.is-valid { border-color: var(--plr-grey-light); background-image: none; padding-right: 14px; }
.qv9 .form-select.is-valid { padding-right: 40px; }
/* Bootstrap ajoute une coche verte aux selects valides (spécificité 0,4,0) : on garde le seul chevron. */
.qv9 .form-select.is-valid:not([multiple]):not([size]), .qv9 .form-select.is-invalid:not([multiple]):not([size]) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233D434E' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' d='M3 6l5 5 5-5'/%3e%3c/svg%3e");
    background-position: right 14px center; background-size: 14px 14px; padding-right: 40px;
}
.qv9 .form-control.is-invalid, .qv9 .form-select.is-invalid { border-color: var(--qv9-error); background-image: none; padding-right: 14px; }
.qv9 .form-select.is-invalid { padding-right: 40px; }
.qv9 .form-control.is-invalid:focus, .qv9 .form-select.is-invalid:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12); }
.qv9 .invalid-feedback { display: none; margin-top: 6px; font-size: 13px; color: var(--qv9-error); }
.qv9 .field-mandatory-highlight { border-color: var(--qv9-error) !important; border-radius: 12px; box-shadow: none !important; animation: none !important; }
.qv9 div.field-mandatory-highlight { border: 1px solid var(--qv9-error); padding: 8px 10px; }
.qv9 .radio-mandatory-hint { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: var(--qv9-error); font-size: 13px; font-weight: 500; animation: none; }

/* Champ pré-rempli par la lecture automatique : accent = donnée, avec sa provenance */
.qv9 .form-control.is-suggested, .qv9 .form-select.is-suggested { background-color: var(--plr-accent); border-color: var(--plr-blue); }
.qv9-suggest-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--plr-navy); }
.qv9-suggest-note .fa-solid { font-size: 11px; }

/* Téléphone international */
.qv9 .iti { width: 100%; }
.qv9 .iti__flag-container { border-radius: 12px 0 0 12px; }
.qv9 .iti--separate-dial-code .iti__selected-flag { background: var(--plr-grey-neutral); border-radius: 12px 0 0 12px; }

/* -----------------------------------------------------------------------------
   Choix : pastilles (radios/checkbox inline) et lignes de choix (empilées)
   ----------------------------------------------------------------------------- */
.qv9 .form-check { padding-left: 0; min-height: 0; margin-bottom: 0; }
.qv9 .form-check-input { float: none; margin: 0; }

/* Pastilles */
.qv9 .form-check-inline { display: inline-block; margin: 0 8px 8px 0; position: relative; }
.qv9 .form-check-inline .form-check-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.qv9 .form-check-inline .form-check-label {
    display: inline-flex; align-items: center; gap: 8px;
    margin: 0; padding: 10px 18px;
    border: 1px solid var(--plr-grey-light); border-radius: var(--plr-r-btn);
    background: var(--plr-white); color: var(--plr-text);
    font-size: 14px; font-weight: 500; line-height: 1.2; cursor: pointer; user-select: none;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.qv9 .form-check-inline .form-check-label:hover { border-color: var(--plr-bar-grey); background: var(--plr-beige); }
.qv9 .form-check-inline .form-check-input:checked + .form-check-label { background: var(--plr-navy); border-color: var(--plr-navy); color: var(--plr-white); }
.qv9 .form-check-inline .form-check-input:focus-visible + .form-check-label { outline: 2px solid var(--plr-navy); outline-offset: 2px; }
.qv9 .form-check-inline .form-check-input:disabled + .form-check-label { opacity: .6; cursor: default; }

/* Lignes de choix (réponses longues : préférences, mise en situation, listes) */
.qv9 .form-check:not(.form-check-inline):not(.form-switch) {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 13px 16px; margin-bottom: 8px;
    border: 1px solid var(--plr-grey-light); border-radius: 16px;
    background: var(--plr-white); cursor: pointer;
    transition: border-color .12s ease, background .12s ease;
}
.qv9 .form-check:not(.form-check-inline):not(.form-switch):hover { border-color: var(--plr-bar-grey); }
.qv9 .form-check:not(.form-check-inline):not(.form-switch):has(.form-check-input:checked) { border-color: var(--plr-navy); background: var(--plr-beige); }
.qv9 .form-check:not(.form-check-inline):not(.form-switch) .form-check-label { margin: 0; font-weight: 400; font-size: 14.5px; color: var(--plr-text); cursor: pointer; flex: 1 1 auto; line-height: 1.45; }
.qv9 .form-check:not(.form-check-inline):not(.form-switch) .form-check-label strong { color: var(--plr-navy); }
.qv9 .form-check:not(.form-check-inline):not(.form-switch) .form-check-input {
    appearance: none; -webkit-appearance: none;
    flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px;
    border: 1.5px solid var(--plr-bar-grey); background: var(--plr-white);
    border-radius: 6px; cursor: pointer; display: inline-grid; place-items: center;
    background-image: none; transition: background .12s ease, border-color .12s ease;
}
.qv9 .form-check:not(.form-check-inline):not(.form-switch) .form-check-input[type="radio"] { border-radius: 50%; }
.qv9 .form-check:not(.form-check-inline):not(.form-switch) .form-check-input:checked { background: var(--plr-navy); border-color: var(--plr-navy); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3.5 8.5l3 3 6-7'/%3e%3c/svg%3e"); background-size: 13px; background-repeat: no-repeat; background-position: center; }
.qv9 .form-check:not(.form-check-inline):not(.form-switch) .form-check-input:focus-visible { outline: 2px solid var(--plr-navy); outline-offset: 2px; }
.qv9 .form-check:not(.form-check-inline):not(.form-switch) .form-check-input:disabled { opacity: .5; }

/* Puces multi-choix (origine du patrimoine, objectifs, prestations) */
.qv9-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qv9-chips .form-check:not(.form-check-inline):not(.form-switch) { display: inline-flex; align-items: center; padding: 9px 16px; border-radius: var(--plr-r-btn); margin: 0; gap: 8px; }
.qv9-chips .form-check:not(.form-check-inline):not(.form-switch):has(.form-check-input:checked) { background: var(--plr-navy); border-color: var(--plr-navy); }
.qv9-chips .form-check:not(.form-check-inline):not(.form-switch):has(.form-check-input:checked) .form-check-label { color: var(--plr-white); }
.qv9-chips .form-check:not(.form-check-inline):not(.form-switch) .form-check-input { width: 16px; height: 16px; margin-top: 0; border-radius: 4px; }
.qv9-chips .form-check:not(.form-check-inline):not(.form-switch) .form-check-input:checked { background-color: var(--plr-white); border-color: var(--plr-white); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23242E4C' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.4' d='M3.5 8.5l3 3 6-7'/%3e%3c/svg%3e"); }
.qv9-chips .form-check:not(.form-check-inline):not(.form-switch) .form-check-label { font-size: 14px; font-weight: 500; }
.qv9-chip-other { display: flex; align-items: center; gap: 10px; margin-top: 10px; max-width: 360px; }
.qv9-chip-other .form-check-input { display: none; }
.qv9-chip-other .form-control { margin: 0 !important; }

/* Lecture seule (fieldset désactivé) : les choix restent lisibles — Bootstrap passe les libellés
   à 50 % d'opacité, ce qui rend blanc-sur-navy illisible. */
.qv9 .ro-locked .form-check-input:disabled ~ .form-check-label,
.qv9 .ro-locked .form-check-input[disabled] ~ .form-check-label { opacity: .85; }
.qv9 .ro-locked .form-check-inline .form-check-input:disabled + .form-check-label { opacity: .85; }
.qv9 .ro-locked .form-check:not(.form-check-inline):not(.form-switch) .form-check-input:disabled { opacity: .85; }

/* Question « oui / non » en ligne (expérience, PPE) */
.qv9-qrow { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--plr-grey-light); }
.qv9-qrow:last-child { border-bottom: 0; }
.qv9-qrow .qv9-q { flex: 1 1 auto; font-size: 14.5px; color: var(--plr-text); }
.qv9-qrow .qv9-a { flex: 0 0 auto; display: flex; gap: 8px; }
.qv9-qrow .form-check-inline { margin: 0; }
.qv9-qrow .form-check-inline .form-check-label { padding: 8px 16px; }

/* Interrupteurs (configuration conseiller, lecture seule) */
.qv9 .form-check.form-switch { display: flex; align-items: center; gap: 12px; padding: 0; margin: 0; border: 0; background: transparent; border-radius: 0; cursor: default; }
.qv9 .form-check.form-switch .form-check-input::before { content: none; }
.qv9 .form-check.form-switch .form-check-input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; margin: 0; border-radius: 100px; border: 0; background: var(--plr-bar-grey); position: relative; cursor: pointer; transition: background .15s ease; flex: 0 0 auto; background-image: none; }
.qv9 .form-check.form-switch .form-check-input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--plr-white); transition: transform .15s ease; }
.qv9 .form-check.form-switch .form-check-input:checked { background: var(--plr-navy); }
.qv9 .form-check.form-switch .form-check-input:checked::after { transform: translateX(18px); }
.qv9 .form-check.form-switch .form-check-label { margin: 0; padding: 0; font-weight: 500; font-size: 14px; cursor: pointer; }

/* -----------------------------------------------------------------------------
   Boutons V9
   ----------------------------------------------------------------------------- */
.qv9-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--plr-r-btn); padding: 15px 28px; font-family: var(--plr-font); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; cursor: pointer; text-decoration: none; transition: opacity .15s ease, background .15s ease; white-space: nowrap; }
.qv9-btn:hover { opacity: .88; }
.qv9-btn:disabled { opacity: .45; cursor: not-allowed; }
.qv9-btn-primary, .qv9 a.qv9-btn-primary { background: var(--plr-navy); color: var(--plr-white); }
.qv9-btn-secondary, .qv9 a.qv9-btn-secondary { background: var(--plr-beige); color: var(--plr-text); }
.qv9-btn-outline, .qv9 a.qv9-btn-outline { background: var(--plr-white); color: var(--plr-text); border: 1px solid var(--plr-grey-light); }
.qv9-btn-sm { padding: 10px 18px; font-size: 11px; }
.qv9-btn-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font-family: var(--plr-font); font-size: 13px; font-weight: 600; color: var(--plr-text-2); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.qv9-btn-link:hover { color: var(--plr-navy); }
.qv9-btn-link:disabled { opacity: .45; cursor: not-allowed; }
.qv9 .spinner-border { width: 1em; height: 1em; border-width: 2px; }

/* Barre de navigation d'étape (collante en bas de la colonne) */
/* Pied de carte : navigation en fin de lecture, dans le flux (pas de barre collante
   qui coupe le formulaire). Le rail assure l'accès direct aux autres étapes. */
.qv9-nav { margin: 30px -44px -28px; padding: 20px 44px 26px; background: var(--plr-white); border-top: 1px solid var(--plr-grey-light); border-radius: 0 0 var(--plr-r-card) var(--plr-r-card); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.qv9-nav .qv9-btn-prev { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 12px 0; font-family: var(--plr-font); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--plr-text-2); cursor: pointer; }
.qv9-nav .qv9-btn-prev:hover { color: var(--plr-navy); }
.qv9-nav .qv9-btn-prev:disabled { opacity: .35; cursor: not-allowed; }
.qv9-nav-status { flex: 1 1 auto; text-align: center; font-size: 12.5px; color: var(--plr-text-3); }
.qv9-nav-status strong { font-weight: 600; color: var(--plr-text-2); font-size: 12.5px; }
.qv9-nav-status .qv9-btn-link { font-size: 12.5px; }
.qv9-nav-left, .qv9-nav-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

/* -----------------------------------------------------------------------------
   Documents : liste des pièces + zone de dépôt + revue de la lecture automatique
   ----------------------------------------------------------------------------- */
.qv9-doc-list { border: 1px solid var(--plr-grey-light); border-radius: 20px; overflow: hidden; }
.qv9-doc-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--plr-grey-light); }
.qv9-doc-row:last-child { border-bottom: 0; }
.qv9-doc-ico { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; background: var(--plr-grey-neutral); display: grid; place-items: center; color: var(--plr-navy); font-size: 15px; }
.qv9-doc-main { flex: 1 1 auto; min-width: 0; }
.qv9-doc-title { font-size: 14.5px; font-weight: 600; color: var(--plr-text); }
.qv9-doc-sub { font-size: 12.5px; color: var(--plr-text-3); margin-top: 2px; }
.qv9-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--plr-r-btn); padding: 6px 12px; font-size: 12px; font-weight: 600; background: var(--plr-beige); color: var(--plr-text); white-space: nowrap; flex: 0 0 auto; }
.qv9-pill-ok { background: var(--plr-navy); color: var(--plr-white); }
.qv9-pill-accent { background: var(--plr-accent); color: var(--plr-navy); }
.qv9-pill-warn { background: var(--qv9-error-bg); color: var(--qv9-error); }

.qv9-dropzone { border: 1.5px dashed var(--plr-bar-grey); border-radius: 24px; padding: 34px 24px; text-align: center; background: var(--plr-white); cursor: pointer; transition: background .12s ease, border-color .12s ease; }
.qv9-dropzone:hover, .qv9-dropzone.is-dragover { background: var(--plr-beige); border-color: var(--plr-navy); }
.qv9-dropzone .fa-solid { font-size: 26px; color: var(--plr-navy); margin-bottom: 10px; }
.qv9-dropzone-title { font-size: 15px; font-weight: 600; color: var(--plr-text); }
.qv9-dropzone-sub { font-size: 13px; color: var(--plr-text-3); margin-top: 4px; }
.qv9-dropzone input[type="file"] { display: none; }

.qv9-file { border: 1px solid var(--plr-grey-light); border-radius: 20px; padding: 16px 18px; margin-top: 12px; }
.qv9-file-head { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; }
.qv9-file-name { font-size: 14px; font-weight: 600; color: var(--plr-text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 200px; }
.qv9-file-head .form-select { width: auto; min-width: 180px; padding: 8px 36px 8px 12px; font-size: 13.5px; flex: 0 0 auto; }
.qv9-file-status { font-size: 13px; color: var(--plr-text-3); display: inline-flex; align-items: center; gap: 8px; }
.qv9-file-remove { background: none; border: 0; color: var(--plr-text-3); cursor: pointer; padding: 6px; border-radius: 50%; flex: 0 0 auto; margin-left: auto; }
.qv9-file-remove:hover { color: var(--qv9-error); background: var(--qv9-error-bg); }
.qv9-review { margin-top: 12px; border-top: 1px solid var(--plr-grey-light); padding-top: 6px; }
.qv9-review-row { display: grid; grid-template-columns: 26px minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--plr-grey-light); font-size: 14px; }
.qv9-review-row:last-child { border-bottom: 0; }
.qv9-review-row .form-check-input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--plr-bar-grey); border-radius: 6px; background: var(--plr-white); cursor: pointer; margin: 0; }
.qv9-review-row .form-check-input:checked { background: var(--plr-navy); border-color: var(--plr-navy); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M3.5 8.5l3 3 6-7'/%3e%3c/svg%3e"); background-size: 12px; background-repeat: no-repeat; background-position: center; }
.qv9-review-label { color: var(--plr-text-2); font-size: 13.5px; }
.qv9-review-value { font-weight: 600; color: var(--plr-text); }
.qv9-review-current { display: block; font-size: 12px; font-weight: 400; color: var(--plr-text-3); }
.qv9-review-current.is-diff { color: #8A5A00; }
.qv9-review-empty { font-size: 13px; color: var(--plr-text-3); padding: 8px 0; }
.qv9-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }

/* Configuration conseiller (écran de sélection des sections) */
.qv9-config-list { display: grid; gap: 8px; }
.qv9-config-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--plr-grey-light); border-radius: 16px; }
.qv9-config-row .form-switch { flex: 0 0 auto; }
.qv9-config-row .qv9-config-title { flex: 1 1 auto; font-size: 14.5px; font-weight: 500; }
.qv9-config-row .qv9-config-state { display: inline-flex; gap: 4px; color: var(--plr-text-3); font-size: 12px; }
.qv9-config-row .qv9-config-state .fa-check-circle { color: var(--qv9-ok); }
.qv9-config-optional { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--plr-text-3); }
.qv9-invites { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--plr-grey-light); }
.qv9-invites ul { padding-left: 18px; color: var(--plr-text-2); font-size: 14px; }

/* Cartes de résultat (profil de risque) */
.qv9-result { background: var(--plr-grey-neutral); border-radius: 20px; padding: 18px 20px; margin-bottom: 18px; }
.qv9-result-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 6px 0; font-size: 14.5px; }
.qv9-result-row span:first-child { color: var(--plr-text-3); }
.qv9-result-accent { background: var(--plr-accent); }

/* Modales Bootstrap dans le questionnaire */
.qv9-modal .modal-content { border-radius: var(--plr-r-card); border: 1px solid var(--plr-grey-light); box-shadow: none; font-family: var(--plr-font); }
.qv9-modal .modal-header, .qv9-modal .modal-footer { border: 0; padding: 22px 28px 0; }
.qv9-modal .modal-footer { padding: 0 28px 22px; }
.qv9-modal .modal-body { padding: 14px 28px; color: var(--plr-text-2); font-size: 14.5px; line-height: 1.6; }
.qv9-modal .modal-title { font-size: 18px; font-weight: 600; color: var(--plr-text); }

/* Écrans d'état (chargement, erreur, fin) */
.qv9-state { text-align: center; padding: 48px 20px; }
.qv9-state h2 { font-size: 24px; font-weight: 600; margin: 12px 0 8px; }
.qv9-state .qv9-state-ico { width: 64px; height: 64px; border-radius: 50%; background: var(--plr-beige); display: inline-grid; place-items: center; font-size: 24px; color: var(--plr-navy); }

/* Bandeau lecture seule */
.qv9-ro { display: inline-flex; align-items: center; gap: 10px; background: var(--plr-beige); border-radius: var(--plr-r-btn); padding: 8px 14px; font-size: 13px; }
.qv9-ro.ro-banner-attn { animation: ro-banner-pulse 0.45s ease 2; }

/* -----------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .qv9-file-head { flex-wrap: wrap; }
    .qv9-layout { grid-template-columns: 1fr; gap: 16px; }
    .qv9-rail { position: static; }
    .qv9-rail .qv9-rail-card { display: none; }
    .qv9-rail.is-open .qv9-rail-card { display: block; }
    .qv9-mobile-head { display: block; background: var(--plr-grey-neutral); border-radius: 20px; padding: 14px 16px; }
    .qv9-mobile-head-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--plr-text-2); }
    .qv9-mobile-head-top strong { color: var(--plr-text); }
    .qv9-mobile-head .qv9-progress-bar { margin-top: 10px; }
    .qv9-card { padding: 24px 20px 20px; border-radius: 24px; }
    .qv9-nav { margin: 24px -20px -20px; padding: 16px 20px 22px; border-radius: 0 0 24px 24px; gap: 10px; }
    .qv9-nav-status { display: none; }
    .qv9-nav-right { flex: 1 1 auto; }
    .qv9-nav-right .qv9-btn { width: 100%; }
    .qv9-head { flex-direction: column; align-items: flex-start; margin-bottom: 14px; }
    .qv9-head h1 { font-size: 22px; }
    .qv9-head .qv9-head-sub { display: none; }
    .qv9-review-row { grid-template-columns: 26px minmax(0, 1fr); }
    .qv9-review-row .qv9-review-value { grid-column: 2; }
    .qv9-qrow { flex-direction: column; align-items: flex-start; gap: 8px; }
    .qv9 .row.mb-3 > .col-6, .qv9 .row.mb-3 > .col-4 { flex: 0 0 100%; max-width: 100%; padding-left: 12px; }
    .qv9 .row.mb-3 > [class^="col-"] + [class^="col-"] { margin-top: 16px; }
}
