:root{color-scheme:dark;--bg:#140f16;--surface:#241b26;--surface2:#302431;--line:#514050;--accent:#ab5279;--accentHi:#cf7499;--ink:#fff5fb;--muted:#cbb6c6;--green:#94e6b2;--orange:#ffd08c;--red:#ff99a4;--shadow:0 16px 40px #07030966}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0}body{font:14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--ink);-webkit-tap-highlight-color:transparent}button,input,select,textarea{font:inherit}button{color:inherit;cursor:pointer;touch-action:manipulation}button:disabled{opacity:.45;cursor:not-allowed}input,select,textarea{background:#171019;color:#fff;border:1px solid #775b70;border-radius:10px;padding:11px 12px;width:100%;min-height:43px}input:focus-visible,button:focus-visible,textarea:focus-visible{outline:2px solid #f3a3c5;outline-offset:2px}textarea{resize:vertical;min-height:100px}input[type=number]{font-variant-numeric:tabular-nums}input[type=search]{appearance:none}a{color:#ffd3e6}small,.small{font-size:11px}.muted{color:var(--muted)}.green{color:var(--green)}.warn{color:var(--orange)}.danger{color:var(--red)}.hidden{display:none!important}button{border:0}h1,h2,h3,p{margin:0}h2{font-size:18px;letter-spacing:-.02em;margin-bottom:10px}h3{font-size:15px;margin-bottom:9px}p+p{margin-top:9px}.row{display:flex;align-items:center;gap:8px}.space{justify-content:space-between}.end{justify-content:flex-end}.wrap{flex-wrap:wrap}.stack{display:flex;flex-direction:column;gap:9px}.grow{flex:1;min-width:0}.right{text-align:right}.strong{font-weight:800}.mono{font-variant-numeric:tabular-nums}.badge{display:inline-flex;align-items:center;justify-content:center;background:var(--accent);min-width:25px;height:25px;padding:0 6px;border-radius:100px;color:white;font-size:13px;font-weight:900}.badge.small{min-width:19px;height:19px;font-size:11px}.btn{border:1px solid #74576e;background:#423143;border-radius:11px;padding:11px 13px;font-size:13px;font-weight:800;min-height:43px}.btn.primary{background:#995072;border-color:#d17a9d}.btn.alt{background:#2d2630;border-color:#6b5367}.btn.success{background:#326249;border-color:#75ba8c}.btn.ghost{background:transparent;border-color:#61505e}.btn.danger-btn{background:#6a303c;border-color:#bb697d}.btn.sm{min-height:33px;padding:6px 10px;font-size:12px}.btn.square{width:42px;padding:0;font-size:23px}.btn.full{width:100%}.tag{display:inline-flex;border:1px solid #82647b;background:#3a2b39;border-radius:50px;padding:3px 8px;font-size:10px}.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:14px;box-shadow:0 2px 10px #09050b33}.listcard{background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:11px}.note{font-size:12px;color:var(--muted)}.notice{border:1px solid #886743;background:#3e2c25;border-radius:10px;padding:10px;color:#ffe1b4;font-size:12px}.empty{text-align:center;padding:30px 10px;color:var(--muted)}.divider{height:1px;background:var(--line);margin:6px 0}label{display:flex;flex-direction:column;gap:5px;color:#ead7e4;font-size:12px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.section{margin-bottom:16px}.section-title{font-weight:850;font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:#f3d8e6;margin:16px 2px 8px}
#app{height:100dvh;min-height:500px;display:flex;flex-direction:column;overflow:hidden;max-width:900px;margin:0 auto;background:var(--bg)}.boot{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.spinner{width:26px;height:26px;border-radius:50%;border:3px solid #8a6481;border-top-color:#fff;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
header{padding:max(10px,env(safe-area-inset-top)) 12px 8px;background:linear-gradient(120deg,#622e4a,#201622);border-bottom:1px solid #67415a;flex:none}header .brand{font-weight:950;font-size:17px;letter-spacing:.05em;line-height:1.1}header .brand span{font-weight:450;font-size:10px;letter-spacing:.08em}header .subtitle{font-size:11px;color:#e9cada;margin-top:3px}.status{font-size:10px;display:flex;align-items:center;gap:4px;color:#d3f9e0}.status.error{color:#ffb5bb}.status .dot{height:8px;width:8px;border-radius:50%;background:#77dba6}.status.error .dot{background:#ff909a}.top-actions{display:flex;gap:6px;align-items:center}.top-actions .btn{min-height:34px;padding:6px 9px}.eventbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 12px 5px;background:#1c151e}.eventbar .eventname{font-size:12px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eventbar .tag{white-space:nowrap}
nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:7px 9px 9px;background:#1c151e;border-bottom:1px solid #594353;flex:none}nav button{background:#312533;border:1px solid #5e485e;border-radius:100px;padding:9px 2px;font-size:11px;font-weight:850;white-space:nowrap}nav button.active{background:#854060;border-color:#df88aa}
main{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;padding:10px 11px 20px;scrollbar-width:thin}.searchrow{display:flex;gap:7px;margin-bottom:8px}.searchrow input{flex:1;min-width:0;min-height:40px;padding:8px 10px}.chips{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:0 0 10px}.chips::-webkit-scrollbar{display:none}.chip{border:1px solid #694f65;background:#352836;border-radius:50px;white-space:nowrap;padding:8px 13px;font-size:12px;font-weight:750;flex:none}.chip.on{background:#9a4e70;border-color:#e094b4}.catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-content:start}.product{position:relative;min-height:97px;display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;text-align:left;background:#2a202b;border:1.5px solid #594457;border-radius:12px;padding:12px 11px 10px;overflow:hidden;box-shadow:0 3px 12px #0b080d22}.product.added{border-color:#e086ab;background:linear-gradient(130deg,#533045,#30232f)}.product .name{font-size:13px;font-weight:850;line-height:1.18;max-width:calc(100% - 24px);min-height:30px;overflow-wrap:anywhere}.product .bottom{display:flex;justify-content:space-between;align-items:flex-end;gap:3px}.product .price{font-size:15px;font-weight:950}.product .stock{font-size:10px;color:#d9cad4}.product .stock.low{color:#ffdb9e}.product .counter{position:absolute;right:7px;top:7px;background:#f1abd1;color:#331627;border-radius:100px;font-weight:950;font-size:13px;min-width:23px;height:23px;display:flex;align-items:center;justify-content:center;padding:0 5px}.product .plus{font-size:23px;line-height:1;color:#e8a5c5}.product .stockwarn{color:var(--orange);font-size:10px;margin-top:3px;font-weight:700}
footer{flex:none;background:#1b151e;border-top:1px solid #694b5f;padding:8px 12px max(10px,env(safe-area-inset-bottom));box-shadow:0 -9px 28px #08060977}.footer-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:7px}.footer-total{font-weight:950;font-size:23px;letter-spacing:-.04em}.footer-steps{display:grid;grid-template-columns:1fr 1fr;gap:8px}.footer-steps .btn{min-height:48px;font-size:15px}.footer-steps .primary{background:#965072}.footer-steps .success{background:#315d46}.cartlink{background:transparent;border:0;text-align:left;padding:3px 0;display:flex;align-items:center;gap:5px;font-size:13px;font-weight:800}
.metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.metric{background:linear-gradient(120deg,#553047,#2a222d);border:1px solid #755269;border-radius:12px;padding:12px;min-height:78px}.metric .title{font-size:11px;color:#ead2dd}.metric .number{font-weight:950;font-size:23px;margin-top:4px;letter-spacing:-.03em;overflow-wrap:anywhere}.finline{padding:8px 0;border-bottom:1px solid var(--line);display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:12px}.finline:last-child{border-bottom:0}.finline strong{white-space:nowrap}.finline.total{font-size:16px;color:var(--green);font-weight:850}.finline.total strong{font-size:20px}.table-wrap{overflow:auto;max-width:100%}table{border-collapse:collapse;width:100%;font-size:11px;white-space:nowrap}th,td{padding:8px 7px;border-bottom:1px solid var(--line);text-align:right}th:first-child,td:first-child{text-align:left}th{color:#f2cfe1;background:#352635}.history-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}.history-item:last-child{border:0}.history-item .title{font-weight:850}.history-item .sub{font-size:11px;color:var(--muted);margin-top:2px}.history-item .amount{font-size:14px;font-weight:900}.formrow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.settings-item{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--line)}.settings-item:last-child{border-bottom:0}.settings-item .name{font-size:13px;font-weight:800}.settings-item .sub{font-size:11px;color:var(--muted)}.accordion{margin-bottom:8px}.accordion summary{cursor:pointer;font-weight:850;padding:13px 12px;background:#342735;border:1px solid #664c63;border-radius:10px;list-style-position:inside}.accordion .inside{padding:12px 9px 14px;border:1px solid #4d3a4a;border-top:0;border-radius:0 0 10px 10px}.test-ribbon{background:#59382b;border:1px solid #976a4f;color:#ffe2ba;border-radius:9px;padding:9px 11px;font-size:11px;margin-bottom:10px;font-weight:750}
#modal-root:empty{display:none}.overlay{position:fixed;inset:0;z-index:1000;background:#050305bf;display:flex;align-items:flex-end;justify-content:center;padding:0;animation:fade .12s ease-out}.dialog{background:#261d28;border:1px solid #78596f;border-radius:20px 20px 0 0;width:min(100%,700px);max-height:90dvh;overflow-y:auto;padding:18px 15px max(18px,env(safe-area-inset-bottom));box-shadow:var(--shadow)}.dialog h2{font-size:19px;margin:0}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.icon-btn{border:1px solid #725467;background:#382a39;color:white;border-radius:100px;width:32px;height:32px;font-size:20px}.stepper{display:flex;align-items:center;gap:6px}.stepper button{width:34px;height:34px;border:1px solid #8d637b;background:#523749;border-radius:9px;font-size:20px;font-weight:800;line-height:1}.stepper strong{min-width:24px;text-align:center;font-size:17px}.cart-item{padding:10px 0;border-bottom:1px solid var(--line);display:flex;gap:8px;align-items:center;justify-content:space-between}.cart-item .nm{font-weight:850;font-size:12px}.money{font-size:36px;font-weight:950;color:var(--green);letter-spacing:-.035em}.quickamount{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.quickamount .btn{padding:10px 4px}.buttons{display:flex;gap:9px;flex-wrap:wrap}.buttons>*{flex:1}.backuparea{min-height:110px;font-size:11px;line-height:1.4}.notice-success{color:#b9f3c8;background:#254233;border:1px solid #4e9970;border-radius:10px;padding:9px;font-size:12px}.notice-error{color:#ffd3d6;background:#532931;border:1px solid #b6697d;border-radius:10px;padding:9px;font-size:12px}.confirmation{font-size:12px;color:var(--orange)}#toast{pointer-events:none;position:fixed;bottom:calc(125px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%) translateY(15px);z-index:3000;max-width:92vw;min-width:230px;padding:11px 14px;border-radius:12px;background:#e5bad0;color:#321526;font-weight:850;font-size:12px;text-align:center;opacity:0;transition:opacity .18s,transform .18s;box-shadow:var(--shadow)}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}#toast.error{background:#ffd0d3;color:#59232f}@keyframes fade{from{opacity:0}to{opacity:1}}
@media(min-width:650px){.catalog{grid-template-columns:repeat(3,minmax(0,1fr))}.product{min-height:109px}.dialog{margin:auto;border-radius:18px}.overlay{align-items:center;padding:20px}#app{border-left:1px solid #3c293a;border-right:1px solid #3c293a}}
@media(max-width:350px){.product{padding:10px 9px}.product .name{font-size:12px}.top-actions .btn{padding:5px 6px;font-size:11px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* V0.3 : mode visible sans gaspiller la hauteur de la caisse. */
.mode-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:7px;padding:6px 7px;font-size:9px;letter-spacing:.025em;font-weight:950;white-space:nowrap;border:1px solid #98715e;color:#ffe0b2;background:#5b3a2f}
.mode-pill.is-real{color:#ddffe8;background:#24503b;border-color:#4b9970}
.product:disabled{opacity:.62;cursor:not-allowed}
.product:disabled .plus{color:#a88496}
@media(max-width:360px){.mode-pill{font-size:8px;padding:5px 5px}.top-actions .btn{font-size:10px;padding:6px 6px}}
