
:root{
  --bg:#f3f3f0;--card:#fff;--soft:#ececea;--ink:#161616;--muted:#777;--line:#dcdcd8;
  --accent:#f7d9df;--accent-strong:#d88f9f;--accent-ink:#5a3038;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%;margin:0;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;background:var(--bg);color:var(--ink)}
button,input{font:inherit}button{cursor:pointer}
.app{height:100vh;display:grid;grid-template-columns:90px 1fr;gap:12px;padding:12px}
.side{background:#fff;border:1px solid var(--line);border-radius:27px;padding:11px 7px;display:flex;flex-direction:column;align-items:center;box-shadow:0 18px 42px rgba(0,0,0,.06)}
.logo{width:48px;height:48px;border-radius:15px;background:#111;color:#fff;display:grid;place-items:center;font-weight:900;margin-bottom:18px}
.nav{border:0;background:transparent;color:#777;width:70px;height:64px;border-radius:17px;margin:3px 0;font-size:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.nav small{font-size:10px;font-weight:700}.nav.active{background:#111;color:#fff}.grow{flex:1}
main{min-width:0;display:flex;flex-direction:column;gap:10px}

.active-banner{
  min-height:92px;border:2px solid var(--accent-strong);background:var(--accent);border-radius:24px;
  padding:12px 15px;display:flex;align-items:center;justify-content:space-between;gap:15px;
  transition:background .2s,border-color .2s;box-shadow:0 10px 25px rgba(0,0,0,.04)
}
.active-label{min-width:180px}.active-label span{font-size:10px;font-weight:900;letter-spacing:.08em;color:var(--accent-ink)}
.active-label strong{display:block;margin-top:2px;font-size:22px;color:var(--accent-ink);letter-spacing:-.4px}
.switchers{display:flex;align-items:center;gap:12px;min-width:0}
.photographers{display:flex;gap:7px;overflow:auto;scrollbar-width:none}
.photographer{
  border:2px solid transparent;background:rgba(255,255,255,.58);border-radius:14px;padding:11px 15px;
  font-weight:850;white-space:nowrap;color:#333
}
.photographer.active{background:#fff;border-color:var(--accent-strong);box-shadow:0 5px 12px rgba(0,0,0,.06)}
.activity-switch{display:flex;padding:4px;background:rgba(255,255,255,.55);border-radius:15px;gap:4px}
.activity{border:0;background:transparent;border-radius:11px;padding:10px 14px;font-weight:900;color:#555}
.activity.active{background:#111;color:#fff}

header{height:62px;border:1px solid var(--line);background:#fff;border-radius:21px;padding:8px 12px;display:flex;align-items:center;justify-content:space-between}
.cats{display:flex;gap:7px;overflow:auto}.cat{border:0;background:#eee;border-radius:12px;padding:10px 16px;font-weight:750;white-space:nowrap}.cat.active{background:#111;color:#fff}
.round{width:43px;height:43px;border:0;border-radius:13px;background:#eee;font-size:22px}
.body{min-height:0;flex:1;display:grid;grid-template-columns:minmax(0,1fr) 375px;gap:10px}
.catalog{overflow:auto;background:#fff;border:2px solid var(--accent-strong);border-radius:25px;padding:17px;box-shadow:0 18px 42px rgba(0,0,0,.05);transition:border-color .2s}
.catalog::-webkit-scrollbar{width:0}.items::-webkit-scrollbar{width:7px}.items::-webkit-scrollbar-track{background:transparent}.items::-webkit-scrollbar-thumb{background:#c7c7c3;border-radius:10px}.items{scrollbar-width:thin;scrollbar-color:#c7c7c3 transparent}
.titlebar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.titlebar h1{font-size:27px;margin:0;letter-spacing:-1px}
.titlebar input{border:1px solid var(--line);background:#f7f7f5;border-radius:13px;padding:11px 13px;width:240px;outline:none}
.grid{display:grid;grid-template-columns:repeat(6,minmax(82px,1fr));gap:8px}
.product{border:1px solid var(--line);background:#fff;border-radius:14px;overflow:hidden;text-align:left;padding:0;min-height:78px;position:relative}
.product:active{transform:scale(.98)}
.visual{height:38px;display:grid;place-items:center;background:#f0f0ed;font-size:19px;font-weight:900}
.visual.dark{background:#202020;color:#fff}.visual.frame{background:#eee3d8}.visual.album{background:#55514c;color:#fff}
.pi{padding:7px 8px 8px}.pn{font-weight:850;font-size:11px;line-height:1.08;min-height:24px}.pp{margin-top:4px;font-weight:900;font-size:12px}
.active-dot{position:absolute;top:5px;right:5px;width:8px;height:8px;border-radius:50%;background:var(--accent-strong);box-shadow:0 0 0 2px rgba(255,255,255,.8)}

.cart{background:#ececea;border:2px solid var(--accent-strong);border-radius:25px;padding:14px;display:flex;flex-direction:column;min-height:0;box-shadow:0 18px 42px rgba(0,0,0,.05);transition:border-color .2s}
.carthead{display:flex;justify-content:space-between;align-items:center;padding:0 3px 6px}.carthead span,.sheethead span{font-size:10px;color:#777;font-weight:850;letter-spacing:.08em}
.carthead h2,.sheethead h2{margin:2px 0 0;font-size:21px}.carthead button{border:0;background:transparent;text-decoration:underline;font-weight:800}
.items{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:5px;padding-right:3px}
.empty{height:100%;min-height:180px;display:grid;place-items:center;text-align:center;color:#888}
.row{background:#fff;border-radius:12px;padding:6px 7px;display:grid;grid-template-columns:7px 28px 1fr auto;gap:6px;align-items:center}
.owner-bar{width:7px;height:100%;min-height:34px;border-radius:7px;background:#ccc}
.qty{width:27px;height:27px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;font-weight:850;font-size:11px}
.row-main{min-width:0}.row-title{font-weight:850;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-owner{font-size:9px;font-weight:800;margin-top:1px}
.row-price{font-size:11px;font-weight:850;text-align:right}.controls{display:flex;gap:3px;margin-top:3px;justify-content:flex-end}.controls button{border:0;height:22px;min-width:22px;border-radius:7px;background:#efefed;font-weight:850;padding:0 5px;font-size:11px}
.pack-details{margin-top:4px;border-top:1px solid #eee;padding-top:3px}.pack-detail{font-size:8.5px;font-weight:750;margin:1px 0;display:flex;align-items:center;gap:4px}
.pack-dot{width:6px;height:6px;border-radius:50%;display:inline-block}
.gift-badge,.discount-badge{display:inline-block;border-radius:8px;padding:2px 5px;font-size:9px;font-weight:900;margin-left:4px}
.gift-badge{background:#e9e4ff;color:#53468c}.discount-badge{background:#fff0c8;color:#745d13}
.cart-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:6px}.secondary-action{border:0;background:#fff;border-radius:10px;padding:8px;font-weight:800;color:#555;font-size:11px}
.notetext{font-size:11px;color:#666;padding:3px 5px}
.totals{padding:6px 3px}.totals div{display:flex;justify-content:space-between;font-size:12px;color:#666;margin:5px 0}.totals .grand{border-top:1px solid #d2d2cf;padding-top:8px;margin-top:7px;font-size:17px;color:#111}.discount-line strong{color:#9a5a00}
.checkout{min-height:54px;border:0;border-radius:16px;background:#111;color:#fff;padding:0 17px;display:flex;align-items:center;justify-content:space-between;font-weight:850;font-size:17px}.checkout strong{font-size:20px}.checkout:disabled{opacity:.3}

.modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.28);backdrop-filter:blur(5px);align-items:center;justify-content:center;padding:25px;z-index:20}.modal.show{display:flex}
.sheet{width:min(700px,92vw);background:#fff;border-radius:28px;padding:22px;box-shadow:0 32px 80px rgba(0,0,0,.25)}
.pack-sheet{width:min(820px,94vw)}.small-sheet{width:min(500px,90vw)}
.sheethead{display:flex;justify-content:space-between;align-items:start}.close{border:0;width:43px;height:43px;border-radius:50%;background:#eee;font-size:24px}
.pack-progress{margin:17px 0 15px;padding:12px 14px;border-radius:14px;background:#f1f1ef;display:flex;justify-content:space-between;gap:10px}.pack-progress span{font-size:12px;color:#777}
.pack-selector{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:end}.pack-selector label{display:block;font-size:11px;font-weight:850;color:#777;margin-bottom:7px}
.pack-photographers{flex-wrap:wrap}.pack-activities{background:#eee}.add-pack-photo{width:100%;margin:15px 0 10px;border:0;border-radius:15px;background:#111;color:#fff;padding:14px;font-weight:900}
.pack-lines{display:grid;grid-template-columns:1fr 1fr;gap:7px;max-height:260px;overflow:auto}.pack-line{border:1px solid var(--line);border-radius:13px;padding:10px;display:flex;align-items:center;justify-content:space-between}.pack-line-left{display:flex;align-items:center;gap:8px}.pack-line-dot{width:12px;height:12px;border-radius:50%}.pack-line b{font-size:13px}.pack-line small{display:block;color:#777;margin-top:2px}.pack-line button{border:0;background:#eee;border-radius:8px;width:28px;height:28px}
.pack-footer{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}.ghost,.primary{border:0;border-radius:13px;padding:12px 18px;font-weight:850}.ghost{background:#eee}.primary{background:#111;color:#fff}.primary:disabled{opacity:.3}
.line-actions,.discount-buttons{display:grid;gap:9px;margin-top:18px}.line-actions button,.discount-buttons button{border:1px solid var(--line);background:#f7f7f5;border-radius:14px;padding:14px;text-align:left;font-weight:850}
.payments{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:18px}.payments button{min-height:120px;border:1px solid var(--line);border-radius:18px;background:#f7f7f5;padding:18px;display:flex;flex-direction:column;align-items:flex-start;font-size:28px}.payments b{font-size:17px;margin-top:6px}
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);background:#111;color:#fff;border-radius:13px;padding:11px 17px;font-weight:750;opacity:0;transition:.2s;z-index:50}.toast.show{opacity:1;transform:translate(-50%,0)}

@media(max-width:1100px){
  .app{grid-template-columns:76px 1fr;padding:8px;gap:8px}.body{grid-template-columns:minmax(0,1fr) 335px;gap:8px}
  .grid{grid-template-columns:repeat(6,minmax(78px,1fr))}.catalog{padding:14px}.cat{padding:10px 12px}
  .active-banner{min-height:84px;padding:10px 12px}.active-label strong{font-size:19px}.photographer{padding:9px 12px}
}

.discount-cancel{
  border:1px solid #d9d9d5!important;
  background:#fff!important;
  color:#555!important;
  text-align:center!important;
}
.discount-remove{
  border:1px solid #efc6c6!important;
  background:#fff0f0!important;
  color:#9b3535!important;
  text-align:center!important;
}
.secondary-action.has-discount{
  background:#fff0c8;
  color:#745d13;
}

.items::after{
  content:"";
  display:block;
  flex:0 0 1px;
}


/* V0.3 - Packs construits depuis les articles */
.pack-summary{
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:16px 0 10px
}
.pack-summary>div{
  background:#f3f3f1;border-radius:13px;padding:10px 12px
}
.pack-summary span,.normal-price-line span,.final-pack-price span{
  display:block;font-size:9px;letter-spacing:.07em;font-weight:900;color:#777
}
.pack-summary strong{display:block;font-size:16px;margin-top:3px}
.pack-summary .pack-saving{background:#e8f4e8}
.pack-summary .pack-saving strong{color:#3f7044}
.admin-sheet{width:min(1050px,96vw);max-height:92vh;overflow:hidden}
.admin-layout{display:grid;grid-template-columns:310px 1fr;gap:14px;margin-top:16px;min-height:520px}
.pack-list-panel,.pack-editor{background:#f5f5f3;border-radius:18px;padding:14px;min-height:0}
.pack-list-panel{display:flex;flex-direction:column}
.admin-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
.mini-primary{
  border:0;background:#111;color:#fff;border-radius:10px;padding:8px 10px;font-size:11px;font-weight:850
}
.admin-pack-list{display:flex;flex-direction:column;gap:6px;overflow:auto;min-height:0}
.admin-pack-card{
  border:1px solid #ddd;background:#fff;border-radius:12px;padding:10px;text-align:left
}
.admin-pack-card.active{border:2px solid #111;padding:9px}
.admin-pack-card b{font-size:12px}
.admin-pack-card small{display:block;color:#777;margin-top:3px;font-size:10px}
.pack-editor{overflow:auto}
.field{margin-bottom:13px}
.field label{display:block;font-size:11px;font-weight:850;color:#666;margin-bottom:5px}
.field input,.field select,.component-add select,.component-add input{
  width:100%;border:1px solid #d9d9d5;background:#fff;border-radius:11px;padding:10px;outline:none
}
.component-add{display:grid;grid-template-columns:1fr 80px auto;gap:7px}
.admin-components{display:flex;flex-direction:column;gap:5px;margin-top:8px}
.admin-component{
  background:#fff;border:1px solid #ddd;border-radius:10px;padding:8px 9px;display:grid;
  grid-template-columns:1fr auto auto;align-items:center;gap:8px
}
.admin-component b{font-size:11px}.admin-component small{font-size:10px;color:#777}
.admin-component button{border:0;background:#eee;border-radius:8px;width:27px;height:27px}
.pack-price-box{border:1px solid #ddd;background:#fff;border-radius:15px;padding:13px}
.normal-price-line,.final-pack-price{display:flex;align-items:center;justify-content:space-between;padding:4px 0}
.normal-price-line strong,.final-pack-price strong{font-size:17px}
.price-mode{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:11px 0}
.price-mode label{
  background:#f2f2f0;border-radius:10px;padding:9px;font-size:10px;font-weight:800
}
.final-pack-price{border-top:1px solid #ddd;margin-top:10px;padding-top:10px}
.admin-footer{display:flex;justify-content:space-between;gap:10px;margin-top:14px}
.danger{border:0;background:#fff0f0;color:#9b3535;border-radius:13px;padding:12px 17px;font-weight:850}
.next-component{
  margin-top:5px;font-size:11px;font-weight:850;color:#444
}
@media(max-width:1000px){
  .admin-layout{grid-template-columns:250px 1fr}
}


/* V0.3.1 — panier à hauteur verrouillée */
main{
  min-height:0!important;
  overflow:hidden;
}
.body{
  min-height:0!important;
  height:0;
  overflow:hidden;
}
.cart{
  height:100%;
  min-height:0!important;
  overflow:hidden;
}
.carthead,
.cart-actions,
.notetext,
.totals,
.checkout{
  flex:0 0 auto;
}

/* Zone articles seule défilable */
.items-wrap{
  position:relative;
  flex:1 1 0;
  min-height:0;
  overflow:hidden;
  padding-right:12px;
}
.items{
  position:absolute;
  inset:0 12px 0 0;
  min-height:0!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding-right:2px;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.items .row{
  flex:0 0 auto!important;
}

/* Scrollbar native, visible sur navigateurs desktop */
.items{
  scrollbar-width:auto!important;
  scrollbar-color:#a9a9a4 #deded9!important;
}
.items::-webkit-scrollbar{
  width:10px!important;
}
.items::-webkit-scrollbar-track{
  background:#deded9!important;
  border-radius:10px;
}
.items::-webkit-scrollbar-thumb{
  background:#9f9f99!important;
  border-radius:10px;
  border:2px solid #deded9;
}

/* Barre personnalisée toujours visible, y compris sur iPad */
.cart-scrollbar{
  position:absolute;
  top:2px;
  right:1px;
  bottom:2px;
  width:7px;
  background:#d7d7d2;
  border-radius:8px;
  opacity:.65;
  pointer-events:none;
}
.cart-scroll-thumb{
  position:absolute;
  top:0;
  left:0;
  width:7px;
  min-height:30px;
  border-radius:8px;
  background:#85857f;
  transition:height .08s linear, transform .05s linear, opacity .15s;
}
.cart-scrollbar.not-scrollable{
  opacity:.18;
}
.cart-scrollbar.not-scrollable .cart-scroll-thumb{
  height:100%!important;
  transform:translateY(0)!important;
  opacity:.3;
}


/* V0.3.2 — une seule barre de défilement dans le panier */
/* Safari / Chrome / Edge : masquer complètement la scrollbar native */
.items{
  scrollbar-width:none!important;
  -ms-overflow-style:none!important;
}
.items::-webkit-scrollbar{
  width:0!important;
  height:0!important;
  display:none!important;
}
.items::-webkit-scrollbar-track,
.items::-webkit-scrollbar-thumb{
  display:none!important;
  background:transparent!important;
}

/* On conserve uniquement notre indicateur personnalisé */
.cart-scrollbar{
  right:2px;
  width:7px;
  background:#d3d3cf;
  opacity:.72;
}
.cart-scroll-thumb{
  width:7px;
  background:#85857f;
}


/* V0.4 — Encaissement */
.payment-sheet{width:min(760px,94vw)}
.payment-home{margin-top:18px}
.payments{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.pay-choice{
  min-height:135px;border:1px solid var(--line);border-radius:20px;background:#f7f7f5;
  display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:20px
}
.pay-choice:active{transform:scale(.985)}
.pay-symbol{font-size:34px}
.pay-choice b{font-size:18px;margin-top:8px}

.payment-screen{margin-top:16px}
.payment-title{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.payment-title>div{display:flex;flex-direction:column}
.payment-title span{font-size:10px;font-weight:900;letter-spacing:.08em;color:#777}
.payment-title strong{font-size:28px;margin-top:2px}
.payment-back{
  width:44px;height:44px;border:0;border-radius:50%;background:#eee;font-size:30px;line-height:1
}
.terminal-status{
  min-height:240px;border-radius:20px;background:#f5f5f3;display:flex;flex-direction:column;
  align-items:center;justify-content:center;text-align:center;padding:25px
}
.terminal-icon{font-size:55px;margin-bottom:10px}
.terminal-status strong{font-size:20px}
.terminal-status span{font-size:12px;color:#777;max-width:390px;margin-top:7px;line-height:1.4}

.validate-payment{
  width:100%;border:0;background:#111;color:#fff;border-radius:16px;min-height:58px;
  margin-top:13px;font-weight:900;font-size:16px
}
.validate-payment:disabled{opacity:.28}

.cash-layout{display:grid;grid-template-columns:1fr 300px;gap:14px}
.cash-left{background:#f5f5f3;border-radius:19px;padding:17px}
.cash-left label,.cheque-box label{
  display:block;font-size:11px;font-weight:850;color:#666;margin-bottom:6px
}
.amount-display{
  background:#fff;border:1px solid #ddd;border-radius:15px;padding:13px 15px;font-weight:900;
  font-size:30px;text-align:right
}
.quick-cash{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin-top:10px}
.quick-cash button{
  border:1px solid #ddd;background:#fff;border-radius:12px;padding:10px;font-weight:850
}
.quick-cash button:first-child{grid-column:1/-1}
.change-box{
  display:flex;justify-content:space-between;align-items:center;margin-top:12px;border-radius:14px;
  background:#e8f4e8;padding:12px 14px
}
.change-box span{font-size:12px;font-weight:800;color:#55715a}
.change-box strong{font-size:22px;color:#3b6940}

.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.keypad button{
  border:1px solid #ddd;background:#f7f7f5;border-radius:15px;min-height:67px;
  font-size:22px;font-weight:850
}
.keypad button:active{background:#e9e9e6}

.cheque-box{
  background:#f5f5f3;border-radius:19px;padding:18px;display:grid;gap:8px
}
.cheque-box input{
  border:1px solid #ddd;background:#fff;border-radius:13px;padding:13px 14px;font-size:16px;outline:none
}
.cheque-box label:not(:first-child){margin-top:8px}
.cheque-box small{font-weight:500}

.mixed-summary{
  display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px
}
.mixed-summary>div{
  background:#f3f3f1;border-radius:14px;padding:11px
}
.mixed-summary span{
  display:block;font-size:9px;font-weight:900;color:#777;letter-spacing:.06em
}
.mixed-summary strong{display:block;font-size:18px;margin-top:4px}
.mixed-summary .mixed-remaining{background:#fff0c8}
.mixed-entry{
  display:grid;grid-template-columns:1fr 150px auto;gap:8px;margin-bottom:10px
}
.mixed-entry select,.mixed-entry input{
  border:1px solid #ddd;background:#fff;border-radius:12px;padding:11px;outline:none
}
.mixed-lines{display:flex;flex-direction:column;gap:6px;max-height:220px;overflow:auto}
.mixed-line{
  display:grid;grid-template-columns:1fr auto auto;gap:9px;align-items:center;
  background:#f5f5f3;border-radius:12px;padding:9px 11px
}
.mixed-line b{font-size:12px}.mixed-line strong{font-size:13px}
.mixed-line button{border:0;background:#e6e6e2;border-radius:8px;width:28px;height:28px}

.done-sheet{width:min(430px,90vw);text-align:center;padding:30px}
.done-icon{
  width:74px;height:74px;border-radius:50%;background:#e2f3e4;color:#3e7445;
  display:grid;place-items:center;font-size:40px;font-weight:900;margin:0 auto 13px
}
.done-sheet>span{font-size:10px;font-weight:900;letter-spacing:.08em;color:#777}
.done-sheet h2{font-size:35px;margin:5px 0 3px}
.done-sheet p{margin:0;color:#666;font-weight:700}
.done-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:22px}

@media(max-width:900px){
  .cash-layout{grid-template-columns:1fr 260px}
}

/* V0.4.1 — encaissements multiples */
.mixed-method-buttons{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
  margin-bottom:9px;
}
.mixed-method{
  border:1px solid #ddd;
  background:#f4f4f2;
  border-radius:12px;
  padding:11px 8px;
  font-weight:900;
}
.mixed-method.active{
  background:#111;
  color:#fff;
  border-color:#111;
}
.mixed-entry{
  grid-template-columns:1fr auto auto!important;
}
.fill-remaining{
  border:1px solid #ddd;
  background:#fff;
  border-radius:12px;
  padding:0 12px;
  font-weight:850;
}
.mixed-help{
  margin-top:8px;
  font-size:10px;
  color:#777;
  text-align:center;
}
.method-badge{
  display:flex;
  align-items:center;
  gap:6px;
}


/* V0.5 — vues Tickets et Caisse */
.app-view{display:none;min-height:0;height:100%;overflow:hidden}
.app-view.active-view{display:flex;flex-direction:column;gap:10px}
.module-page{
  height:100%;min-height:0;background:#fff;border:1px solid var(--line);border-radius:26px;
  padding:18px;display:flex;flex-direction:column;overflow:hidden;
}
.module-head{
  flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:14px
}
.module-head h1{font-size:30px;margin:2px 0 0}
.module-actions{display:flex;gap:8px;align-items:center}
.module-actions input{
  border:1px solid #ddd;background:#f7f7f5;border-radius:12px;padding:10px 12px;min-width:240px;outline:none
}
.primary-small{
  border:0;background:#111;color:#fff;border-radius:12px;padding:10px 14px;font-weight:850
}
.tickets-layout{flex:1;min-height:0;display:grid;grid-template-columns:360px 1fr;gap:12px}
.tickets-list-panel{
  min-height:0;background:#f2f2ef;border-radius:18px;padding:10px;display:flex;flex-direction:column
}
.tickets-summary{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:8px}
.tickets-summary>div{background:#fff;border-radius:12px;padding:9px}
.tickets-summary span{display:block;font-size:9px;font-weight:850;color:#777}
.tickets-summary strong{display:block;font-size:18px;margin-top:3px}
.tickets-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:6px}
.ticket-card{
  border:1px solid #ddd;background:#fff;border-radius:12px;padding:9px 10px;text-align:left
}
.ticket-card.active{border:2px solid #111;padding:8px 9px}
.ticket-card-top{display:flex;justify-content:space-between;gap:8px}
.ticket-card b{font-size:12px}.ticket-card strong{font-size:12px}
.ticket-card small{display:block;color:#777;font-size:9px;margin-top:3px}
.ticket-detail{
  min-height:0;background:#f7f7f5;border-radius:18px;padding:16px;overflow:auto
}
.empty-ticket-detail{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#888}
.empty-ticket-detail div{font-size:45px}.empty-ticket-detail strong{margin-top:8px}
.ticket-paper{
  width:min(520px,100%);margin:0 auto;background:#fff;border:1px solid #ddd;border-radius:16px;padding:20px
}
.ticket-paper-head{text-align:center;border-bottom:1px dashed #bbb;padding-bottom:12px;margin-bottom:12px}
.ticket-paper-head h2{margin:3px 0;font-size:20px}
.ticket-meta{font-size:10px;color:#777}
.ticket-lines{display:flex;flex-direction:column;gap:8px}
.ticket-line{display:grid;grid-template-columns:1fr auto;gap:10px;font-size:11px}
.ticket-line small{display:block;color:#777;margin-top:2px}
.ticket-total{
  display:flex;justify-content:space-between;border-top:1px dashed #bbb;margin-top:13px;padding-top:12px;font-size:18px;font-weight:900
}
.ticket-payments{margin-top:12px;border-top:1px dashed #bbb;padding-top:10px}
.ticket-payment{display:flex;justify-content:space-between;font-size:11px;margin:4px 0}

.cash-dashboard{
  flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:1fr 1fr;gap:12px;align-content:start
}
.cash-card{
  background:#f5f5f3;border-radius:18px;padding:15px;border:1px solid #e4e4e1
}
.cash-card.wide{grid-column:1/-1}
.cash-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cash-card h2{margin:2px 0 0;font-size:20px}
.cash-date{font-size:11px;color:#777;font-weight:750}
.opening-row{display:grid;grid-template-columns:220px auto;gap:10px;align-items:end;margin-top:13px}
.opening-row .field{margin:0}
.session-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:13px}
.session-actions button{
  border:1px solid #ddd;background:#fff;border-radius:12px;padding:11px;font-weight:850
}
.session-actions .danger{background:#fff0f0;color:#9b3535;border:0}
.metric-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.metric-grid>div{background:#fff;border-radius:12px;padding:10px}
.metric-grid span{display:block;font-size:10px;color:#777;font-weight:850}
.metric-grid strong{display:block;font-size:19px;margin-top:3px}
.cash-balance-big{font-size:35px;font-weight:900;margin:10px 0}
.cash-breakdown{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.cash-breakdown>div{background:#fff;border-radius:10px;padding:8px}
.cash-breakdown span{display:block;font-size:9px;color:#777}.cash-breakdown strong{font-size:12px}
.cash-movements{display:flex;flex-direction:column;gap:6px;margin-top:10px;max-height:210px;overflow:auto}
.cash-move{
  display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;background:#fff;border-radius:11px;padding:8px 10px
}
.cash-move b{font-size:11px}.cash-move small{font-size:9px;color:#777}.cash-move strong{font-size:12px}
.placeholder-page{align-items:center;justify-content:center;text-align:center}
.placeholder-icon{font-size:50px}.placeholder-page p{color:#777;margin:8px 0 16px}

.report-sheet{width:min(600px,92vw)}
.report-content{margin-top:15px}
.report-section{background:#f5f5f3;border-radius:14px;padding:12px;margin-top:8px}
.report-section h3{font-size:12px;margin:0 0 8px}
.report-line{display:flex;justify-content:space-between;font-size:11px;margin:5px 0}
.report-line.total{font-size:15px;font-weight:900;border-top:1px solid #ddd;padding-top:8px;margin-top:8px}
.close-cash-form{margin-top:15px}
.close-cash-form label{display:block;font-size:11px;font-weight:850;color:#666;margin-bottom:6px}
.close-cash-form input{
  width:100%;border:1px solid #ddd;border-radius:13px;padding:13px;font-size:20px;text-align:right
}
.close-preview{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.close-preview>div{background:#f5f5f3;border-radius:12px;padding:10px}
.close-preview span{display:block;font-size:9px;color:#777}.close-preview strong{display:block;font-size:18px;margin-top:3px}
.danger-full{width:100%;border:0;background:#9b3535;color:#fff;border-radius:14px;padding:13px;font-weight:900}

@media(max-width:1050px){
  .tickets-layout{grid-template-columns:320px 1fr}
  .session-actions{grid-template-columns:1fr 1fr}
}


/* V0.5.1 — navigation d'encaissement toujours accessible */
.payment-method-tabs{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:7px;
  margin:14px 0 8px;
}
.payment-tab{
  border:1px solid #ddd;
  background:#f3f3f1;
  border-radius:12px;
  padding:10px 7px;
  font-size:12px;
  font-weight:900;
}
.payment-tab.active{
  background:#111;
  color:#fff;
  border-color:#111;
}
.payment-screen[hidden],
.payment-home[hidden]{
  display:none!important;
}
.payment-screen:not([hidden]),
.payment-home:not([hidden]){
  display:block;
}


/* V0.5.2 — paiement mixte ultra rapide */
.mixed-fast-entry{
  background:#f5f5f3;
  border-radius:16px;
  padding:13px;
  margin-bottom:10px;
}
.mixed-fast-entry>label{
  display:block;
  font-size:10px;
  font-weight:900;
  color:#666;
  margin-bottom:6px;
}
.mixed-amount-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
}
.mixed-amount-row input{
  border:1px solid #d8d8d4;
  background:#fff;
  border-radius:13px;
  padding:12px 14px;
  font-size:22px;
  font-weight:900;
  text-align:right;
  outline:none;
}
.mixed-direct-buttons{
  margin-top:9px;
  margin-bottom:0;
}
.mixed-method-direct{
  border:1px solid #ddd;
  background:#fff;
  border-radius:13px;
  min-height:55px;
  font-size:14px;
  font-weight:900;
}
.mixed-method-direct:active{
  transform:scale(.98);
  background:#111;
  color:#fff;
}


/* V0.6 — ombre portée sous les vignettes + stats photographe */
.product{
  box-shadow:0 8px 18px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
}
.product:hover{
  box-shadow:0 12px 24px rgba(0,0,0,.11), 0 3px 7px rgba(0,0,0,.05);
}
.product:active{
  box-shadow:0 5px 10px rgba(0,0,0,.08), 0 2px 3px rgba(0,0,0,.04);
}

.photographer-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}
.photographer-card{
  background:#fff;
  border:1px solid #ddd;
  border-radius:14px;
  padding:12px;
}
.photographer-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.photographer-id{
  display:flex;
  align-items:center;
  gap:8px;
}
.photographer-dot{
  width:12px;
  height:12px;
  border-radius:50%;
  flex:0 0 auto;
}
.photographer-card b{
  font-size:14px;
}
.photographer-total{
  font-size:18px;
  font-weight:900;
}
.photographer-breakdown{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}
.photographer-breakdown>div{
  background:#f5f5f3;
  border-radius:10px;
  padding:8px;
}
.photographer-breakdown span{
  display:block;
  font-size:9px;
  color:#777;
  font-weight:850;
}
.photographer-breakdown strong{
  display:block;
  font-size:14px;
  margin-top:3px;
}
.photographer-empty{
  font-size:11px;
  color:#777;
  padding:10px;
  background:#fff;
  border-radius:12px;
  border:1px solid #ddd;
}

.ticket-subbreak{
  margin-top:8px;
  padding-top:7px;
  border-top:1px dashed #ddd;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.ticket-subline{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:10px;
  color:#555;
}
.ticket-subline span:first-child{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media(max-width:1050px){
  .photographer-stats{
    grid-template-columns:1fr;
  }
}


/* V0.7 — paramètres photographes & commissions */
.settings-tabs{
  display:flex;
  gap:7px;
  margin:14px 0 10px;
}
.settings-tab{
  border:0;
  background:#ededeb;
  border-radius:12px;
  padding:10px 14px;
  font-weight:850;
}
.settings-tab.active{
  background:#111;
  color:#fff;
}
.settings-pane{display:none;min-height:0}
.settings-pane.active{display:block}

.commission-admin-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:8px 0 10px;
}
.commission-admin-head h3{
  margin:2px 0 0;
  font-size:20px;
}
.commission-help{
  background:#f5f5f3;
  border-radius:12px;
  padding:10px 12px;
  font-size:11px;
  color:#666;
  line-height:1.4;
}
.commission-admin-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.commission-admin-card{
  background:#f5f5f3;
  border:1px solid #e0e0dc;
  border-radius:15px;
  padding:12px;
}
.commission-admin-title{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
}
.commission-admin-title .photographer-dot{
  width:14px;height:14px;
}
.commission-admin-title strong{
  font-size:15px;
}
.commission-rate-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.commission-rate-grid label{
  display:block;
  font-size:10px;
  color:#666;
  font-weight:850;
}
.commission-rate-grid input{
  width:100%;
  margin-top:4px;
  border:1px solid #d5d5d1;
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
  text-align:right;
  font-weight:850;
}
.commission-day-total{
  background:#fff;
  border:1px solid #ddd;
  border-radius:12px;
  padding:8px 11px;
  text-align:right;
}
.commission-day-total span{
  display:block;
  font-size:8px;
  letter-spacing:.06em;
  font-weight:900;
  color:#777;
}
.commission-day-total strong{
  display:block;
  font-size:18px;
  margin-top:2px;
}

.photographer-commission{
  margin-top:8px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#111;
  color:#fff;
  border-radius:10px;
  padding:8px 9px;
}
.photographer-commission span{
  font-size:9px;
  font-weight:850;
  opacity:.75;
}
.photographer-commission strong{
  font-size:15px;
}
.rate-caption{
  font-size:8px!important;
  color:#888!important;
  margin-top:2px!important;
}

@media(max-width:900px){
  .commission-admin-grid{grid-template-columns:1fr}
}


/* V0.8 — statistiques */
.stats-head{margin-bottom:10px}
.stats-toolbar{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.period-buttons{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.period-btn{
  border:0;
  background:#ececea;
  border-radius:11px;
  padding:9px 12px;
  font-weight:850;
  font-size:11px;
}
.period-btn.active{
  background:#111;
  color:#fff;
}
.custom-period{
  display:flex;
  align-items:center;
  gap:7px;
}
.custom-period label{
  font-size:10px;
  font-weight:850;
  color:#666;
}
.custom-period input{
  margin-left:4px;
  border:1px solid #ddd;
  background:#fff;
  border-radius:9px;
  padding:7px 8px;
}
.stats-content{
  flex:1;
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.stats-kpis{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:9px;
}
.kpi-card{
  background:#f5f5f3;
  border:1px solid #e1e1dd;
  border-radius:15px;
  padding:12px;
}
.kpi-card span{
  display:block;
  font-size:9px;
  letter-spacing:.06em;
  font-weight:900;
  color:#777;
}
.kpi-card strong{
  display:block;
  font-size:22px;
  margin-top:5px;
}
.stats-card{
  background:#f5f5f3;
  border:1px solid #e1e1dd;
  border-radius:17px;
  padding:14px;
}
.stats-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.stats-card-head h2{
  margin:2px 0 0;
  font-size:19px;
}
.stats-period-label{
  font-size:10px;
  color:#777;
  font-weight:800;
}
.stats-photographers{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.stats-photo-card{
  background:#fff;
  border:1px solid #ddd;
  border-radius:13px;
  padding:10px;
}
.stats-photo-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.stats-photo-name{
  display:flex;
  align-items:center;
  gap:7px;
}
.stats-photo-name strong{
  font-size:13px;
}
.stats-photo-total{
  font-size:16px;
  font-weight:900;
}
.stats-photo-grid{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:6px;
  margin-top:8px;
}
.stats-photo-grid>div{
  background:#f5f5f3;
  border-radius:9px;
  padding:7px;
}
.stats-photo-grid span{
  display:block;
  font-size:8px;
  color:#777;
  font-weight:850;
}
.stats-photo-grid strong{
  display:block;
  margin-top:2px;
  font-size:12px;
}
.activity-stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}
.activity-stat-card{
  background:#fff;
  border:1px solid #ddd;
  border-radius:13px;
  padding:12px;
}
.activity-stat-card span{
  display:block;
  font-size:10px;
  font-weight:900;
  color:#777;
}
.activity-stat-card strong{
  display:block;
  font-size:24px;
  margin-top:3px;
}
.activity-stat-card small{
  display:block;
  margin-top:4px;
  color:#666;
  font-weight:750;
}
.stats-empty{
  grid-column:1/-1;
  background:#fff;
  border-radius:12px;
  padding:12px;
  color:#777;
  font-size:11px;
}

@media(max-width:1050px){
  .stats-kpis{grid-template-columns:1fr 1fr}
  .stats-photographers{grid-template-columns:1fr}
}


/* V0.8.1 — encaissements colorés + virement */
.payment-method-tabs{
  grid-template-columns:repeat(5,1fr);
}
.payments{
  grid-template-columns:repeat(3,1fr);
}
.pay-choice{
  min-height:112px;
}
.transfer-status{
  border:1px solid #ddd;
  background:#f0eafb;
  color:#61477f;
  border-radius:12px;
  padding:11px 12px;
  font-size:11px;
  font-weight:800;
}
.mixed-direct-buttons{
  grid-template-columns:repeat(4,1fr)!important;
}

.payment-metrics{
  grid-template-columns:repeat(5,1fr)!important;
}
.metric-card{
  border:1px solid rgba(0,0,0,.05);
}
.metric-cb{background:#dfeafa!important}
.metric-cash{background:#dff1e2!important}
.metric-cheque{background:#f8edca!important}
.metric-transfer{background:#ebe1f7!important}
.metric-total{
  background:#222!important;
  color:#fff!important;
}
.metric-total span{color:#cfcfcf!important}
.metric-total strong{color:#fff!important}

.activity-stat-card.activity-stop{
  background:#e5f1df;
}
.activity-stat-card.activity-filmage{
  background:#e2eaf8;
}

@media(max-width:1050px){
  .payment-metrics{
    grid-template-columns:repeat(3,1fr)!important;
  }
}


/* V0.8.2 — Activités neutres, couleur réservée au chiffre d'affaires */
.activity-stat-card{
  background:#fff!important;
  border:1px solid #ddd!important;
}
.activity-stat-card span{
  color:#666!important;
}
.activity-stat-card small{
  color:#777!important;
}

/* Mise en valeur du chiffre d'affaires uniquement */
#statsStopCA{
  display:inline-block;
  background:#e3f1e3;
  color:#3f6f45;
  border-radius:10px;
  padding:6px 10px;
}
#statsFilmageCA{
  display:inline-block;
  background:#e2ebf8;
  color:#355d87;
  border-radius:10px;
  padding:6px 10px;
}

/* Neutraliser les anciennes couleurs éventuelles */
.activity-stat-card.activity-stop,
.activity-stat-card.activity-filmage{
  background:#fff!important;
}


/* V0.8.3 — Statistiques : couleur uniquement sur le chiffre d'affaires */
#statsStopCA,
#statsFilmageCA{
  background:transparent!important;
  color:#111!important;
  border-radius:0!important;
  padding:0!important;
  display:block!important;
}

/* Les cartes STOP / FILMAGE restent totalement neutres */
.activity-stat-card,
.activity-stat-card.activity-stop,
.activity-stat-card.activity-filmage{
  background:#fff!important;
  border:1px solid #ddd!important;
}
.activity-stat-card span,
.activity-stat-card small{
  color:#666!important;
}
.activity-stat-card strong{
  color:#111!important;
}

/* Mise en couleur du chiffre d'affaires principal */
.kpi-card:first-child{
  background:#e8f3e8!important;
  border-color:#d3e6d4!important;
}
#statsCA{
  color:#3d7144!important;
}

/* Mise en couleur des montants de CA par photographe */
.stats-photo-total{
  display:inline-block;
  background:#e7eef9;
  color:#355d87!important;
  border-radius:10px;
  padding:5px 10px;
}

/* Garder les blocs internes STOP / FILMAGE / COMMISSION des photographes neutres */
.stats-photo-grid > div{
  background:#f5f5f3!important;
}


/* V0.9 — statut Gérant / Commissionné */
.photographer-status-row{
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
  margin-bottom:10px;
}
.photographer-status-row label{
  display:block;
  font-size:10px;
  color:#666;
  font-weight:850;
}
.photographer-status-row select{
  width:100%;
  margin-top:4px;
  border:1px solid #d5d5d1;
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
  font-weight:850;
}
.owner-note{
  background:#e8f3e8;
  color:#3d6642;
  border-radius:10px;
  padding:9px 10px;
  font-size:10px;
  font-weight:800;
  margin-top:8px;
}
.commission-rate-grid.owner-disabled{
  opacity:.35;
  pointer-events:none;
}
.owner-badge{
  display:inline-block;
  margin-left:7px;
  padding:3px 7px;
  border-radius:8px;
  background:#111;
  color:#fff;
  font-size:8px;
  font-weight:900;
  vertical-align:middle;
}
.staff-badge{
  display:inline-block;
  margin-left:7px;
  padding:3px 7px;
  border-radius:8px;
  background:#efefed;
  color:#555;
  font-size:8px;
  font-weight:900;
  vertical-align:middle;
}
.owner-ca-box{
  margin-top:8px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#e8f3e8;
  color:#315b37;
  border-radius:10px;
  padding:8px 9px;
}
.owner-ca-box span{
  font-size:9px;
  font-weight:850;
}
.owner-ca-box strong{
  font-size:15px;
}
.accounting-note{
  margin-top:10px;
  background:#fff;
  border:1px dashed #cfcfca;
  border-radius:11px;
  padding:9px 10px;
  font-size:9px;
  line-height:1.4;
  color:#666;
}

/* V0.9.1 — indépendants / prestataires */
.independent-badge{
  display:inline-block;
  margin-left:7px;
  padding:3px 7px;
  border-radius:8px;
  background:#eef1f5;
  color:#46515f;
  font-size:8px;
  font-weight:900;
  vertical-align:middle;
}
.invoice-note{
  margin-top:8px;
  background:#f4f1e8;
  color:#665b3f;
  border-radius:10px;
  padding:9px 10px;
  font-size:10px;
  font-weight:800;
}
.accounting-account{
  margin-top:6px;
  font-size:9px;
  color:#777;
}


/* =========================================================
   V0.10 — Fournisseurs / indépendants / factures reçues
   ========================================================= */

.neutral-small{background:#ececea!important;color:#333!important}
.suppliers-page{min-height:0}
.supplier-kpis{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  flex:0 0 auto;
  margin-bottom:10px;
}
.supplier-kpi{
  background:#f5f5f3;
  border:1px solid #e0e0dc;
  border-radius:14px;
  padding:10px 11px;
}
.supplier-kpi.warning{background:#fff4d8}
.supplier-kpi span{
  display:block;
  color:#777;
  font-size:8px;
  letter-spacing:.06em;
  font-weight:900;
}
.supplier-kpi strong{
  display:block;
  margin-top:4px;
  font-size:18px;
}

.supplier-tabs{
  display:flex;
  gap:6px;
  flex:0 0 auto;
  margin-bottom:9px;
}
.supplier-tab{
  border:0;
  background:#ececea;
  border-radius:11px;
  padding:9px 13px;
  font-weight:850;
  font-size:11px;
}
.supplier-tab.active{background:#111;color:#fff}
.supplier-pane{display:none;flex:1;min-height:0}
.supplier-pane.active{display:block}

.supplier-layout{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:330px 1fr;
  gap:10px;
}
.supplier-list-panel{
  min-height:0;
  background:#f3f3f0;
  border-radius:16px;
  padding:10px;
  display:flex;
  flex-direction:column;
}
.supplier-list-head{
  flex:0 0 auto;
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-bottom:8px;
}
.supplier-list-head strong{font-size:12px}
.supplier-list-head input{
  border:1px solid #d9d9d5;
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
  outline:none;
}
.supplier-list{
  min-height:0;
  flex:1;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.supplier-list-card{
  border:1px solid #ddd;
  background:#fff;
  border-radius:12px;
  padding:9px 10px;
  text-align:left;
}
.supplier-list-card.active{
  border:2px solid #111;
  padding:8px 9px;
}
.supplier-list-card-top{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
}
.supplier-list-card b{font-size:12px}
.supplier-list-card small{
  display:block;
  margin-top:3px;
  color:#777;
  font-size:9px;
}
.supplier-mini-photo{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:9px;
  font-weight:850;
}
.supplier-mini-dot{width:8px;height:8px;border-radius:50%}

.supplier-editor{
  min-height:0;
  overflow:auto;
  background:#f7f7f5;
  border-radius:16px;
  padding:14px;
}
.supplier-editor-empty{
  height:100%;
  min-height:300px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#888;
}
.supplier-editor-empty strong{margin-top:6px}
.supplier-editor-empty span{font-size:11px;margin-top:3px}

.supplier-editor-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.supplier-editor-head h2{margin:2px 0 0;font-size:21px}
.linked-photo-badge{
  background:#111;
  color:#fff;
  border-radius:10px;
  padding:6px 9px;
  font-size:9px;
  font-weight:900;
}
.supplier-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}
.supplier-form-grid label,
.supplier-invoice-grid label{
  display:block;
  font-size:10px;
  color:#666;
  font-weight:850;
}
.supplier-form-grid input,
.supplier-form-grid select,
.supplier-form-grid textarea,
.supplier-invoice-grid input,
.supplier-invoice-grid select,
.supplier-invoice-grid textarea{
  width:100%;
  margin-top:4px;
  border:1px solid #d8d8d4;
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
  outline:none;
  resize:vertical;
}
.span-2{grid-column:1/-1}
.supplier-form-actions{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:12px;
}
.supplier-accounting-note{
  margin-top:10px;
  padding:9px 10px;
  border:1px dashed #cfcfca;
  border-radius:10px;
  color:#666;
  font-size:9px;
  line-height:1.4;
}

.invoice-toolbar{margin-bottom:8px}
.invoice-filters{display:flex;gap:6px}
.invoice-filter{
  border:0;background:#ededeb;border-radius:10px;padding:8px 11px;font-size:10px;font-weight:850
}
.invoice-filter.active{background:#111;color:#fff}
.supplier-invoices-table-wrap{
  height:calc(100% - 40px);
  overflow:auto;
  border:1px solid #ddd;
  border-radius:14px;
  background:#fff;
}
.supplier-invoices-table{
  width:100%;
  border-collapse:collapse;
  min-width:1050px;
}
.supplier-invoices-table th{
  position:sticky;
  top:0;
  background:#f3f3f0;
  z-index:1;
  font-size:9px;
  color:#666;
  text-align:left;
  padding:9px 8px;
  border-bottom:1px solid #ddd;
}
.supplier-invoices-table td{
  font-size:10px;
  padding:8px;
  border-bottom:1px solid #eee;
  vertical-align:middle;
}
.supplier-invoices-table tr:hover td{background:#fafafa}
.invoice-status{
  display:inline-block;
  border-radius:8px;
  padding:4px 7px;
  font-size:8px;
  font-weight:900;
}
.invoice-status.to_validate{background:#ececea;color:#555}
.invoice-status.to_pay{background:#fff1c9;color:#725d1a}
.invoice-status.paid{background:#e4f2e5;color:#3f7045}
.invoice-difference.ok{color:#3f7045;font-weight:850}
.invoice-difference.warn{color:#a8612a;font-weight:850}
.table-action{
  border:0;background:#ededeb;border-radius:8px;padding:6px 8px;font-size:9px;font-weight:850
}

.supplier-invoice-sheet{width:min(850px,95vw);max-height:94vh;overflow:auto}
.supplier-invoice-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:14px;
}
.invoice-reconciliation-box{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
  margin-top:12px;
}
.invoice-reconciliation-box>div{
  background:#f4f4f2;
  border-radius:12px;
  padding:10px;
}
.invoice-reconciliation-box span{
  display:block;
  font-size:8px;
  letter-spacing:.06em;
  font-weight:900;
  color:#777;
}
.invoice-reconciliation-box strong{
  display:block;
  font-size:17px;
  margin-top:4px;
}
#invoiceDifferenceBox.match{background:#e5f2e7}
#invoiceDifferenceBox.mismatch{background:#fff0d7}
.supplier-invoice-actions{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:13px;
}

@media(max-width:1050px){
  .supplier-kpis{grid-template-columns:1fr 1fr}
  .supplier-layout{grid-template-columns:280px 1fr}
}


/* =========================================================
   V0.10.1 — régime TVA entreprise
   ========================================================= */
.company-settings-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:8px 0 12px;
}
.company-settings-head h3{
  margin:2px 0 0;
  font-size:20px;
}
.company-vat-card{
  background:#f5f5f3;
  border:1px solid #dfdfdb;
  border-radius:16px;
  padding:14px;
}
.company-field{
  display:block;
  font-size:10px;
  color:#666;
  font-weight:850;
  margin-bottom:12px;
}
.company-field select,
.company-field textarea{
  width:100%;
  margin-top:5px;
  border:1px solid #d5d5d1;
  background:#fff;
  border-radius:10px;
  padding:10px 11px;
  font-weight:750;
  resize:none;
}
.vat-regime-info{
  background:#e8f3e8;
  color:#365d3b;
  border-radius:12px;
  padding:11px 12px;
  margin-bottom:12px;
}
.vat-regime-info strong{
  display:block;
  font-size:12px;
}
.vat-regime-info span{
  display:block;
  margin-top:3px;
  font-size:10px;
  line-height:1.4;
}
.vat-info-blue{
  background:#e7eef9;
  color:#355d87;
}
.vat-accounting-preview{
  background:#111;
  color:#fff;
  border-radius:12px;
  padding:11px 12px;
}
.vat-accounting-preview span{
  display:block;
  color:#bbb;
  font-size:8px;
  letter-spacing:.06em;
  font-weight:900;
}
.vat-accounting-preview strong{
  display:block;
  margin-top:4px;
  font-size:13px;
}
.invoice-reconciliation-4{
  grid-template-columns:repeat(4,1fr)!important;
}
.invoice-accounting-cost{
  background:#e8f3e8!important;
}
.invoice-accounting-cost small{
  display:block;
  margin-top:3px;
  color:#58715c;
  font-size:8px;
  font-weight:800;
}
.supplier-vat-status{
  grid-column:1/-1;
  background:#111;
  color:#fff;
  border-radius:10px;
  padding:7px 10px;
  font-size:9px;
  font-weight:850;
}
@media(max-width:1050px){
  .invoice-reconciliation-4{
    grid-template-columns:1fr 1fr!important;
  }
}


/* =========================================================
   V0.11 — Comptabilité
   ========================================================= */
.accounting-page{min-height:0}
.accounting-head{margin-bottom:10px}
.accounting-vat-badge{
  display:inline-flex;
  align-items:center;
  background:#e8f3e8;
  color:#345d3a;
  border-radius:10px;
  padding:8px 10px;
  font-size:9px;
  font-weight:900;
}
.accounting-toolbar{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
}
.accounting-period-buttons,
.accounting-tabs{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.accounting-period,
.accounting-tab{
  border:0;
  background:#ececea;
  border-radius:10px;
  padding:8px 11px;
  font-size:10px;
  font-weight:850;
}
.accounting-period.active,
.accounting-tab.active{
  background:#111;
  color:#fff;
}
.accounting-custom-period{
  display:flex;
  align-items:center;
  gap:7px;
}
.accounting-custom-period label{
  font-size:9px;
  font-weight:850;
  color:#666;
}
.accounting-custom-period input{
  margin-left:4px;
  border:1px solid #ddd;
  border-radius:8px;
  padding:6px 7px;
  background:#fff;
}
.accounting-kpis{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  flex:0 0 auto;
  margin-bottom:9px;
}
.accounting-kpi{
  border:1px solid #e0e0dc;
  border-radius:14px;
  padding:10px 11px;
  background:#f5f5f3;
}
.accounting-kpi.ca{background:#e8f3e8}
.accounting-kpi.purchases{background:#f6eee4}
.accounting-kpi.balance{background:#e8eef8}
.accounting-kpi.pending{background:#f4f4f2}
.accounting-kpi span{
  display:block;
  font-size:8px;
  letter-spacing:.055em;
  color:#777;
  font-weight:900;
}
.accounting-kpi strong{
  display:block;
  margin-top:4px;
  font-size:18px;
}
.accounting-kpi small{
  display:block;
  margin-top:3px;
  font-size:8px;
  color:#777;
}
.accounting-tabs{
  flex:0 0 auto;
  margin-bottom:9px;
}
.accounting-pane{
  display:none;
  flex:1;
  min-height:0;
}
.accounting-pane.active{display:block}
.accounting-summary-grid{
  height:100%;
  min-height:0;
  overflow:auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  align-content:start;
}
.accounting-card{
  background:#f5f5f3;
  border:1px solid #e0e0dc;
  border-radius:15px;
  padding:12px;
}
.wide-accounting-card{grid-column:1/-1}
.accounting-card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:9px;
}
.accounting-card-head h2{
  margin:2px 0 0;
  font-size:16px;
}
.accounting-payment-breakdown{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:7px;
}
.accounting-payment-item{
  border-radius:11px;
  padding:9px;
  background:#fff;
  border:1px solid #ddd;
}
.accounting-payment-item.cb{background:#dfeafa}
.accounting-payment-item.cash{background:#dff1e2}
.accounting-payment-item.cheque{background:#f8edca}
.accounting-payment-item.transfer{background:#ebe1f7}
.accounting-payment-item.total{background:#222;color:#fff}
.accounting-payment-item span{
  display:block;
  font-size:8px;
  font-weight:900;
  opacity:.75;
}
.accounting-payment-item strong{
  display:block;
  margin-top:3px;
  font-size:14px;
}
.accounting-purchase-summary{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
}
.accounting-purchase-summary>div{
  background:#fff;
  border:1px solid #ddd;
  border-radius:11px;
  padding:9px;
}
.accounting-purchase-summary span,
.accounting-control-grid span{
  display:block;
  font-size:8px;
  color:#777;
  font-weight:900;
}
.accounting-purchase-summary strong,
.accounting-control-grid strong{
  display:block;
  margin-top:3px;
  font-size:14px;
}
.accounting-control-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
}
.accounting-control-grid>div{
  background:#fff;
  border:1px solid #ddd;
  border-radius:11px;
  padding:9px;
}
.accounting-balance-badge{
  border-radius:9px;
  padding:5px 8px;
  font-size:8px;
  font-weight:900;
  background:#e4f2e5;
  color:#3f7045;
}
.accounting-balance-badge.error{
  background:#fee7db;
  color:#9a4b2f;
}
.accounting-info-note{
  margin-top:9px;
  border:1px dashed #ccc;
  border-radius:10px;
  padding:8px 9px;
  font-size:9px;
  color:#666;
  line-height:1.4;
}
.accounting-table-wrap{
  height:100%;
  min-height:0;
  overflow:auto;
  border:1px solid #ddd;
  border-radius:13px;
  background:#fff;
}
.accounting-table{
  width:100%;
  border-collapse:collapse;
  min-width:860px;
}
.accounting-table th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f2f2ef;
  color:#666;
  font-size:8px;
  text-align:left;
  padding:8px;
  border-bottom:1px solid #ddd;
}
.accounting-table td{
  font-size:9px;
  padding:7px 8px;
  border-bottom:1px solid #eee;
}
.accounting-table td.money{
  text-align:right;
  font-variant-numeric:tabular-nums;
  font-weight:800;
}
.accounting-table .journal-code{
  display:inline-block;
  min-width:27px;
  text-align:center;
  border-radius:7px;
  padding:3px 5px;
  background:#eee;
  font-size:8px;
  font-weight:900;
}
.accounting-table tr.entry-start td{
  border-top:2px solid #ddd;
}
.accounting-footer-note{
  flex:0 0 auto;
  margin-top:7px;
  color:#888;
  font-size:8px;
  text-align:right;
}

@media(max-width:1050px){
  .accounting-kpis{grid-template-columns:1fr 1fr}
  .accounting-payment-breakdown{grid-template-columns:repeat(3,1fr)}
}


/* =========================================================
   V0.12 — Facturation hors caisse
   ========================================================= */
.billing-page{min-height:0}
.billing-kpis{
  flex:0 0 auto;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  margin-bottom:9px;
}
.billing-kpi{
  border:1px solid #e0e0dc;
  border-radius:14px;
  padding:10px 11px;
  background:#f5f5f3;
}
.billing-kpi.billed{background:#e7eef9}
.billing-kpi.paid{background:#e8f3e8}
.billing-kpi.due{background:#fff1d8}
.billing-kpi span{
  display:block;
  font-size:8px;
  letter-spacing:.055em;
  color:#777;
  font-weight:900;
}
.billing-kpi strong{
  display:block;
  margin-top:4px;
  font-size:18px;
}
.billing-toolbar{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
}
.billing-period-buttons,.billing-filters{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.billing-period,.billing-filter{
  border:0;
  background:#ececea;
  border-radius:10px;
  padding:8px 11px;
  font-size:10px;
  font-weight:850;
}
.billing-period.active,.billing-filter.active{
  background:#111;
  color:#fff;
}
.billing-layout{
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:340px 1fr;
  gap:10px;
}
.billing-list-panel{
  min-height:0;
  background:#f3f3f0;
  border-radius:15px;
  padding:10px;
  display:flex;
  flex-direction:column;
}
.billing-list-search{flex:0 0 auto;margin-bottom:8px}
.billing-list-search input{
  width:100%;
  border:1px solid #d9d9d5;
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
  outline:none;
}
.billing-invoice-list{
  flex:1;
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.billing-list-card{
  border:1px solid #ddd;
  background:#fff;
  border-radius:12px;
  padding:9px 10px;
  text-align:left;
}
.billing-list-card.active{
  border:2px solid #111;
  padding:8px 9px;
}
.billing-list-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.billing-list-top b{font-size:11px}
.billing-list-card strong{
  font-size:13px;
}
.billing-list-card small{
  display:block;
  margin-top:3px;
  color:#777;
  font-size:9px;
}
.billing-list-status{
  display:inline-block;
  border-radius:8px;
  padding:4px 7px;
  font-size:8px;
  font-weight:900;
}
.billing-list-status.draft{background:#ededeb;color:#666}
.billing-list-status.sent{background:#e7eef9;color:#355d87}
.billing-list-status.paid{background:#e4f2e5;color:#3f7045}

.billing-detail{
  min-height:0;
  overflow:auto;
  background:#f7f7f5;
  border-radius:15px;
  padding:14px;
}
.billing-empty{
  height:100%;
  min-height:280px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  color:#888;
}
.billing-empty>div{font-size:34px}
.billing-empty strong{margin-top:6px}
.billing-empty span{margin-top:3px;font-size:10px}

.billing-detail-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.billing-detail-head h2{
  margin:2px 0 0;
  font-size:22px;
}
.billing-detail-actions{
  display:flex;
  gap:6px;
}
.billing-client-card{
  margin-top:12px;
  background:#fff;
  border:1px solid #ddd;
  border-radius:12px;
  padding:10px;
}
.billing-client-card strong{display:block;font-size:12px}
.billing-client-card span{display:block;margin-top:2px;font-size:9px;color:#666}
.billing-detail-lines{
  margin-top:10px;
  border:1px solid #ddd;
  border-radius:12px;
  overflow:hidden;
  background:#fff;
}
.billing-detail-line{
  display:grid;
  grid-template-columns:1fr 65px 100px 100px;
  gap:7px;
  padding:8px 9px;
  border-bottom:1px solid #eee;
  font-size:10px;
}
.billing-detail-line:last-child{border-bottom:0}
.billing-detail-line.header{
  background:#f1f1ef;
  color:#777;
  font-size:8px;
  font-weight:900;
}
.billing-detail-line span:nth-child(n+2){text-align:right}
.billing-detail-total{
  margin-top:10px;
  display:flex;
  justify-content:flex-end;
}
.billing-detail-total>div{
  min-width:240px;
  background:#111;
  color:#fff;
  border-radius:12px;
  padding:10px 12px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.billing-detail-total span{font-size:9px;font-weight:850}
.billing-detail-total strong{font-size:19px}
.billing-payment-summary{
  margin-top:10px;
  background:#e8f3e8;
  color:#345d3a;
  border-radius:12px;
  padding:10px;
  font-size:10px;
}
.billing-unpaid-summary{
  margin-top:10px;
  background:#fff1d8;
  color:#6f5d2d;
  border-radius:12px;
  padding:10px;
  font-size:10px;
}
.billing-detail-notes{
  margin-top:10px;
  color:#666;
  font-size:10px;
  line-height:1.4;
}
.billing-detail-vat{
  margin-top:8px;
  color:#777;
  font-size:8px;
  text-align:right;
}

.billing-sheet{
  width:min(920px,96vw);
  max-height:95vh;
  display:flex;
  flex-direction:column;
}
.billing-form-scroll{
  overflow:auto;
  min-height:0;
  padding-right:2px;
}
.billing-section{
  background:#f5f5f3;
  border:1px solid #e0e0dc;
  border-radius:14px;
  padding:12px;
  margin-top:10px;
}
.billing-section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:9px;
}
.billing-section-title strong{font-size:12px}
.billing-section-title span{font-size:8px;color:#777}
.billing-lines-title button{flex:0 0 auto}
.billing-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.billing-form-grid label,
.billing-note-label{
  display:block;
  font-size:9px;
  color:#666;
  font-weight:850;
}
.billing-form-grid input,
.billing-form-grid select,
.billing-form-grid textarea,
.billing-note-label textarea{
  width:100%;
  margin-top:4px;
  border:1px solid #d5d5d1;
  background:#fff;
  border-radius:9px;
  padding:8px 9px;
  outline:none;
  resize:vertical;
}
.billing-lines-head{
  display:grid;
  grid-template-columns:minmax(220px,1fr) 70px 115px 100px 36px;
  gap:6px;
  color:#777;
  font-size:8px;
  font-weight:900;
  padding:0 4px 5px;
}
.billing-lines{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.billing-line-row{
  display:grid;
  grid-template-columns:minmax(220px,1fr) 70px 115px 100px 36px;
  gap:6px;
  align-items:center;
}
.billing-line-row input{
  width:100%;
  border:1px solid #d5d5d1;
  background:#fff;
  border-radius:9px;
  padding:8px;
  outline:none;
}
.billing-line-total{
  text-align:right;
  font-size:10px;
  font-weight:900;
}
.billing-line-remove{
  border:0;
  background:#eee;
  border-radius:8px;
  width:32px;
  height:32px;
  font-weight:900;
}
.billing-total-box{
  width:300px;
  margin:10px 0 0 auto;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.billing-total-box>div{
  display:flex;
  justify-content:space-between;
  font-size:10px;
}
.billing-grand-total{
  border-top:1px solid #ccc;
  padding-top:7px;
  font-size:13px!important;
}
.billing-vat-mention{
  margin-top:8px;
  text-align:right;
  color:#777;
  font-size:8px;
}
.billing-modal-actions{
  flex:0 0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-top:10px;
}
.billing-modal-actions-right{
  display:flex;
  gap:7px;
}
.billing-preview-sheet{
  width:min(780px,94vw);
  max-height:94vh;
  overflow:auto;
}
.billing-preview-content{
  background:#fff;
  border:1px solid #ddd;
  border-radius:12px;
  padding:24px;
}
.billing-preview-doc-head{
  display:flex;
  justify-content:space-between;
  gap:25px;
}
.billing-preview-doc-head h1{margin:0;font-size:25px}
.billing-preview-doc-head p{margin:4px 0;font-size:10px;color:#666}
.billing-preview-client{
  margin-top:25px;
  margin-left:auto;
  width:48%;
  font-size:10px;
  line-height:1.45;
}
.billing-preview-table{
  margin-top:24px;
  width:100%;
  border-collapse:collapse;
}
.billing-preview-table th,.billing-preview-table td{
  padding:8px;
  border-bottom:1px solid #ddd;
  font-size:9px;
  text-align:left;
}
.billing-preview-table th{background:#f3f3f0;color:#666}
.billing-preview-table th:nth-child(n+2),
.billing-preview-table td:nth-child(n+2){text-align:right}
.billing-preview-totals{
  margin-top:14px;
  margin-left:auto;
  width:45%;
}
.billing-preview-totals div{
  display:flex;
  justify-content:space-between;
  padding:4px 0;
  font-size:10px;
}
.billing-preview-totals .grand{
  margin-top:5px;
  padding-top:8px;
  border-top:1px solid #999;
  font-size:14px;
  font-weight:900;
}
.billing-preview-legal{
  margin-top:25px;
  border-top:1px solid #ddd;
  padding-top:10px;
  font-size:8px;
  color:#777;
}
.billing-preview-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:10px;
}

@media(max-width:1050px){
  .billing-layout{grid-template-columns:300px 1fr}
  .billing-kpis{grid-template-columns:1fr 1fr}
}

@media print{
  body *{visibility:hidden!important}
  #billingPreviewContent,#billingPreviewContent *{visibility:visible!important}
  #billingPreviewContent{
    position:absolute!important;
    left:0;top:0;
    width:100%!important;
    border:0!important;
    padding:0!important;
  }
}


/* =========================================================
   V0.13 — Fichier clients + articles de facturation
   ========================================================= */

/* Clients */
.clients-page{min-height:0}
.clients-layout{
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:330px 1fr;
  gap:10px;
}
.clients-list-panel{
  min-height:0;
  background:#f3f3f0;
  border-radius:15px;
  padding:10px;
  display:flex;
  flex-direction:column;
}
.clients-search{margin-bottom:8px}
.clients-search input{
  width:100%;
  border:1px solid #d9d9d5;
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
}
.client-list{
  flex:1;
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.client-list-card{
  text-align:left;
  border:1px solid #ddd;
  background:#fff;
  border-radius:12px;
  padding:9px 10px;
}
.client-list-card.active{
  border:2px solid #111;
  padding:8px 9px;
}
.client-list-card-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:7px;
}
.client-list-card b{font-size:12px}
.client-list-card small{
  display:block;
  margin-top:3px;
  color:#777;
  font-size:9px;
}
.client-type-badge{
  display:inline-block;
  border-radius:8px;
  padding:3px 6px;
  background:#ededeb;
  color:#666;
  font-size:7px;
  font-weight:900;
}
.client-type-badge.business{
  background:#e7eef9;
  color:#355d87;
}
.client-editor{
  min-height:0;
  overflow:auto;
  background:#f7f7f5;
  border-radius:15px;
  padding:14px;
}
.client-editor-empty{
  height:100%;
  min-height:300px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#888;
}
.client-editor-empty strong{margin-top:6px}
.client-editor-empty span{font-size:10px;margin-top:3px}
.client-editor-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.client-editor-head h2{margin:2px 0 0;font-size:21px}
.client-invoice-count{
  border-radius:9px;
  padding:5px 8px;
  background:#ededeb;
  color:#666;
  font-size:8px;
  font-weight:900;
}
.client-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}
.client-form-grid label{
  display:block;
  font-size:10px;
  color:#666;
  font-weight:850;
}
.client-form-grid input,
.client-form-grid select,
.client-form-grid textarea{
  width:100%;
  margin-top:4px;
  border:1px solid #d8d8d4;
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
  resize:vertical;
}
.client-form-actions{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:12px;
}

/* Billing main tabs */
.billing-main-tabs{
  display:flex;
  gap:6px;
  flex:0 0 auto;
  margin-bottom:9px;
}
.billing-main-tab{
  border:0;
  background:#ececea;
  border-radius:10px;
  padding:8px 11px;
  font-size:10px;
  font-weight:850;
}
.billing-main-tab.active{background:#111;color:#fff}
.billing-main-pane{display:none;flex:1;min-height:0}
.billing-main-pane.active{display:flex;flex-direction:column;min-height:0}

/* Billing client picker */
.billing-client-picker-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:end;
  margin-bottom:9px;
}
.billing-client-picker-row label{
  display:block;
  font-size:9px;
  color:#666;
  font-weight:850;
}
.billing-client-picker-row select{
  width:100%;
  margin-top:4px;
  border:1px solid #d5d5d1;
  background:#fff;
  border-radius:9px;
  padding:8px 9px;
}
.billing-line-actions{display:flex;gap:6px}

/* Billing article directory */
.billing-articles-layout{
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:360px 1fr;
  gap:10px;
}
.billing-article-list-panel{
  min-height:0;
  background:#f3f3f0;
  border-radius:15px;
  padding:10px;
  display:flex;
  flex-direction:column;
}
.billing-article-list-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.billing-article-list-head strong{display:block;font-size:12px}
.billing-article-list-head span{display:block;font-size:8px;color:#777;margin-top:2px}
.billing-article-search,
.billing-picker-search{
  width:100%;
  border:1px solid #d9d9d5;
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
  margin-bottom:8px;
}
.billing-article-list{
  flex:1;
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.billing-article-list-card{
  text-align:left;
  border:1px solid #ddd;
  background:#fff;
  border-radius:12px;
  padding:9px 10px;
}
.billing-article-list-card.active{
  border:2px solid #111;
  padding:8px 9px;
}
.billing-article-list-card-top{
  display:flex;
  justify-content:space-between;
  gap:8px;
}
.billing-article-list-card b{font-size:11px}
.billing-article-list-card strong{font-size:12px}
.billing-article-list-card small{
  display:block;
  margin-top:3px;
  font-size:8px;
  color:#777;
}
.billing-article-editor{
  min-height:0;
  overflow:auto;
  background:#f7f7f5;
  border-radius:15px;
  padding:14px;
}
.billing-article-editor-empty{
  height:100%;
  min-height:280px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#888;
}
.billing-article-editor-empty strong{margin-top:6px}
.billing-article-editor-empty span{font-size:10px;margin-top:3px}
.billing-article-editor-head h2{margin:2px 0 12px;font-size:21px}
.billing-article-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}
.billing-article-form-grid label{
  display:block;
  font-size:10px;
  color:#666;
  font-weight:850;
}
.billing-article-form-grid input,
.billing-article-form-grid select,
.billing-article-form-grid textarea{
  width:100%;
  margin-top:4px;
  border:1px solid #d8d8d4;
  background:#fff;
  border-radius:10px;
  padding:9px 10px;
  resize:vertical;
}
.billing-article-form-actions{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:12px;
}

/* Article picker */
.billing-article-picker-sheet{
  width:min(650px,94vw);
  max-height:90vh;
  overflow:auto;
}
.billing-article-picker-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}
.billing-picker-card{
  border:1px solid #ddd;
  background:#f7f7f5;
  border-radius:12px;
  padding:10px;
  text-align:left;
}
.billing-picker-card b{display:block;font-size:11px}
.billing-picker-card strong{display:block;font-size:15px;margin-top:4px}
.billing-picker-card small{display:block;color:#777;font-size:8px;margin-top:3px}

@media(max-width:1050px){
  .clients-layout{grid-template-columns:280px 1fr}
  .billing-articles-layout{grid-template-columns:300px 1fr}
}


/* V0.13.1 — correction position fiches + accès création articles */
.client-editor,
.billing-article-editor{
  scroll-behavior:auto;
}

#clientForm,
#billingArticleForm{
  margin:0;
  align-self:stretch;
}

.client-editor-head,
.billing-article-editor-head{
  position:sticky;
  top:-14px;
  z-index:2;
  background:#f7f7f5;
  padding-top:14px;
  padding-bottom:8px;
}

/* Le bouton de création reste visible dans le catalogue */
.billing-article-list-head{
  position:sticky;
  top:-10px;
  z-index:3;
  background:#f3f3f0;
  padding-top:10px;
}

/* Evite qu'un panneau caché conserve une place dans Facturation */
.billing-main-pane:not(.active){
  display:none!important;
}


/* =========================================================
   V0.14 — Catégories libres + Service/Vente + charges
   ========================================================= */

.billing-kpis{
  grid-template-columns:repeat(5,1fr);
}
.billing-kpi.social{
  background:#f1e9f7;
}
.billing-kpi.social small{
  display:block;
  margin-top:3px;
  font-size:7px;
  color:#756681;
  font-weight:800;
}

.billing-article-head-actions{
  display:flex;
  gap:6px;
  align-items:center;
}
.billing-category-type-preview{
  display:block;
  margin-top:4px;
  font-size:8px;
  color:#777;
  font-weight:850;
}

.micro-social-settings{
  margin-top:12px;
  padding:12px;
  background:#fff;
  border:1px solid #ddd;
  border-radius:12px;
}
.micro-social-head strong{
  display:block;
  margin-top:2px;
  font-size:13px;
}
.micro-social-rates{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:10px;
}
.micro-social-rates label{
  font-size:9px;
  color:#666;
  font-weight:850;
}
.micro-social-rates input{
  width:100%;
  margin-top:4px;
  border:1px solid #d5d5d1;
  background:#fff;
  border-radius:9px;
  padding:8px 9px;
  text-align:right;
  font-weight:850;
}
.micro-social-note{
  margin-top:8px;
  font-size:8px;
  color:#777;
  line-height:1.4;
}

.accounting-kpi.social{
  background:#f1e9f7;
}
.accounting-kpis{
  grid-template-columns:repeat(5,1fr);
}

/* Invoice line gains a category selector */
.billing-lines-head,
.billing-line-row{
  grid-template-columns:150px minmax(210px,1fr) 65px 105px 95px 36px!important;
}
.billing-line-category{
  width:100%;
  border:1px solid #d5d5d1;
  background:#fff;
  border-radius:9px;
  padding:8px 7px;
  outline:none;
  font-size:9px;
}

/* Category manager */
.billing-category-sheet{
  width:min(780px,94vw);
  max-height:90vh;
  overflow:hidden;
}
.billing-category-layout{
  height:min(560px,72vh);
  display:grid;
  grid-template-columns:310px 1fr;
  gap:10px;
  margin-top:12px;
}
.billing-category-list-panel{
  min-height:0;
  background:#f3f3f0;
  border-radius:14px;
  padding:10px;
  display:flex;
  flex-direction:column;
}
.billing-category-list-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.billing-category-list-head strong{display:block;font-size:11px}
.billing-category-list-head span{
  display:block;
  margin-top:2px;
  font-size:8px;
  color:#777;
  line-height:1.35;
}
.billing-category-list{
  flex:1;
  min-height:0;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.billing-category-card{
  border:1px solid #ddd;
  background:#fff;
  border-radius:11px;
  padding:9px 10px;
  text-align:left;
}
.billing-category-card.active{
  border:2px solid #111;
  padding:8px 9px;
}
.billing-category-card-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:7px;
}
.billing-category-card b{font-size:11px}
.billing-category-card small{
  display:block;
  margin-top:3px;
  color:#777;
  font-size:8px;
}
.activity-type-badge{
  display:inline-block;
  border-radius:7px;
  padding:3px 6px;
  font-size:7px;
  font-weight:900;
}
.activity-type-badge.sale{
  background:#e4f2e5;
  color:#3f7045;
}
.activity-type-badge.service{
  background:#e7eef9;
  color:#355d87;
}
.billing-category-editor{
  min-height:0;
  overflow:auto;
  background:#f7f7f5;
  border-radius:14px;
  padding:14px;
}
.billing-category-editor-empty{
  height:100%;
  min-height:260px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  color:#888;
}
.billing-category-editor-empty strong{margin-top:6px}
.billing-category-editor-empty span{margin-top:3px;font-size:9px}
.billing-category-editor-head h3{
  margin:2px 0 12px;
  font-size:20px;
}
.billing-category-field{
  display:block;
  font-size:9px;
  color:#666;
  font-weight:850;
  margin-bottom:10px;
}
.billing-category-field input,
.billing-category-field select{
  width:100%;
  margin-top:4px;
  border:1px solid #d5d5d1;
  background:#fff;
  border-radius:9px;
  padding:9px 10px;
}
.billing-category-rate-preview{
  background:#111;
  color:#fff;
  border-radius:10px;
  padding:9px 10px;
  font-size:10px;
  font-weight:850;
}
.billing-category-help{
  margin-top:9px;
  border:1px dashed #ccc;
  border-radius:10px;
  padding:9px;
  color:#666;
  font-size:9px;
  line-height:1.4;
}
.billing-category-actions{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:12px;
}

@media(max-width:1100px){
  .billing-kpis{grid-template-columns:repeat(3,1fr)}
  .accounting-kpis{grid-template-columns:repeat(3,1fr)}
}
\n\n/* V0.14.1 — suppression article + CFP formation */\n.billing-article-list-row{display:grid;grid-template-columns:1fr 34px;gap:5px;align-items:stretch}\n.billing-article-list-row .billing-article-list-card{width:100%}\n.billing-article-delete-quick{border:0;border-radius:10px;background:#f3e7e5;color:#95463d;font-size:14px;font-weight:900}\n.billing-article-delete-quick:hover{background:#edd9d6}\n.billing-article-delete-quick:active{transform:scale(.96)}\n.micro-social-rates{grid-template-columns:1fr 1fr!important}\n.micro-social-rates label:nth-child(n+3){background:#f5f1e6;border-radius:10px;padding:8px}\n.billing-category-rate-preview{line-height:1.35}\n

/* =========================================================
   V0.15 — Articles caisse Vente/Service + charges globales
   ========================================================= */
.pos-charge-head{
  display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0 10px;
}
.pos-charge-head h3{margin:2px 0 0;font-size:20px}
.pos-charge-help{
  background:#f5f5f3;border-radius:12px;padding:10px 12px;font-size:10px;color:#666;line-height:1.4;
}
.pos-article-type-grid{
  margin-top:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px;
}
.pos-article-type-row{
  background:#f5f5f3;border:1px solid #e0e0dc;border-radius:12px;padding:9px 10px;
  display:grid;grid-template-columns:1fr 125px;gap:10px;align-items:center;
}
.pos-article-type-info b{display:block;font-size:11px}
.pos-article-type-info small{display:block;margin-top:2px;color:#777;font-size:8px}
.pos-article-type-row select{
  width:100%;border:1px solid #d5d5d1;background:#fff;border-radius:9px;padding:8px;font-weight:850;font-size:9px;
}
.micro-stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.micro-stats-card{
  background:#fff;border:1px solid #ddd;border-radius:12px;padding:10px;
}
.micro-stats-card span{display:block;font-size:8px;color:#777;font-weight:900}
.micro-stats-card strong{display:block;margin-top:3px;font-size:16px}
@media(max-width:1050px){
  .pos-article-type-grid{grid-template-columns:1fr}
  .micro-stats-grid{grid-template-columns:1fr 1fr}
}


/* =========================================================
   V0.16 — Banque / rapprochement bancaire
   ========================================================= */
.bank-page{min-height:0}
.bank-connection-badge{
  display:inline-flex;
  align-items:center;
  border-radius:9px;
  padding:7px 9px;
  font-size:8px;
  font-weight:900;
}
.bank-connection-badge.disconnected{
  background:#eee;
  color:#666;
}
.bank-connection-badge.connected{
  background:#e4f2e5;
  color:#3f7045;
}
.bank-kpis{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:8px;
  flex:0 0 auto;
  margin-bottom:9px;
}
.bank-kpi{
  background:#f5f5f3;
  border:1px solid #e0e0dc;
  border-radius:14px;
  padding:10px 11px;
}
.bank-kpi.warning{background:#fff2d9}
.bank-kpi.suggestion{background:#e7eef9}
.bank-kpi.done{background:#e6f2e7}
.bank-kpi span{
  display:block;
  color:#777;
  font-size:8px;
  letter-spacing:.055em;
  font-weight:900;
}
.bank-kpi strong{
  display:block;
  margin-top:4px;
  font-size:18px;
}
.bank-tabs{
  display:flex;
  gap:6px;
  flex:0 0 auto;
  margin-bottom:9px;
}
.bank-tab,.bank-filter{
  border:0;
  background:#ececea;
  border-radius:10px;
  padding:8px 11px;
  font-size:10px;
  font-weight:850;
}
.bank-tab.active,.bank-filter.active{
  background:#111;
  color:#fff;
}
.bank-pane{
  display:none;
  flex:1;
  min-height:0;
}
.bank-pane.active{display:flex;flex-direction:column}
.bank-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  margin-bottom:8px;
}
.bank-filters{display:flex;gap:6px}
.bank-search{
  min-width:250px;
  border:1px solid #d9d9d5;
  background:#fff;
  border-radius:10px;
  padding:8px 10px;
  outline:none;
}
.bank-layout{
  display:grid;
  grid-template-columns:minmax(420px,1fr) 360px;
  gap:10px;
  flex:1;
  min-height:0;
}
.bank-transactions-panel{
  min-height:0;
  background:#f3f3f0;
  border-radius:15px;
  padding:9px;
}
.bank-transactions-list{
  height:100%;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.bank-transaction-card{
  display:grid;
  grid-template-columns:82px 1fr 110px 90px;
  align-items:center;
  gap:8px;
  border:1px solid #ddd;
  border-radius:12px;
  background:#fff;
  padding:9px 10px;
  text-align:left;
}
.bank-transaction-card.active{
  border:2px solid #111;
  padding:8px 9px;
}
.bank-transaction-date{
  font-size:9px;
  color:#777;
}
.bank-transaction-label strong{
  display:block;
  font-size:11px;
}
.bank-transaction-label small{
  display:block;
  margin-top:2px;
  font-size:8px;
  color:#777;
}
.bank-transaction-amount{
  text-align:right;
  font-size:13px;
  font-weight:900;
}
.bank-transaction-amount.positive{color:#3f7045}
.bank-transaction-amount.negative{color:#9a4b2f}
.bank-status-badge{
  justify-self:end;
  border-radius:8px;
  padding:4px 6px;
  font-size:7px;
  font-weight:900;
  text-align:center;
}
.bank-status-badge.unmatched{background:#eee;color:#666}
.bank-status-badge.suggested{background:#e7eef9;color:#355d87}
.bank-status-badge.reconciled{background:#e4f2e5;color:#3f7045}

.bank-match-panel{
  min-height:0;
  overflow:auto;
  background:#f7f7f5;
  border-radius:15px;
  padding:12px;
}
.bank-match-empty{
  min-height:280px;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  color:#888;
}
.bank-match-empty>div{font-size:30px}
.bank-match-empty strong{margin-top:6px}
.bank-match-empty span{font-size:9px;margin-top:3px}
.bank-match-head{
  padding-bottom:10px;
  border-bottom:1px solid #ddd;
}
.bank-match-head h2{font-size:16px;margin:2px 0}
.bank-match-head p{font-size:9px;color:#777;margin:3px 0}
.bank-match-amount{
  font-size:20px;
  font-weight:900;
  margin-top:8px;
}
.bank-suggestions-title{
  margin:12px 0 7px;
  font-size:9px;
  color:#777;
  font-weight:900;
  letter-spacing:.05em;
}
.bank-suggestion-card{
  border:1px solid #ddd;
  background:#fff;
  border-radius:11px;
  padding:9px;
  margin-bottom:6px;
}
.bank-suggestion-card.best{
  border-color:#9ab7da;
  background:#f5f8fc;
}
.bank-suggestion-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.bank-suggestion-card b{font-size:10px}
.bank-suggestion-card strong{font-size:12px}
.bank-suggestion-card small{
  display:block;
  margin-top:3px;
  color:#777;
  font-size:8px;
}
.bank-suggestion-confidence{
  display:inline-block;
  margin-top:5px;
  border-radius:7px;
  padding:3px 5px;
  background:#e7eef9;
  color:#355d87;
  font-size:7px;
  font-weight:900;
}
.bank-suggestion-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:7px;
}
.bank-no-suggestion{
  border:1px dashed #ccc;
  border-radius:11px;
  padding:10px;
  color:#777;
  font-size:9px;
  line-height:1.4;
}
.bank-reconciled-summary{
  border-radius:11px;
  background:#e4f2e5;
  color:#3f7045;
  padding:10px;
  margin-top:10px;
  font-size:9px;
  line-height:1.4;
}
.bank-table-wrap{
  flex:1;
  min-height:0;
  overflow:auto;
  border:1px solid #ddd;
  border-radius:13px;
  background:#fff;
}
.bank-table{
  width:100%;
  border-collapse:collapse;
  min-width:850px;
}
.bank-table th{
  position:sticky;
  top:0;
  background:#f2f2ef;
  color:#666;
  font-size:8px;
  text-align:left;
  padding:8px;
  border-bottom:1px solid #ddd;
}
.bank-table td{
  font-size:9px;
  padding:8px;
  border-bottom:1px solid #eee;
}
.bank-table td.money{
  text-align:right;
  font-weight:850;
}
.bank-account-card{
  display:grid;
  grid-template-columns:65px 1fr 190px;
  align-items:center;
  gap:14px;
  background:#f5f5f3;
  border:1px solid #ddd;
  border-radius:16px;
  padding:16px;
}
.bank-account-icon{
  width:58px;height:58px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:#fff;
  font-size:28px;
}
.bank-account-main h2{margin:2px 0 0;font-size:19px}
.bank-account-main p{margin:4px 0 0;font-size:9px;color:#777}
.bank-account-status{
  text-align:right;
}
.bank-account-status span{
  display:block;
  font-size:7px;
  color:#777;
  font-weight:900;
}
.bank-account-status strong{
  display:block;
  margin-top:4px;
  font-size:10px;
}
.bank-provider-card{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  gap:15px;
  align-items:flex-start;
  background:#111;
  color:#fff;
  border-radius:16px;
  padding:15px;
}
.bank-provider-card h3{margin:2px 0 5px;font-size:16px}
.bank-provider-card p{max-width:650px;margin:0;color:#bbb;font-size:9px;line-height:1.45}
.bank-demo-badge{
  flex:0 0 auto;
  border-radius:8px;
  padding:5px 7px;
  background:#fff;
  color:#111;
  font-size:7px;
  font-weight:900;
}
@media(max-width:1050px){
  .bank-layout{grid-template-columns:1fr 320px}
  .bank-transaction-card{grid-template-columns:75px 1fr 100px}
  .bank-status-badge{display:none}
}


/* =========================================================
   V0.17 — Fournisseur bancaire abstrait / GoCardless par défaut
   ========================================================= */
.bank-provider-config{
  align-items:stretch!important;
}
.bank-provider-config-main{
  flex:1;
}
.bank-provider-selector{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:12px;
}
.bank-provider-selector label{
  display:block;
  font-size:8px;
  color:#bbb;
  font-weight:850;
}
.bank-provider-selector select{
  width:100%;
  margin-top:4px;
  border:1px solid #444;
  background:#222;
  color:#fff;
  border-radius:9px;
  padding:8px 9px;
}
.bank-provider-capabilities{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:7px;
  margin-top:10px;
}
.bank-provider-capabilities>div{
  background:#1f1f1f;
  border:1px solid #333;
  border-radius:9px;
  padding:8px;
}
.bank-provider-capabilities span{
  display:block;
  color:#888;
  font-size:7px;
  font-weight:900;
}
.bank-provider-capabilities strong{
  display:block;
  margin-top:3px;
  color:#fff;
  font-size:9px;
}
.bank-provider-side{
  flex:0 0 130px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
}
.bank-provider-info{
  font-size:8px!important;
  color:#607080!important;
}

/* V0.17.1 — Service / Vente au niveau article */
.billing-lines-head,.billing-line-row{grid-template-columns:135px 90px minmax(190px,1fr) 60px 100px 90px 36px!important;}
.activity-type-badge{background:#ededeb;color:#666;}


/* =========================================================
   V0.17.1 TEST — environnement totalement isolé
   ========================================================= */
body{
  padding-top:0;
  overflow:hidden;
}
.test-mode-banner{
  position:fixed;
  z-index:99999;
  top:0;
  left:0;
  right:0;
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  background:#b42318;
  color:#fff;
  box-shadow:0 1px 8px rgba(0,0,0,.18);
  font-size:10px;
}
.test-mode-banner strong{
  font-size:12px;
  letter-spacing:.08em;
}
.test-mode-banner span{
  opacity:.9;
}
.test-mode-banner button{
  border:1px solid rgba(255,255,255,.45);
  background:#fff;
  color:#8f1c13;
  border-radius:8px;
  padding:5px 9px;
  font-size:9px;
  font-weight:900;
}
.side-test-badge{
  margin:4px auto 7px;
  padding:4px 6px;
  border-radius:7px;
  background:#b42318;
  color:#fff;
  font-size:8px;
  font-weight:950;
  letter-spacing:.08em;
}


/* =========================================================
   V0.17.1 TEST-1 — correction hauteur écran
   La bannière TEST occupe 38 px : l'application utilise le reste.
   ========================================================= */

:root{
  --test-banner-height:38px;
}

/* Décale l'application sous la bannière sans augmenter la hauteur totale */
body{
  height:100vh!important;
  max-height:100vh!important;
}

.test-mode-banner{
  height:var(--test-banner-height)!important;
}

/* Le conteneur principal commence sous la bannière et s'arrête au bas de l'écran */
.app,
#app,
.app-shell,
.shell,
.main-app,
.layout{
  max-height:calc(100vh - var(--test-banner-height))!important;
}

/* Le premier grand conteneur d'interface présent dans cette version */
body > .app,
body > #app,
body > .app-shell,
body > .shell,
body > .layout{
  position:relative;
  top:var(--test-banner-height);
  height:calc(100vh - var(--test-banner-height))!important;
  min-height:0!important;
}

/* Cas de la structure actuelle : sidebar + zone principale directement dans body */
body > aside,
body > .sidebar{
  top:var(--test-banner-height)!important;
  height:calc(100vh - var(--test-banner-height))!important;
  max-height:calc(100vh - var(--test-banner-height))!important;
}

body > main,
body > .main,
body > .content,
body > .workspace{
  margin-top:var(--test-banner-height)!important;
  height:calc(100vh - var(--test-banner-height))!important;
  max-height:calc(100vh - var(--test-banner-height))!important;
  min-height:0!important;
}

/* Sécurise les vues et la caisse contre tout dépassement vertical */
.app-view,
.module-page,
.sale-layout,
.sale-view,
#saleView{
  min-height:0!important;
  max-height:100%!important;
}

/* Sur Safari, utilise aussi la hauteur dynamique disponible */
@supports (height: 100dvh){
  body{
    height:100dvh!important;
    max-height:100dvh!important;
  }
  body > .app,
  body > #app,
  body > .app-shell,
  body > .shell,
  body > .layout,
  body > main,
  body > .main,
  body > .content,
  body > .workspace,
  body > aside,
  body > .sidebar{
    height:calc(100dvh - var(--test-banner-height))!important;
    max-height:calc(100dvh - var(--test-banner-height))!important;
  }
}


/* =========================================================
   V0.17.1 TEST-2 — verrouillage réel dans le viewport
   ========================================================= */

/* L'application est physiquement enfermée entre la bannière et le bas de l'écran. */
body > .app{
  position:fixed!important;
  top:var(--test-banner-height)!important;
  bottom:0!important;
  left:0!important;
  right:0!important;
  width:auto!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  margin:0!important;
}

/* Les deux colonnes de .app peuvent réellement rétrécir verticalement. */
body > .app > .side,
body > .app > main{
  min-height:0!important;
  height:auto!important;
  max-height:100%!important;
}

body > .app > main{
  overflow:hidden!important;
}

/* La vue vente remplit exactement main. */
#saleView.active-view{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
}

/* Bandeau et catégories ne poussent jamais le panier hors écran. */
#saleView > .active-banner,
#saleView > header{
  flex:0 0 auto!important;
}

/* La zone catalogue/panier prend uniquement l'espace restant. */
#saleView > .body{
  flex:1 1 0!important;
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
}

/* Panier : le bouton Encaisser et les totaux sont toujours réservés. */
#cartPanel{
  height:100%!important;
  max-height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}

#cartPanel .items-wrap{
  flex:1 1 0!important;
  min-height:0!important;
}

/* Sécurise le bouton de fin sur les petits écrans. */
#checkout{
  flex:0 0 54px!important;
  min-height:54px!important;
  height:54px!important;
}

/* La barre latérale peut défiler si un écran est vraiment trop bas. */
body > .app > .side{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:none;
}
body > .app > .side::-webkit-scrollbar{
  width:0;
}

/* MacBook / hauteur réduite : compacter légèrement sans changer la logique. */
@media (max-height:820px){
  .active-banner{
    min-height:74px!important;
    padding-top:8px!important;
    padding-bottom:8px!important;
  }
  header{
    height:54px!important;
  }
  .cart{
    padding:10px!important;
  }
  .checkout{
    flex-basis:48px!important;
    min-height:48px!important;
    height:48px!important;
  }
  .nav{
    height:56px!important;
    margin:1px 0!important;
  }
}


/* =========================================================
   TEST-3 — Powens réel via relais MyselfPhoto
   ========================================================= */
.bank-relay-fields{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:9px;
  margin-top:12px;
}
.bank-relay-fields label{
  display:block;
  font-size:8px;
  color:#bbb;
  font-weight:850;
}
.bank-relay-fields input{
  width:100%;
  margin-top:4px;
  border:1px solid #444;
  background:#222;
  color:#fff;
  border-radius:9px;
  padding:8px 9px;
  outline:none;
}
.bank-powens-config{
  align-items:stretch!important;
}
.bank-provider-side{
  min-width:140px;
}
.bank-live-error{
  margin-top:8px;
  background:#fde8e5;
  color:#8b352c;
  border-radius:9px;
  padding:8px;
  font-size:8px;
}


/* TEST-5 */
.live-clock{flex:0 0 auto;min-width:116px;text-align:center;padding:7px 10px;border-radius:12px;background:rgba(255,255,255,.65);border:1px solid rgba(0,0,0,.06)}
.live-clock strong{display:block;font-size:16px;line-height:1;font-variant-numeric:tabular-nums}
.live-clock span{display:block;margin-top:4px;font-size:8px;font-weight:850;color:#607080;text-transform:capitalize}

.manager-only.role-hidden{display:none!important}
.role-mode-nav.manager{background:#e6edf8}
.role-mode-nav.vendor{background:#fff0d7}

.pos-article-type-row{grid-template-columns:60px minmax(170px,1fr) 105px 105px minmax(140px,1fr)!important;align-items:center;gap:8px}
.pos-product-preview{width:56px;height:44px;border-radius:9px;background:#eee;border:1px solid #ddd;display:grid;place-items:center;overflow:hidden;font-size:14px;font-weight:900;background-size:cover;background-position:center}
.pos-article-visual-controls{display:flex;flex-direction:column;gap:4px}
.pos-article-visual-controls input[type="text"]{width:100%;border:1px solid #d7d7d3;border-radius:8px;padding:6px 7px;font-size:9px}
.pos-article-photo-actions{display:flex;gap:4px}
.pos-article-photo-label{flex:1;display:inline-flex;align-items:center;justify-content:center;border-radius:7px;padding:5px 6px;background:#eee;font-size:7px;font-weight:850;cursor:pointer}
.pos-article-photo-label input{display:none}
.pos-clear-photo{border:0;border-radius:7px;padding:5px 7px;background:#f3e7e5;color:#91463d;font-size:7px;font-weight:900}
.product .visual.has-photo{color:transparent!important;background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important}

.access-settings-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0 12px}
.access-settings-head h3{margin:2px 0 0;font-size:20px}
.access-settings-card{background:#f5f5f3;border:1px solid #ddd;border-radius:15px;padding:14px}
.access-settings-card label{display:block;margin-bottom:9px;font-size:9px;color:#666;font-weight:850}
.access-settings-card input{width:100%;margin-top:4px;border:1px solid #d5d5d1;background:#fff;border-radius:9px;padding:9px 10px}
.access-help{margin-top:10px;padding:9px 10px;border:1px dashed #ccc;border-radius:10px;color:#666;font-size:9px;line-height:1.45}
.access-pin-status{margin-top:9px;border-radius:9px;padding:8px 9px;background:#eee;color:#666;font-size:8px;font-weight:850}
.access-pin-status.ready{background:#e4f2e5;color:#3f7045}

.role-sheet{width:min(460px,92vw)}
.role-modal-content{padding-top:12px}
.role-current{border-radius:13px;padding:12px;background:#f4f4f2}
.role-current span{display:block;font-size:8px;color:#777;font-weight:900}
.role-current strong{display:block;margin-top:3px;font-size:18px}
.role-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:12px}
.role-pin-entry{margin-top:11px}
.role-pin-entry label{display:block;font-size:9px;color:#666;font-weight:850}
.role-pin-entry input{width:100%;margin-top:5px;border:1px solid #d5d5d1;border-radius:10px;padding:10px;font-size:18px;text-align:center;letter-spacing:.25em}


/* =========================================================
   TEST-6 — Réglages / Articles caisse défilants
   ========================================================= */

/* La fenêtre Réglages reste dans l'écran et devient une vraie colonne flexible. */
#settingsModal .sheet{
  height:min(760px,calc(100vh - 80px))!important;
  max-height:calc(100vh - 80px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}

/* Titre + onglets restent visibles. */
#settingsModal .sheethead,
#settingsModal .settings-tabs{
  flex:0 0 auto!important;
}

/* Tous les panneaux occupent uniquement l'espace restant. */
#settingsModal .settings-pane{
  min-height:0!important;
  flex:1 1 auto!important;
}

/* Articles caisse : contenu organisé en colonne. */
#settingsPosArticlesPane.active{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
}

/* En-tête du panneau et bouton Enregistrer restent fixes. */
#settingsPosArticlesPane .pos-article-type-head{
  flex:0 0 auto!important;
}

/* La grille seule défile. */
#posArticleTypeGrid{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-right:6px!important;
  padding-bottom:18px!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}

/* Barre de défilement discrète mais visible sur Mac. */
#posArticleTypeGrid::-webkit-scrollbar{
  width:8px;
}
#posArticleTypeGrid::-webkit-scrollbar-thumb{
  background:#c9c9c5;
  border-radius:8px;
}
#posArticleTypeGrid::-webkit-scrollbar-track{
  background:transparent;
}

/* Sur les écrans moins hauts, la fenêtre utilise quasiment toute la hauteur. */
@media(max-height:850px){
  #settingsModal .sheet{
    height:calc(100vh - 48px)!important;
    max-height:calc(100vh - 48px)!important;
  }
}


/* =========================================================
   TEST-7 — correction définitive Articles caisse
   ========================================================= */

/* Le vrai modal est packAdminModal, pas settingsModal. */
#packAdminModal{
  overflow:hidden!important;
}
#packAdminModal .admin-sheet{
  width:min(1180px,96vw)!important;
  height:calc(100vh - 70px)!important;
  max-height:calc(100vh - 70px)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
#packAdminModal .sheethead,
#packAdminModal .settings-tabs{
  flex:0 0 auto!important;
}
#packAdminModal .settings-pane{
  flex:1 1 0!important;
  min-height:0!important;
  overflow:auto!important;
}
#settingsPosArticlesPane.active{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
}
#settingsPosArticlesPane .pos-article-type-head{
  flex:0 0 auto!important;
  position:relative;
  z-index:2;
  background:#fff;
}
#posArticleTypeGrid{
  flex:1 1 0!important;
  min-height:0!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  touch-action:pan-y;
  padding-right:8px!important;
  padding-bottom:30px!important;
  scrollbar-width:auto!important;
  scrollbar-color:#aaa transparent!important;
}
#posArticleTypeGrid::-webkit-scrollbar{width:12px!important}
#posArticleTypeGrid::-webkit-scrollbar-thumb{background:#aaa!important;border-radius:8px!important;border:3px solid #fff!important}
#posArticleTypeGrid::-webkit-scrollbar-track{background:#f2f2ef!important;border-radius:8px!important}

@media(max-height:850px){
  #packAdminModal .admin-sheet{
    height:calc(100vh - 34px)!important;
    max-height:calc(100vh - 34px)!important;
  }
}

/* Photographes */
.commission-admin-actions{display:flex;gap:7px;align-items:center}
.commission-card-actions{display:flex;justify-content:flex-end;margin-top:8px}
.delete-photographer-btn{
  border:0;border-radius:8px;padding:6px 8px;background:#f3e7e5;color:#95463d;
  font-size:8px;font-weight:900;
}
.photographer-admin-sheet{width:min(540px,92vw)}
.photographer-admin-form{
  display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px;
}
.photographer-admin-form label{display:block;font-size:9px;color:#666;font-weight:850}
.photographer-admin-form input,.photographer-admin-form select{
  width:100%;margin-top:4px;border:1px solid #d5d5d1;background:#fff;border-radius:9px;padding:9px;
}
.photographer-admin-footer{display:flex;justify-content:flex-end;margin-top:12px}

/* Ticket email */
.ticket-email-sheet{width:min(500px,92vw)}
.ticket-email-form{margin-top:12px}
.ticket-email-form label{display:block;font-size:9px;color:#666;font-weight:850}
.ticket-email-form input{
  width:100%;margin-top:4px;border:1px solid #d5d5d1;border-radius:9px;padding:10px;
}
.ticket-email-summary{
  margin:10px 0;padding:10px;border-radius:10px;background:#f5f5f3;
  font-size:9px;color:#666;line-height:1.4;
}
.ticket-email-action{
  margin-top:10px;
  width:100%;
  border:0;
  border-radius:10px;
  background:#111;
  color:#fff;
  padding:10px;
  font-weight:900;
  font-size:10px;
}

/* TEST-8 — ticket imprimable */
.company-identity-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
.company-identity-grid input,.company-identity-grid textarea{width:100%;margin-top:5px;border:1px solid #d5d5d1;background:#fff;border-radius:10px;padding:10px 11px;resize:vertical}
.ticket-actions-row{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}
.ticket-print-action,.ticket-email-action{width:100%;border:0;border-radius:10px;padding:10px;font-weight:900;font-size:10px}
.ticket-print-action{background:#ececea;color:#111}.ticket-email-action{background:#111;color:#fff}
.ticket-print-sheet{width:min(560px,94vw);max-height:94vh;overflow:auto}
.ticket-print-content{background:#fff;padding:20px}
.ticket-print-company{text-align:center;border-bottom:1px solid #ddd;padding-bottom:12px;margin-bottom:12px}
.ticket-print-company h1{margin:0;font-size:20px}.ticket-print-company p{margin:3px 0;color:#555;font-size:9px}
.ticket-print-title{text-align:center;margin-bottom:14px}.ticket-print-title strong{display:block;font-size:15px}.ticket-print-title span{display:block;margin-top:3px;font-size:9px;color:#666}
.ticket-print-lines{border-top:1px solid #ddd}.ticket-print-line{display:grid;grid-template-columns:1fr 95px;gap:10px;padding:8px 0;border-bottom:1px solid #eee;font-size:10px}.ticket-print-line strong{text-align:right}
.ticket-print-total{display:flex;justify-content:space-between;gap:15px;margin-top:12px;padding-top:10px;border-top:2px solid #111;font-size:16px;font-weight:900}
.ticket-print-payments{margin-top:12px;padding:9px;background:#f5f5f3;border-radius:9px}.ticket-print-payment{display:flex;justify-content:space-between;gap:12px;font-size:9px;padding:2px 0}
.ticket-print-vat{margin-top:15px;text-align:center;font-size:9px;font-weight:850}.ticket-print-footer{margin-top:12px;text-align:center;color:#777;font-size:8px}
.ticket-print-actions{display:flex;justify-content:flex-end;margin-top:10px}
@media print{
  body *{visibility:hidden!important}
  #ticketPrintContent,#ticketPrintContent *{visibility:visible!important}
  #ticketPrintContent{position:absolute!important;left:0!important;top:0!important;width:100%!important;padding:0!important;margin:0!important}
  .no-print{display:none!important}
  @page{margin:12mm}
}


/* =========================================================
   TEST-9 — Articles caisse : aucune information rognée
   ========================================================= */

/* Une seule colonne : chaque article utilise toute la largeur disponible. */
#settingsPosArticlesPane #posArticleTypeGrid{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:8px!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
}

/* Chaque fiche reste strictement dans la largeur du panneau. */
#settingsPosArticlesPane .pos-article-type-row{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:64px minmax(190px,1fr) 120px 120px minmax(180px,240px)!important;
  gap:10px!important;
  align-items:center!important;
}

/* Les textes et contrôles peuvent réellement rétrécir sans pousser hors écran. */
#settingsPosArticlesPane .pos-article-type-info{
  min-width:0!important;
  overflow:hidden!important;
}
#settingsPosArticlesPane .pos-article-type-info b,
#settingsPosArticlesPane .pos-article-type-info small{
  display:block!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

#settingsPosArticlesPane .pos-article-type-row select,
#settingsPosArticlesPane .pos-article-type-row input{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}

#settingsPosArticlesPane .pos-article-visual-controls{
  min-width:0!important;
  width:100%!important;
}

/* Sur écran plus étroit, compacter légèrement mais garder une ligne complète. */
@media(max-width:1250px){
  #settingsPosArticlesPane .pos-article-type-row{
    grid-template-columns:58px minmax(150px,1fr) 105px 105px minmax(150px,200px)!important;
    gap:7px!important;
  }
}

/* Si l'écran devient vraiment trop étroit, on passe les réglages visuels dessous. */
@media(max-width:1000px){
  #settingsPosArticlesPane .pos-article-type-row{
    grid-template-columns:58px minmax(150px,1fr) 100px 100px!important;
  }
  #settingsPosArticlesPane .pos-article-visual-controls{
    grid-column:2 / -1!important;
  }
}


/* =========================================================
   TEST-10 — bouton CAISSE vert/rouge
   ========================================================= */
.pos-caisse-toggle{
  width:112px;
  min-width:112px;
  height:36px;
  border:0;
  border-radius:10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font-size:9px;
  font-weight:950;
  letter-spacing:.04em;
  transition:.12s ease;
}
.pos-caisse-toggle.on{
  background:#dff2e3;
  color:#2f6d3c;
  box-shadow:inset 0 0 0 1px #b9dfc1;
}
.pos-caisse-toggle.off{
  background:#f6dfdc;
  color:#9a3f36;
  box-shadow:inset 0 0 0 1px #e7bbb5;
}
.pos-caisse-toggle:active{
  transform:scale(.97);
}
.pos-caisse-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:currentColor;
}
#settingsPosArticlesPane .pos-article-type-row{
  grid-template-columns:64px minmax(190px,1fr) 112px 120px minmax(180px,240px)!important;
}
@media(max-width:1250px){
  #settingsPosArticlesPane .pos-article-type-row{
    grid-template-columns:58px minmax(150px,1fr) 105px 105px minmax(150px,200px)!important;
  }
}


/* TEST-10.1 — vrai bouton CAISSE */
.pos-caisse-toggle{
  width:112px!important;
  min-width:112px!important;
  height:36px!important;
  border:0!important;
  border-radius:10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  font-size:9px!important;
  font-weight:950!important;
  letter-spacing:.04em!important;
  cursor:pointer!important;
}
.pos-caisse-toggle.on{
  background:#dff2e3!important;
  color:#2f6d3c!important;
  box-shadow:inset 0 0 0 1px #b9dfc1!important;
}
.pos-caisse-toggle.off{
  background:#f6dfdc!important;
  color:#9a3f36!important;
  box-shadow:inset 0 0 0 1px #e7bbb5!important;
}
.pos-caisse-toggle:active{
  transform:scale(.97);
}
.pos-caisse-dot{
  width:9px!important;
  height:9px!important;
  border-radius:50%!important;
  background:currentColor!important;
}

/* TEST-11 — Stripe */
.online-sales-page{min-height:0}
.online-sync-status{display:inline-flex;align-items:center;border-radius:9px;padding:7px 9px;background:#eee;color:#666;font-size:8px;font-weight:900}
.online-sync-status.ok{background:#e4f2e5;color:#3f7045}
.online-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:9px}
.online-kpi{border:1px solid #e0e0dc;border-radius:14px;padding:10px 11px;background:#f5f5f3}
.online-kpi.money{background:#e7eef9}.online-kpi.refund{background:#f7e5e2}.online-kpi.net{background:#e7f2e8}
.online-kpi span{display:block;font-size:8px;color:#777;font-weight:900}.online-kpi strong{display:block;margin-top:4px;font-size:18px}
.online-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}
.online-filters{display:flex;gap:6px}.online-filter{border:0;background:#ececea;border-radius:10px;padding:8px 11px;font-size:10px;font-weight:850}.online-filter.active{background:#111;color:#fff}
.online-search{min-width:250px;border:1px solid #d9d9d5;background:#fff;border-radius:10px;padding:8px 10px}
.online-layout{display:grid;grid-template-columns:minmax(460px,1fr) 380px;gap:10px;flex:1;min-height:0}
.online-list-panel{min-height:0;background:#f3f3f0;border-radius:15px;padding:9px}.online-sales-list{height:100%;overflow:auto;display:flex;flex-direction:column;gap:6px}
.online-sale-card{border:1px solid #ddd;background:#fff;border-radius:12px;padding:9px 10px;text-align:left}.online-sale-card.active{border:2px solid #111;padding:8px 9px}
.online-sale-top{display:flex;justify-content:space-between;gap:10px}.online-sale-card b{font-size:11px}.online-sale-card strong{font-size:13px}.online-sale-card small{display:block;margin-top:3px;color:#777;font-size:8px}
.online-kind{display:inline-block;border-radius:7px;padding:3px 6px;font-size:7px;font-weight:900;margin-left:6px}.online-kind.sale{background:#e4f2e5;color:#3f7045}.online-kind.refund{background:#f5dfdc;color:#934039}
.online-sale-detail{min-height:0;overflow:auto;background:#f7f7f5;border-radius:15px;padding:12px}.online-empty{height:100%;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#888}.online-empty>div{font-size:32px}.online-empty span{font-size:9px;margin-top:3px}
.online-detail-head h2{margin:2px 0;font-size:17px}.online-detail-meta{font-size:9px;color:#777}.online-detail-amount{margin-top:8px;font-size:22px;font-weight:900}
.online-customer-card,.online-items-card,.online-stripe-card{margin-top:10px;background:#fff;border:1px solid #ddd;border-radius:11px;padding:10px}
.online-customer-card strong{display:block;font-size:11px}.online-customer-card span{display:block;font-size:9px;color:#666;margin-top:2px}
.online-item{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid #eee;font-size:9px}.online-item:last-child{border-bottom:0}
.online-stripe-card{font-size:8px;color:#666;word-break:break-all}


/* =========================================================
   TEST-13 — Factures fournisseurs centralisées
   ========================================================= */
.supplier-sync-status{
  display:inline-flex;
  align-items:center;
  border-radius:9px;
  padding:7px 9px;
  background:#eee;
  color:#666;
  font-size:8px;
  font-weight:900;
}
.supplier-sync-status.ok{background:#e4f2e5;color:#3f7045}
.supplier-sync-status.error{background:#f6dfdc;color:#934039}
.supplier-attachment-status{
  display:block;
  margin-top:4px;
  font-size:8px;
  color:#777;
}
.supplier-proof-btn{
  border:0;
  border-radius:8px;
  padding:6px 8px;
  background:#e7eef9;
  color:#355d87;
  font-size:8px;
  font-weight:900;
}
.supplier-proof-btn[disabled]{
  background:#eee;
  color:#999;
}
.invoice-status.reconciled{
  background:#dcefe3;
  color:#28633b;
}
.supplier-source-badge{
  display:inline-block;
  margin-top:3px;
  padding:2px 5px;
  border-radius:6px;
  background:#eee;
  color:#777;
  font-size:7px;
  font-weight:850;
}

/* TEST-14 */
.online-main-tabs{display:flex;gap:6px;margin-bottom:9px}.online-main-tab{border:0;background:#e9e9e6;border-radius:10px;padding:8px 12px;font-weight:850;font-size:9px}.online-main-tab.active{background:#111;color:#fff}.online-main-pane{display:none;min-height:0;flex:1}.online-main-pane.active{display:block}.stripe-payouts-list{display:flex;flex-direction:column;gap:7px;overflow:auto;min-height:0}.stripe-payout-card{background:#fff;border:1px solid #ddd;border-radius:12px;padding:10px}.stripe-payout-top{display:flex;justify-content:space-between;gap:10px}.stripe-payout-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:7px}.stripe-payout-grid div{background:#f5f5f3;border-radius:8px;padding:7px}.stripe-payout-grid span{display:block;font-size:7px;color:#777;font-weight:850}.stripe-payout-grid strong{font-size:11px}.payout-status{font-size:7px;border-radius:6px;padding:3px 5px;background:#e4f2e5;color:#35683d;font-weight:900}.yavin-info{background:#f2f2ef;border-radius:10px;padding:9px;font-size:9px;color:#666;margin-bottom:8px}.yavin-row{display:grid;grid-template-columns:115px 90px 1fr 100px;gap:8px;align-items:center;background:#fff;border:1px solid #ddd;border-radius:11px;padding:8px;font-size:9px}.yavin-row .ok{color:#35683d;font-weight:900}.yavin-row .warn{color:#9a4a3c;font-weight:900}.supplier-justification-only{display:flex!important;gap:8px;align-items:center;background:#f5f5f3;border-radius:9px;padding:8px}.supplier-justification-only input{width:auto;margin:0}

.pdp-panel{padding:24px;max-width:1050px;margin:auto;overflow:auto;height:calc(100vh - 80px)}
.pdp-panel h2{margin-top:28px}.pdp-panel p{line-height:1.5}.pdp-panel button,.pdp-panel input,.pdp-panel select{padding:10px;margin:4px;border:1px solid #c8c8c8;border-radius:6px}.pdp-fields{display:flex;flex-wrap:wrap;gap:12px}.pdp-fields label{display:flex;flex-direction:column;min-width:200px}.pdp-row{padding:16px;margin:10px 0;background:#fff;border:1px solid #ddd;border-radius:8px}

/* V1.0.1-r1 — configuration partagée, accessible sur iPad. */
#packAdminModal .settings-tabs{flex-wrap:wrap}
.bank-settings-actions{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
#settingsBankPane p{line-height:1.5}
#bankSettingsStatus{padding:12px;background:#f3f3f0;border-radius:10px;overflow-wrap:anywhere}
@media(max-width:700px){#settingsBankPane .bank-powens-config{flex-direction:column}#settingsBankPane .bank-relay-fields{grid-template-columns:1fr}}

/* Client editor: author display rules must respect the hidden state. */
#clientEditorEmpty[hidden], #clientForm[hidden]{display:none!important}
.client-edit-label{display:block;margin-top:7px;font-size:11px;font-weight:700;color:#355d87}

/* r4: clearer client selection and address suggestions. */
#billingClientSelect{font-size:16px;min-height:46px;padding:11px 12px}
.billing-client-picker-row label{font-size:13px}
.address-results{font-size:13px;line-height:1.5;color:#454545}
.address-results:empty{display:none}
.address-results p{margin:6px 0;white-space:pre-line}
.address-results button,.address-lookup>button{font-size:14px;padding:9px 12px;margin:4px 6px 4px 0;border:1px solid #b7c5d4;border-radius:9px;background:#fff;color:#244565;cursor:pointer}
.address-results button:focus-visible,.address-lookup>button:focus-visible{outline:3px solid #488de0;outline-offset:2px}

/* r6: collapsible Caisse navigation. */
.side{overflow-y:auto;overflow-x:hidden;min-height:0}
.side>.nav,.side>.logo,.side>.caisse-nav-items{flex-shrink:0}
.caisse-nav-items{width:100%;padding:3px 0 5px;border-bottom:1px solid #e5e5e2;margin-bottom:4px}
.caisse-nav-items[hidden]{display:none!important}
.side .caisse-subnav{width:100%;min-height:36px;height:auto;padding:8px 3px;margin:2px 0;border-radius:10px;font-size:12px;font-weight:700;line-height:1.25;white-space:normal}
.side .caisse-subnav.active{background:#e8eef8;color:#23476b}
.side .nav:focus-visible{outline:2px solid #397cc5;outline-offset:-2px}

/* Dedicated Caisse pages use the main workspace, never the settings overlay. */
.caisse-editor-page{min-height:0;overflow:hidden}
.caisse-editor-page>.module-head,.caisse-editor-page>.settings-tabs{flex-shrink:0}
.caisse-editor-scroll{flex:1;min-height:0;overflow:auto;padding:0 4px 16px}
.caisse-editor-scroll .admin-layout{min-height:0}
.caisse-editor-page .settings-tabs{flex-wrap:wrap}
@media(max-width:760px){.caisse-editor-scroll .admin-layout{grid-template-columns:1fr}.caisse-editor-page .module-head{flex-wrap:wrap;gap:10px}}

/* r9: the standalone page owns scrolling; the former modal grid grows naturally. */
#posCatalogView #settingsPosArticlesPane.active{display:block!important;overflow:visible!important;height:auto!important;max-height:none!important}
#posCatalogView #settingsPosArticlesPane #posArticleTypeGrid{flex:none!important;height:auto!important;max-height:none!important;overflow:visible!important;scrollbar-gutter:auto}
#posCatalogView .pos-charge-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
@media(max-width:600px){#posCatalogView .pos-charge-head{flex-wrap:wrap}}

.purchase-nav-items{border-left:2px solid #dae1ea;margin-left:5px;padding-left:3px}
.purchase-nav-items[hidden]{display:none!important}
.quotes-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:14px;min-height:0;flex:1}
.quotes-layout>aside,.quotes-layout>#quoteEditor{overflow:auto;min-height:0;padding:12px;background:#f6f6f3;border-radius:14px}
#quoteSearch{width:100%;padding:10px;border:1px solid #ddd;border-radius:8px}
#quoteList button{display:block;width:100%;text-align:left;background:white;border:1px solid #ddd;border-radius:10px;padding:12px;margin-top:8px}
.quote-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.quote-fields label{display:flex;flex-direction:column;gap:5px;font-size:13px}
.quote-fields input,.quote-fields select,.quote-fields textarea,.quote-line input,#quoteProduct{width:100%;padding:10px;border:1px solid #ddd;border-radius:8px;font:inherit}
.quote-line{display:grid;grid-template-columns:minmax(120px,1fr) 80px 100px 42px;gap:8px;margin:8px 0}
.quote-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.quote-actions button,.quote-line button{padding:10px;border:1px solid #ccc;border-radius:9px;background:white;cursor:pointer}
@media(max-width:800px){.quotes-layout{grid-template-columns:1fr;overflow:auto}.quotes-layout>aside{max-height:200px}.quotes-layout>#quoteEditor{overflow:visible}.quote-fields{grid-template-columns:1fr}.quote-line{grid-template-columns:minmax(90px,1fr) 60px 80px 32px}}

/* r11: respect hidden placeholders, align editor and compact product labels. */
#billingArticleEditorEmpty[hidden],#billingArticleForm[hidden],#posArticleCreateForm[hidden]{display:none!important}
.billing-articles-layout{grid-template-columns:minmax(230px,310px) minmax(0,1fr)}
.billing-article-editor,.billing-article-list-panel,.billing-article-form-grid label{min-width:0}
.billing-article-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.billing-article-form-grid input,.billing-article-form-grid select,.billing-article-form-grid textarea{box-sizing:border-box;max-width:100%;min-width:0}
.billing-article-editor-head{position:static;padding-top:0}
.article-create-icon{display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:42px;padding:9px;flex-shrink:0}
.pos-catalog-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
#settingsPosArticlesPane .pos-charge-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
#settingsPosArticlesPane .pos-article-type-info{max-width:230px}
#settingsPosArticlesPane .pos-article-type-info b{font-size:13px}
#settingsPosArticlesPane .pos-article-type-info small{font-size:11px}
#posArticleCreateForm{background:#f3f3f0;border-radius:14px;padding:16px;margin:12px 0;flex-shrink:0}
.pos-create-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}
.pos-create-fields label{display:flex;flex-direction:column;gap:6px;font-size:13px}
.pos-create-fields input,.pos-create-fields select{box-sizing:border-box;min-width:0;width:100%;padding:10px;border:1px solid #ddd;border-radius:8px;background:white}
@media(max-width:850px){.billing-articles-layout{grid-template-columns:1fr;overflow:auto}.billing-article-list-panel{max-height:240px}.billing-article-editor{overflow:visible}.pos-create-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* r13 — Same editing workspace and live document for quotes and invoices. */
.document-editor-sheet{width:min(1440px,97vw);height:94vh;max-height:94vh;display:flex;flex-direction:column;overflow:hidden}
.document-workspace{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(320px,1fr);gap:20px;flex:1;min-height:0;overflow:hidden}
.document-form{min-width:0;min-height:0;overflow:auto;padding-right:8px}
.document-form .billing-section:first-child{margin-top:0}
.document-form label{font-size:12px;color:#555;font-weight:700}
.document-form input,.document-form select,.document-form textarea{font:inherit;width:100%;box-sizing:border-box;min-width:0;padding:10px;border:1px solid #d8d8d4;border-radius:9px;background:white}
.document-form [hidden]{display:none!important}
.document-preview-panel{background:#eaeae7;border-radius:14px;padding:14px;overflow:auto;min-height:0;min-width:0}
.document-preview-heading{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px;font-size:12px}
.document-preview-heading span,.document-preview-panel>small{font-size:11px;color:#666}
.document-preview-button{display:block;width:100%;padding:0;margin-bottom:12px;border:0;background:white;cursor:zoom-in;color:#222;text-align:left;border-radius:2px;box-shadow:0 3px 10px #0001}
.document-preview-button:focus-visible{outline:3px solid #1769aa;outline-offset:3px}
.commercial-document{font:12px Arial,sans-serif;color:#222;background:white;padding:26px;min-height:550px;box-sizing:border-box;overflow-wrap:anywhere}
.commercial-document header{display:flex;justify-content:space-between;gap:20px;border-bottom:2px solid #222;padding-bottom:15px}
.commercial-document header>div{min-width:0;flex:1}.commercial-document h1{font-size:24px;margin:0 0 8px}.commercial-document h2{font-size:14px;margin:20px 0}
.document-company{text-align:right}.commercial-document p{white-space:pre-line;line-height:1.5;margin:5px 0}.document-client{margin:20px 0}.document-client small{color:#777;font-size:9px}
.commercial-document table{width:100%;border-collapse:collapse;font-size:11px;table-layout:fixed}.commercial-document th,.commercial-document td{border-bottom:1px solid #ddd;padding:9px 4px;vertical-align:top;text-align:right}.commercial-document th:first-child,.commercial-document td:first-child{text-align:left;width:43%}.commercial-document th{background:#f5f5f3}
.document-totals{margin:18px 0 18px auto;width:65%}.document-totals>div{display:flex;justify-content:space-between;gap:8px;padding:7px 0}.document-total{border-top:2px solid #222;font-size:15px}.document-notes{margin-top:22px}.commercial-document footer{margin-top:25px;font-size:10px;white-space:pre-line}
#billingPreviewModal{z-index:60}#billingPreviewModal .billing-preview-sheet{width:min(880px,96vw)}#billingPreviewContent{padding:0}#billingPreviewContent .commercial-document{font-size:14px;padding:35px}
.quote-footer{display:flex;flex-wrap:wrap;gap:8px}.quote-footer button{border:0;border-radius:10px;padding:12px;font-weight:700;cursor:pointer}.quote-footer [data-quote-action="save"]{background:#111;color:white}#quoteModalActions{flex-wrap:wrap}#quoteModalActions #quoteMessage{margin:0;font-size:12px;width:100%}
#quoteEditor .quote-fields{grid-template-columns:repeat(2,minmax(0,1fr))}#quoteEditor .quote-fields label{display:flex;flex-direction:column;gap:5px}#quoteEditor .quote-line{grid-template-columns:minmax(100px,1fr) 64px 90px 32px}#quoteEditor .quote-line button{padding:5px}#quoteEditor .quote-actions{margin:12px 0}
.document-list-help{padding:24px;color:#777}
@media(max-width:1000px){.document-workspace{grid-template-columns:1fr;overflow:auto}.document-form{overflow:visible}.document-preview-panel{overflow:visible}.document-editor-sheet{height:94vh}.document-preview-button{max-width:580px;margin:auto auto 12px}}
@media print{#billingPreviewModal.show{position:absolute!important;inset:0!important;padding:0!important;background:white!important;display:block!important;overflow:visible!important;backdrop-filter:none!important}#billingPreviewModal.show .sheet{display:block!important;max-height:none!important;width:100%!important;overflow:visible!important;box-shadow:none!important}#billingPreviewModal.show .sheethead,#billingPreviewModal.show .billing-preview-actions{display:none!important}#billingPreviewContent{position:static!important;max-height:none!important;overflow:visible!important}#billingPreviewContent,#billingPreviewContent *{visibility:visible!important}.commercial-document{min-height:0!important}.commercial-document tr{break-inside:avoid}}

.commercial-document header{height:auto;min-height:0;border:0;border-bottom:2px solid #222;border-radius:0;background:transparent;padding:0 0 15px;align-items:flex-start;position:static}
.document-form .billing-lines-head{display:none}
.document-form .billing-line-row,#quoteEditor .quote-line{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:10px;padding:12px;margin:10px 0;background:#fff;border:1px solid #ddd;border-radius:12px;align-items:end}
.document-line-half{grid-column:span 3}.document-line-full{grid-column:1/-1}.document-line-small{grid-column:span 2}.document-form .billing-line-total{font-size:12px;padding-bottom:12px;overflow-wrap:anywhere}
.document-form .billing-line-row label,#quoteEditor .quote-line label{display:flex;flex-direction:column;gap:5px;min-width:0}
.document-form .billing-line-actions{flex-wrap:wrap}.document-form .billing-lines-title{align-items:flex-start;flex-wrap:wrap}
.commercial-document header{height:auto!important;min-height:0!important}
.document-form .quote-actions button{border:0;border-radius:10px;padding:10px 12px;font-size:12px;font-weight:700;background:#e9e9e6}
.document-form .quote-actions button:first-of-type{background:#111;color:white}
#billingInvoiceModal,#quoteInvoiceModal{padding-top:50px;padding-bottom:16px}
.document-editor-sheet{height:calc(100vh - 76px);max-height:calc(100vh - 76px)}

/* Branded A4 portrait document; keep the supplied logo unchanged. */
.document-logo{display:block;width:180px;max-width:100%;height:auto;margin:0 0 6px auto;object-fit:contain}
.document-preview-button .commercial-document{aspect-ratio:210/297;min-height:0}
#billingPreviewContent .commercial-document{aspect-ratio:210/297;min-height:0}
@page commercial {size:A4 portrait;margin:15mm}
@media print{
 body.commercial-print{height:auto!important;overflow:visible!important;background:white!important}
 body.commercial-print> :not(#billingPreviewModal){display:none!important}
 body.commercial-print #billingPreviewModal{position:static!important;display:block!important;overflow:visible!important;margin:0!important;padding:0!important;height:auto!important}
 body.commercial-print #billingPreviewModal .sheet{border:0!important;border-radius:0!important;padding:0!important;margin:0!important;height:auto!important}
 body.commercial-print #billingPreviewContent{width:auto!important;border:0!important;margin:0!important}
 body.commercial-print .commercial-document{page:commercial;width:180mm!important;max-width:100%!important;aspect-ratio:auto!important;min-height:0!important;padding:0!important;font-size:10pt!important}
 body.commercial-print .document-logo{width:48mm}
 body.commercial-print .commercial-document thead{display:table-header-group}
 body.commercial-print .commercial-document tr,body.commercial-print .document-totals,body.commercial-print .commercial-document header{break-inside:avoid}
}

/* r15: compact identity, document reference above the rule, contacts below. */
.commercial-document{display:flex;flex-direction:column}
.commercial-document>header{display:block;padding:0 0 8px;flex:0 0 auto}
.commercial-document .document-brand{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px}
.commercial-document .document-brand>div{text-align:right;font-size:11px;max-width:65%}
.commercial-document .document-brand p{font-size:10px;margin:2px 0}
.commercial-document .document-logo{width:105px;height:auto;margin:0;flex-shrink:0}
.commercial-document .document-heading-line{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.commercial-document .document-heading-line h1{font-size:19px;margin:0}.document-heading-line h1 span{font-size:13px;font-weight:normal;margin-left:6px}
.commercial-document .document-heading-line p{font-size:11px;margin:0;white-space:nowrap}
.commercial-document .document-due{font-size:10px;text-align:right;margin:6px 0 0}
.commercial-document .document-client{margin:14px 0 4px}
.commercial-document .document-legal{font-size:10px;margin:18px 0;white-space:pre-line}
.commercial-document .document-contact-footer{margin-top:auto;padding-top:10px;border-top:1px solid #ccc;text-align:center;font-size:9px;line-height:1.6;white-space:normal}
.commercial-document .document-contact-footer span{padding:0 4px}
@media print{body.commercial-print .commercial-document{min-height:265mm!important}body.commercial-print .commercial-document .document-logo{width:28mm}body.commercial-print .document-contact-footer{break-inside:avoid}}

/* r16 — transactions chronologiques et historique client */
#navBank small{font-size:10px}
#transactionsSyncStatus{font-size:12px;color:#526478;margin:0 0 10px}
.bank-layout{grid-template-columns:minmax(0,1fr)}
.bank-layout.has-selection{grid-template-columns:minmax(0,1fr) 340px}
#bankMatchPanel[hidden]{display:none}
.bank-transactions-panel{background:white;padding:10px 16px;overflow:hidden}
.bank-transactions-list{display:block;padding-right:8px}
.transaction-month{font-size:21px;font-weight:600;text-transform:capitalize;margin:24px 0 18px 78px;color:#283647}
.transaction-line{display:grid;grid-template-columns:64px minmax(0,1fr);gap:14px;position:relative;margin-bottom:12px}
.transaction-day{text-align:center;font-size:17px;font-weight:700;padding-top:19px;color:#283647;border-right:1px solid #d5e1ed}
.transaction-day small{display:block;font-size:12px;font-weight:400;margin-top:3px}
.transaction-body{display:grid;grid-template-columns:minmax(140px,1fr) minmax(140px,240px) 115px;align-items:center;gap:14px;border:1px solid #d5e1ed;border-radius:10px;padding:16px;background:white;min-height:76px}
.transaction-line.selected .transaction-body{border-color:#466d99;background:#f4f8fd}
.transaction-open{background:none;border:0;text-align:left;padding:0;color:#283647;min-width:0;cursor:pointer}
.transaction-open strong{font-size:14px;overflow-wrap:anywhere;display:block}.transaction-open small{font-size:11px;display:block;color:#62748a;margin-top:7px;overflow-wrap:anywhere}
.transaction-category small{font-size:10px;color:#62748a;display:block;margin-bottom:3px}
.transaction-category select{font-size:13px;font-weight:600;color:#344d65;width:100%;background:transparent;border:0;padding:4px 0;min-width:0}
.transaction-value{text-align:right;font-size:15px;white-space:nowrap;color:#283647}.transaction-value.positive{color:#287451}
.transactions-empty{padding:30px;color:#62748a}.bank-filters{flex-wrap:wrap}
.client-invoice-history{margin:24px 0;border-top:1px solid #ddd;padding-top:18px}.client-invoice-history p{font-size:12px;color:#666}
.client-history-row{display:flex;align-items:center;gap:14px;border-bottom:1px solid #eee;padding:14px 0}.client-history-row>div{flex:1}.client-history-row small{display:block;margin-top:5px;font-size:12px;color:#666}
@media(max-width:1100px){.bank-layout.has-selection{grid-template-columns:1fr}.bank-layout.has-selection .bank-transactions-panel{min-height:220px}.transaction-body{grid-template-columns:minmax(100px,1fr) 140px 95px;padding:12px;gap:8px}}
@media(max-width:700px){.transaction-body{grid-template-columns:1fr 90px}.transaction-category{grid-row:2;grid-column:1 / -1}.transaction-line{grid-template-columns:42px 1fr;gap:6px}.transaction-month{margin-left:48px}}

.invoice-lock-notice{padding:13px 16px;background:#fff5dc;color:#72571c;border-radius:10px;font-size:13px;line-height:1.5;margin:12px 0}
.invoice-email-history{font-size:12px;color:#536b59}
#invoiceActionModal .invoice-action-card{position:relative;width:min(540px,94vw);max-height:88vh;overflow:auto;background:white;border-radius:20px;padding:28px}
#invoiceActionModal label{display:block;font-size:14px;margin:16px 0}
#invoiceActionModal input,#invoiceActionModal select{display:block;width:100%;padding:12px;border:1px solid #ddd;border-radius:8px;margin-top:7px;font-size:16px}
#invoiceActionMessage{white-space:pre-wrap;line-height:1.5;font-size:14px}
#invoiceActionSubmit{margin-top:12px}.billing-detail-actions{flex-wrap:wrap}

/* r18: compact navigation labels and soft debit/credit colours. */
.side .nav{box-sizing:border-box;max-width:100%;min-width:0;text-align:center}
.side .nav small,.side #navBank small{font-size:9px;line-height:1.25;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.side .caisse-subnav{font-size:10px;line-height:1.3;padding:8px 3px;overflow-wrap:anywhere;word-break:normal}
.side .purchase-nav-items .caisse-subnav{font-size:9.5px}
#bankView .transaction-value.negative,#bankView .bank-transaction-amount.negative,#bankView .bank-match-amount.negative,#bankView td.money.negative{color:#b85d68}
#bankView .transaction-value.positive,#bankView .bank-transaction-amount.positive,#bankView .bank-match-amount.positive,#bankView td.money.positive{color:#54856a}
#bankView .transaction-value.negative{background:#fff0f2}
#bankView .transaction-value.positive{background:#edf7f0}
#bankView .transaction-value{padding:6px 8px;border-radius:8px}
.side .nav:not(.caisse-subnav){padding-left:2px;padding-right:2px}

/* r19: coloured text only, without an amount badge. */
#bankView .transaction-value,
#bankView .transaction-value.negative,
#bankView .transaction-value.positive{background:transparent;border:0;box-shadow:none;border-radius:0;padding:0}

/* r20: explicit photo removal without deleting the product. */
.pos-article-photo-actions .pos-clear-photo{font-size:11px;line-height:1.3;padding:7px 9px;min-height:32px;white-space:normal;color:#9a3946;background:#fbe9ec;border-radius:7px}
.pos-article-photo-actions .pos-clear-photo[hidden]{display:none}

/* r21: iPad touch layout, safe areas and portrait workspaces. */
@media screen{
 body>.app{padding-bottom:max(8px,env(safe-area-inset-bottom));padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
 .ipad-install-help{background:#f0f5fb;border-radius:14px;padding:16px;margin-bottom:18px;font-size:14px;line-height:1.5}
}
@media screen and (max-width:1180px), screen and (pointer:coarse){
 button,label.pos-article-photo-label{touch-action:manipulation}
 input,select,textarea{font-size:16px!important}
 .side .caisse-subnav{min-height:44px!important}
 .module-head,.module-actions,.bank-toolbar,.billing-toolbar{flex-wrap:wrap;gap:8px}
 .module-actions button,.primary-small,.secondary-action,.bank-filter,.bank-tab,.billing-filter,.billing-period,.settings-tab,.cat{min-height:44px}
 .module-page{padding:16px;min-width:0}
 .modal{padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom))}
 .sheet{max-height:calc(100dvh - 64px);overflow-y:auto;overscroll-behavior:contain}
 .document-editor-sheet{height:calc(100dvh - 64px)!important;width:calc(100vw - 24px)!important}
 .document-editor-actions{flex-wrap:wrap}
 .sheethead{gap:8px}.sheethead .close,.close-modal{min-width:44px;min-height:44px}
 .photographer,.activity{min-height:44px;padding:8px 10px}
 .active-banner{flex-wrap:wrap;gap:8px;padding:10px!important}
 .active-label{min-width:0}.active-label strong{font-size:18px}.switchers{flex-wrap:wrap;gap:6px}
 .controls button{min-width:36px;min-height:36px}
 .pos-article-photo-actions{flex-wrap:wrap;gap:6px}
 .pos-article-photo-label,.pos-clear-photo{min-height:44px!important;font-size:12px!important}
 #settingsPosArticlesPane .pos-article-type-row{grid-template-columns:58px minmax(100px,1fr) 112px!important;gap:10px!important}
 #settingsPosArticlesPane .pos-article-type-row>select{grid-column:2}
 #settingsPosArticlesPane .pos-article-visual-controls{grid-column:2 / -1!important}
 .bank-search,.online-search{min-width:0;max-width:100%;flex:1}
 .transaction-category select{min-height:44px;font-size:14px!important}
 .billing-detail-actions{flex-wrap:wrap}.client-history-row{flex-wrap:wrap}
 .online-layout{grid-template-columns:minmax(0,1fr) 300px}
}
@media screen and (max-width:900px){
 .app{grid-template-columns:76px minmax(0,1fr);gap:8px;padding:8px}
 .side{padding:8px 3px}.side .nav{max-width:100%}
 #saleView>.body{grid-template-columns:minmax(0,1fr) 290px}
 #products{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .live-clock{min-width:95px}.active-banner .switchers{width:100%;justify-content:space-between}
 .active-label strong{font-size:17px}
 .tickets-layout,.billing-layout,.clients-layout,.supplier-layout,.billing-articles-layout,.online-layout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(150px,27%) minmax(0,1fr);overflow:hidden;min-height:0}
 .tickets-layout>*,.billing-layout>*,.clients-layout>*,.supplier-layout>*,.billing-articles-layout>*,.online-layout>*{min-height:0;max-height:100%;overflow:auto}
 .billing-kpis,.bank-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 .billing-form-grid,.client-form-grid,.supplier-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .bank-layout.has-selection{grid-template-rows:minmax(150px,1fr) minmax(180px,1fr)}
 .transaction-body{grid-template-columns:minmax(0,1fr) 100px}
 .transaction-category{grid-column:1 / -1;grid-row:2}.transaction-value{grid-column:2;grid-row:1}
 .transaction-month{font-size:19px;margin-left:52px}.transaction-line{grid-template-columns:40px minmax(0,1fr);gap:10px}
 .settings-tabs{flex-wrap:wrap}.admin-layout{grid-template-columns:1fr;min-height:0}
 .document-preview-panel{margin-top:12px}
 .test-mode-banner{gap:6px;padding:0 6px}.test-mode-banner span{font-size:9px}.test-mode-banner button{font-size:8px}
}
@media screen and (max-width:700px){
 #saleView>.body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(160px,1fr) minmax(260px,1fr)}
 #products{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 .billing-form-grid,.client-form-grid,.supplier-form-grid{grid-template-columns:1fr}
 .billing-form-grid .span-2,.client-form-grid .span-2{grid-column:auto}
 .test-mode-banner span{display:none}
}

@media screen and (min-width:901px) and (max-width:1180px){#products{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media screen and (max-width:1180px), screen and (pointer:coarse){
 .side{padding:8px 3px}.side .caisse-subnav{font-size:9px;height:auto!important;padding:6px 2px}.side .nav small,.side #navBank small{font-size:8.5px}
}
@media screen and (max-width:1000px){
 .document-workspace{display:block;overflow-y:auto;overscroll-behavior:contain}
 .document-workspace>.document-form{height:auto;max-height:none;overflow:visible;padding-right:0}
 .document-workspace>.document-preview-panel{height:auto;max-height:none;overflow:visible;margin-top:20px}
}
