:root {
  --iseki: #313C93;
  --iseki-deep: #232C73;
  --groupe: #D8232A;
  --ink: #1C2033;
  --muted: #5B6178;
  --line: #DCE0EA;
  --surface: #EEF1F7;
  --paper: #FFFFFF;
  --vente: #2E7D4F;
  --vente-bg: #E7F3EC;
  --alerte: #9A5B00;
  --alerte-bg: #FFF3DC;
  --danger: #B42318;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--surface); font-size: 15px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #8FA0FF; outline-offset: 2px; }
a { color: var(--iseki); }
.vide { padding: 40px; text-align: center; color: var(--muted); }

/* barre du portail */
header.bar { background: var(--iseki); color: #fff; display: flex; align-items: center; gap: 22px; padding: 0 20px; height: 58px; position: sticky; top: 0; z-index: 10; }
header.bar .marque { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
header.bar .marque img { height: 22px; filter: brightness(0) invert(1); }
header.bar .marque span { font-weight: 500; opacity: .85; white-space: nowrap; }
header.bar nav { display: flex; gap: 4px; }
header.bar nav a { color: #fff; text-decoration: none; padding: 7px 12px; border-radius: 6px; opacity: .85; white-space: nowrap; }
header.bar nav a:hover { opacity: 1; background: rgba(255,255,255,.08); }
header.bar nav a[aria-current="page"] { opacity: 1; background: rgba(255,255,255,.16); }
header.bar .proprio { margin-left: auto; display: flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 30px; padding: 4px 14px 4px 4px; }
header.bar .proprio img { height: 40px; width: 40px; }
header.bar .proprio small { font-size: 12px; line-height: 1.2; color: var(--muted); }
header.bar .proprio b { display: block; color: var(--ink); font-weight: 600; }
header.bar .moi { background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: 6px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.menu-moi { position: absolute; right: 20px; top: 54px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 6px; min-width: 220px; box-shadow: 0 8px 24px rgba(28,32,51,.12); z-index: 20; }
.menu-moi button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu-moi button:hover { background: var(--surface); }
.menu-moi p { margin: 4px 10px 8px; color: var(--muted); font-size: 13px; }

main.page { padding: 22px 28px 80px; max-width: 1440px; margin: 0 auto; }
.entete { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.entete h1 { font-size: 23px; font-weight: 600; margin: 0; }
.entete .resume { color: var(--muted); }
.entete .droite { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* boutons et champs */
a.btn { text-decoration: none; display: inline-block; }
.btn { border: 1px solid var(--line); background: var(--paper); border-radius: 6px; padding: 8px 14px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: #B9C0D4; }
.btn.primaire { background: var(--iseki); border-color: var(--iseki); color: #fff; }
.btn.primaire:hover { background: var(--iseki-deep); }
.btn.petit { padding: 4px 10px; font-size: 14px; }
.btn.lien { border: 0; background: none; color: var(--iseki); padding: 4px 6px; }
.btn.danger { color: var(--danger); }
.btn[aria-pressed="true"] { background: var(--iseki); color: #fff; border-color: var(--iseki); }
.btn:disabled { opacity: .5; cursor: default; }
label.champ { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.champ input, label.champ select, label.champ textarea, input.saisie, select.saisie { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--paper); font-size: 15px; color: var(--ink); font-weight: 400; min-width: 0; }
textarea { resize: vertical; }
.grille { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.recherche { width: min(380px, 100%); }

/* blocs */
.bloc { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; }
.bloc > h2 { font-size: 16px; font-weight: 600; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.bloc > h2 .n { width: 24px; height: 24px; border-radius: 50%; background: var(--iseki); color: #fff; display: inline-grid; place-items: center; font-size: 13px; flex: none; }
.bloc > h2 .suite { margin-left: auto; font-weight: 400; font-size: 14px; }
.bloc .corps { padding: 14px 16px; }
.scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.sous td { padding-top: 14px; color: var(--muted); font-size: 13px; font-weight: 500; border-bottom: 0; }
tr.clic { cursor: pointer; }
tr.clic:hover td { background: #F7F8FC; }
td.code { font-family: var(--cond); font-weight: 500; white-space: nowrap; }
td.code small { display: block; color: var(--muted); }
td.desc { min-width: 220px; max-width: 520px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.vente { font-weight: 600; color: var(--vente); background: var(--vente-bg); }
.ecart { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.barre { color: var(--muted); }
.tag { display: inline-block; font-size: 12px; padding: 0 8px; border-radius: 10px; background: var(--surface); color: var(--muted); margin-left: 6px; font-weight: 500; white-space: nowrap; }
.tag.valider, .tag.alerte { background: var(--alerte-bg); color: var(--alerte); }
.tag.ok { background: var(--vente-bg); color: var(--vente); }
.col-marge { display: none; }
.marges .col-marge { display: table-cell; }
.marges div.col-marge { display: block; }
td.montage { color: var(--muted); font-style: italic; }

/* catalogue */
.cat { display: grid; grid-template-columns: 230px 1fr; gap: 20px; }
.cat nav button { display: flex; justify-content: space-between; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
.cat nav button:hover { background: var(--paper); }
.cat nav button[aria-current="true"] { background: var(--iseki); color: #fff; }
.cat nav .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.cat nav button[aria-current="true"] .n { color: #C9D0FF; }
section.pg { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; overflow: hidden; }
section.pg h3 { font-size: 14px; font-weight: 600; margin: 0; padding: 10px 14px; background: #F7F8FC; border-bottom: 1px solid var(--line); color: var(--iseki-deep); }

/* configurateur */
.config { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.recap { position: sticky; top: 76px; }
.recap .ligne { display: flex; justify-content: space-between; padding: 5px 0; font-variant-numeric: tabular-nums; }
.recap .ligne.total { font-weight: 600; font-size: 19px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.recap .ligne.muted { color: var(--muted); }
.recap .actions { display: grid; gap: 8px; margin-top: 14px; }
.alerte-bandeau { background: var(--alerte-bg); color: var(--alerte); border-radius: 6px; padding: 10px 12px; margin-top: 12px; font-size: 14px; }
.marge-bloc { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
table.lignes input, table.lignes select { border: 1px solid var(--line); border-radius: 5px; padding: 5px 7px; background: var(--paper); font-variant-numeric: tabular-nums; }
table.lignes input.qte { width: 58px; text-align: right; }
table.lignes input.pu { width: 110px; text-align: right; }
table.lignes input.rem { width: 80px; text-align: right; }
table.lignes textarea { width: 100%; border: 1px solid transparent; border-radius: 5px; padding: 4px 6px; background: transparent; min-height: 34px; }
table.lignes textarea:hover, table.lignes textarea:focus { border-color: var(--line); background: var(--paper); }
tr.sous-suggere td { background: #FFFAF0; }
.choix-client { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.resultats { border: 1px solid var(--line); border-radius: 6px; margin-top: 8px; max-height: 240px; overflow: auto; }
.resultats button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: var(--paper); padding: 8px 10px; cursor: pointer; }
.resultats button:hover { background: var(--surface); }
.client-choisi { display: flex; gap: 12px; align-items: start; background: var(--surface); border-radius: 6px; padding: 10px 12px; }
.client-choisi > div:first-child { flex: 1; }
.machine-choisie { display: flex; gap: 12px; align-items: center; background: var(--vente-bg); border-radius: 6px; padding: 10px 12px; }
.machine-choisie div { flex: 1; }
.onglets { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }

/* statuts */
.statut { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 10px; background: var(--surface); color: var(--muted); white-space: nowrap; }
.statut.envoyee { background: #E6EAFF; color: var(--iseki); }
.statut.acceptee { background: var(--vente-bg); color: var(--vente); }
.statut.refusee { background: #FDECEA; color: var(--danger); }

/* connexion */
.connexion { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.connexion .gauche { background: var(--iseki); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.connexion .gauche img.iseki { width: 190px; filter: brightness(0) invert(1); }
.connexion .gauche h1 { font-size: 34px; font-weight: 600; line-height: 1.15; max-width: 12em; margin: 0; }
.connexion .gauche .proprio { display: flex; align-items: center; gap: 14px; background: #fff; color: var(--ink); border-radius: 60px; padding: 8px 22px 8px 8px; width: max-content; max-width: 100%; }
.connexion .gauche .proprio img { width: 64px; height: 64px; }
.connexion .gauche .proprio b { display: block; }
.connexion .gauche .proprio small { display: block; color: var(--muted); font-size: 13px; }
.connexion .droite { display: grid; place-items: center; padding: 32px; }
.connexion .formulaire { width: min(360px, 100%); display: grid; gap: 14px; }
.connexion form { display: grid; gap: 14px; margin-top: 12px; }
.connexion h2 { margin: 0 0 4px; font-size: 22px; }
.btn.google { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; padding: 11px 14px; font-size: 16px; }
.connexion .aide { color: var(--muted); font-size: 13px; margin: -6px 0 0; }
.connexion details summary { cursor: pointer; color: var(--iseki); font-size: 14px; }
.erreur { color: var(--danger); font-size: 14px; min-height: 1.2em; }

dialog { border: 0; border-radius: 10px; padding: 0; width: min(560px, 94vw); box-shadow: 0 20px 60px rgba(28,32,51,.25); }
dialog::backdrop { background: rgba(28,32,51,.35); }
dialog .corps { padding: 18px 20px; display: grid; gap: 12px; }
dialog h2 { margin: 0; font-size: 18px; }
dialog .pied { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.mdp { font-family: var(--cond); font-size: 20px; background: var(--surface); padding: 10px 14px; border-radius: 6px; letter-spacing: .04em; user-select: all; }

@media (max-width: 1100px) {
  .config { grid-template-columns: 1fr; }
  .recap { position: static; }
  header.bar .proprio small { display: none; }
}
@media (max-width: 760px) {
  header.bar { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
  header.bar nav { order: 3; width: 100%; overflow-x: auto; }
  header.bar .proprio { padding: 2px; }
  header.bar .proprio img { height: 32px; width: 32px; }
  main.page { padding: 14px 12px 60px; }
  .cat { grid-template-columns: 1fr; }
  .cat nav { display: flex; overflow-x: auto; gap: 4px; }
  .cat nav button { width: auto; white-space: nowrap; gap: 8px; }
  .connexion { grid-template-columns: 1fr; }
  .connexion .gauche { padding: 28px; gap: 24px; }
  .connexion .gauche h1 { font-size: 26px; }
  .menu-moi { top: 100px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* catalogue interactif */
.rayon { margin-bottom: 30px; }
.rayon > h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; color: var(--iseki-deep); }
.cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.carte { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
a.carte:hover { border-color: var(--iseki); }
a.carte:hover h3 { color: var(--iseki); }
.visuel { aspect-ratio: 16 / 10; background: #F4F5F9; display: grid; place-items: center; overflow: hidden; }
.visuel img { width: 100%; height: 100%; object-fit: contain; }
.sans-photo { width: 100%; height: 100%; background: var(--iseki); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px 16px; }
.sans-photo span { font-family: var(--cond); font-weight: 600; font-size: 34px; line-height: 1; letter-spacing: -.01em; }
.sans-photo small { opacity: .75; font-size: 12px; margin-top: 6px; }
.carte .texte { padding: 12px 14px 14px; display: grid; gap: 4px; }
.carte h3 { margin: 0; font-size: 17px; font-weight: 600; }
.carte .meta { margin: 0; color: var(--muted); font-size: 14px; }
.carte .prix { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.carte .prix b { color: var(--vente); font-size: 16px; }
.admin-photos .texte { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admin-photos h3 { width: 100%; }
.fil { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.fiche { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 18px; }
.fiche-visuel { border-radius: 8px; overflow: hidden; }
.fiche-visuel img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: contain; background: #F4F5F9; }
.fiche-visuel .sans-photo { aspect-ratio: 16 / 10; height: auto; }
.fiche-visuel .sans-photo span { font-size: 64px; }
.fiche-info h1 { font-size: 30px; margin: 0; font-weight: 600; }
.fiche-info .meta { color: var(--muted); margin: 4px 0 0; }
.prix-grand { font-size: 17px; color: var(--muted); margin: 14px 0; }
.prix-grand b { color: var(--vente); font-size: 26px; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 18px; }
.tuiles div { background: var(--surface); border-radius: 8px; padding: 10px 12px; }
.tuiles dt { font-size: 12px; color: var(--muted); }
.tuiles dd { margin: 2px 0 0; font-weight: 500; font-size: 14px; }
.actions-fiche { display: flex; gap: 10px; flex-wrap: wrap; }
.deux-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; align-items: start; }
ul.specs { margin: 0; padding: 14px 16px 14px 34px; columns: 1; }
ul.specs li { padding: 3px 0; }
.note-montage { margin: 0; padding: 10px 16px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .fiche, .deux-col { grid-template-columns: 1fr; } .fiche-info h1 { font-size: 24px; } }

.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 14px 16px; }
.vignette { border: 0; padding: 0; background: #F4F5F9; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette:hover { outline: 2px solid var(--iseki); }
dialog.visionneuse { width: min(1200px, 96vw); background: #111827; }
dialog.visionneuse img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.vn-barre { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 10px; color: #fff; flex-wrap: wrap; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; padding: 14px 16px; }
.doc { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; text-decoration: none; color: inherit; }
.doc:hover { border-color: var(--iseki); }
.doc .ext { background: var(--iseki); color: #fff; font-size: 12px; font-weight: 600; border-radius: 5px; padding: 6px 8px; }
.doc small { display: block; color: var(--muted); }

.arrondis { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.recap small { color: var(--muted); font-weight: 400; }

.acc-outils { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.aide-acc { color: var(--muted); font-size: 13px; }
.acc-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; scrollbar-width: thin; }
.chip { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 16px; padding: 5px 12px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.chip span { color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 2px; }
.chip[aria-pressed="true"] { background: var(--iseki); border-color: var(--iseki); color: #fff; }
.chip[aria-pressed="true"] span { color: #C9D0FF; }
.acc-liste { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table.acc thead th { position: sticky; top: 0; background: #F7F8FC; z-index: 1; }
.requis { display: block; margin-top: 4px; font-size: 13px; color: var(--alerte); background: var(--alerte-bg); border-radius: 5px; padding: 3px 7px; }
.requis b { font-family: var(--cond); font-weight: 600; }
.option-req { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; }
.option-req small { color: var(--muted); }

.pneus { display: inline-block; margin: 4px 0 0; font-size: 12.5px; color: var(--iseki-deep); background: #E9ECFA; border-radius: 5px; padding: 2px 8px; white-space: nowrap; }
.pneus b { font-family: var(--cond); font-weight: 600; }
td.desc .pneus { display: table; }

.docs-choix { display: grid; gap: 4px; }
.docs-choix label { display: flex; gap: 8px; align-items: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
.docs-choix label span { flex: 1; }
.docs-choix small { color: var(--muted); }
.docs-choix .autre-langue { opacity: .65; }

/* ---------- smartphone ---------- */
.config > *, .bloc, .corps, #liste-acc, .acc-outils { min-width: 0; }
#barre-mobile { display: none; }
@media (max-width: 760px) {
  body { font-size: 15px; }
  input, select, textarea, .saisie { font-size: 16px !important; } /* evite le zoom automatique sur iPhone */
  .config { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cat { grid-template-columns: minmax(0, 1fr) !important; }
  .cat > * { min-width: 0; }
  .entete h1 { font-size: 19px; }
  .entete .droite { margin-left: 0; width: 100%; }
  .entete .droite .recherche { flex: 1; }
  .bloc > h2 { padding: 10px 12px; font-size: 15px; flex-wrap: wrap; }
  .bloc .corps { padding: 12px; }
  .grille { grid-template-columns: minmax(0, 1fr); }
  .client-choisi { flex-direction: column; }
  .client-choisi > div:last-child { display: flex !important; gap: 8px; }
  .btn { min-height: 40px; }
  .btn.petit { min-height: 36px; }
  .acc-outils .recherche { width: 100%; }
  .aide-acc { width: 100%; }

  /* tableaux en cartes */
  table.lignes, table.lignes tbody, table.lignes tr, table.lignes td,
  table.acc, table.acc tbody, table.acc tr, table.acc td,
  #liste-machines table, #liste-machines tbody, #liste-machines tr, #liste-machines td { display: block; width: auto; }
  table.lignes tr:first-child, table.acc thead { display: none; }
  table.lignes tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; padding: 12px; border-bottom: 1px solid var(--line); }
  table.lignes td { border: 0; padding: 0; text-align: left; }
  table.lignes td:nth-child(1), table.lignes td:nth-child(2) { grid-column: 1 / -1; }
  table.lignes td:nth-child(3)::before { content: "Quantité"; }
  table.lignes td:nth-child(4)::before { content: "Prix de vente"; }
  table.lignes td:nth-child(5)::before { content: "Remise"; }
  table.lignes td:nth-child(6)::before { content: "Total HTVA"; }
  table.lignes td:nth-child(7)::before { content: "Achat"; }
  table.lignes td:nth-child(n+3):nth-child(-n+7)::before { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
  table.lignes td:nth-child(6) { align-self: end; font-size: 16px; }
  table.lignes td:nth-child(8) { grid-column: 1 / -1; text-align: right; }
  table.lignes td.col-marge { display: none; }
  .marges table.lignes td.col-marge { display: block; }
  table.lignes input.qte, table.lignes input.pu { width: 100%; }
  table.lignes td:nth-child(5) { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  table.lignes td:nth-child(5)::before { flex-basis: 100%; margin-bottom: 0 !important; }
  table.lignes td:nth-child(5) .ecart { flex-basis: 100%; }
  table.lignes input.rem { width: auto; flex: 1; min-width: 0; }
  table.lignes td:nth-child(5) select { flex: none; }
  header.bar .marque span { display: none; }
  header.bar .moi { padding: 5px 8px; font-size: 14px; }
  table.lignes td.num { white-space: normal; }
  table.lignes textarea { border-color: var(--line); background: var(--paper); }

  table.acc tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.acc tr.sous { display: block; padding: 12px 12px 4px; background: #F7F8FC; }
  table.acc td { border: 0; padding: 0; }
  table.acc td:nth-child(1) { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
  table.acc td:nth-child(2) { grid-column: 1 / -1; max-width: none; min-width: 0; }
  table.acc td:nth-child(3) { text-align: left; align-self: center; }
  table.acc td:nth-child(4) { display: none; }
  .marges table.acc td:nth-child(4) { display: block; grid-column: 1 / -1; text-align: left; }
  table.acc td:nth-child(5) { grid-column: 2; grid-row: 3; }
  .acc-liste { max-height: none; border: 0; }

  #liste-machines tr.clic { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
  #liste-machines tr.sous { padding: 12px 4px 2px; }
  #liste-machines td { border: 0; padding: 0; }
  #liste-machines td.code, #liste-machines td.desc { grid-column: 1 / -1; min-width: 0; max-width: none; }
  #liste-machines td.vente { background: none; text-align: left; }

  .onglets { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .onglets .btn { flex: none; }
  .machine-choisie { flex-wrap: wrap; }

  /* recapitulatif en bas + barre fixe avec le total */
  .recap { position: static; }
  #barre-mobile { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; gap: 10px; align-items: center;
    background: var(--paper); border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(28,32,51,.08); }
  #barre-mobile .tot { flex: 1; line-height: 1.2; }
  #barre-mobile .tot small { display: block; color: var(--muted); font-size: 12px; }
  #barre-mobile .tot b { font-size: 18px; }
  main.page { padding-bottom: 96px; }
  .docs-choix label { flex-wrap: wrap; }
}
