/* MBC Gestion — couleurs du logo MBC Store : bleu #03369F (chariot) et jaune #FFBF00 (bulle).
   Mise en page : en-tête, menu à gauche (ordinateur) ou en bandeau (téléphone), contenu en cartes. */
:root {
  --marque: #03369F; --marque-fonce: #022A7D; --marque-clair: #EAF0FB; --jaune: #FFBF00; --jaune-fonce: #E6AC00; --jaune-clair: #FFF6D6;
  --noir: #111827; --texte: #1f2937; --gris: #6b7280; --gris-clair: #9ca3af;
  --fond: #F3F5F9; --carte: #fff; --bord: #e5e9f0; --bord-fort: #d4dae4;
  --vert: #0f7a46; --vert-clair: #e3f6ec; --rouge: #c0261a; --rouge-clair: #fdecea; --orange: #b45309; --orange-clair: #fff4e0;
  --ombre: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --ombre-haute: 0 10px 30px rgba(16, 24, 40, .12);
  --rayon: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Poppins, "Segoe UI", Roboto, system-ui, -apple-system, Arial, sans-serif; background: var(--fond); color: var(--texte); font-size: 15px; line-height: 1.45; }
svg.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Boutons et champs */
button { font: inherit; font-weight: 500; cursor: pointer; border: 0; border-radius: 10px; padding: 10px 16px; background: var(--marque); color: #fff; transition: background .15s, box-shadow .15s, transform .05s; }
button:active:not(:disabled) { transform: translateY(1px); }
button:hover:not(:disabled) { background: var(--marque-fonce); }
button.sec { background: #fff; color: var(--texte); border: 1px solid var(--bord-fort); }
button.sec:hover:not(:disabled) { background: #f6f8fb; }
button.danger { background: #fff; color: var(--rouge); border: 1.5px solid var(--rouge); padding: 8px 14px; }
button.danger:hover:not(:disabled) { background: var(--rouge-clair); }
button.lien { background: none; color: var(--marque); padding: 6px 8px; font-weight: 600; }
button.lien:hover:not(:disabled) { background: var(--marque-clair); }
button.petit { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
button:disabled { opacity: .45; cursor: not-allowed; }
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--bord-fort); border-radius: 10px; width: 100%; background: #fff; color: var(--texte); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--marque); box-shadow: 0 0 0 3px rgba(3, 54, 159, .12); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--marque); }
textarea { min-height: 80px; }
label.champ { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14px; color: var(--noir); }
label.champ input, label.champ select, label.champ textarea { margin-top: 6px; font-weight: 400; }
label.champ small { font-weight: 400; }
small, .gris { color: var(--gris); }
h1 { font-size: 24px; font-weight: 700; margin: 4px 0 18px; color: var(--noir); letter-spacing: -.2px; }
h2 { font-size: 17px; font-weight: 600; margin: 2px 0 12px; color: var(--noir); }
h3 { font-size: 15px; font-weight: 600; margin: 16px 0 8px; color: var(--noir); }

/* Bande de démo */
#demo { background: #fff8db; border-bottom: 1px solid #f3e1a0; padding: 6px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; }
#demo select { width: auto; padding: 4px 8px; border-radius: 8px; }
.demo-titre { background: var(--orange); color: #fff; font-weight: 700; padding: 2px 8px; border-radius: 6px; font-size: 12px; letter-spacing: .5px; }

/* En-tête */
header { background: #fff; padding: 8px 20px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid var(--bord); position: sticky; top: 0; z-index: 5; }
.marque { display: flex; align-items: center; gap: 10px; }
.marque img { height: 44px; width: 44px; display: block; }
.marque .nom-marque { font-size: 22px; color: var(--marque); white-space: nowrap; font-style: italic; font-weight: 500; }
.marque .nom-marque b { color: var(--jaune); font-style: normal; font-weight: 800; }
.marque .appli { background: var(--marque-clair); color: var(--marque); font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; }
.moi { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.moi .nom { font-weight: 600; color: var(--noir); line-height: 1.2; }
.moi .role { color: var(--gris); font-size: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--jaune), #FFD54A); color: var(--marque); display: grid; place-items: center; font-weight: 800; font-size: 17px; box-shadow: 0 4px 10px rgba(255, 191, 0, .35); }

/* Menu */
.cadre { display: flex; align-items: flex-start; }
nav { width: 236px; flex: none; position: sticky; top: 61px; height: calc(100vh - 61px); overflow-y: auto; padding: 14px 12px; background: #fff; border-right: 1px solid var(--bord); display: flex; flex-direction: column; gap: 2px; }
nav button { background: none; color: var(--gris); display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; font-weight: 500; white-space: nowrap; }
nav button:hover:not(:disabled) { background: #f4f6fa; color: var(--noir); }
nav button.on { background: var(--marque); color: #fff; box-shadow: 0 4px 12px rgba(3, 54, 159, .25); }
nav button.on:hover:not(:disabled) { background: var(--marque); color: #fff; }
nav button span.lib { flex: 1; }
/* Éléments du menu de téléphone, cachés sur ordinateur */
button.burger, .nav-tete, .nav-moi, nav button.nav-sortir, #voile { display: none; }
.pastille { display: inline-block; background: var(--rouge); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
nav button.on .pastille { background: var(--jaune); color: var(--marque); }
main { flex: 1; min-width: 0; max-width: 1240px; margin: 0 auto; padding: 22px 24px 60px; }

/* Messages, cartes */
.msg { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; }
.msg.ok { background: var(--vert-clair); color: var(--vert); }
.msg.err { background: var(--rouge-clair); color: var(--rouge); }
.msg.info { background: var(--marque-clair); color: var(--marque-fonce); }
.vide { text-align: center; padding: 30px 16px; color: var(--gris); background: #fff; border-radius: var(--rayon); border: 1.5px dashed var(--bord-fort); }
.ok-txt { color: var(--vert); } .ko-txt { color: var(--rouge); } .warn-txt { color: var(--orange); }
.titre-ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.titre-ligne h1, .titre-ligne h2 { margin-bottom: 8px; }
.filtres { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; align-items: flex-end; }
.filtres label { font-size: 13px; color: var(--gris); font-weight: 600; }
.filtres input, .filtres select { width: auto; display: block; margin-top: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.boite { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 18px; margin-bottom: 16px; box-shadow: var(--ombre); }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.chiffre { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); position: relative; overflow: hidden; }
.chiffre::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--bord-fort); }
.chiffre.bleu::before { background: var(--marque); } .chiffre.ok::before { background: var(--vert); } .chiffre.ko::before { background: var(--rouge); }
.chiffre .t { color: var(--gris); font-size: 13px; font-weight: 500; }
.chiffre .v { font-size: 23px; font-weight: 700; margin-top: 4px; color: var(--noir); letter-spacing: -.3px; }
.chiffre .d { color: var(--gris); font-size: 12px; margin-top: 4px; }
button.chiffre.clic { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; padding-right: 34px; transition: transform .12s, box-shadow .12s, border-color .12s; }
button.chiffre.clic:hover, button.chiffre.clic:focus-visible { transform: translateY(-2px); border-color: var(--marque); box-shadow: 0 8px 22px rgba(3, 54, 159, .14); outline: none; }
button.chiffre.clic:active { transform: translateY(0); }
.chiffre .aller { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 26px; line-height: 1; color: var(--bord-fort); transition: color .12s, right .12s; }
button.chiffre.clic:hover .aller { color: var(--marque); right: 10px; }
.chiffre.ok .v { color: var(--vert); } .chiffre.ko .v { color: var(--rouge); } .chiffre.bleu .v { color: var(--marque); }

/* Tableaux */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef1f6; font-size: 14px; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: #f7f9fc; font-size: 12px; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .4px; }
td.m, th.m { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 700; background: #f7f9fc; }
tr.clic { cursor: pointer; }
tr.clic:hover td { background: #f5f8ff; }
tr.annulee td { color: var(--gris-clair); text-decoration: line-through; }
.tableau { overflow-x: auto; margin-bottom: 8px; }
.boite > .tableau table, .boite table { box-shadow: none; }
.etat { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: #eef1f6; color: var(--gris); white-space: nowrap; text-decoration: none; }
.etat.ok { background: var(--vert-clair); color: var(--vert); }
.etat.ko { background: var(--rouge-clair); color: var(--rouge); }
.etat.warn { background: var(--orange-clair); color: var(--orange); }
.etat.bleu { background: var(--marque-clair); color: var(--marque); }
.infos td:first-child { color: var(--gris); width: 40%; }

.alertes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.alertes li { padding: 10px 12px; border-left: 4px solid var(--orange); background: var(--orange-clair); border-radius: 8px; }
.alertes li.ko { border-color: var(--rouge); background: var(--rouge-clair); }
.journal { list-style: none; padding: 0; margin: 0; }
.journal li { padding: 10px 0; border-bottom: 1px solid #eef1f6; display: flex; gap: 14px; }
.journal li:last-child { border-bottom: 0; }
.journal li .q { color: var(--gris); font-size: 12px; min-width: 120px; }
.journal li.alerte { color: var(--rouge); }

/* Puces (filtres) */
.puces { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; margin: 12px 0; scrollbar-width: none; }
.puces::-webkit-scrollbar { display: none; }
button.puce { background: #fff; color: var(--texte); border: 1px solid var(--bord-fort); border-radius: 30px; padding: 7px 14px; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
button.puce:hover:not(:disabled) { background: #f4f6fa; }
button.puce svg.ico { width: 16px; height: 16px; }
button.puce .n { background: #eef1f6; color: var(--gris); border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 600; }
button.puce.on { background: var(--noir); color: #fff; border-color: var(--noir); }
button.puce.on .n { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Caisse (écran Vendre) ---------- */
main.large { max-width: none; }
.caisse { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.caisse > * { min-width: 0; }
.recherche { position: relative; }
.recherche svg.ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gris); }
.recherche input { padding: 13px 14px 13px 44px; font-size: 15px; border-radius: 12px; background: #fff; box-shadow: var(--ombre); border-color: var(--bord); }
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
button.tuile { background: #fff; color: var(--texte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 10px; text-align: left; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--ombre); position: relative; font-weight: 400; }
button.tuile:hover:not(:disabled) { background: #fff; border-color: var(--marque); box-shadow: var(--ombre-haute); transform: translateY(-2px); }
button.tuile:disabled { opacity: .55; }
.tuile-img { height: 92px; border-radius: 10px; display: grid; place-items: center; color: var(--marque); position: relative; }
.tuile-img svg.ico { width: 42px; height: 42px; stroke-width: 1.4; }
.tuile-img .dans { position: absolute; top: 6px; right: 6px; background: var(--marque); color: #fff; font-size: 12px; font-weight: 700; min-width: 24px; height: 24px; border-radius: 12px; display: grid; place-items: center; padding: 0 6px; }
.tuile-img .ajout { position: absolute; bottom: 6px; right: 6px; background: var(--jaune); color: var(--marque); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.tuile-img .ajout svg.ico { width: 18px; height: 18px; stroke-width: 2.6; }
.tuile-nom { font-weight: 600; font-size: 14px; color: var(--noir); line-height: 1.3; min-height: 36px; }
.tuile-imei { font-size: 12px; color: var(--gris); }
.tuile-prix { font-weight: 700; font-size: 17px; color: var(--marque); }
.tuile-bas { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--gris); align-items: center; }
.stock { font-weight: 600; padding: 1px 7px; border-radius: 10px; background: var(--vert-clair); color: var(--vert); white-space: nowrap; }
.stock.bas { background: var(--orange-clair); color: var(--orange); }
.stock.zero { background: var(--rouge-clair); color: var(--rouge); }
.section-imei { margin-bottom: 14px; }
.section-imei .etiquette { font-size: 12px; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }

.ticket { background: #fff; border: 1px solid var(--bord); border-radius: 18px; box-shadow: var(--ombre-haute); position: sticky; top: 80px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; overflow: hidden; }
.ticket-tete { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--bord); }
.ticket-tete h2 { margin: 0; flex: 1; display: flex; align-items: center; gap: 8px; }
.ticket-tete .compte { background: var(--marque-clair); color: var(--marque); font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.ticket-corps { padding: 6px 18px 16px; overflow-y: auto; flex: 1; }
.ticket-vide { text-align: center; color: var(--gris); padding: 50px 24px; }
.ticket-vide svg.ico { width: 54px; height: 54px; stroke-width: 1.2; color: var(--bord-fort); margin-bottom: 8px; }
.article { padding: 12px 0; border-bottom: 1px dashed var(--bord-fort); }
.article-haut { display: flex; gap: 10px; align-items: flex-start; }
.mini { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; color: var(--marque); flex: none; }
.mini svg.ico { width: 20px; height: 20px; }
.article-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.article-nom b { font-weight: 600; font-size: 14px; color: var(--noir); }
.article-nom small { font-size: 12px; }
button.icone-btn { background: none; color: var(--gris-clair); padding: 4px; border-radius: 8px; }
button.icone-btn:hover:not(:disabled) { background: var(--rouge-clair); color: var(--rouge); }
button.icone-btn svg.ico { width: 18px; height: 18px; }
.article-bas { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-left: 48px; }
.prix-champ { display: flex; align-items: center; border: 1px solid var(--bord-fort); border-radius: 10px; background: #fff; overflow: hidden; width: 140px; }
.prix-champ:focus-within { border-color: var(--marque); box-shadow: 0 0 0 3px rgba(3, 54, 159, .12); }
.prix-champ input { border: 0; box-shadow: none; padding: 7px 4px 7px 10px; font-weight: 600; text-align: right; }
.prix-champ input:focus { box-shadow: none; }
.prix-champ span { padding: 0 10px 0 2px; color: var(--gris); font-weight: 600; }
.pas { display: flex; align-items: center; border: 1px solid var(--bord-fort); border-radius: 10px; overflow: hidden; }
.pas button { background: #f7f9fc; color: var(--noir); padding: 6px 11px; border-radius: 0; font-weight: 700; }
.pas button:hover:not(:disabled) { background: var(--marque-clair); }
.pas span { min-width: 30px; text-align: center; font-weight: 600; }
.article-total { margin-left: auto; font-weight: 700; color: var(--noir); white-space: nowrap; }
.article .alerte-prix { margin: 8px 0 0 48px; font-size: 12px; padding: 7px 10px; border-radius: 8px; }
.alerte-prix.ko { background: var(--rouge-clair); color: var(--rouge); }
.alerte-prix.warn { background: var(--orange-clair); color: var(--orange); }
.article.bloque .prix-champ { border-color: var(--rouge); }
.bloc { margin-top: 16px; }
.bloc-titre { font-size: 12px; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.bloc-titre .oblig { color: var(--rouge); text-transform: none; letter-spacing: 0; font-weight: 600; }
.bloc .deux { gap: 8px; }
.bloc input, .bloc select { padding: 9px 11px; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
button.mode { background: #fff; color: var(--texte); border: 1.5px solid var(--bord-fort); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; font-size: 12px; font-weight: 600; }
button.mode:hover:not(:disabled) { background: #f7f9fc; border-color: var(--marque); }
button.mode.on { border-color: var(--marque); background: var(--marque-clair); color: var(--marque); }
.montant-recu { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.montant-recu label { font-size: 13px; color: var(--gris); font-weight: 600; white-space: nowrap; }
.montant-recu .prix-champ { flex: 1; width: auto; }
.paie { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.paie .prix-champ { width: 46%; }
.paie select { flex: 1; }
.troc { background: var(--jaune-clair); border: 1px solid #f5dd8a; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.troc svg.ico { color: var(--orange); }
.troc .t { flex: 1; }
select.ajout-troc { border-style: dashed; color: var(--gris); margin-bottom: 8px; }
.totaux { background: #f7f9fc; border-radius: 12px; padding: 12px 14px; margin-top: 16px; }
.totaux .l { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; }
.totaux .l.grand { font-size: 22px; font-weight: 700; color: var(--noir); padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--bord-fort); }
.totaux .l.reste { color: var(--rouge); font-weight: 700; }
.case { display: flex; gap: 10px; align-items: center; font-weight: 600; margin: 12px 0 4px; font-size: 14px; }
.case input { width: 18px; height: 18px; }
.ticket-pied { padding: 14px 18px 18px; border-top: 1px solid var(--bord); background: #fff; }
button.encaisser { width: 100%; font-size: 17px; font-weight: 700; padding: 15px; border-radius: 12px; background: var(--jaune); color: var(--marque); display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 6px 16px rgba(255, 191, 0, .35); }
button.encaisser:hover:not(:disabled) { background: var(--jaune-fonce); }
button.encaisser svg.ico { stroke-width: 2.4; }
.barre-panier { display: none; }

/* Fenêtres */
.fond { position: fixed; inset: 0; background: rgba(17, 24, 39, .5); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto; z-index: 10; }
.fenetre { position: relative; background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 560px; box-shadow: var(--ombre-haute); }
.fenetre.large { max-width: 780px; }
.fenetre h2 { padding-right: 30px; }
button.fermer { position: absolute; top: 12px; right: 12px; background: #f3f5f9; color: var(--gris); font-size: 20px; width: 34px; height: 34px; padding: 0; border-radius: 50%; line-height: 1; }
button.fermer:hover:not(:disabled) { background: var(--bord); color: var(--noir); }
.papier { font-family: "Courier New", monospace; font-size: 14px; line-height: 1.45; max-width: 340px; margin: 0 auto 10px; background: #fff; }
.papier .c { text-align: center; }
.papier hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.papier .l { display: flex; justify-content: space-between; gap: 10px; }
.papier .l span:last-child { text-align: right; white-space: nowrap; }
.papier .gros-montant { font-size: 17px; font-weight: bold; }
.logo-recu { height: 110px; }
label.option { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1.5px solid var(--bord-fort); border-radius: 12px; margin-bottom: 8px; cursor: pointer; }
label.option input { width: 18px; height: 18px; }
label.option:has(input:checked) { border-color: var(--marque); background: var(--marque-clair); }

/* Tableau de bord (modèle « cartes de couleur ») */
.db-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.db-tete h1 { margin: 0; font-size: 26px; }
.db-tete p { margin: 2px 0 0; font-size: 13px; text-transform: none; }
.db-tete > button { display: inline-flex; align-items: center; gap: 8px; background: var(--jaune); color: var(--marque); font-weight: 700; padding: 11px 18px; box-shadow: 0 6px 16px rgba(255, 191, 0, .35); }
.db-tete > button:hover:not(:disabled) { background: var(--jaune-fonce); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
button.kpi { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 14px; align-items: center; text-align: left;
  padding: 20px; border-radius: 18px; color: #fff; min-height: 116px; box-shadow: 0 8px 20px rgba(16, 24, 40, .12); transition: transform .15s, box-shadow .15s; }
button.kpi::before, button.kpi::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .14); pointer-events: none; }
button.kpi::before { width: 130px; height: 130px; right: -40px; bottom: -55px; }
button.kpi::after { width: 70px; height: 70px; right: 40px; top: -38px; background: rgba(255, 255, 255, .1); }
button.kpi:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(16, 24, 40, .18); }
.kpi.bleu { background: linear-gradient(135deg, #03369F, #2563d9); } .kpi.bleu:hover:not(:disabled) { background: linear-gradient(135deg, #022A7D, #2563d9); }
.kpi.jaune { background: linear-gradient(135deg, #FFB000, #FFD54A); color: var(--marque-fonce); } .kpi.jaune:hover:not(:disabled) { background: linear-gradient(135deg, #F5A800, #FFD54A); }
.kpi.vert { background: linear-gradient(135deg, #0f8a50, #3cbf7a); } .kpi.vert:hover:not(:disabled) { background: linear-gradient(135deg, #0b7342, #3cbf7a); }
.kpi.rouge { background: linear-gradient(135deg, #d6402a, #f27a4d); } .kpi.rouge:hover:not(:disabled) { background: linear-gradient(135deg, #bd3522, #f27a4d); }
.kpi-ico { grid-row: 1 / span 3; width: 48px; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; }
.kpi-ico svg.ico { width: 24px; height: 24px; }
.kpi-v { font-size: 23px; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; white-space: nowrap; }
.kpi-t { font-size: 13px; font-weight: 600; opacity: .95; }
.kpi-d { font-size: 12px; opacity: .8; font-weight: 400; }
.db-grille { display: grid; gap: 16px; margin-bottom: 0; }
.db-grille > * { min-width: 0; }
.db-grille.g1 { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.db-grille.g2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-grille.g3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.db-grille .boite { border: 0; border-radius: 18px; box-shadow: 0 4px 18px rgba(16, 24, 40, .06); padding: 20px; }
.db-ventes { display: flex; flex-direction: column; gap: 4px; }
button.db-vente { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; background: none; color: var(--texte); text-align: left; padding: 10px 8px; border-radius: 12px; font-weight: 400; }
button.db-vente:hover:not(:disabled) { background: #f5f7fb; }
.db-vign { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--marque); flex: none; }
.db-vign.petit { width: 36px; height: 36px; border-radius: 10px; }
.db-vign svg.ico { width: 22px; height: 22px; }
.db-qui, .db-mt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.db-qui small, .db-mt small { color: var(--marque); font-size: 11px; font-weight: 600; }
.db-mt small { color: var(--gris); font-weight: 500; }
.db-qui b { font-weight: 600; color: var(--noir); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.db-mt b { font-weight: 700; color: var(--noir); white-space: nowrap; font-size: 14px; }
.db-quand { color: var(--gris); font-size: 12px; white-space: nowrap; }
.db-graph { display: flex; align-items: flex-end; gap: 10px; height: 210px; padding-top: 6px; }
.db-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.db-val { font-size: 11px; font-weight: 600; color: var(--gris); height: 15px; white-space: nowrap; }
.db-barre { flex: 1; width: 100%; max-width: 38px; display: flex; align-items: flex-end; background: #f1f4f9; border-radius: 10px; overflow: hidden; }
.db-barre span { width: 100%; background: linear-gradient(180deg, #4d7fe6, var(--marque)); border-radius: 10px; }
.db-col.auj .db-barre span { background: linear-gradient(180deg, #FFD54A, var(--jaune)); }
.db-col.auj .db-val, .db-col.auj .db-jour { color: var(--marque); font-weight: 700; }
.db-jour { font-size: 12px; color: var(--gris); text-transform: capitalize; }
.db-legende { margin: 12px 0 0; font-size: 13px; }
.db-legende b { color: var(--noir); }
.db-pile { display: flex; flex-direction: column; gap: 16px; }
button.db-caisse { position: relative; overflow: hidden; display: flex; flex-direction: column; text-align: left; gap: 4px; padding: 22px; border-radius: 18px; min-height: 170px;
  background: linear-gradient(135deg, #03369F 0%, #2a63d6 70%, #4c86f0 100%); box-shadow: 0 10px 24px rgba(3, 54, 159, .3); transition: transform .15s; }
button.db-caisse:hover:not(:disabled) { background: linear-gradient(135deg, #022A7D 0%, #2a63d6 70%, #4c86f0 100%); transform: translateY(-3px); }
button.db-caisse::before { content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%; right: -50px; top: -70px; background: rgba(255, 191, 0, .28); }
button.db-caisse::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; right: 50px; bottom: -60px; background: rgba(255, 255, 255, .1); }
button.db-caisse small { color: rgba(255, 255, 255, .88); font-size: 14px; font-weight: 500; position: relative; }
button.db-caisse b { font-size: 30px; font-weight: 700; letter-spacing: -.4px; position: relative; }
.db-caisse-bas { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 13px; opacity: .9; position: relative; }
.db-caisse-bas svg.ico { width: 30px; height: 30px; color: var(--jaune); }
button.db-petite { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; background: #fff; color: var(--texte);
  padding: 16px; border-radius: 18px; box-shadow: 0 4px 18px rgba(16, 24, 40, .06); font-weight: 400; }
button.db-petite:hover:not(:disabled) { background: #fff; box-shadow: 0 8px 22px rgba(3, 54, 159, .14); }
button.db-petite .db-vign { grid-row: 1 / span 2; color: var(--orange); }
button.db-petite small { color: var(--gris); display: block; font-size: 12px; }
button.db-petite b { font-size: 20px; color: var(--noir); }
button.db-petite .gris { font-size: 12px; }
.db-sous { margin: -6px 0 0; font-size: 12px; }
.db-gros { font-size: 25px; font-weight: 700; color: var(--noir); margin-bottom: 14px; letter-spacing: -.3px; }
.db-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.db-mode { background: #f3f5f9; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; min-width: 0; }
.db-mode small { color: var(--gris); font-size: 12px; }
.db-mode b { font-size: 15px; color: var(--noir); white-space: nowrap; }
.db-mode.plein { background: var(--marque); }
.db-mode.plein small { color: rgba(255, 255, 255, .8); } .db-mode.plein b { color: #fff; }
.clic-boite { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.clic-boite:hover { box-shadow: 0 8px 22px rgba(3, 54, 159, .14) !important; transform: translateY(-2px); }
.db-cat { display: grid; grid-template-columns: auto minmax(0, 1fr) 90px; align-items: center; gap: 10px; margin-top: 10px; }
.db-cat-nom { font-size: 13px; font-weight: 600; color: var(--noir); display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.db-cat-nom small { font-weight: 400; }
.db-jauge { height: 8px; background: #f1f4f9; border-radius: 6px; overflow: hidden; }
.db-jauge span { display: block; height: 100%; border-radius: 6px; }

/* Accueil vendeur / technicien */
.db-seule { border: 0 !important; border-radius: 18px !important; box-shadow: 0 4px 18px rgba(16, 24, 40, .06) !important; padding: 20px !important; }
.afaire { display: flex; flex-direction: column; gap: 8px; }
button.afaire-l { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; text-align: left; background: #f6f8fc; color: var(--texte); font-weight: 500; padding: 10px 12px; border-radius: 12px; font-size: 14px; }
button.afaire-l:hover:not(:disabled) { background: var(--marque-clair); }
button.afaire-l .db-vign { background: #fff; }
button.afaire-l.ko { background: var(--rouge-clair); }
button.afaire-l.ko .db-vign { color: var(--rouge); }
button.afaire-l .aller { font-size: 22px; color: var(--gris-clair); line-height: 1; }
.db-qui.panne { color: var(--gris); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* Formulaire d'un deal : somme fixe ou pourcentage */
.f-deal .si-pct { display: none; }
.f-deal.pct .si-pct { display: block; }
.f-deal.pct .si-fixe { display: none; }
.titre-ligne > button svg.ico { vertical-align: -4px; margin-right: 4px; width: 18px; height: 18px; }

/* Bouton « Vendre » flottant */
button.fab { position: fixed; right: 24px; bottom: 24px; z-index: 7; display: flex; align-items: center; gap: 10px; padding: 15px 24px 15px 20px; border-radius: 40px;
  background: linear-gradient(135deg, #FFB000, #FFD54A); color: var(--marque); font-weight: 700; font-size: 16px; box-shadow: 0 10px 26px rgba(3, 54, 159, .28), 0 4px 10px rgba(255, 176, 0, .4); }
button.fab:hover:not(:disabled) { background: linear-gradient(135deg, #F5A800, #FFCB2E); transform: translateY(-2px); }
button.fab svg.ico { width: 24px; height: 24px; stroke-width: 2.2; }
main { padding-bottom: 100px; }

/* Se déconnecter */
button.sortir { background: none; color: var(--gris); padding: 8px; border-radius: 10px; margin-left: 2px; }
button.sortir:hover:not(:disabled) { background: var(--rouge-clair); color: var(--rouge); }

/* Page de connexion */
body.ecran-connexion header, body.ecran-connexion nav { display: none; }
body.ecran-connexion main { max-width: none; padding: 0; }
.cnx { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: calc(100vh - 37px); }
.cnx-gauche { position: relative; overflow: hidden; background: linear-gradient(150deg, #022A7D 0%, #03369F 45%, #2a63d6 100%); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; }
.cnx-gauche::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; top: -140px; background: rgba(255, 191, 0, .25); }
.cnx-gauche::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; left: -90px; bottom: -110px; background: rgba(255, 255, 255, .08); }
.cnx-gauche > * { position: relative; }
.cnx-logo { background: #fff; border-radius: 22px; padding: 12px; width: 130px; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); margin-bottom: 26px; }
.cnx-logo img { display: block; width: 100%; height: auto; }
.cnx-gauche h1 { color: #fff; font-size: 34px; margin: 0 0 6px; line-height: 1.2; }
.cnx-slogan { color: var(--jaune); font-weight: 600; margin: 0 0 26px; font-size: 16px; }
.cnx-points { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-direction: column; gap: 12px; }
.cnx-points li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.cnx-points svg.ico { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .15); color: var(--jaune); }
.cnx-adr { font-size: 13px; opacity: .8; margin: 0; }
.cnx-droite { padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; max-width: 560px; width: 100%; margin: 0 auto; }
.cnx-droite h2 { font-size: 26px; margin: 0 0 4px; }
.cnx-droite > p { margin: 0 0 22px; }
.cnx-gens { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
button.cnx-pers { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; color: var(--texte); border: 2px solid transparent; border-radius: 16px; padding: 14px; box-shadow: 0 4px 16px rgba(16, 24, 40, .07); font-weight: 400; }
button.cnx-pers:hover:not(:disabled) { background: #fff; border-color: var(--marque-clair); }
button.cnx-pers.on { border-color: var(--marque); background: var(--marque-clair); }
.cnx-nom { display: flex; flex-direction: column; line-height: 1.25; }
.cnx-nom b { color: var(--noir); font-size: 15px; } .cnx-nom small { text-transform: capitalize; }
.cnx-code { background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 4px 18px rgba(16, 24, 40, .07); }
.cnx-code input { font-size: 22px; letter-spacing: 10px; text-align: center; }
button.cnx-entrer { width: 100%; padding: 14px; font-size: 16px; font-weight: 700; border-radius: 12px; }
.cnx-aide { font-size: 12px; text-align: center; margin: 10px 0 0; }

/* Tablette et téléphone */
@media (max-width: 900px) {
  .cnx { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .cnx-gauche { padding: 28px 22px; }
  .cnx-gauche h1 { font-size: 24px; }
  .cnx-logo { width: 92px; padding: 8px; border-radius: 16px; margin-bottom: 16px; }
  .cnx-points { display: none; }
  .cnx-slogan { margin-bottom: 10px; }
  .cnx-droite { padding: 24px 16px 40px; }
  button.fab { right: 16px; bottom: 16px; padding: 13px 20px 13px 16px; }
}
@media (max-width: 1250px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-grille.g2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .db-grille.g2 > .db-pile { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .db-grille.g1, .db-grille.g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kpis { gap: 10px; }
  button.kpi { grid-template-columns: 1fr; padding: 16px; min-height: 0; }
  .kpi-ico { grid-row: auto; width: 38px; height: 38px; margin-bottom: 8px; }
  .kpi-v { font-size: 18px; }
  .db-grille.g2, .db-grille.g2 > .db-pile { grid-template-columns: minmax(0, 1fr); display: grid; }
  button.db-vente { grid-template-columns: 40px minmax(0, 1fr) auto; row-gap: 2px; }
  button.db-vente .db-vign { grid-row: 1 / span 2; width: 40px; height: 40px; }
  .db-quand { grid-column: 2; font-size: 11px; }
  .db-qui.panne { display: none; }
  .db-etat { grid-column: 3; grid-row: 2; justify-self: end; }
  .db-graph { gap: 5px; height: 180px; }
  .db-val { font-size: 10px; }
}
@media (max-width: 1100px) {
  .caisse { grid-template-columns: minmax(0, 1fr) 360px; }
  nav { width: 200px; }
}
@media (max-width: 900px) {
  header { padding: 6px 14px; }
  .marque img { height: 38px; width: 38px; }
  .marque .nom-marque { font-size: 19px; }
  .marque .appli { display: none; }
  .moi .nom, .moi .role { display: none; }
  .cadre { display: block; }
  /* Menu ☰ : il sort sur le côté gauche */
  button.burger { display: grid; place-items: center; background: none; color: var(--marque); padding: 8px; margin-right: 2px; border-radius: 10px; }
  button.burger:hover:not(:disabled) { background: var(--marque-clair); }
  button.burger svg.ico { width: 26px; height: 26px; stroke-width: 2.2; }
  header button.sortir { display: none; }
  nav { position: fixed; top: 0; left: 0; bottom: 0; z-index: 30; width: 290px; max-width: 86vw; height: 100%; padding: 12px 12px 24px;
    border-right: 0; box-shadow: 8px 0 30px rgba(16, 24, 40, .25); transform: translateX(-105%); transition: transform .22s ease; }
  body.menu-ouvert nav { transform: none; }
  #voile { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(16, 24, 40, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.menu-ouvert #voile { opacity: 1; pointer-events: auto; }
  body.menu-ouvert { overflow: hidden; }
  .nav-tete { display: flex; align-items: center; gap: 8px; padding: 2px 2px 12px; }
  .nav-tete img { width: 38px; height: 38px; }
  .nav-tete .nom-marque { font-size: 19px; color: var(--marque); font-style: italic; font-weight: 500; flex: 1; }
  .nav-tete .nom-marque b { color: var(--jaune); font-style: normal; font-weight: 800; }
  nav button.nav-fermer { background: none; color: var(--gris); padding: 8px; flex: none; }
  .nav-moi { display: flex; align-items: center; gap: 12px; background: var(--marque-clair); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
  .nav-moi .nom { font-weight: 700; color: var(--noir); line-height: 1.2; }
  .nav-moi .role { color: var(--gris); font-size: 12px; text-transform: capitalize; }
  nav button { padding: 13px 14px; font-size: 15px; }
  nav button.nav-sortir { display: flex; margin-top: auto; color: var(--rouge); border-top: 1px solid var(--bord); border-radius: 0; padding-top: 16px; }
  nav button.nav-sortir:hover:not(:disabled) { background: var(--rouge-clair); color: var(--rouge); }
  main { padding: 16px 14px 90px; }
  .caisse { grid-template-columns: minmax(0, 1fr); }
  .ticket { position: static; max-height: none; scroll-margin-top: 110px; }
  .tuiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .tuile-img { height: 74px; }
  .deux { grid-template-columns: 1fr; }
  .bloc .deux { grid-template-columns: 1fr 1fr; }
  .barre-panier { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 6; background: var(--marque); color: #fff; text-decoration: none; border-radius: 14px; padding: 14px 16px; align-items: center; gap: 10px; font-weight: 600; box-shadow: var(--ombre-haute); }
  .barre-panier b { margin-left: auto; background: var(--jaune); color: var(--marque); padding: 3px 10px; border-radius: 8px; }
  h1 { font-size: 21px; }
}
@media (max-width: 420px) {
  .tuiles { grid-template-columns: 1fr 1fr; }
  .modes button.mode { font-size: 11px; }
  .article-bas { padding-left: 0; flex-wrap: wrap; }
  .article .alerte-prix { margin-left: 0; }
}
@media print {
  #demo, header, nav, main, .pas-imprimer, button.fermer, .barre-panier { display: none !important; }
  body { background: #fff; }
  .fond { position: static; background: none; padding: 0; backdrop-filter: none; }
  .fenetre { padding: 0; max-width: 320px; box-shadow: none; }
}
