/* Pages de remplissage : téléphone (une question à la fois) et ordinateur (formulaire + aperçu). */
:root { --wa: #1F6B35; --wa-soft: #DCEFE1; --warn: #93370D; --warn-soft: #FFFAEB; --hl: #F5B400; --field: #F1F5FA; }

.loading { padding: 40px; text-align: center; color: var(--muted); }
.crumb { font-weight: 600; color: var(--muted); }
.crumb::before { content: "/"; margin-right: 10px; color: #98A2B3; font-weight: 400; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 26px; border-radius: 14px; border: 2px solid transparent; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: #163C69; }
.btn.wa { background: #fff; color: var(--wa); border-color: var(--wa); }
.btn.wa:hover { background: var(--wa-soft); }
.btn.ghost { background: transparent; color: var(--muted); height: 48px; font-weight: 500; font-size: 16px; }
.btn.block { width: 100%; }
:focus-visible { outline: 3px solid #84ADFF; outline-offset: 2px; }

/* ---------- champs ---------- */
.inp { width: 100%; height: 44px; border: 1px solid #C9D1DA; border-radius: 10px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
textarea.inp { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.4; }
.inp:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #CFDDF0; outline: none; }
.inp::placeholder { color: #98A2B3; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 6px 14px; border-radius: 20px; border: 2px solid #C9D1DA; background: #fff; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: #9FB3CC; }
.chip.on { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 600; }
.stepper { display: inline-flex; align-items: center; gap: 12px; }
.stepper .st { width: 42px; height: 42px; border-radius: 21px; border: 2px solid var(--primary); background: #fff; color: var(--primary); font: inherit; font-size: 22px; font-weight: 700; cursor: pointer; line-height: 1; }
.stepper .st:disabled { opacity: .35; cursor: default; }
.stepper .num { min-width: 22px; text-align: center; font-size: 20px; font-weight: 700; }
.help { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.fine { margin: 0; font-size: 13px; color: var(--muted); }
.alert { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 14px; line-height: 1.4; }
.note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #F1F4F8; font-size: 14.5px; line-height: 1.45; }

.family { display: flex; flex-direction: column; gap: 10px; }
.tg { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px; border-radius: 14px; border: 2px solid #D5DCE4; background: #fff; font-size: 16px; font-weight: 600; cursor: pointer; }
.tg.on { border-color: var(--primary); background: #E7EEF7; color: #163C69; }
.tg input { width: 24px; height: 24px; margin: 0; accent-color: var(--primary); }
.tg .tg-l { flex: 1; }
.tg.fixed { cursor: default; }
.tg .ck.on { width: 24px; height: 24px; border-radius: 6px; background: var(--primary); position: relative; }
.tg .ck.on::after { content: ""; position: absolute; left: 8px; top: 3px; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }

.todo { display: flex; flex-direction: column; gap: 10px; background: #F5F7FA; border-radius: 14px; padding: 16px; }
.todo strong { font-size: 16px; }
.todo-i { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.todo-i input { width: 20px; height: 20px; flex-shrink: 0; margin: 1px 0 0; accent-color: var(--wa); }

/* =================== TÉLÉPHONE =================== */
.mob { background: #fff; min-height: 100vh; }
.wz { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 12px 20px 20px; }
.wz-top { display: flex; align-items: center; gap: 8px; }
.back { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; margin-left: -10px; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 22px; }
.bar { flex: 1; height: 8px; border-radius: 4px; background: #E1E6EC; overflow: hidden; }
.bar > div { height: 8px; border-radius: 4px; background: var(--primary); transition: width .25s; }
.who { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 15px; font-weight: 600; color: var(--muted); }
.who-dot { min-width: 34px; height: 34px; padding: 0 6px; border-radius: 17px; background: #FCEBDD; color: #8A3A08; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.wz-q { margin: 14px 0 22px; font-size: 26px; line-height: 1.25; font-family: var(--font); }
.inp.big { height: 62px; border: 2px solid var(--primary); border-radius: 14px; padding: 0 16px; font-size: 22px; font-weight: 600; box-shadow: 0 0 0 4px #CFDDF0; }
textarea.inp.big { height: auto; padding: 14px 16px; font-size: 19px; }
.choices.big { display: flex; flex-direction: column; gap: 10px; }
.choices.big .chip { display: flex; align-items: center; gap: 12px; min-height: 58px; border-radius: 14px; padding: 0 16px; font-size: 17px; text-align: left; }
.choices.big .chip .ck { width: 22px; height: 22px; border-radius: 11px; border: 2px solid #9AA6B2; flex-shrink: 0; }
.choices.big .chip.on { background: #E7EEF7; color: #163C69; }
.choices.big .chip.on .ck { border: 7px solid var(--primary); }
.stepper.big .st { width: 54px; height: 54px; border-radius: 27px; font-size: 26px; }
.stepper.big .num { font-size: 28px; min-width: 40px; }
.wz-foot { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 6px; }
.recap { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.rc { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 12px; background: #F5F7FA; border: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.rc b { display: block; font-size: 16px; }
.rc small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.rc .ed { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--primary); flex-shrink: 0; }
.fin { gap: 14px; padding-top: 28px; }
.fin .wz-q { margin: 0; }
.ok-dot { width: 60px; height: 60px; border-radius: 30px; background: var(--wa-soft); display: flex; align-items: center; justify-content: center; }

/* =================== ORDINATEUR =================== */
.desk { min-height: 100vh; }
.desk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 28px; max-width: 1440px; margin: 0 auto; padding: 24px 32px 32px; align-items: start; }
.desk-grid.fam { grid-template-columns: minmax(0, 1fr) 320px; }
.desk-form { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.intro { margin: 0; color: var(--muted); font-size: 15px; }
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 26px; display: flex; flex-direction: column; gap: 14px; }
.sec h2 { margin: 0; font-size: 19px; font-family: var(--font-title); }
.grp { border: 0; margin: 0; padding: 0; min-width: 0; }
.grp legend { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); padding: 0; margin-bottom: 8px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; }
.row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.row.wide { grid-column: 1 / -1; }
.lab { font-size: 14px; font-weight: 600; color: #344054; }
.cards-p { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid #D0D5DD; border-radius: 14px; padding: 14px; }
.pcard .row.wide .chips .chip { min-height: 34px; padding: 3px 12px; font-size: 14px; }
.role { align-self: flex-start; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: #E7EEF7; color: #163C69; }
.role.r-enfants { background: #FCEBDD; color: #8A3A08; }
.more summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--primary); padding: 4px 0; }
.more[open] { display: flex; flex-direction: column; gap: 10px; }
.side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 32px); min-width: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { min-width: 30px; height: 30px; border-radius: 8px; border: 1px solid #C9D1DA; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.tab.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.sheet-label { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.pv { overflow-y: auto; flex: 1 1 auto; min-height: 240px; display: flex; flex-direction: column; gap: 12px; padding: 2px 6px 6px 2px; }
.page { position: relative; width: 100%; background: #fff; box-shadow: 0 2px 10px rgba(16, 24, 40, .14); container-type: inline-size; flex-shrink: 0; }
.page img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ov { position: absolute; inset: 0; }
.ot { position: absolute; white-space: pre; line-height: 1; color: #1A3F8F; font-family: Helvetica, Arial, sans-serif; }
.ot.times { font-family: "Times New Roman", Times, serif; color: #111; }
.om { position: absolute; background: #fff; }
.os { position: absolute; background: #1A3F8F; }
.oe { position: absolute; border: 1.2px solid #1A3F8F; border-radius: 50%; }
.hl { position: absolute; background: rgba(245, 180, 0, .28); outline: 2px solid var(--hl); border-radius: 2px; pointer-events: none; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { background: rgba(245, 180, 0, .12); } }
@media (prefers-reduced-motion: reduce) { .hl { animation: none; } .bar > div { transition: none; } }
.actions { display: flex; gap: 10px; }
.actions .btn.primary { flex: 1; }
.fam-side { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
#fam-count { display: flex; flex-direction: column; gap: 4px; }
.big-n { font-size: 46px; font-weight: 700; line-height: 1; color: var(--primary); font-family: var(--font-title); }
.big-l { font-size: 17px; font-weight: 600; }
.muted { margin: 4px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.order { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; color: #344054; line-height: 1.6; }
.fam-side .actions { flex-direction: column; }
