:root{--bg:#f2f0eb;--panel:#fff;--ink:#202024;--muted:#777168;--line:#ded8cf;--dark:#28282c;--blue:#087cf1;--ok:#24a865;--warn:#aa6f1a}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;min-height:100%;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--ink)}button,input,textarea{font:inherit}button{cursor:pointer}.topbar{position:sticky;top:0;z-index:25;display:flex;align-items:center;justify-content:space-between;gap:10px;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border-bottom:1px solid var(--line);padding:max(10px,env(safe-area-inset-top)) 12px 10px}.brand{display:flex;align-items:center;gap:8px;font-weight:950;letter-spacing:.02em}.brandmark{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--dark);color:white;font-weight:950}.topchips{display:flex;gap:6px;align-items:center}.chip,.iconbtn{border:1px solid #ddd6cd;background:#f5f2ed;border-radius:12px;padding:9px 10px;font-weight:850;color:#45413d}.iconbtn{width:41px}.content{max-width:980px;margin:auto;padding:12px 12px 110px}.statusCard,.searchCard{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:13px;margin-bottom:10px}.statusCard{display:flex;align-items:center;justify-content:space-between;gap:10px}.eyebrow{font-size:10px;font-weight:950;letter-spacing:.1em;color:#8b847b}.destination{font-size:17px;font-weight:950;margin-top:3px}.dot{display:inline-block;width:8px;height:8px;background:var(--ok);border-radius:50%;margin-left:6px}.modeBadge{font-size:11px;font-weight:950;padding:8px 10px;border-radius:999px;background:#eee8df;color:#696159}.searchRow{display:grid;grid-template-columns:1fr auto;gap:8px}.searchRow input{width:100%;min-width:0;border:1px solid #d8d1c8;border-radius:14px;padding:13px 14px;font-size:17px;background:#fbfaf8}.clearSearch{width:52px;border:0;border-radius:14px;background:#ece7df;color:var(--blue);font-size:25px;font-weight:900}.quickRow{display:grid;grid-template-columns:1fr 1fr 1fr;gap:7px;margin-top:9px}.softBtn,.darkBtn,.sendBtn,.followBtn{border:0;border-radius:13px;padding:12px 10px;font-weight:950}.softBtn{background:#ede9e2;color:#49443f}.darkBtn{background:var(--dark);color:#fff}.categoryBar{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding:2px 0 9px}.categoryBar::-webkit-scrollbar{display:none}.catBtn{flex:0 0 auto;border:0;border-radius:999px;padding:9px 13px;color:white;font-weight:900}.catBtn.active{outline:3px solid #0002}.resultMeta{font-size:12px;font-weight:800;color:var(--muted);padding:0 2px 8px}.productGrid{display:grid;grid-template-columns:1fr 1fr;gap:7px}.productBtn{border:1px solid var(--line);background:white;border-radius:14px;padding:11px;text-align:left;min-height:83px;display:flex;flex-direction:column;justify-content:space-between;gap:8px}.productBtn:active{transform:scale(.985)}.productName{font-size:14px;line-height:1.18;font-weight:850}.productFoot{display:flex;align-items:flex-end;justify-content:space-between;gap:7px}.productCat{font-size:10px;color:#8c857c;font-weight:800}.productPrice{font-size:13px;font-weight:950;white-space:nowrap}.ticketFab{position:fixed;right:14px;bottom:max(14px,env(safe-area-inset-bottom));z-index:30;border:0;background:var(--dark);color:#fff;border-radius:999px;padding:14px 17px;display:flex;align-items:center;gap:9px;font-weight:950;box-shadow:0 12px 35px #0004}.ticketFab b{display:grid;place-items:center;min-width:25px;height:25px;padding:0 7px;background:white;color:var(--dark);border-radius:999px}.modal{display:none;position:fixed;inset:0;z-index:50;background:#0007;align-items:flex-end}.modal.open{display:flex}.sheet{width:100%;max-height:90dvh;overflow:auto;background:white;border-radius:22px 22px 0 0;padding:15px;padding-bottom:max(18px,env(safe-area-inset-bottom))}.sheetHead{display:flex;align-items:center;justify-content:space-between;gap:10px}.sheetHead h2{margin:0 0 10px;font-size:22px}.xbtn{border:0;background:#eee9e2;border-radius:999px;width:38px;height:38px;font-size:24px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.fields label,.globalNote,.settingsBlock label{font-size:11px;color:#716a61;font-weight:900}.fields input,.globalNote textarea,.settingsBlock input{width:100%;margin-top:4px;border:1px solid #d9d1c8;border-radius:12px;padding:11px 12px;background:#fbfaf8;font-size:16px;color:var(--ink)}.globalNote{display:block;margin-top:9px}.ticketLines{margin-top:10px;border-top:1px solid #eee8df}.ticketLine{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #eee8df}.qtyCtl{display:flex;align-items:center;gap:5px}.qtyCtl button{width:30px;height:30px;border:1px solid #ddd;border-radius:9px;background:#fff;font-weight:950}.lineMain{min-width:0}.lineMain button{border:0;padding:0;background:none;text-align:left;font-weight:850;color:var(--ink)}.lineNote{font-size:11px;color:#925c1d;font-weight:800;margin-top:3px}.linePrice{font-size:13px;font-weight:950;white-space:nowrap}.ticketTotal{display:flex;justify-content:space-between;align-items:center;padding:14px 0 7px;font-size:21px;font-weight:950}.sendRow{display:grid;grid-template-columns:1fr 1.3fr;gap:8px}.followBtn{background:#eee7dc;color:#473f37}.sendBtn{background:var(--dark);color:#fff}.sendBtn.full,.softBtn.full{width:100%;margin-top:10px}.sendHint{font-size:11px;color:#7d756b;font-weight:750;text-align:center;padding-top:8px}.modifierGrid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.modifierGrid button{border:1px solid #ddd6cd;background:#f7f4ef;border-radius:11px;padding:10px;font-weight:800}.historyCard{border:1px solid var(--line);border-radius:14px;padding:11px;margin-bottom:8px}.historyTop{display:flex;justify-content:space-between;gap:8px;font-weight:900}.historyMeta{font-size:11px;color:var(--muted);margin-top:3px}.historyItems{font-size:12px;line-height:1.4;margin-top:7px}.settingsBlock{border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:9px}.settingLabel{font-size:11px;font-weight:950;color:#777067;letter-spacing:.05em}.lockedSetting{font-size:18px;font-weight:950;margin-top:5px}.settingsBlock p{font-size:12px;color:#777067;line-height:1.4;margin:7px 0 0}.segmented{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:#eee9e2;padding:4px;border-radius:12px;margin-top:8px}.segmented button{border:0;background:transparent;border-radius:9px;padding:10px;font-weight:900}.segmented button.active{background:white;box-shadow:0 1px 5px #0002}.hidden{display:none}.warningBox{margin-top:10px;padding:10px;border-radius:11px;background:#fff3da;color:#7a5717;font-size:11px;font-weight:750;line-height:1.4}.toast{position:fixed;left:50%;bottom:88px;z-index:80;transform:translateX(-50%) translateY(18px);background:#202024;color:#fff;border-radius:12px;padding:11px 14px;font-weight:850;opacity:0;transition:.18s;pointer-events:none;max-width:90%;text-align:center}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.empty{grid-column:1/-1;background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;text-align:center;color:#8a837a;font-weight:800}
@media(min-width:760px){.productGrid{grid-template-columns:repeat(4,1fr)}.sheet{max-width:650px;margin:0 auto}.modal{justify-content:center}.quickRow{grid-template-columns:repeat(3,180px)}}
.ticketSeparator{display:grid;grid-template-columns:1fr auto auto;gap:9px;align-items:center;padding:12px 0;border-bottom:1px solid #eee8df}
.ticketSeparator>span{height:2px;background:#2b292d;border-radius:999px}
.ticketSeparator strong{font-size:12px;letter-spacing:.12em;font-weight:950;color:#2b292d;white-space:nowrap}
.removeSeparator{width:30px;height:30px;border:0;border-radius:999px;background:#eee9e2;color:#4b4640;font-weight:950;font-size:18px}


/* V1.9 — cuissons + commentaires rapides */
.cookingSheet{padding-bottom:max(26px,env(safe-area-inset-bottom))}
.cookingGrid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:10px}
.cookingGrid button{border:1px solid #d8d1c8;background:#f8f5f0;border-radius:14px;padding:17px 10px;font-size:17px;font-weight:950;color:#2b292d}
.cookingGrid button:active{transform:scale(.985)}
.cookingGrid.small button{padding:12px 8px;font-size:14px}
.cookingGrid button.selected{background:#28282c;color:#fff;border-color:#28282c}
.cookingHint{margin-top:10px;text-align:center;color:#7d756b;font-size:11px;font-weight:750}
.lineCookingEditor{margin:6px 0 10px;padding:11px;border:1px solid var(--line);border-radius:14px;background:#fbfaf8}
.lineMain{display:flex;flex-direction:column;align-items:flex-start}
.lineNameBtn{font-size:14px}
.commentShortcut{margin-top:5px!important;color:#087cf1!important;font-size:11px!important;font-weight:900!important}
.presetSection{margin-top:12px;border-top:1px solid #eee8df;padding-top:12px}
.presetTitle{font-size:11px;font-weight:950;letter-spacing:.05em;color:#716a61}
.presetChips{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding:9px 1px 3px}
.presetChips::-webkit-scrollbar{display:none}
.presetChip{flex:0 0 auto;border:1px solid #d8d1c8;background:#f7f4ef;border-radius:999px;padding:10px 12px;font-size:13px;font-weight:850;color:#36322f}
.presetChip:active{background:#e9e3da}
.presetHelp,.presetEmpty{margin-top:7px;color:#837b72;font-size:11px;font-weight:700;line-height:1.35}
.savedCommentAdd{display:grid;grid-template-columns:1fr auto;gap:7px;margin-top:10px}
.savedCommentAdd input{margin:0!important}
.savedCommentAdd button{border:0;border-radius:12px;padding:0 14px;background:#28282c;color:#fff;font-weight:900}
.savedCommentsSettingsList{margin-top:9px;max-height:260px;overflow:auto;border-top:1px solid #eee8df}
.savedCommentRow{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid #eee8df;font-size:13px;font-weight:800}
.savedCommentRow button{width:30px;height:30px;border:0;border-radius:999px;background:#eee9e2;color:#4b4640;font-size:18px;font-weight:950}
.smallTop{margin-top:9px!important}



.cpHidden{display:none!important}
body{background:#111!important}
.content{padding:0!important;max-width:none!important}
#cpRemote{min-height:100dvh;background:#151515;padding:env(safe-area-inset-top) 0 calc(74px + env(safe-area-inset-bottom))}
.cpHeader{
  position:sticky;top:0;z-index:50;
  display:grid;
  grid-template-columns:1fr 1fr .95fr;
  grid-template-rows:52px 50px;
  background:#202124;border-bottom:2px solid #080808
}
.cpHeaderBox,.cpTable,.cpSend{
  border:1px solid #555;border-radius:0;
  background:#f3f3f3;color:#333;font-weight:800
}
.cpTitle{
  grid-column:1/3;grid-row:1;
  text-align:left;padding:4px 14px;
  font-size:15px;line-height:1.05;
  display:flex;align-items:center;
  white-space:normal;word-break:normal;overflow-wrap:normal
}
.cpTotal{
  grid-column:1/3;grid-row:2;
  text-align:left;padding:0 14px;font-size:22px
}
.cpTable{
  grid-column:3;grid-row:1;
  background:#252525;color:#fff;font-size:14px;line-height:1.05;padding:4px
}
.cpSend{
  grid-column:3;grid-row:2;
  background:#70c900;color:white;font-size:18px;border-color:#5fae00
}
.cpGrid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-auto-rows:40px;
  gap:2px;padding:4px;
  background:#151515;
  align-content:start;
  min-height:calc(100dvh - 176px - env(safe-area-inset-bottom))
}
.cpSearchGrid{grid-auto-rows:78px}
.cpTouch{
  min-width:0;
  border:0;border-radius:0;
  padding:7px 3px;
  font-size:15px;font-weight:900;line-height:1.06;
  text-transform:uppercase;
  white-space:normal;
  word-break:normal;
  overflow-wrap:anywhere;
  hyphens:none;
  text-wrap:balance;
  overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.25)
}
.cpTouch.cpMedium{font-size:13px}
.cpTouch.cpSmall{font-size:11.5px}
.cpTouch.cpTiny{font-size:10px}
.cpTouch:active{transform:scale(.97);filter:brightness(.9)}
.cpCategory,.cpProduct{min-height:0}
.cpBottom{
  position:fixed;z-index:60;left:0;right:0;bottom:0;
  display:grid;grid-template-columns:repeat(4,1fr);
  height:calc(66px + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);
  background:#242424;border-top:1px solid #555
}
.cpBottom button{
  border:0;border-right:1px solid #444;background:#292929;color:#fff;
  font-weight:800;font-size:13px
}
.cpEmpty{grid-column:1/-1;color:#bbb;padding:30px;text-align:center}
body.cpModalOpen .cpBottom{display:none!important}
body.cpModalOpen .modal{z-index:220!important}
body.cpModalOpen .sheet{
  max-height:94dvh!important;
  padding-bottom:max(26px,env(safe-area-inset-bottom))!important
}
@media(min-width:700px){
  .cpGrid{grid-auto-rows:47px}
  .cpTouch{font-size:17px}
  .cpTouch.cpMedium{font-size:14px}
  .cpTouch.cpSmall{font-size:12.5px}
  .cpTouch.cpTiny{font-size:10.5px}
  .cpHeader{grid-template-rows:56px 56px}
  .cpBottom{height:72px}
}


/* V0.4 : auto-fit dynamique des libellés de touches */
.cpTouch{
  overflow:hidden!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}
.cpTouchLabel{
  display:block;
  width:100%;
  max-width:100%;
  font-weight:900;
  text-align:center;
  white-space:normal;
  word-break:normal;
  overflow-wrap:normal;
  hyphens:none;
}

.claimBtn{border:0;border-radius:13px;padding:12px 10px;font-weight:950;background:#31bf4c;color:#fff}
.sendRow:has(.claimBtn:not(.hidden)){grid-template-columns:.85fr .95fr 1.1fr}

/* V0.2.1 — bouton PikSou Security visible dans l'interface Cashpad.
   Aucun changement de grille, ticket, routage, bridge ou Security Core. */
.cpTable{padding-right:46px!important}
.cpSecurity{
  position:absolute;z-index:55;right:6px;top:7px;
  width:36px;height:36px;padding:0;
  border:1px solid #4d4d4d;border-radius:9px;
  background:#151515;color:#70c900;
  font-size:18px;line-height:34px;text-align:center;
  box-shadow:0 1px 0 #0008;
}
.cpSecurity:active{transform:scale(.96)}

/* V0.2.3 — handoff iOS sécurisé : le custom URL scheme est lancé sur un toucher direct. */
#securePrintHandoff{
  position:fixed;inset:0;z-index:999999;
  display:flex;align-items:center;justify-content:center;
  padding:24px;background:rgba(0,0,0,.72)
}
.secureHandoffCard{
  width:min(440px,100%);background:#fff;color:#181818;
  border-radius:24px;padding:26px;text-align:center;
  box-shadow:0 18px 60px rgba(0,0,0,.36)
}
.secureHandoffIcon{font-size:34px;margin-bottom:4px}
.secureHandoffCard h2{margin:4px 0 10px;font-size:29px}
.secureHandoffCard p{font-size:17px;line-height:1.35;margin:0 0 20px;color:#555}
.secureHandoffCard button{
  width:100%;border:0;border-radius:15px;padding:16px 12px;
  font-size:18px;font-weight:900;margin-top:10px
}
#secureHandoffPrint{background:#58cf00;color:#fff}
#secureHandoffCancel{background:#eee;color:#222}
.secureHandoffCard small{display:block;margin-top:14px;color:#777;line-height:1.35}

/* V0.2.5 multi-driver */
.noteBtn{border:0;border-radius:13px;padding:12px 10px;font-weight:950;background:#efe2c4;color:#5b4212}.sendRow{grid-template-columns:.85fr 1fr 1.15fr}.sendRow:has(.claimBtn:not(.hidden)){grid-template-columns:.75fr .85fr .95fr 1.1fr}
