/* QUIMITRA Gestion — thème inspiré de l'interface utilisée en magasin (fenêtres claires,
   menu accordéon à gauche, en-têtes bleu foncé, tuiles colorées). */
:root {
  --bleu: #0b3f94;
  --bleu-2: #1559c7;
  --bleu-clair: #e8f0fc;
  --gris-fond: #eef0f3;
  --gris-panneau: #f7f8fa;
  --bord: #c9cfd8;
  --texte: #1d2430;
  --doux: #5d6878;
  --rouge-ligne: #f4a39a;
  --rouge: #d93025;
  --vert-ligne: #8ee58e;
  --vert: #1e8e3e;
  --jaune: #f7e27a;
  --t-articles: #8cc63f;
  --t-caisse: #2aa4df;
  --t-achat: #8f4fd6;
  --t-treso: #e8842b;
  --t-stock: #17b3a3;
  --t-depenses: #d35bd6;
  --police: "Segoe UI", "Noto Sans", "DejaVu Sans", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--police); font-size: 13px; color: var(--texte); background: var(--gris-fond); }
a { color: var(--bleu-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: 13px; }
input, select, textarea {
  border: 1px solid var(--bord); border-radius: 2px; padding: 4px 6px; background: #fff; min-height: 26px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc0ff; border-color: var(--bleu-2); }
label { display: block; color: var(--doux); font-size: 12px; margin-bottom: 2px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.centre { text-align: center; }
.doux { color: var(--doux); }
.rouge { color: var(--rouge); }
.vert { color: var(--vert); }
.gras { font-weight: 700; }
.cache { display: none !important; }

/* ---------- Barre de titre (comme une fenêtre Windows) ---------- */
.titre-app {
  height: 24px; display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 12px;
  background: #fff; border-bottom: 1px solid var(--bord); color: #333;
}
.titre-app .logo-mini { width: 16px; height: 16px; }

/* ---------- Grille principale ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; height: calc(100vh - 24px - 22px); }
.app.sans-menu { grid-template-columns: 1fr; }

/* ---------- Menu de gauche ---------- */
.menu-gauche {
  background: #fff; border-right: 1px solid var(--bord); display: flex; flex-direction: column; overflow: hidden;
}
.societe {
  padding: 14px 8px; text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .5px;
  border-bottom: 1px solid var(--bord); background: linear-gradient(#fff, #f2f4f7); text-transform: uppercase;
}
.accordeon { flex: 1; overflow-y: auto; }
.acc-titre {
  display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #dde1e7;
  background: linear-gradient(#fbfbfc, #eceff3); padding: 6px 10px; font-size: 13px; color: #333; cursor: pointer;
}
.acc-titre.ouvert { background: var(--bleu); color: #fff; font-weight: 700; }
.acc-corps { display: none; padding: 2px 0 6px; background: #fff; }
.acc-titre.ouvert + .acc-corps { display: block; }
.acc-corps a, .menu-module a {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 14px; color: #222;
  border-bottom: 1px solid #f0f1f4; font-size: 13px;
}
.acc-corps a:hover, .menu-module a:hover { background: var(--bleu-clair); text-decoration: none; }
.acc-corps a.actif, .menu-module a.actif { background: #d6e4fb; font-weight: 600; }
.acc-corps a.inactif, .menu-module a.inactif { color: #a0a7b2; }
.ico { width: 20px; text-align: center; font-size: 15px; flex: none; }
.sous-titre { padding: 6px 10px 2px; font-size: 11px; color: var(--doux); background: #eef1f5; font-weight: 600; }
.pied-menu {
  border-top: 1px solid var(--bord); padding: 6px 10px; font-size: 12px; display: flex; align-items: center;
  gap: 6px; background: #f3f5f8;
}
.pied-menu .barre-reseau { margin-left: auto; color: var(--vert); letter-spacing: -2px; }

/* ---------- Zone principale ---------- */
.principal { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.entete {
  display: flex; align-items: flex-start; gap: 14px; padding: 6px 12px 4px; background: #fff;
  border-bottom: 1px solid #e1e4e9;
}
.entete .date-jour { font-size: 17px; font-weight: 600; letter-spacing: .3px; }
.entete .date-jour small { display: block; font-size: 11px; color: var(--doux); font-weight: 400; }
.modules { display: flex; gap: 8px; margin-top: 4px; }
.btn-module {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--bord);
  background: linear-gradient(#fff, #eceff3); border-radius: 3px; color: #222; font-weight: 600; font-size: 12px;
}
.btn-module:hover { text-decoration: none; background: #e3ecfb; }
.entete .droite { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.horloge { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.btn-ico {
  width: 28px; height: 28px; border: 1px solid var(--bord); border-radius: 3px; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; position: relative; cursor: pointer;
}
.btn-ico:hover { background: #e3ecfb; text-decoration: none; }
.pastille {
  position: absolute; top: -6px; right: -6px; background: var(--rouge); color: #fff; border-radius: 9px;
  font-size: 10px; min-width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.barre-periode {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px; background: #fff; flex-wrap: wrap;
}
.barre-periode input[type=date] { width: 132px; }
.btn-jaune { background: var(--jaune); border: 1px solid #c9b04a; }
.onglets { display: flex; gap: 2px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--bord); }
.onglets a {
  padding: 5px 12px; border: 1px solid transparent; border-bottom: 0; color: #333; border-radius: 3px 3px 0 0;
  font-size: 12px;
}
.onglets a.actif { background: var(--gris-fond); border-color: var(--bord); margin-bottom: -1px; }
.contenu { flex: 1; overflow: auto; padding: 10px 12px; position: relative; }

/* ---------- Barre d'état ---------- */
.barre-etat {
  height: 22px; display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px;
  background: #e9ecf0; border-top: 1px solid var(--bord); color: #333; white-space: nowrap; overflow: hidden;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; min-height: 28px; cursor: pointer;
  border: 1px solid var(--bord); border-radius: 3px; background: linear-gradient(#fff, #e9ecf0); color: #222;
  font-weight: 600; white-space: nowrap;
}
.btn:hover { background: #e3ecfb; text-decoration: none; }
.btn.bleu { background: var(--bleu-2); border-color: var(--bleu); color: #fff; }
.btn.vert { background: #6fcf6f; border-color: #3fa53f; color: #083b08; }
.btn.rouge { background: #f3a8a1; border-color: #d46a60; color: #5a0c06; }
.btn.jaune { background: var(--jaune); border-color: #c9b04a; }
.btn.rose { background: #e9a8f0; border-color: #b65ec4; }
.btn.petit { padding: 2px 8px; min-height: 24px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn .touche { font-weight: 400; color: inherit; opacity: .75; font-size: 11px; }

/* ---------- Tableau de bord ---------- */
.accueil { display: grid; grid-template-columns: 1fr 260px; gap: 12px; height: 100%; }
.schema {
  position: relative; min-height: 460px; display: grid; grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr; align-items: center; justify-items: center; padding: 10px;
}
.schema svg.liens { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.tuile {
  z-index: 1; width: 170px; height: 96px; color: #fff; border-radius: 3px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 14px; letter-spacing: .5px;
  box-shadow: 0 2px 4px rgba(0,0,0,.18); text-transform: uppercase; transition: transform .1s;
}
.tuile:hover { transform: translateY(-2px); text-decoration: none; filter: brightness(1.05); }
.tuile .ti { font-size: 34px; line-height: 1; filter: grayscale(1) brightness(5); }
.tuile.articles { background: var(--t-articles); }
.tuile.caisse { background: var(--t-caisse); }
.tuile.achat { background: var(--t-achat); }
.tuile.treso { background: var(--t-treso); }
.tuile.stock { background: var(--t-stock); }
.tuile.depenses { background: var(--t-depenses); }
.logo-centre { z-index: 1; text-align: center; }
.logo-centre .nom { font-weight: 800; color: #0f5f73; font-size: 20px; letter-spacing: 1px; }
.logo-centre .sous { font-size: 9px; letter-spacing: 3px; color: #0f5f73; }
.notifications { background: #fff; border: 1px solid var(--bord); overflow-y: auto; max-height: 100%; }
.notifications h3 { margin: 0; padding: 6px 10px; font-size: 13px; background: #f0f2f5; border-bottom: 1px solid var(--bord); }
.notif { display: flex; gap: 8px; padding: 7px 10px; border-bottom: 1px solid #eef0f3; font-size: 12px; color: #222; }
.notif:hover { background: var(--bleu-clair); text-decoration: none; }
.notif .ico { font-size: 18px; }
.notif b { display: block; }
.indicateurs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.indic { background: #fff; border: 1px solid var(--bord); padding: 8px 10px; }
.indic .lib { font-size: 11px; color: var(--doux); text-transform: uppercase; }
.indic .val { font-size: 17px; font-weight: 700; margin-top: 2px; }

/* ---------- Fenêtre de module ---------- */
.fenetre { background: #fff; border: 1px solid #aeb6c2; box-shadow: 0 3px 12px rgba(0,0,0,.12); display: flex; flex-direction: column; min-height: 100%; }
.fenetre-titre {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-bottom: 1px solid var(--bord);
  background: #fff; font-size: 13px;
}
.fenetre-titre .fermer { margin-left: auto; font-size: 16px; color: #333; padding: 0 6px; }
.fenetre-titre .fermer:hover { background: #e81123; color: #fff; text-decoration: none; }
.fenetre-corps { display: grid; grid-template-columns: 210px 1fr; flex: 1; min-height: 0; }
.fenetre-corps.plein { grid-template-columns: 1fr; }
.menu-module { border-right: 1px solid var(--bord); background: var(--gris-panneau); overflow-y: auto; }
.menu-module .sous-titre:first-child { margin-top: 0; }
.menu-module .compteur { margin-left: auto; background: #e8542c; color: #fff; border-radius: 3px; padding: 0 6px; font-size: 11px; font-weight: 700; }
.zone { padding: 8px 10px; min-width: 0; overflow: auto; }
.onglets-int { display: flex; gap: 2px; border-bottom: 1px solid var(--bord); margin-bottom: 8px; }
.onglets-int a, .onglets-int span {
  padding: 4px 12px; border: 1px solid var(--bord); border-bottom: 0; background: #f0f2f5; font-size: 12px; color: #333;
}
.onglets-int .actif { background: #fff; margin-bottom: -1px; font-weight: 600; }

/* ---------- Ruban (barre d'outils des documents) ---------- */
.ruban { display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--bord); margin-bottom: 6px; }
.groupe { padding: 4px 8px 2px; border-right: 1px solid #e1e4e9; display: flex; flex-direction: column; }
.groupe .elems { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); gap: 1px 10px; flex: 1; }
.groupe .elems a { display: flex; align-items: center; gap: 5px; padding: 2px 4px; font-size: 12px; color: #222; white-space: nowrap; }
.groupe .elems a:hover { background: var(--bleu-clair); text-decoration: none; }
.groupe .nom-groupe { font-size: 10.5px; color: var(--doux); text-align: center; margin-top: 2px; }
.ruban .horloge-ruban { margin-left: auto; padding: 4px 12px; text-align: left; }
.ruban .horloge-ruban .h { font-size: 24px; font-weight: 700; color: var(--bleu); font-variant-numeric: tabular-nums; }
.ruban .horloge-ruban .d { font-size: 10px; color: var(--bleu); font-weight: 600; }

/* ---------- Filtres ---------- */
.filtres { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: flex-end; margin-bottom: 6px; }
.filtres > div { display: flex; flex-direction: column; }
.filtres input, .filtres select { min-width: 110px; }
.filtres .large input { min-width: 240px; }

/* ---------- Grilles de données ---------- */
.grille-wrap { border: 1px solid var(--bord); background: #fff; overflow: auto; max-height: calc(100vh - 300px); }
.grille-wrap.haute { max-height: calc(100vh - 230px); }
table.grille { border-collapse: collapse; width: 100%; font-size: 12.5px; }
table.grille th {
  position: sticky; top: 0; z-index: 2; background: linear-gradient(#fafbfc, #e6e9ee); color: #333; font-weight: 600;
  text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--bord); border-right: 1px solid #dde1e7;
  white-space: nowrap; font-size: 11.5px; text-transform: uppercase;
}
table.grille.bleue th { background: var(--bleu); color: #fff; border-right-color: #2f62b7; }
table.grille td { padding: 3px 6px; border-bottom: 1px solid #e8ebef; border-right: 1px solid #f0f1f4; white-space: nowrap; }
table.grille tbody tr:nth-child(even) td { background: #f5f8fc; }
table.grille tbody tr:hover td { background: #dfeafc; }
table.grille tbody tr.sel td { background: #3d4b5e !important; color: #fff; }
table.grille tbody tr.sel td a { color: #fff; }
table.grille tbody tr.neg td { background: var(--vert-ligne) !important; }
table.grille tbody tr.zero td { background: var(--rouge-ligne) !important; }
table.grille tbody tr.inactif td { color: #8d96a3; background: #e5e7ea !important; }
table.grille tbody tr.promo td:first-child { box-shadow: inset 4px 0 0 #63c132; }
table.grille tbody tr.gratuit td:first-child { box-shadow: inset 4px 0 0 #b03bc9; }
table.grille tbody tr.annule td { color: #999; text-decoration: line-through; }
table.grille td.credit-client { background: var(--rouge-ligne) !important; font-weight: 600; }
table.grille td.ttc-rouge { background: #f39a90 !important; }
table.grille tfoot td {
  position: sticky; bottom: 0; background: #e9edf2; font-weight: 700; border-top: 2px solid var(--bord); padding: 4px 6px;
}
table.grille tr[data-href] { cursor: pointer; }
.legende { display: flex; gap: 14px; font-size: 11.5px; margin-top: 6px; align-items: center; flex-wrap: wrap; }
.legende span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; border: 1px solid #999; }
.legende .l-inactif::before { background: #8d96a3; }
.legende .l-gratuit::before { background: #b03bc9; }
.legende .l-promo::before { background: #63c132; }
.legende .l-zero::before { background: var(--rouge-ligne); }
.legende .l-neg::before { background: var(--vert-ligne); }
.legende .l-credit::before { background: var(--rouge-ligne); }

/* ---------- Bas d'écran des documents ---------- */
.bas-doc { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; margin-top: 6px; align-items: start; }
.cadre { border: 1px solid var(--bord); background: #fff; padding: 6px 8px; position: relative; }
.cadre > .legende-cadre { position: absolute; top: -8px; left: 8px; background: #fff; padding: 0 4px; font-size: 11px; color: var(--doux); }
.totaux-mini { display: grid; grid-template-columns: auto auto auto auto; gap: 2px 8px; font-size: 11.5px; align-items: center; }
.totaux-mini .v { background: #eef1f5; border: 1px solid #d9dde3; padding: 1px 8px; text-align: right; min-width: 110px; font-weight: 600; }
.actions-bas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.radios { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.radios label { display: inline-flex; gap: 3px; align-items: center; color: #222; margin: 0; font-size: 12px; }

/* ---------- Formulaires ---------- */
.form-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; }
.form-grille .x2 { grid-column: span 2; }
.form-grille input, .form-grille select, .form-grille textarea { width: 100%; }
.case { display: flex; align-items: center; gap: 6px; color: #222; font-size: 13px; }
.case input { min-height: 0; }
fieldset { border: 1px solid var(--bord); padding: 8px 10px 10px; margin: 0 0 10px; background: #fff; }
legend { font-size: 12px; color: var(--bleu); font-weight: 700; padding: 0 4px; }
.actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- Éditeur de document ---------- */
.doc-entete { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px 12px; margin-bottom: 8px; }
.doc-entete input, .doc-entete select { width: 100%; }
.recherche-art { position: relative; }
.suggestions {
  position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--bleu-2);
  max-height: 300px; overflow-y: auto; box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.suggestions div { padding: 5px 8px; cursor: pointer; display: flex; gap: 10px; border-bottom: 1px solid #eef0f3; }
.suggestions div.actif, .suggestions div:hover { background: var(--bleu-clair); }
.suggestions .s-ref { color: var(--doux); width: 110px; flex: none; font-size: 12px; }
.suggestions .s-des { flex: 1; }
.suggestions .s-px { font-weight: 600; }
.suggestions .s-st { width: 70px; text-align: right; font-size: 12px; }
table.lignes input { width: 100%; min-height: 24px; padding: 2px 4px; border-color: transparent; background: transparent; }
table.lignes input:focus { background: #fff; border-color: var(--bleu-2); }
table.lignes td { padding: 1px 3px; }
.totaux-doc { display: grid; grid-template-columns: auto auto; gap: 3px 16px; justify-content: end; margin-top: 8px; font-size: 13px; }
.totaux-doc .num { min-width: 130px; }
.totaux-doc .net { font-size: 17px; font-weight: 800; color: var(--bleu); }

/* ---------- Caisse comptoir ---------- */
.pos { display: grid; grid-template-columns: 1fr 340px; gap: 10px; height: calc(100vh - 190px); }
.pos .gauche { display: flex; flex-direction: column; min-height: 0; }
.pos .scan input { font-size: 18px; padding: 8px 10px; width: 100%; }
.pos .panier { flex: 1; overflow: auto; border: 1px solid var(--bord); background: #fff; margin-top: 8px; }
.pos .droite { display: flex; flex-direction: column; gap: 8px; }
.afficheur { background: #10261a; color: #63ff8f; font-family: "DejaVu Sans Mono", monospace; padding: 10px 14px; border-radius: 3px; text-align: right; }
.afficheur .total { font-size: 34px; font-weight: 700; }
.afficheur .lib { font-size: 12px; color: #a6e8b8; text-align: left; }
.pave-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pave-modes label { display: flex; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--bord); background: #fff; color: #222; font-size: 13px; cursor: pointer; border-radius: 3px; margin: 0; }
.pave-modes input:checked + span { font-weight: 700; color: var(--bleu); }
.grand-btn { font-size: 18px; padding: 12px; justify-content: center; width: 100%; }

/* ---------- Messages ---------- */
.flash { padding: 8px 12px; margin-bottom: 8px; border: 1px solid; border-radius: 3px; background: #fff; }
.flash.ok { border-color: #8fd19e; background: #eaf7ed; color: #155724; }
.flash.erreur { border-color: #f1a7a0; background: #fdecea; color: #8a1c12; }
.flash.info { border-color: #9cc0ff; background: #eaf2ff; color: #123d82; }
.vide { padding: 30px; text-align: center; color: var(--doux); }
.badge { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 11px; font-weight: 600; background: #e3e7ee; color: #333; }
.badge.vert { background: #d4f3dc; color: #126b2c; }
.badge.rouge { background: #fbd9d5; color: #8a1c12; }
.badge.orange { background: #ffe4c2; color: #8a4a00; }
.badge.bleu { background: #dbe7fd; color: #123d82; }

/* ---------- Connexion ---------- */
.ecran-login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, #f4f7fb, #dfe5ee);
}
.boite-login { width: 400px; max-width: 94vw; background: #fff; border: 1px solid #aeb6c2; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.boite-login .bt { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--bord); font-size: 13px; }
.boite-login .bt .ok { color: #1e8e3e; font-weight: 900; }
.boite-login .sous-bt { display: flex; justify-content: space-between; padding: 6px 10px; font-weight: 600; font-size: 12px; border-bottom: 1px solid #eee; }
.boite-login .corps { padding: 10px 18px 16px; }
.boite-login .champ { margin-bottom: 10px; }
.boite-login input { width: 100%; font-size: 17px; padding: 8px 10px; }
.boite-login .mdp { position: relative; }
.boite-login .oeil { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 16px; cursor: pointer; }
.boite-login .bas { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.support { background: var(--t-caisse); color: #fff; font-weight: 800; padding: 6px 12px; font-size: 18px; line-height: 1.2; border-radius: 2px; }
.support small { display: block; font-size: 10px; font-weight: 600; }
.valider-rond { width: 54px; height: 54px; border-radius: 50%; background: #0f3466; color: #fff; border: 0; font-size: 24px; cursor: pointer; }
.valider-rond:hover { background: var(--bleu-2); }
.logo-login { text-align: center; padding: 8px 0 4px; }

/* ---------- Impression écran ---------- */
@media print {
  .titre-app, .menu-gauche, .entete, .barre-periode, .onglets, .barre-etat, .menu-module, .fenetre-titre,
  .filtres, .ruban, .actions, .bas-doc, .no-print { display: none !important; }
  .app { display: block; height: auto; }
  .contenu, .zone { overflow: visible; padding: 0; }
  .fenetre { border: 0; box-shadow: none; }
  .fenetre-corps { display: block; }
  .grille-wrap { max-height: none; overflow: visible; border: 0; }
  table.grille th { position: static; }
}

/* ---------- Téléphone / tablette ---------- */
.btn-menu-mobile { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 46px); }
  .menu-gauche { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 18px rgba(0,0,0,.25); }
  body.menu-ouvert .menu-gauche { transform: none; }
  body.menu-ouvert::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 40; }
  .btn-menu-mobile { display: inline-flex; }
  .principal { overflow: visible; }
  .contenu { overflow: visible; padding: 8px; }
  .entete { flex-wrap: wrap; gap: 6px; padding: 6px 8px; }
  .entete .date-jour { font-size: 14px; }
  .modules { display: none; }
  .horloge { font-size: 16px; }
  .accueil { grid-template-columns: 1fr; }
  .schema { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 10px; min-height: 0; }
  .schema svg.liens, .schema .logo-centre, .schema .vide-cell { display: none; }
  .tuile { width: 100%; height: 92px; }
  .indicateurs { grid-template-columns: 1fr 1fr; }
  .fenetre-corps { grid-template-columns: 1fr; }
  .menu-module { border-right: 0; border-bottom: 1px solid var(--bord); max-height: none; display: flex; overflow-x: auto; }
  .menu-module .sous-titre { display: none; }
  .menu-module a { white-space: nowrap; border-bottom: 0; border-right: 1px solid #e3e6ea; padding: 8px 10px; }
  .grille-wrap, .grille-wrap.haute { max-height: none; }
  .doc-entete { grid-template-columns: 1fr 1fr; }
  .doc-entete > :first-child { grid-column: span 2; }
  .bas-doc { grid-template-columns: 1fr; }
  .pos { grid-template-columns: 1fr; height: auto; }
  .pos .panier { min-height: 220px; }
  .ruban .groupe .elems { grid-template-rows: none; grid-auto-flow: row; }
  .barre-etat { font-size: 10px; justify-content: flex-start; padding: 0 6px; }
  .form-grille .x2 { grid-column: span 1; }
  input, select { font-size: 16px; } /* évite le zoom automatique sur téléphone */
}
.filtres input[type=checkbox], .filtres input[type=radio], .case input { min-width: 0 !important; width: auto; min-height: 0; }
.ico, .tuile .ti, .btn-ico, .notif .ico { font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif; }
.col-tuiles { display: flex; flex-direction: column; gap: 8px; z-index: 1; }
@media (max-width: 900px) {
  .col-tuiles { display: contents; }
  .schema { padding: 0; }
}
