/* Prospection — Art-Tisons SA. Sobre : une seule couleur d'accent (le bleu du logo), beaucoup d'air, typographie lisible.
   Ordinateur d'abord ; tablette (iPad) et téléphone suivent. */
@font-face { font-family: "Inter"; src: url("../fonts/Inter-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --accent: #00569A; --accent-d: #00467E; --accent-l: #E8F0F7; --accent-ring: rgba(0, 86, 154, .28);
  --bg: #F5F6F8; --surface: #FFFFFF; --soft: #FAFBFC; --border: #D9DDE3; --line: #ECEEF1;
  --text: #1D1D1B; --muted: #5F636B; --faint: #8A8F97;
  --ok: #1E6B3A; --ok-l: #E7F3EC; --warn: #8A5A00; --warn-l: #FCF3E0; --bad: #A32020; --bad-l: #FBEAEA;
  --r: 10px; --r-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .16);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 24px; line-height: 1.25; }
h2 { font-size: 17px; }
h3 { font-size: 14px; color: var(--muted); font-weight: 600; text-transform: none; }
p { margin: 0; }
a { color: var(--accent); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.boot { max-width: 420px; margin: 20vh auto; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.warn-txt { color: var(--warn); }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; }
.ico.big { width: 40px; height: 40px; color: var(--ok); }

/* Bandeau démo, barre du haut */
.demo-band { background: var(--accent-l); color: var(--accent-d); text-align: center; font-size: 13px; padding: 6px 12px; font-weight: 600; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 0 28px; height: 64px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); font-weight: 600; }
.brand img { height: 24px; width: auto; display: block; }
.brand span { padding-left: 14px; border-left: 1px solid var(--border); font-size: 15px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.nav a:hover { background: var(--soft); color: var(--text); }
.nav a.on { color: var(--accent); background: var(--accent-l); }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: var(--soft); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.uname { font-size: 14px; font-weight: 600; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; display: grid; z-index: 30; }
.menu a, .menu button { display: block; text-align: left; padding: 9px 12px; border-radius: 6px; font: inherit; font-size: 14px; color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--soft); }
.menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; }
.menu-head small { color: var(--muted); }
.menu-btn { position: relative; }
.menu-btn summary { list-style: none; }
.menu-btn summary::-webkit-details-marker { display: none; }

