/* Facturation — design final du 27 octobre 2026 : Bebas Neue + Montserrat, sauge et graphite, pilules, direction éditoriale.
   Pas de cartes ni d'ombres : des règles (encre) et des filets. Un grand chiffre par écran. */
:root {
  --fond: #F2F4F1; --champ: #FFFFFF; --encre: #171A17; --texte2: #4A4F4A; --discret: #7A807A; --filet: #DCE0DB; --filet-doux: #ECEFEA;
  --sauge: #2F5D45; --sauge-pale: #E3ECE5; --sauge-fonce: #244a37;
  --envoyee: #7A4E0E; --envoyee-fond: #F6EAD2; --retard: #9B3B2E; --retard-fond: #F7E3DF;
  --titre: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif; --corps: 'Montserrat', Helvetica, Arial, sans-serif;
  --r: 8px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font: 15px/1.5 var(--corps); font-variant-numeric: tabular-nums; }
a { color: var(--encre); text-decoration: none; } a:hover { color: var(--sauge); }
b, strong { font-weight: 600; }
h1, h2, h3 { font-family: var(--titre); font-weight: 400; letter-spacing: .01em; margin: 0; }
h1 { font-size: 64px; line-height: .92; } h2 { font-size: 30px; line-height: 1; } h3 { font-size: 24px; line-height: 1; }
svg { flex-shrink: 0; }
.wrap { width: 100%; max-width: 1216px; margin: 0 auto; padding: 0 48px; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); }
.label a { color: var(--discret); } .label a:hover { color: var(--sauge); }
.mini { font-size: 13px; color: var(--discret); }
.texte2 { color: var(--texte2); }
.num, .monnaie { font-variant-numeric: tabular-nums; white-space: nowrap; } .nowrap { white-space: nowrap; }
.sauge { color: var(--sauge); } .rouge { color: var(--retard); }

/* ---------- en-tête 64 px, règle encre ---------- */
.topbar { height: 64px; border-bottom: 1px solid var(--encre); background: var(--fond); }
.topbar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { font-family: var(--titre); font-size: 26px; letter-spacing: .02em; line-height: 1; color: var(--encre); white-space: nowrap; }
.brand:hover { color: var(--encre); }
#nav { display: flex; gap: 4px; }
#nav a { padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--texte2); white-space: nowrap; }
#nav a:hover { color: var(--encre); background: var(--filet-doux); }
#nav a.actif { background: var(--sauge); color: #fff; font-weight: 600; }
main#vue { padding: 40px 48px 72px; }

/* ---------- en-tête de page et sections ---------- */
.entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--encre); }
.entete h1 { margin-top: 6px; }
.entete .sous-titre { font-size: 13px; color: var(--texte2); margin-top: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.retour { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--discret); min-height: 32px; }
.retour:hover { color: var(--sauge); }
.sec { padding: 24px 0; border-bottom: 1px solid var(--filet); }
.sec.fin { border-bottom: 0; }
.sec-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.sec-titre .mini, .sec-titre .lien { font-size: 13px; }
.lien { font-size: 13px; font-weight: 600; color: var(--sauge); display: inline-flex; align-items: center; gap: 6px; }
.lien:hover { color: var(--sauge-fonce); text-decoration: underline; }
.deux { display: grid; grid-template-columns: 1fr; gap: 0 48px; }
.trois { display: grid; grid-template-columns: 1fr; gap: 0 48px; }
.trois > .principal { min-width: 0; }
@media (min-width: 900px) { .deux { grid-template-columns: repeat(2, minmax(0, 1fr)); } .trois { grid-template-columns: repeat(3, minmax(0, 1fr)); } .trois > .principal { grid-column: span 2; } }
aside h2, .sous-sec h2 { padding-top: 20px; }
aside .bloc + .bloc, .sous-sec { margin-top: 28px; padding-top: 0; border-top: 1px solid var(--filet); }

