:root {
  --accent: #4f46e5;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --border: #e3e5ea;
  --text: #14161c;
  --muted: #6b7180;
  --ok: #0f9d6b;
  --ok-bg: #e3f6ee;
  --warn: #b7791f;
  --warn-bg: #fdf3dc;
  --danger: #d1344b;
  --danger-bg: #fde8eb;
  --info: #2563eb;
  --info-bg: #e5edff;
  --shadow: 0 1px 2px rgba(16, 20, 32, .05), 0 6px 20px rgba(16, 20, 32, .05);
  --radius: 12px;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
}
[data-theme="dark"] {
  --bg: #0e1016;
  --surface: #171a22;
  --surface-2: #1f232d;
  --border: #2a2f3b;
  --text: #eceef3;
  --muted: #939aab;
  --ok-bg: #12372b;
  --warn-bg: #3d3014;
  --danger-bg: #44181f;
  --info-bg: #17284d;
  --ok: #46d39e;
  --warn: #f0b955;
  --danger: #ff7d8f;
  --info: #7da6ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.ic { width: 18px; height: 18px; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.right { text-align: right; }
.grow { flex: 1; }

/* ---------- Layout ---------- */
#app { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px; font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  color: #fff;
}
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  color: var(--muted); font-weight: 500; transition: background .12s, color .12s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-link .count { margin-left: auto; font-size: 12px; background: var(--danger-bg); color: var(--danger); padding: 0 7px; border-radius: 99px; font-weight: 600; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.sidebar-foot button { background: none; border: 0; cursor: pointer; text-align: left; width: 100%; }

main { padding: 30px 38px 60px; max-width: 1240px; width: 100%; margin: 0 auto; min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; letter-spacing: -.025em; font-weight: 700; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Components ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 550;
  white-space: nowrap; transition: transform .06s, background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.icon { padding: 7px; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .nav-link:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-title { font-size: 14px; font-weight: 650; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { padding: 18px 20px; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.kpi .value { font-size: 25px; font-weight: 700; letter-spacing: -.03em; margin: 5px 0 3px; }
.kpi .hint { font-size: 12.5px; color: var(--muted); }
.kpi .hint.up { color: var(--ok); } .kpi .hint.down { color: var(--danger); }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-avoir, .b-emis { background: var(--warn-bg); color: var(--warn); }
.b-brouillon { background: var(--surface-2); color: var(--muted); }
.b-envoyee { background: var(--info-bg); color: var(--info); }
.b-payee, .b-accepte { background: var(--ok-bg); color: var(--ok); }
.b-retard, .b-refuse, .b-annulee { background: var(--danger-bg); color: var(--danger); }

.toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: transparent; padding: 5px 11px; border-radius: 99px; cursor: pointer; font-weight: 550; color: var(--muted); font-size: 13px; }
.chip span { opacity: .7; margin-left: 4px; }
.chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.search { position: relative; margin-left: auto; }
.search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.search input { padding-left: 32px; width: 230px; }

input, select, textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; width: 100%;
  transition: border-color .12s;
}
/* Menus déroulants identiques partout (Safari sur iPhone ignore sinon bordure et hauteur). */
select {
  -webkit-appearance: none; appearance: none; padding-right: 30px;
  background-image: 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='%236b7180' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--border)); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
textarea { resize: vertical; min-height: 78px; }
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
input[type="color"] { padding: 2px; height: 36px; width: 56px; cursor: pointer; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--muted); }
label.field > * { font-weight: 400; color: var(--text); font-size: 14px; }
label.field > small { font-size: 12.5px; color: var(--muted); }
label.check { display: flex; gap: 9px; align-items: center; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.three { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .04em; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
.table th.right, .table td.right { text-align: right; }
.table .strong { font-weight: 600; }
.table-wrap { overflow-x: auto; }
.empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.list-row:hover .t { color: var(--accent); }
.list-row .t { font-weight: 600; }
.list-row .s { font-size: 12.5px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }

/* ---------- Chart ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: var(--accent); opacity: .85; transition: opacity .12s; }
.chart .bar.cur { opacity: 1; }
.chart g.col:hover .bar { opacity: 1; }
.chart g.col .tip { opacity: 0; transition: opacity .12s; font-size: 11px; font-weight: 650; fill: var(--text); }
.chart g.col:hover .tip { opacity: 1; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; }

/* ---------- Document editor ---------- */
.editor { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.editor > * { min-width: 0; } /* sinon le tableau des lignes élargit toute la page sur téléphone */
.lines { min-width: 600px; }
.lines th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: left; padding: 0 6px 8px; }
.lines td { padding: 4px 6px 4px 0; vertical-align: top; }
.lines td:last-child { padding-right: 0; }
.lines .lt { padding-top: 12px; text-align: right; font-weight: 600; white-space: nowrap; }
.lines input, .lines select { padding: 7px 9px; }
.lines select { padding-right: 26px; background-position: right 8px center; }
.summary { position: sticky; top: 20px; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); }
.sum-row b { color: var(--text); font-weight: 550; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; font-weight: 700; }
.sum-total span:last-child { font-size: 22px; letter-spacing: -.02em; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack .btn { justify-content: center; }
.section-gap { margin-top: 16px; }

/* ---------- A4 preview ---------- */
.sheet-wrap { display: flex; justify-content: center; }
.sheet {
  background: #fff; color: #14161c; width: 210mm; min-height: 297mm; padding: 18mm 17mm; box-shadow: var(--shadow);
  border-radius: 4px; display: flex; flex-direction: column; font-size: 12.5px;
}
.sheet .top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12mm; }
.sheet .co { font-size: 21px; font-weight: 750; letter-spacing: -.02em; color: var(--accent); }
.sheet .doc-t { text-align: right; }
.sheet .doc-t h2 { font-size: 26px; letter-spacing: .06em; font-weight: 300; text-transform: uppercase; }
.sheet .parties { display: grid; grid-template-columns: 1fr 1fr; gap: 12mm; margin-bottom: 9mm; }
.sheet .cap { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: #7a8090; font-weight: 650; margin-bottom: 4px; }
.sheet .meta { display: flex; gap: 12mm; padding: 9px 0; border-top: 1px solid #e3e5ea; border-bottom: 1px solid #e3e5ea; margin-bottom: 8mm; }
.sheet table th { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: #7a8090; text-align: left; padding: 7px 8px; border-bottom: 2px solid var(--accent); }
.sheet table td { padding: 9px 8px; border-bottom: 1px solid #eceef2; vertical-align: top; }
.sheet .r { text-align: right; white-space: nowrap; }
.sheet .tot { margin: 7mm 0 0 auto; width: 76mm; }
.sheet .tot div { display: flex; justify-content: space-between; padding: 4px 8px; }
.sheet .tot .big { background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; padding: 9px 8px; border-radius: 5px; margin-top: 6px; }
.sheet .notes { margin-top: 9mm; white-space: pre-wrap; }
.sheet .legal { margin-top: auto; padding-top: 9mm; font-size: 9.5px; color: #7a8090; line-height: 1.55; }
.sheet .legal hr { border: 0; border-top: 1px solid #e3e5ea; margin: 8px 0; }

/* ---------- Connexion & compte ---------- */
.auth { grid-column: 1 / -1; min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 500px at 50% -10%, var(--accent-soft), transparent 70%); }
.auth-card { width: 100%; max-width: 400px; padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.auth-card .brand { padding: 0 0 6px; }
.auth-card h1 { font-size: 22px; letter-spacing: -.02em; }
.auth-card .btn { justify-content: center; padding: 10px; margin-top: 4px; }
.auth-card .switch { text-align: center; }
.auth-error { background: var(--danger-bg); color: var(--danger); padding: 9px 12px; border-radius: 9px; font-weight: 550; }
.auth-info { background: var(--ok-bg); color: var(--ok); padding: 9px 12px; border-radius: 9px; font-weight: 550; }
.auth-card .terms { align-items: flex-start; font-size: 13px; color: var(--muted); }
.auth-card .terms input { margin-top: 3px; }
.auth-card a, .legal-links a { color: var(--accent); font-weight: 550; }
.auth-card a:hover, .legal-links a:hover { text-decoration: underline; }
.legal-links { text-align: center; font-size: 12.5px; color: var(--muted); }
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; background: var(--warn-bg); color: var(--warn);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 20px; font-weight: 500; }
.banner b { font-weight: 650; }
.banner .btn { color: var(--text); padding: 6px 11px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; }
.link:hover { text-decoration: underline; }
.btn:disabled { opacity: .6; cursor: progress; }
.account { padding: 10px 11px 0; margin-top: 6px; border-top: 1px solid var(--border); font-size: 12.5px; min-width: 0; }
.account .mail { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sync-status { color: var(--muted); display: flex; align-items: center; gap: 6px; }
#sync-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
#sync-status[data-s="saving"]::before { background: var(--warn); }
#sync-status[data-s="offline"]::before { background: var(--danger); }

/* ---------- Modal & toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 12, 20, .5); display: grid; place-items: center; padding: 20px; z-index: 50; animation: fade .15s; backdrop-filter: blur(3px); }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 560px; box-shadow: 0 24px 70px rgba(0, 0, 0, .3); animation: pop .18s; max-height: 90vh; overflow: auto; }
.modal.sm { max-width: 410px; }
.modal header { padding: 20px 22px 0; font-size: 17px; font-weight: 700; }
.modal .body { padding: 16px 22px; }
.modal footer { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }
#toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: center; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 550; box-shadow: var(--shadow); animation: pop .18s; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1180px) {
  .editor { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 760px) {
  #app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px; border-right: 0; border-top: 1px solid var(--border); z-index: 20; justify-content: space-around; }
  .sidebar .brand, .nav-link span, .sidebar-foot button, .account { display: none; }
  .nav-link span.count { display: none; }
  .sidebar-foot { margin: 0; flex-direction: row; }
  main { padding: 20px 16px 90px; }
  #toasts { bottom: 76px; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .search { margin-left: 0; width: 100%; } .search input { width: 100%; }
  .sheet { width: 100%; min-height: 0; padding: 22px 18px; }
  .sheet .parties { grid-template-columns: 1fr; gap: 16px; }
  .page-head { align-items: center; }
  .page-head h1 { font-size: 20px; }
  .page-head > .grow { flex: 1 1 0; min-width: 0; }
  .page-head > .actions { flex-basis: 100%; }
  /* Lignes du devis en cartes empilées : description en entier, puis quantité, prix, TVA. */
  .lines { min-width: 0; width: 100%; }
  .lines thead { display: none; }
  .lines tbody { display: block; }
  .lines tr { display: grid; grid-template-columns: 1fr 1.3fr 1fr 36px; gap: 8px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .lines tr:first-child { padding-top: 0; }
  .lines td { display: block; width: auto !important; padding: 0 !important; }
  .lines td:first-child { grid-column: 1 / -1; }
  .lines td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
  .lines td.lt { grid-column: 1 / -1; grid-row: 3; display: flex; justify-content: space-between; text-align: right; }
  .lines td.lt::before { margin: 0; }
  .lines input, .lines select { height: 42px; }
  /* Listes de devis/factures et de clients en cartes sur deux lignes (plus de colonnes coupées). */
  .doc-table thead, .client-table thead { display: none; }
  .doc-table tbody, .client-table tbody { display: block; }
  .doc-table tr, .client-table tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .doc-table td, .client-table td { padding: 0; border: 0; white-space: normal; }
  .doc-table td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .doc-table td:nth-child(2) { grid-column: 1; grid-row: 2; color: var(--muted); }
  .doc-table td:nth-child(3), .doc-table td:nth-child(4) { display: none; }
  .doc-table td:nth-child(5) { grid-column: 2; grid-row: 1; text-align: right; font-weight: 600; }
  .doc-table td:nth-child(6) { grid-column: 2; grid-row: 2; text-align: right; }
  .client-table td:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .client-table td:nth-child(2), .client-table td:nth-child(3), .client-table td:nth-child(4) { display: none; }
  .client-table td:nth-child(5) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .doc-table td[colspan], .client-table td[colspan] { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- Print ---------- */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .sidebar, .no-print, #toasts { display: none !important; }
  #app { display: block; }
  main { padding: 0; max-width: none; }
  .sheet { box-shadow: none; border-radius: 0; width: 210mm; min-height: 297mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Pages légales ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 44px 22px 80px; }
.legal-page .brand { padding: 0 0 26px; }
.legal-page h1 { font-size: 28px; letter-spacing: -.025em; margin-bottom: 6px; }
.legal-page h2 { font-size: 17px; margin: 30px 0 8px; }
.legal-page p, .legal-page li { color: var(--muted); line-height: 1.65; margin-bottom: 10px; }
.legal-page ul { padding-left: 20px; margin: 0; }
.legal-page a { color: var(--accent); font-weight: 550; }
.legal-page mark { background: var(--warn-bg); color: var(--warn); padding: 1px 5px; border-radius: 4px; font-weight: 600; }
.legal-page .notice { background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); padding: 12px 16px; margin: 18px 0 6px; font-weight: 500; }
.legal-page footer { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; }

/* ---------- Suivi des envois & page publique d'un document ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; color: var(--muted); }
.timeline li { padding-left: 16px; position: relative; overflow-wrap: anywhere; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.public-doc { padding: 22px 16px 50px; }
.public-bar { max-width: 210mm; margin: 0 auto 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.public-foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.sheet .tot div > b { font-weight: 500; }
@media print { .public-doc { padding: 0; } }

/* ---------- Guide de démarrage ---------- */
.onboarding { margin-bottom: 16px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.onboarding.done { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.onb-head { display: flex; align-items: flex-start; gap: 12px; }
.onb-bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin: 14px 0 6px; overflow: hidden; }
.onb-bar span { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .3s; }
.onb-steps { list-style: none; margin: 0; padding: 0; }
.onb-steps li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.onb-steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.onb-steps .t { font-weight: 550; }
.onb-steps .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.onb-steps li > .grow { min-width: 200px; }
.onb-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 650;
  background: var(--surface-2); color: var(--muted); }
.onb-mark .ic { width: 15px; height: 15px; }
.onb-steps .is-done .onb-mark { background: var(--ok-bg); color: var(--ok); }
.onb-steps .is-done .t { color: var(--muted); text-decoration: line-through; font-weight: 400; }
.onb-steps .is-next .onb-mark { background: var(--accent); color: #fff; }
.welcome-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.welcome-list li { display: flex; gap: 13px; align-items: flex-start; }
.welcome-list .t { font-weight: 600; }
.welcome-list .s { font-size: 13px; color: var(--muted); }

/* ---------- Verrouillage, logo, acceptation en ligne ---------- */
.lock-note { background: var(--info-bg); color: var(--info); border-radius: var(--radius); padding: 11px 14px; margin-bottom: 16px; font-weight: 500; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; opacity: 1; }
.sheet .logo { max-height: 60px; max-width: 230px; display: block; margin-bottom: 6px; }
.logo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.logo-pick img { max-height: 44px; max-width: 160px; border: 1px solid var(--border); border-radius: 8px; padding: 4px; background: #fff; }
.public-box { max-width: 210mm; margin: 0 auto 16px; }
.accept-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.accept-row .field { min-width: 220px; }

.file-btn { position: relative; overflow: hidden; cursor: pointer; }
.file-btn input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; padding: 0; border: 0; }