/* Mise en page des écrans */
.main { max-width: 1320px; margin: 0 auto; padding: 32px 28px 64px; display: grid; gap: 20px; align-content: start; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.section { margin-top: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 24px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.grow { flex: 1; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 220px; max-width: 420px; }
.btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btns.end { justify-content: flex-end; }
.btns.col { flex-direction: column; align-items: stretch; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid2.tight { gap: 12px; }
.grid-npa { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.split { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.editor-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.side { gap: 18px; }
.pv-col { display: grid; gap: 12px; min-width: 0; }
.sticky { position: sticky; top: calc(84px + var(--msg-h, 0px)); }
.foot-note { color: var(--muted); font-size: 13px; }
.lead { color: var(--muted); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s; }
.btn:hover { background: var(--accent-d); border-color: var(--accent-d); }
.btn:focus-visible, .i:focus-visible, a:focus-visible, button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.wait { cursor: progress; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--soft); border-color: #C5CBD3; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: #861a1a; }
.btn.ghost.danger-text { color: var(--bad); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn.pulse { box-shadow: 0 0 0 3px var(--accent-ring); }
.btn .ico { width: 16px; height: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link.small { font-size: 13px; }
.file-link { display: inline-block; margin-left: 8px; }

/* Champs */
.f { display: grid; gap: 6px; min-width: 0; }
.f-l { font-size: 13px; font-weight: 600; color: var(--text); }
.f-h { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.def { color: var(--faint); }
.i { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.i:hover { border-color: #C5CBD3; }
.i:focus { border-color: var(--accent); }
textarea.i { resize: vertical; line-height: 1.5; }
.i.mono, .editor { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; line-height: 1.6; }
.editor { min-height: 460px; }
.i.code { font-size: 22px; letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums; }
.i.code-sm { max-width: 160px; letter-spacing: .12em; }
.i.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; width: auto; }
.i.num { max-width: 120px; }
.num-row { display: flex; align-items: center; gap: 8px; }
.unit { color: var(--muted); font-size: 13px; }
select.i { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235F636B' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.chk { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; line-height: 1.4; padding: 3px 0; }
.chk input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.fs { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.fs legend { font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px 24px; }
.form-grid.one { grid-template-columns: 1fr; gap: 14px; }
.more { border-top: 1px solid var(--line); padding-top: 12px; }
.more > summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; list-style: none; display: flex; align-items: center; gap: 6px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.more[open] > summary::before { transform: rotate(45deg); }
.more[open] > summary { margin-bottom: 14px; }

/* Choix segmenté */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; max-width: 100%; }
.seg button { border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 6px 14px; border-radius: 7px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.count { font-size: 12px; background: var(--line); color: var(--muted); border-radius: 10px; padding: 0 7px; min-width: 22px; text-align: center; }
.seg button.on .count { background: var(--accent-l); color: var(--accent); }

/* Tableaux */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--soft); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--soft); }
.tbl tr.off td { color: var(--faint); }
.tbl .act { text-align: right; white-space: nowrap; width: 1%; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.card:not(.flush) .tbl th:first-child, .card:not(.flush) .tbl td:first-child { padding-left: 0; }
.card:not(.flush) .tbl th { background: none; }
.empty-cell { color: var(--muted); text-align: center; padding: 28px !important; }
.alert-line { margin-top: 4px; line-height: 1.35; }
.alert-line.attention { color: var(--warn); }
.alert-line.bloque { color: var(--bad); }

/* Étiquettes, messages */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--line); color: var(--muted); white-space: nowrap; margin: 0 4px 2px 0; }
.tag.ok { background: var(--ok-l); color: var(--ok); }
.tag.warn { background: var(--warn-l); color: var(--warn); }
.tag.bad { background: var(--bad-l); color: var(--bad); }
.tag.s-feu, .tag.s-pierre, .tag.s-mixte { background: var(--accent-l); color: var(--accent-d); }
.note { padding: 11px 14px; border-radius: 8px; font-size: 14px; background: var(--accent-l); color: var(--accent-d); border: 1px solid #D0E0EE; }
.note.warn { background: var(--warn-l); color: var(--warn); border-color: #F1DFB5; }
.note.err { background: var(--bad-l); color: var(--bad); border-color: #F1CACA; }
.note.ok { background: var(--ok-l); color: var(--ok); border-color: #C8E3D2; }
.note.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.empty { display: grid; justify-items: center; gap: 6px; padding: 48px 24px; text-align: center; color: var(--muted); }
.empty b { color: var(--text); font-size: 16px; }
.empty .btn { margin-top: 10px; }
.empty-ico { width: 44px; height: 44px; color: var(--faint); margin-bottom: 4px; }
.empty-ico svg { width: 100%; height: 100%; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
/* Messages : bandeau réservé dans le flux (jamais par-dessus le contenu). Sous la barre, collé à elle au défilement. */
/* Sans ancrage du défilement : à l'arrivée du message, le contenu descend au lieu de passer sous le bandeau. */
html { overflow-anchor: none; }
.msgslot { display: none; }
.msgslot.on { display: block; position: sticky; top: 64px; z-index: 19; background: var(--bg); padding: 10px 28px 0; }
.topbar + .msgslot.on { top: 64px; }
#app > .msgslot.on:first-child { top: 0; padding-top: 12px; }
.msgslot.in-sheet.on { position: static; background: none; padding: 14px 24px 0; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 1264px; margin: 0 auto; padding: 10px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500;
  background: var(--ok-l); color: var(--ok); border: 1px solid #C9E3D3; animation: toast-in .18s ease-out; }
.toast.err { background: var(--bad-l); color: var(--bad); border-color: #F1C9C9; }
.toast-ico { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 12px; font-weight: 700; }
.toast.err .toast-ico { background: var(--bad); }
.toast-txt { min-width: 0; overflow-wrap: anywhere; }
@keyframes toast-in { from { opacity: 0; } to { opacity: 1; } }

/* Feuilles (fenêtres) */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(17, 24, 39, .38); display: grid; place-items: start center; padding: 6vh 16px; overflow-y: auto; }
.sheet { width: min(560px, 100%); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); }
.sheet.wide { width: min(920px, 100%); }
.sh-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.sh-head h2 { font-size: 18px; }
.sh-body { padding: 24px; display: grid; gap: 18px; }
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: var(--soft); }
.alerts li.attention { background: var(--warn-l); color: var(--warn); }
.alerts li.bloque { background: var(--bad-l); color: var(--bad); }
.alerts li.info { color: var(--muted); }
.ok-line { display: flex; gap: 8px; align-items: center; color: var(--ok); font-size: 14px; }
.fo-box, .bexio-box { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: grid; gap: 6px; font-size: 14px; }
.row-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row-line:last-child { border-bottom: 0; }
.results { min-height: 120px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 0 28px; }
.map-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.map-row b { font-size: 14px; }
.done { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 24px; }

/* Aperçu PDF */
.preview { position: relative; background: #E9ECF0; border-radius: var(--r); padding: 20px; min-height: 360px; }
.preview.busy::after { content: ""; position: absolute; top: 12px; right: 12px; width: 16px; height: 16px; border: 2px solid var(--accent-ring); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pv-pages { display: grid; gap: 16px; }
.pv-page { width: 100%; height: auto; display: block; background: #fff; box-shadow: 0 2px 10px rgba(16, 24, 40, .14); }
.pv-msg:empty { display: none; }
.pv-msg { margin-bottom: 12px; }
.pv-info { display: grid; gap: 8px; }
.pv-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pv-meta .btn { margin-left: auto; }
.cta { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 10px; }

/* Éditeur de modèle */
.edit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.counter { font-size: 13px; color: var(--text); font-weight: 600; }
.counter .muted, .counter .warn-txt { font-weight: 400; }
.edit-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 8px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; margin-bottom: -8px; }
.versions { list-style: none; margin: 0; padding: 0; display: grid; }
.versions li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

/* Réglages */
.settings { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.set-menu { display: grid; gap: 2px; position: sticky; top: calc(84px + var(--msg-h, 0px)); }
.set-menu a { padding: 9px 14px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.set-menu a:hover { background: var(--surface); color: var(--text); }
.set-menu a.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.set-select { display: none; margin-bottom: 16px; }
.set-body { display: grid; gap: 20px; }
.set-body .split { grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); }
.logo-row { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.logo-preview { height: 48px; width: auto; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.sig-row { display: grid; grid-template-columns: 1.2fr 1.4fr .8fr 1fr auto; gap: 14px; align-items: end; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sig-img { height: 36px; width: auto; display: block; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.vars { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 14px; }
.vars dd { margin: 0; color: var(--muted); }
.big-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 20px; letter-spacing: .08em; text-align: center; padding: 14px; background: var(--soft); border: 1px dashed var(--border); border-radius: 8px; }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 32px 16px; background: var(--bg); }
.login-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 36px 32px; display: grid; gap: 18px; }
.login-logo { height: 36px; width: auto; justify-self: start; margin-bottom: 8px; }
.login-foot { color: var(--faint); font-size: 13px; }
.demo-box { border-top: 1px solid var(--line); padding-top: 18px; display: grid; gap: 12px; font-size: 14px; }
.demo-box p { color: var(--muted); }
.demo-box b { color: var(--text); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.qr { justify-self: center; width: 200px; height: 200px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.qr svg { width: 100%; height: 100%; display: block; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes code { text-align: center; padding: 8px; font-size: 15px; letter-spacing: .06em; }

/* Tablette (iPad portrait) */
@media (max-width: 1100px) {
  .split, .editor-split, .set-body .split { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .main { padding: 24px 20px 56px; }
  .msgslot.on { padding: 10px 20px 0; }
}
@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; gap: 0; }
  .set-menu { display: none; }
  .set-select { display: block; }
  .uname { display: none; }
  .sig-row { grid-template-columns: 1fr 1fr; }
}
/* Téléphone */
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar { padding: 0 12px; gap: 8px; height: 56px; }
  .msgslot.on, .topbar + .msgslot.on { top: 56px; padding: 8px 14px 0; }
  .brand span { display: none; }
  .brand img { height: 20px; }
  .nav { justify-content: center; gap: 0; }
  .nav a { padding: 8px 10px; }
  .nav a span:not(.ico) { display: none; }
  .nav a .ico { width: 22px; height: 22px; }
  .main { padding: 18px 14px 48px; gap: 16px; }
  h1 { font-size: 21px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .page-head .btns { width: 100%; }
  .page-head .btns .btn { flex: 1; }
  .card { padding: 18px; }
  .grid2 { grid-template-columns: 1fr; gap: 16px; }
  .tbl td, .tbl th { padding: 12px 10px; }
  .toolbar .search { min-width: 100%; }
  .sh-body { padding: 18px; }
  .sheet-bg { padding: 0; }
  .sheet, .sheet.wide { border-radius: 0; min-height: 100vh; }
  .login-card { padding: 28px 22px; }
  .preview { padding: 10px; }
}
@media print {
  .topbar, .demo-band, .btn, .login-foot, .demo-box { display: none !important; }
  .login-card { box-shadow: none; border: 0; }
}

/* Les grilles ne s'élargissent jamais au-delà de l'écran (tableaux et listes déroulantes longues) */
.main > *, .stack > *, .split > *, .grid2 > *, .settings > *, .set-body > *, .form-grid > *, .sh-body > * { min-width: 0; }
select.i { max-width: 100%; text-overflow: ellipsis; }
.edit-bar .i.sm { flex: 1 1 200px; min-width: 0; }

/* Téléphone : chaque ligne de tableau devient une petite fiche (pas de défilement de côté) */
@media (max-width: 640px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .card:not(.flush) .tbl tr { padding-left: 0; padding-right: 0; }
  .tbl tbody tr:last-child { border-bottom: 0; }
  .tbl td { padding: 2px 0 !important; border: 0; }
  .tbl td:empty { display: none; }
  .tbl .act, .tbl .num { text-align: left; width: auto; }
  .tbl .act { padding-top: 8px !important; }
}