/* ---------- grands chiffres ---------- */
.grand { font-family: var(--titre); font-size: 112px; line-height: .9; letter-spacing: .005em; margin-top: 6px; white-space: nowrap; }
.grand .unite { font-size: .5em; color: var(--discret); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.stat .val { font-family: var(--titre); font-size: 38px; line-height: 1; margin-top: 6px; white-space: nowrap; }
.stat .sous { font-size: 12.5px; color: var(--discret); margin-top: 4px; }
.stat .sous.rouge { color: var(--retard); }
.vedette { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; padding: 28px 0 26px; }
.montant-bebas { font-family: var(--titre); font-size: 44px; line-height: 1; white-space: nowrap; }

/* ---------- jauge du seuil ---------- */
.jauge-seuil { position: relative; height: 34px; margin-top: 14px; }
.jauge-seuil .fond, .jauge-seuil .plein { position: absolute; left: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--filet); }
.jauge-seuil .fond { right: 0; } .jauge-seuil .plein { background: var(--sauge); }
.jauge-seuil.alerte .plein { background: var(--envoyee); } .jauge-seuil.depasse .plein { background: var(--retard); }
.jauge-seuil .point { position: absolute; top: 5px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--sauge); border: 3px solid var(--fond); }
.jauge-seuil.alerte .point { background: var(--envoyee); } .jauge-seuil.depasse .point { background: var(--retard); }
.jauge-seuil .marque { position: absolute; top: 4px; width: 1px; height: 16px; background: var(--retard); }
.jauge-seuil .leg { position: absolute; top: 20px; font-size: 11px; font-weight: 600; color: var(--discret); }
.jauge-seuil .leg.alerte { color: var(--retard); margin-left: -28px; }

/* ---------- listes à filets ---------- */
.liste .rang { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--filet-doux); min-height: 56px; color: var(--encre); }
.liste .rang:last-child { border-bottom: 0; }
.liste a.rang:hover .nom { color: var(--sauge); }
.liste .rang .nom { font-weight: 600; } .liste .rang .sous { font-size: 12.5px; color: var(--discret); display: block; }
.liste .rang .droite { display: flex; align-items: center; gap: 12px; }
.liste .rang .m { font-weight: 600; min-width: 76px; text-align: right; }
.liste .rang .m.plus { color: var(--sauge); }
.vide { color: var(--discret); padding: 16px 0; font-size: 14px; }

/* ---------- barres mensuelles ---------- */
.barres { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-items: end; height: 140px; margin-top: 18px; border-bottom: 1px solid var(--encre); }
.barres .col { display: flex; gap: 2px; align-items: flex-end; height: 100%; }
.barres .col i { flex: 1; display: block; min-height: 1px; }
.barres .col i.f { background: var(--encre); } .barres .col i.e { background: var(--sauge); } .barres .col i.d { background: var(--filet); }
.barres-mois { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; margin-top: 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--discret); text-align: center; }
.barres-mois .courant { color: var(--encre); }
.legende { display: flex; gap: 16px; font-size: 12px; color: var(--discret); flex-wrap: wrap; }
.legende i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }

