/* ==========================================================================
   Assistant Annexe 15 – styles
   ========================================================================== */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1b2730;
  --ink-2: #44525d;
  --muted: #74818b;
  --line: #e3e7eb;
  --line-2: #cfd6dc;
  --accent: #174f57;
  --accent-2: #23707a;
  --accent-soft: #eaf2f3;
  --ok: #1d7347;
  --ok-soft: #eaf5ee;
  --warn: #9a5b00;
  --warn-soft: #fcf3e3;
  --err: #b3261e;
  --err-soft: #fcefee;
  --info-soft: #f1f4f8;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.45 var(--font); }
svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; }
small { color: var(--muted); font-weight: 400; }
b { font-weight: 600; }
a { color: var(--accent-2); }

/* ---------- en-tête ---------- */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1400px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--accent); color: #fff; }
.brand-mark svg { width: 26px; height: 26px; stroke-width: 4.5; }
.brand h1 { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.brand p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tarif { font-size: 12px; color: var(--muted); margin-right: 6px; cursor: help; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: 600 13.5px/1 var(--font); padding: 9px 14px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s;
}
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #113d44; }
.btn-line { background: #fff; color: var(--ink-2); border-color: var(--line-2); }
.btn-line:hover { border-color: var(--accent-2); color: var(--accent); }
.btn-line-dark { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-line-dark:hover { background: #f6f7f8; }
.btn-soft { background: var(--accent-soft); color: var(--accent); border-color: #d3e3e5; width: 100%; }
.btn-soft:hover { background: #dcebed; }
.link { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 0 4px; }
.link-btn { background: none; border: 0; padding: 4px 6px; color: var(--accent-2); font: 600 12.5px var(--font); cursor: pointer; border-radius: 6px; }
.link-btn:hover { background: var(--accent-soft); }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.notice { margin-top: 14px; padding: 10px 14px; border-radius: 8px; background: var(--warn-soft); color: #6a4100; border: 1px solid #f0dcb4; font-size: 13.5px; }

/* ---------- mise en page ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; padding: 18px 24px 8px; max-width: 1400px; margin: 0 auto; align-items: start; }
.form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 18px 20px; }
.card > h2 { font-size: 15px; font-weight: 650; display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.card > h2 small { font-size: 12px; font-weight: 500; }
.num { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 12px; }

.grid { display: grid; gap: 12px 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.add-grid { grid-template-columns: minmax(0, 1fr) 80px 70px 110px; }
.row-fields { display: flex; flex-wrap: wrap; gap: 12px 22px; align-items: flex-end; }
.row-fields + .row-fields { margin-top: 14px; }
.row-fields .grow { flex: 1; min-width: 240px; }
.row-fields .idx { width: 160px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field.narrow { max-width: 240px; }
.under { font-style: normal; font-weight: 500; color: var(--accent-2); }
input[type=text], input[type=date], input[type=number], input[type=email], input[type=password], input[type=tel], input:not([type]), select {
  font: 14.5px/1.2 var(--font); color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 7px;
  padding: 8px 10px; width: 100%; min-width: 0; transition: border-color .12s, box-shadow .12s;
}
input:hover, select:hover { border-color: #b9c3ca; }
input:focus, select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(35, 112, 122, .14); }
input::placeholder { color: #a7b1b8; }
input.bad { border-color: var(--err); background: var(--err-soft); }
input.odd { border-color: #d5a14a; }
select { cursor: pointer; }

.age-out { padding: 8px 10px; border-radius: 7px; background: #f6f7f8; border: 1px solid var(--line); color: var(--muted); font-weight: 600; min-height: 36px; }
.age-out.on { color: var(--accent); background: var(--accent-soft); border-color: #d3e3e5; }
.age-band { margin-top: 12px; }

.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13.8px; cursor: pointer; padding: 3px 0; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.checks { display: flex; flex-direction: column; gap: 2px; }
.checks.inline { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; padding: 6px 0; }
.checks.sep { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

details.more { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); list-style: none; display: flex; align-items: baseline; gap: 8px; padding: 2px 0; }
details.more > summary small { font-size: 12px; }
details.more > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; position: relative; top: -1px; }
details.more[open] > summary::before { transform: rotate(45deg); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:hover { color: var(--accent); }
details.more > .grid, details.more > .opts, details.more > .rx, details.more > .table-wrap { margin-top: 12px; }
details.more > .check { margin-top: 10px; }

.hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }

/* ---------- segmented ---------- */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #fff; }
.seg label { position: relative; }
.seg label + label span { border-left: 1px solid var(--line-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 13px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: background .12s, color .12s; }
.seg span:hover { background: #f4f6f7; }
.seg input:checked + span { background: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: -2px; }

/* ---------- onglets ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); }
.tab { position: relative; }
.tab input { position: absolute; opacity: 0; }
.tab span { display: block; padding: 9px 16px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab span:hover { color: var(--ink); }
.tab input:checked + span { color: var(--accent); border-bottom-color: var(--accent); }
.tab input:focus-visible + span { outline: 2px solid var(--accent-2); }

/* ---------- prescription OD/OG ---------- */
.rx-head, .rx-row { display: grid; grid-template-columns: 44px repeat(2, minmax(64px, 1fr)) 62px repeat(2, minmax(64px, 1fr)) 92px 58px; gap: 8px; align-items: center; }
.rx-head { font-size: 11.5px; font-weight: 600; color: var(--muted); padding-bottom: 6px; }
.rx-head .c { text-align: center; }
.rx-row { padding: 7px 0; border-top: 1px solid var(--line); transition: opacity .15s; }
.rx-row input { text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.rx-row.off .mer { opacity: .45; }
.eye-tag { font-weight: 700; color: var(--accent); font-size: 14.5px; }
.mer { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); text-align: center; font-size: 13.5px; }
.mer.on { color: var(--ink); }
.mer.hi { color: var(--ok); }
.rx-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 4px; }
.rx-foot .hint { flex: 1; min-width: 260px; }
.rx-actions { display: flex; gap: 4px; padding-top: 5px; }
.rx-prev .rx-head, .rx-prev .rx-row { grid-template-columns: 44px repeat(4, minmax(64px, 1fr)); }
.is-lentilles .col-add, .is-lentilles .col-prism { display: none; }
.is-lentilles .rx-head, .is-lentilles .rx-row { grid-template-columns: 44px repeat(2, minmax(64px, 1fr)) 62px 92px 58px; }
.is-lentilles .rx-prev .rx-head, .is-lentilles .rx-prev .rx-row { grid-template-columns: 44px repeat(2, minmax(64px, 1fr)); }

.toggle { position: relative; display: inline-block; width: 36px; height: 21px; cursor: pointer; justify-self: center; }
.toggle input { position: absolute; opacity: 0; }
.toggle i { position: absolute; inset: 0; border-radius: 999px; background: #d3dade; transition: background .15s; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + i { background: var(--accent-2); }
.toggle input:checked + i::after { transform: translateX(15px); }
.toggle input:focus-visible + i { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.presc-state, .renew-state { font-size: 13px; font-weight: 600; margin-top: 10px; }
.presc-state:empty, .renew-state:empty { display: none; }
.presc-state.ok, .renew-state.ok { color: var(--ok); }
.presc-state.err { color: var(--err); }
.renew-state.warn { color: var(--warn); }
#renewBox { margin-top: 14px; }

.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 0; }
.opt .check { flex: 1; }
.opt .opt-price { width: 104px; flex: none; padding: 6px 8px; text-align: right; font-size: 13.5px; }

.kids { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: #f7f9fa; border: 1px solid var(--line); }
.cl-ind { margin-top: 12px; }
.auto-ind { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.ind.yes { color: var(--ok); font-weight: 600; }
.ind.yes::before { content: '✓ '; }
.mode-lentilles .row-fields { margin-top: 14px; }

/* ---------- résultat ---------- */
.result { position: sticky; top: 14px; }
.result-card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20, 35, 45, .04), 0 8px 24px rgba(20, 35, 45, .06); padding: 18px; max-height: calc(100vh - 28px); overflow: auto; }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.result-head h2 { font-size: 16px; font-weight: 650; }
.conv { font-size: 12px; font-weight: 600; color: var(--ok); }
.conv::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.conv.warn { color: var(--warn); }

.eyes-out { display: flex; flex-direction: column; gap: 8px; }
.eye-res { display: flex; gap: 11px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); border-left: 3px solid var(--line-2); background: #fff; }
.eye-res .eye-b { flex: none; font-weight: 700; font-size: 13px; color: var(--ink-2); width: 24px; padding-top: 1px; }
.eye-res.ok { border-left-color: var(--ok); }
.eye-res.ko { border-left-color: var(--err); background: #fffbfb; }
.eye-res.warn { border-left-color: var(--warn); background: var(--warn-soft); align-items: center; }
.eye-res.skip { align-items: center; background: #fafbfb; }
.eye-body { min-width: 0; }
.eye-main { font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.eye-main .lbl { font-weight: 400; color: var(--ink-2); font-size: 13.2px; }
.eye-supp { font-size: 12.5px; margin-top: 4px; color: var(--ink-2); }
.reason { font-size: 13px; color: #8a2019; margin-top: 2px; }
.meta { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.notes { margin: 5px 0 0; padding-left: 16px; font-size: 12.3px; color: var(--ink-2); }
.muted { color: var(--muted); font-size: 13.5px; }
.code { display: inline-block; font: 600 13px/1.25 var(--mono); padding: 1px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); border: 1px solid #d3e3e5; letter-spacing: .02em; }
.code.sm { font-size: 11.5px; }

.msgs { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.msg { font-size: 12.8px; padding: 7px 10px; border-radius: 7px; line-height: 1.4; border-left: 3px solid; }
.msg.ok { background: var(--ok-soft); color: #134f31; border-color: var(--ok); }
.msg.info { background: var(--info-soft); color: var(--ink-2); border-color: #b8c3cd; }
.msg.warn { background: var(--warn-soft); color: #6a4100; border-color: #d99a3a; }
.msg.err { background: var(--err-soft); color: #7a1c15; border-color: var(--err); }

.lines-wrap { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.lines-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.lines { display: flex; flex-direction: column; gap: 6px; }
.ln { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
.ln-top { display: flex; align-items: flex-start; gap: 9px; }
.ln-lbl { flex: 1; min-width: 0; font-weight: 600; font-size: 13.3px; line-height: 1.3; }
.ln-lbl small, .ln-amt small { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.ln-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13.5px; }
.ln-prices { display: grid; grid-template-columns: 92px 92px 1fr; gap: 8px; align-items: end; margin-top: 8px; }
.ln-prices label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.ln-out { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12.3px; color: var(--ink-2); font-variant-numeric: tabular-nums; padding-bottom: 2px; }
.ln-out b.pos { color: var(--ok); }
.opt-note { color: var(--accent-2); }
.muted-s { color: #a0aab1; font-size: 12px; }
input.money { width: 100%; padding: 6px 8px; text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.x { border: 0; background: none; color: var(--muted); width: 22px; height: 22px; border-radius: 5px; cursor: pointer; font-size: 17px; line-height: 1; flex: none; }
.x:hover { background: var(--err-soft); color: var(--err); }
.empty { color: var(--muted); font-size: 13px; padding: 6px 0; margin: 0; }

.totals { margin-top: 10px; }
.tot-row { display: flex; justify-content: space-between; padding: 4px 2px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tot-row b { color: var(--ink); }
.tot-row b.pos { color: var(--ok); }
.tot-row.small { font-size: 12px; color: var(--muted); }
.tot-row.small b { color: var(--muted); font-weight: 500; }
.tot-row.big { margin-top: 6px; padding: 9px 2px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 14.5px; color: var(--ink); }
.tot-row.big b { font-size: 17px; color: var(--accent); }
.tot-hint { font-size: 12.3px; color: var(--muted); margin: 6px 2px 0; }

.result-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 14px; }
.result-actions .btn { padding: 11px 12px; }
.fine { font-size: 11.8px; color: var(--muted); margin: 10px 2px 0; }

/* ---------- simulation ---------- */
.sim { max-width: 1400px; margin: 22px auto 0; padding: 0 24px; scroll-margin-top: 12px; }
.sim-in { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.sim-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.sim-head h2 { font-size: 16px; font-weight: 650; }
.sim-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); max-width: 720px; }
.sim-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
.sim-form { display: flex; flex-direction: column; gap: 12px; }
.sim-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sim-col { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.sim-col h4 { font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 8px; }
.sim-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.sim-row.sub { font-size: 12.3px; color: var(--muted); padding: 0 0 0 10px; }
.sim-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 600; }
.sim-row.total b { color: var(--accent); font-size: 16px; }
.sim-notes { margin: 8px 0 0; padding-left: 16px; font-size: 12.3px; color: var(--ink-2); }
.sim-notes li + li { margin-top: 2px; }
.sim-mut { margin-top: 12px; border-radius: 8px; background: #f7f9fa; border: 1px solid var(--line); padding: 12px 14px; }
.sim-mut-head { margin-bottom: 6px; }
.sim-mut-head a { font-size: 12.5px; margin-left: 6px; }
.sim-kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px; font-size: 13px; padding: 2px 0; }
.sim-kv span:first-child { color: var(--muted); }
.sim-all { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
.sim-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sim-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.sim-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.presc-rules { margin-top: 14px; }
.presc-rules h3 { font-size: 13.5px; font-weight: 650; margin-bottom: 6px; }
.presc-rules ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.presc-rules li + li { margin-top: 3px; }

/* ---------- pied de page ---------- */
.foot { max-width: 1400px; margin: 0 auto; padding: 14px 24px 22px; }
.foot-in { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.foot p { margin: 0; }
.credit { margin-left: auto !important; font-size: 11.5px; color: #9aa5ad; letter-spacing: .01em; }

/* ---------- dialogues ---------- */
.dlg { border: 0; border-radius: 12px; padding: 0; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); width: min(700px, calc(100vw - 24px)); color: var(--ink); }
.dlg::backdrop { background: rgba(15, 25, 32, .45); }
.dlg form { padding: 22px; }
.dlg h2 { font-size: 17px; font-weight: 650; margin-bottom: 2px; }
.dlg .grid { margin: 14px 0 10px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.dlg-preview { width: min(880px, calc(100vw - 24px)); max-height: calc(100vh - 24px); flex-direction: column; background: #e9ecee; }
.dlg-preview[open] { display: flex; }
.preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.preview-bar > div { display: flex; gap: 8px; }
.preview-scroll { overflow: auto; padding: 16px; }
.preview-scroll .a15-sheet { margin: 0 auto 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }

/* ---------- accès (connexion / activation) ---------- */
body.locked .app { display: none; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.gate-box { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 26px 26px 22px; box-shadow: 0 10px 30px rgba(20, 35, 45, .08); }

/* ---------- page d'accueil ---------- */
.gate.landing { display: block; place-items: normal; min-height: 0; padding: 0; background: #fff; }
.l-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.l-nav { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(6px); border-bottom: 1px solid var(--line); }
.l-nav .l-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.l-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 15.5px; }
.l-brand .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
.l-brand .brand-mark svg { width: 22px; height: 22px; }
.l-links { display: flex; align-items: center; gap: 22px; }
.l-links a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.l-links a:not(.btn):hover { color: var(--accent); }
.l-hero { padding: 64px 0 72px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff 0%, #f7f9fa 100%); }
.l-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 400px); gap: 56px; align-items: center; }
.l-eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--accent-2); letter-spacing: .02em; }
.l-hero h1 { font-size: 42px; line-height: 1.12; letter-spacing: -.02em; font-weight: 700; max-width: 17ch; }
.l-lead { margin: 18px 0 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 54ch; }
.l-checks { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.l-checks li { position: relative; padding-left: 24px; }
.l-checks li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px; border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg); }
.l-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.l-cta .btn { padding: 11px 18px; font-size: 14.5px; }
.l-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: 0 12px 36px rgba(20, 35, 45, .08); scroll-margin-top: 80px; }
.l-section { padding: 72px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 62px; }
.l-section.alt { background: #f7f9fa; }
.l-h2 { font-size: 28px; font-weight: 700; letter-spacing: -.015em; }
.l-sub { margin: 10px 0 0; font-size: 16px; color: var(--ink-2); max-width: 60ch; line-height: 1.55; }
.l-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 36px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.l-features article { background: #fff; padding: 22px 22px 24px; }
.l-features h3 { font-size: 15.5px; font-weight: 650; margin-bottom: 8px; }
.l-features p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.l-steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: s; }
.l-steps li { counter-increment: s; display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 2px solid var(--ink); }
.l-steps li::before { content: counter(s, decimal-leading-zero); font: 600 13px var(--mono); color: var(--muted); }
.l-steps b { font-size: 16px; }
.l-steps span { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.l-contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 56px; align-items: start; }
.l-form { border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.l-form h3 { font-size: 16px; font-weight: 650; }
.l-form textarea { font: 14.5px/1.4 var(--font); color: var(--ink); border: 1px solid var(--line-2); border-radius: 7px; padding: 8px 10px; width: 100%; resize: vertical; }
.l-form textarea:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(35, 112, 122, .14); }
.l-form .btn { align-self: flex-start; padding: 10px 18px; }
.l-form-msg { margin: 0; font-size: 13.5px; }
.l-form-msg:empty { display: none; }
.l-form-msg.ok { color: var(--ok); }
.l-form-msg.err { color: var(--err); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.l-faq { margin-top: 26px; display: flex; flex-direction: column; border-top: 1px solid var(--line-2); max-width: 820px; }
.l-faq details { border-bottom: 1px solid var(--line-2); padding: 14px 0; }
.l-faq summary { cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.l-faq summary::-webkit-details-marker { display: none; }
.l-faq summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.l-faq details[open] summary::after { content: '–'; }
.l-faq p { margin: 10px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; max-width: 70ch; }
.l-foot { padding: 22px 0 28px; font-size: 12.5px; color: var(--muted); }
.l-foot .l-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 960px) {
  .l-hero-grid, .l-contact-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .l-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .l-hero h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .l-in { padding: 0 16px; }
  .l-links a:not(.btn) { display: none; }
  .l-hero { padding: 40px 0 48px; }
  .l-hero h1 { font-size: 29px; }
  .l-lead { font-size: 15.5px; }
  .l-features, .l-steps { grid-template-columns: minmax(0, 1fr); }
  .l-section { padding: 48px 0; }
  .l-h2 { font-size: 23px; }
}
.gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.gate-brand b { display: block; font-size: 16px; }
.gate-brand small { font-size: 12.5px; }
.gate-screen { display: flex; flex-direction: column; gap: 12px; }
.gate-screen h2 { font-size: 17px; font-weight: 650; }
.gate-screen p { margin: 0; font-size: 14px; color: var(--ink-2); }
.gate-screen .btn { width: 100%; padding: 11px; }
.gate-screen .link-btn { align-self: center; }
.gate-msg { margin: 0 0 12px; font-size: 13.5px; }
.gate-msg:empty { display: none; }
.gate-msg.err { color: var(--err); background: var(--err-soft); padding: 8px 10px; border-radius: 7px; }
.gate-msg.info { color: var(--ink-2); background: var(--info-soft); padding: 8px 10px; border-radius: 7px; }
.devices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.devices li { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.devices li small { display: block; color: var(--muted); font-size: 12px; }
.devices .btn { width: auto; padding: 7px 10px; }
.account-bar { display: flex; align-items: center; gap: 4px; margin-right: 6px; font-size: 13px; }
.acc-name { font-weight: 600; color: var(--ink-2); margin-right: 4px; }
.who { display: flex; flex-direction: column; gap: 4px; margin: -2px 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.who select { font-weight: 600; }
.set-account h3 { font-size: 13.5px; font-weight: 650; margin: 14px 0 8px; }
.opt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.req-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.req-row .btn { width: auto; }
input:disabled { background: #f4f6f7; color: var(--ink-2); }

/* ---------- administration ---------- */
.admin { max-width: 1400px; margin: 0 auto; padding: 18px 24px 40px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.kpi span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 22px; font-weight: 650; color: var(--accent); }
.kpi small { margin-left: 6px; }
.admin-tabs { margin-bottom: 14px; }
.admin-tools { display: flex; gap: 10px; margin-bottom: 12px; align-items: center; flex-wrap: wrap; }
.admin-tools input { flex: 1; min-width: 200px; max-width: 420px; }
.admin-tools select { width: auto; }
.admin-tools .btn { white-space: nowrap; margin-left: auto; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-list { padding: 8px 10px; }
.sim-table tr.row { cursor: pointer; }
.sim-table tr.row:hover td { background: #f7f9fa; }
.sim-table tr.sel td { background: var(--accent-soft); }
.st { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-warn { background: var(--warn-soft); color: var(--warn); }
.st-off { background: var(--err-soft); color: var(--err); }
.admin-detail { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow: auto; }
.detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.detail-head h2 { font-size: 16px; font-weight: 650; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.admin-detail h3 { font-size: 13.5px; font-weight: 650; margin: 20px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-detail h3 small { font-weight: 400; font-size: 12px; }
.btn.inline { width: auto; }
.btn.danger, .link-btn.danger { color: var(--err); }
.adm-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13.5px; }
.adm-list li .x { margin-left: auto; }
.add-opt { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 8px; }
.add-opt .btn { width: auto; }
.admin-msg { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; background: var(--ink); color: #fff; padding: 9px 14px; border-radius: 8px; font-size: 13.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.admin-msg:empty { display: none; }
.admin-msg.bad { background: var(--err); }
.nowrap { white-space: nowrap; }
.admin-gate { background: linear-gradient(180deg, #fff 0%, #eef2f4 100%); }
.admin-gate .gate-screen p { color: var(--muted); font-size: 13.5px; }
.st-wait { background: #eef1f4; color: var(--ink-2); }
.tag { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: #eef1f4; border-radius: 5px; padding: 1px 7px; }
.pane-title { font-size: 16px; font-weight: 650; margin-bottom: 4px; }
.dsec { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.dsec:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.dsec h3 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 10px; padding: 0; border: 0; }
.dsec .hint { margin-top: 6px; }
.detail-head small { color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.detail-head h2 { margin-bottom: 4px; }
.code-create { display: flex; gap: 8px; margin-top: 10px; }
.code-create select { max-width: 300px; }
.code-create .btn { white-space: nowrap; }
.adm-list li.off { opacity: .55; }
.danger-zone { text-align: right; }
.msg-cell { max-width: 340px; font-size: 13px; color: var(--ink-2); }
.sim-table tr.done td { color: var(--muted); }
.who-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who.need select { border-color: var(--err); box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }
.who-msg { margin: 2px 0 0; font-size: 12.5px; font-weight: 500; color: var(--err); line-height: 1.4; }
.subbar { background: #f3f6f7; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.subbar.trial { background: var(--accent-soft); color: #134048; }
.subbar.urgent { background: var(--warn-soft); color: #6a4100; }
.subbar-in { max-width: 1400px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.subbar b { font-weight: 650; }
.subbar .link-btn { white-space: nowrap; }
.st-trial { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 720px) { .subbar-in { padding: 8px 16px; } }
.who .link-btn { font-weight: 600; font-size: 12px; padding: 2px 0; }
@media (max-width: 1000px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } .admin-detail { position: static; max-height: none; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .admin { padding: 14px 16px 30px; } .add-opt { grid-template-columns: 1fr; } .account-bar .acc-name { display: none; } }

/* ==========================================================================
   Annexe 15 (A4)
   ========================================================================== */
.print-area { display: none; }
.a15 { color: #000; font: 9pt/1.32 Arial, Helvetica, sans-serif; }
.a15-sheet { width: 210mm; min-height: 297mm; padding: 13mm 12mm 12mm; background: #fff; position: relative; }
.a15-title { text-align: center; font-weight: 700; font-size: 10pt; margin-bottom: 4mm; }
.a15-b { font-weight: 700; }
.a15-vignette { border-top: 1px solid #000; padding-top: 1.5mm; margin-bottom: 2mm; min-height: 30mm; }
.a15-vig-fields { margin-top: 4mm; }
.a15-vig-fields > div { padding: .6mm 0; }
.a15-banner { text-align: center; font-weight: 700; border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 1.2mm 0; margin: 2mm 0 2mm; letter-spacing: .02em; }
.a15-line { padding: .6mm 0; }
.a15-fill { font-weight: 700; color: #0a2a66; font-family: Arial, Helvetica, sans-serif; }
.a15-dots { color: #555; }
.a15-table { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: 2.5mm; font-size: 7.6pt; }
.a15-table th { font-family: "Times New Roman", Times, serif; font-weight: 400; font-size: 7.6pt; border: 1px solid #000; padding: 1mm .8mm; vertical-align: top; text-align: center; height: 14mm; }
.a15-table td { border-left: 1px solid #000; border-right: 1px solid #000; padding: .6mm 1mm; height: 8.2mm; text-align: center; font-weight: 700; color: #0a2a66; vertical-align: middle; overflow: hidden; }
.a15-table td.t-l { text-align: left; font-weight: 600; font-size: 7.2pt; line-height: 1.15; }
.a15-table td.t-r { text-align: right; }
.a15-table tbody tr:last-child td { border-bottom: 1px solid #000; }
.a15-table tfoot td { border: 1px solid #000; height: 8mm; color: #0a2a66; }
.a15-table tfoot td:first-child { color: #000; font-weight: 400; font-family: "Times New Roman", Times, serif; font-size: 7.6pt; vertical-align: top; }
.a15-table td.a15-box { border: 2px solid #000; position: relative; padding-top: 3.2mm; }
.a15-ref { position: absolute; top: .4mm; left: 0; right: 0; text-align: center; font-weight: 400; color: #000; font-family: "Times New Roman", Times, serif; font-size: 7pt; }
.a15-right { text-align: right; margin-top: 5mm; }
.a15-right + .a15-right { margin-top: 4mm; }
.a15-note { margin-top: 6mm; font-size: 7pt; color: #444; }
.a15-block { border-top: 1px solid #000; padding: 1.8mm 0 2.2mm; }
.a15-block > div { padding: .45mm 0; }
.a15-yn { display: flex; justify-content: space-between; gap: 6mm; }
.a15-yn b { white-space: nowrap; }
.a15-gap { margin-top: 2mm; }
.a15-sign { margin-top: 3mm; padding-bottom: 2mm !important; }
.a15-confirm { border-top: 1px solid #000; margin-top: 2mm; padding-top: 1.5mm !important; font-weight: 700; }
.a15-confirm > div { padding: .45mm 0; }
.a15-foot { font-style: italic; font-size: 8pt; border-top: 1px solid #000; margin-top: 1.5mm; padding-top: 1.5mm !important; }
.a15-split { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #000; margin-top: 2mm; }
.a15-tp { padding: 1.5mm 2mm 1.5mm 0; }
.a15-signbox { border-left: 1px solid #000; padding: 1.5mm 2mm; min-height: 26mm; }
.a15-signbox .a15-fill { margin-top: 1mm; }
.a15-receipt { border: 1px solid #000; margin-top: 5mm; padding: 1.5mm 3mm 3mm; }
.a15-rtitle { text-align: center; font-weight: 700; margin-bottom: 3mm; }
.a15-rgrid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 5mm 8mm; font-weight: 700; }
.a15 s { text-decoration-thickness: 1.5px; }

/* ---------- impression ---------- */
@page { size: A4 portrait; margin: 0; }
@media print {
  html, body { background: #fff; }
  .app, dialog { display: none !important; }
  .print-area { display: block; }
  .a15-sheet { box-shadow: none; margin: 0; page-break-after: always; break-after: page; min-height: 0; height: 296mm; overflow: hidden; }
  .a15-sheet:last-child { page-break-after: auto; break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .result { position: static; }
  .result-card { max-height: none; }
  .sim-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .topbar-in, .wrap { padding-left: 16px; padding-right: 16px; }
  .brand p, .tarif { display: none; }
  .layout { padding: 14px 16px; gap: 14px; }
  .card { padding: 16px; }
  .g3, .g4, .g2, .opts { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .add-grid { grid-template-columns: 1fr 1fr; }
  .add-grid > :first-child { grid-column: 1 / -1; }
  .rx { overflow-x: auto; }
  .rx-head, .rx-row { min-width: 600px; }
  .sim { padding: 0 16px; }
  .sim-in { padding: 16px; }
  .sim-cols { grid-template-columns: minmax(0, 1fr); }
  .foot { padding: 14px 16px 22px; }
  .preview-scroll { padding: 8px; }
  .preview-scroll .a15 { zoom: .45; }
}