/* ---------- boutons : pilules 44 px ---------- */
.btn { font: inherit; font-size: 14px; font-weight: 500; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--encre); background: transparent; color: var(--encre); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.2; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--filet-doux); color: var(--encre); } .btn:disabled { opacity: .45; cursor: default; }
.btn.primaire { background: var(--sauge); border-color: var(--sauge); color: #fff; font-weight: 600; } .btn.primaire:hover { background: var(--sauge-fonce); border-color: var(--sauge-fonce); color: #fff; }
.btn.petit { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.doux { border-color: var(--filet); background: var(--champ); color: var(--texte2); } .btn.doux:hover { border-color: var(--encre); color: var(--encre); background: var(--champ); }
.btn.danger { color: var(--retard); border-color: var(--retard); } .btn.danger:hover { background: var(--retard-fond); color: var(--retard); }
.btn.rond { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--filet); background: var(--champ); color: var(--encre); }
.btn.rond:hover { border-color: var(--encre); }
.btn.pointille { border-style: dashed; }
.btn.texte { border: 0; background: transparent; color: var(--discret); font-weight: 500; } .btn.texte:hover { color: var(--encre); background: transparent; }
.btn.lien { border: 0; background: transparent; color: var(--sauge); font-weight: 600; padding: 0 6px; min-height: 36px; font-size: 13px; } .btn.lien:hover { background: transparent; color: var(--sauge-fonce); text-decoration: underline; }
.btn.danger.lien { color: var(--retard); }
.btn-ligne { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.x { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 50%; color: var(--discret); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
.x:hover { color: var(--encre); background: var(--filet-doux); }

/* ---------- étiquettes d'état ---------- */
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; white-space: nowrap; line-height: 1.2; }
.tag.payee, .tag.ok { background: var(--sauge-pale); color: var(--sauge); }
.tag.envoyee, .tag.warn { background: var(--envoyee-fond); color: var(--envoyee); }
.tag.retard, .tag.danger, .tag.annulee { background: var(--retard-fond); color: var(--retard); }
.tag.brouillon, .tag.contour { padding: 4px 10px; border: 1px solid var(--filet); color: var(--texte2); }
.tag.muted, .tag.nu { padding: 0; color: var(--discret); }

/* ---------- filtres : pilules et champ de recherche ---------- */
.filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--filet); }
.pilules { display: flex; gap: 6px; flex-wrap: wrap; }
.pilule { font: inherit; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--filet); background: var(--champ); font-size: 13px; font-weight: 500; color: var(--texte2); cursor: pointer; white-space: nowrap; line-height: 1.2; }
.pilule:hover { border-color: var(--encre); color: var(--encre); }
.pilule.actif { background: var(--encre); border-color: var(--encre); color: #fff; font-weight: 600; }
.recherche { display: flex; flex-direction: row; align-items: center; gap: 10px; flex: 1 1 240px; min-height: 44px; padding: 0 14px; border: 1px solid var(--filet); border-radius: var(--r); background: var(--champ); color: var(--discret); }
.recherche input { border: 0; background: transparent; padding: 0; min-height: 0; font-size: 14px; outline: none; }
.recherche:focus-within { border-color: var(--encre); }
.filtres select { width: auto; min-width: 110px; font-size: 14px; font-weight: 500; }
.droite-auto { margin-left: auto; }

/* ---------- tableaux : filets doux, en-têtes en étiquettes ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); padding: 18px 16px 10px 0; border-bottom: 1px solid var(--filet); white-space: nowrap; }
td { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--filet-doux); vertical-align: middle; }
th:last-child, td:last-child { padding-right: 0; }
th.num, td.num { text-align: right; }
td.fort { font-weight: 600; }
td.date { color: var(--texte2); white-space: nowrap; }
td .sous { color: var(--discret); font-size: 12.5px; display: block; }
tr.clic { cursor: pointer; } tr.clic:hover td { color: var(--sauge); }
tr.clic:hover td .tag, tr.clic:hover td .sous { color: inherit; }
tr.brouillon td { color: var(--discret); }
table.serree td { padding: 10px 16px 10px 0; } table.serree th { padding-top: 12px; }
tbody tr:last-child td { border-bottom: 0; }
table.bordee tbody tr:last-child td { border-bottom: 1px solid var(--filet-doux); }

/* ---------- formulaires : étiquettes en capitales, champs blancs 44 px, coins 8 px ---------- */
form.formulaire { display: flex; flex-direction: column; gap: 16px; }
.champs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.champs .large { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); }
label.ligne { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--texte2); }
label .aide { letter-spacing: 0; text-transform: none; font-weight: 400; }
input, select, textarea { font: inherit; font-family: var(--corps); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--encre); min-height: 44px; padding: 0 14px; border: 1px solid var(--filet); border-radius: var(--r); background: var(--champ); width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--encre); }
textarea { min-height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; padding: 0; accent-color: var(--sauge); }
input[type=number] { text-align: right; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234A4F4A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.aide { color: var(--discret); font-size: 13px; margin: 0; line-height: 1.5; }
.erreur { color: var(--retard); font-size: 14px; min-height: 1.2em; margin: 0; }
.lignes-facture .entete-l, .lignes-facture .ligne { display: grid; grid-template-columns: minmax(0, 1fr) 80px 130px 120px 36px; gap: 10px; align-items: center; }
.lignes-facture .entete-l { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--discret); padding-bottom: 8px; border-bottom: 1px solid var(--filet); }
.lignes-facture .ligne { padding: 10px 0; border-bottom: 1px solid var(--filet-doux); }
.lignes-facture .ligne input { font-size: 15px; } .lignes-facture .ligne .l-qte, .lignes-facture .ligne .l-pu { text-align: right; padding: 0 12px; }
.lignes-facture .montant { text-align: right; font-weight: 600; }
.lignes-facture .entete-l .montant { font-weight: 600; }
.lignes-facture .ajouter { margin-top: 12px; }
.totaux { width: 300px; max-width: 100%; margin-left: auto; font-size: 14px; }
.totaux .l { display: flex; justify-content: space-between; padding: 6px 0; color: var(--texte2); }
.totaux .l.discret { color: var(--discret); }
.totaux .l.avant-total { padding-bottom: 14px; border-bottom: 1px solid var(--encre); }
.totaux .total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; }
.totaux .total .montant-bebas { font-size: 44px; }
.total-aside .montant-bebas { font-size: 64px; line-height: .95; margin-top: 6px; }
.total-aside .boutons { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--encre); }
.total-aside .boutons .btn { width: 100%; } .total-aside .boutons .btn.primaire { min-height: 48px; font-size: 15px; }
details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--sauge); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details[open] summary { margin-bottom: 12px; }

/* ---------- relevés : tableau en colonnes (date, libellé complet, montant, classement, détail, actions) ---------- */
.trans-table { font-size: 13.5px; table-layout: auto; }
.trans-table th { padding-top: 14px; padding-bottom: 8px; }
.trans-table td { padding: 6px 10px 6px 0; vertical-align: middle; }
.trans-table td.date { white-space: nowrap; color: var(--discret); font-size: 12.5px; width: 56px; }
.trans-table td.lib { font-weight: 500; line-height: 1.35; min-width: 260px; }
.trans-table td.lib .note-txt { display: block; font-size: 12px; color: var(--texte2); font-style: italic; font-weight: 400; margin-top: 1px; }
.trans-table td.m { font-weight: 600; width: 92px; white-space: nowrap; }
.trans-table td.m.plus { color: var(--sauge); }
.trans-table select, .trans-table input { min-height: 30px; font-size: 12.5px; padding: 0 8px; }
.trans-table select { padding-right: 24px; background-position: right 7px center; }
.trans-table select.sel-quoi { width: 142px; }
.trans-table td.det { width: 330px; }
.trans-table td.det > * { display: inline-block; vertical-align: middle; margin: 2px 6px 2px 0; }
.trans-table td.det input.inp-client, .trans-table td.det input.inp-fourn { width: 128px; }
.trans-table td.det select.inp-desc { width: 160px; }
.trans-table td.det select.sel-cat { width: 128px; } .trans-table td.det select.sel-facture { max-width: 220px; } .trans-table td.det select.sel-methode { width: 118px; }
.trans-table td.det .part { white-space: nowrap; font-size: 12.5px; color: var(--discret); } .trans-table td.det input.inp-part { width: 44px; text-align: right; padding: 0 4px; }
.trans-table td.det .indice { font-size: 12.5px; color: var(--discret); }
.trans-table td.act { white-space: nowrap; width: 74px; }
.trans-table td.act input.inp-note { width: 170px; margin-right: 6px; }
.trans-table .btn.rond { width: 30px; height: 30px; min-height: 30px; }
.trans-table .btn.rond.ok { color: var(--sauge); border-color: var(--sauge); margin-left: 4px; } .trans-table .btn.rond.ok:hover { background: var(--sauge); color: #fff; }
.trans-table .btn.rond.note-ico { color: var(--discret); } .trans-table .btn.rond.note-ico.actif { color: var(--sauge); border-color: var(--sauge); }
.trans-table .btn.lien { min-height: 30px; padding: 0 6px; }
.trans-table tr.ignoree td.lib, .trans-table tr.ignoree td.m { color: var(--discret); }
.entete.actif .btn.pointille { background: var(--sauge-pale); border-color: var(--sauge); color: var(--sauge); }
.releves-liste .rang { min-height: 48px; padding: 10px 0; }

/* ---------- alertes : une ligne, un trait à gauche ---------- */
.alerte-bloc { padding: 10px 0 10px 16px; border-left: 2px solid var(--envoyee); color: var(--texte2); font-size: 14px; margin: 16px 0 0; }
.alerte-bloc b { color: var(--encre); }
.alerte-bloc.danger { border-left-color: var(--retard); color: var(--retard); } .alerte-bloc.danger b { color: var(--retard); }
.alerte-bloc.info { border-left-color: var(--filet); color: var(--texte2); }
.alerte-bloc a { color: var(--sauge); font-weight: 600; }
.alertes .alerte-bloc + .alerte-bloc { margin-top: 8px; }

/* ---------- toast et modale ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--encre); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 50; max-width: calc(100% - 32px); }
.toast.erreur { background: var(--retard); }
.modal-fond { position: fixed; inset: 0; background: rgba(23, 26, 23, .4); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--fond); width: 100%; max-width: 720px; max-height: 92vh; overflow: auto; padding: 24px 20px 32px; border-top: 1px solid var(--encre); }
.modal h2 { padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--encre); }
.modal form.formulaire { gap: 16px; }
@media (min-width: 640px) { .modal-fond { align-items: center; padding: 24px; } .modal { border: 1px solid var(--encre); padding: 28px 32px 32px; } }

/* ---------- connexion ---------- */
.connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.connexion-bloc { width: 100%; max-width: 380px; }
.connexion-bloc .brand { display: block; padding-bottom: 14px; border-bottom: 1px solid var(--encre); }
.connexion-bloc h1 { font-size: 44px; margin: 24px 0 20px; }
.connexion-bloc form { display: flex; flex-direction: column; gap: 14px; }
.connexion-bloc .btn { width: 100%; min-height: 48px; }

/* ---------- réglages ---------- */
.reglages .sec h2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.reglages .sec h2 .tag { letter-spacing: .06em; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--filet-doux); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.journal td { font-size: 13px; padding: 8px 16px 8px 0; }

/* ---------- barre d'onglets mobile (5), total collant ---------- */
.tabbar { display: none; }
.feuille-plus { display: flex; flex-direction: column; }
.feuille-plus a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0; border-bottom: 1px solid var(--filet-doux); font-weight: 500; }
.feuille-plus a:last-child { border-bottom: 0; }
.total-collant { display: none; }
.apercu-pdf { width: 100%; height: 72vh; border: 1px solid var(--filet); background: #fff; display: block; margin-top: 24px; }

@media (max-width: 900px) {
  .wrap, main#vue { padding-left: 24px; padding-right: 24px; }
  .grand { font-size: 84px; }
  .stats { gap: 20px; } .stat .val { font-size: 30px; }
}
@media (max-width: 760px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .wrap, main#vue { padding-left: 20px; padding-right: 20px; }
  main#vue { padding-top: 22px; padding-bottom: 32px; }
  .topbar { height: 56px; }
  .topbar #nav { display: none; }
  .brand { font-size: 24px; }
  h1 { font-size: 44px; } h2 { font-size: 26px; }
  .entete { padding-bottom: 16px; gap: 14px; }
  .entete .actions { width: 100%; } .entete .actions .btn { flex: 1 1 auto; min-height: 48px; }
  .sec { padding: 16px 0; }
  .vedette { padding: 18px 0 16px; gap: 14px; }
  .grand { font-size: 72px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; }
  .stat .val { font-size: 24px; margin-top: 2px; } .stat .label { font-size: 10px; } .stat .sous { display: none; }
  .barres { height: 100px; gap: 6px; } .barres-mois { gap: 6px; }
  .filtres { padding: 14px 0; }
  .pilules { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; } .pilules::-webkit-scrollbar { display: none; }
  .recherche { flex-basis: 100%; }
  .droite-auto { margin-left: 0; }
  th { padding-top: 12px; } td { padding: 12px 12px 12px 0; }
  .lignes-facture .entete-l { display: none; }
  .lignes-facture .ligne { grid-template-columns: minmax(0, 1fr) 36px; gap: 8px; padding: 12px 0; }
  .lignes-facture .ligne .l-desc { grid-column: 1 / -1; }
  .lignes-facture .ligne .l-qte, .lignes-facture .ligne .l-pu, .lignes-facture .ligne .montant { grid-column: auto; }
  .lignes-facture .ligne { grid-template-areas: "desc desc desc x" "qte pu m m"; grid-template-columns: 70px minmax(0, 1fr) 1fr 36px; }
  .lignes-facture .ligne .l-desc { grid-area: desc; } .lignes-facture .ligne .l-qte { grid-area: qte; } .lignes-facture .ligne .l-pu { grid-area: pu; } .lignes-facture .ligne .montant { grid-area: m; } .lignes-facture .ligne .x { grid-area: x; }
  .lignes-facture .ligne input { font-size: 16px; }
  .totaux { width: 100%; }
  .total-aside .montant-bebas { font-size: 44px; }
  .total-aside .boutons { display: none; }
  .total-collant { display: flex; position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 20; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 20px; background: var(--fond); border-top: 1px solid var(--encre); }
  .total-collant .montant-bebas { font-size: 36px; margin-top: 2px; }
  .total-collant .btn { min-height: 48px; font-size: 15px; }
  .trans-table { min-width: 0; } .trans-table thead { display: none; }
  .trans-table tr.trans { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; border-bottom: 1px solid var(--filet-doux); padding: 10px 0; }
  .trans-table tr.trans td { border: 0; padding: 0; width: auto; } .trans-table td.m { text-align: right; }
  .trans-table td.det { grid-column: 1 / 3; } .trans-table td.act { grid-column: 3; grid-row: 2; justify-self: end; }
  .trans-table tr.trans td:nth-child(4) { grid-column: 1 / 3; }
  .trans-table select.sel-quoi { width: 100%; } .trans-table td.act input.inp-note { width: 130px; }
  .modal-fond { padding: 0; }
  .tabbar { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--encre); background: var(--fond); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 60px; justify-content: center; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--discret); }
  .tabbar a span { width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
  .tabbar a.actif { color: var(--encre); } .tabbar a.actif span { background: var(--sauge); color: #fff; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .apercu-pdf { display: none; }
}
@media (max-width: 420px) { .grand { font-size: 60px; } .stat .val { font-size: 22px; } h1 { font-size: 40px; } }
[hidden] { display: none !important; }
