/* ToliMarket 360 — espace public (boutique, panier, commande, suivi). Charte : bleu nuit #000033, orange #FF6600, Montserrat. */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:Montserrat,system-ui,-apple-system,sans-serif;color:#000033;background:linear-gradient(180deg,#FFFFFF 0%,#F2F3F6 100%) fixed;min-height:100vh;line-height:1.45}
a{color:#000033}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid #FF6600;outline-offset:2px}
.skip{position:absolute;left:-9999px}.skip:focus{left:12px;top:12px;background:#fff;padding:8px 12px;border-radius:8px;z-index:50}
.wrap{max-width:560px;margin:0 auto;min-height:100vh;display:flex;flex-direction:column;position:relative}
.muted{color:#5B6070}
.i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.loading{display:flex;align-items:center;justify-content:center;gap:10px;min-height:60vh;font-weight:600;color:#5B6070}
.spinner{width:18px;height:18px;border:3px solid #D5D8DE;border-top-color:#000033;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation:none}}
.noscript{padding:24px;text-align:center}

/* En-tête */
.top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;background:#fff;border-bottom:1px solid #E4E6EB;position:sticky;top:0;z-index:5}
.top .title{font-size:13px;font-weight:700;text-align:center;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.iconbtn{width:44px;height:44px;display:flex;align-items:center;justify-content:center;border:0;background:none;border-radius:12px;cursor:pointer;color:#000033;text-decoration:none}
.iconbtn:hover{background:#F2F3F6}

/* Boutique */
.banner{height:120px;background:linear-gradient(135deg,#000033 0%,#1A1A5C 100%)}
.storehead{padding:0 20px 16px;display:flex;flex-direction:column;gap:10px;margin-top:-34px}
.logo{width:72px;height:72px;border-radius:20px;background:#000033;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:22px;border:4px solid #fff;box-shadow:0 6px 16px rgba(0,0,51,.12)}
h1{margin:0;font-size:24px;font-weight:800;letter-spacing:-.01em}
h2{margin:0;font-size:18px;font-weight:800}
.row{display:flex;gap:8px}
.search{display:flex;align-items:center;gap:10px;height:48px;padding:0 14px;background:#fff;border:1px solid #D5D8DE;border-radius:14px;margin:0 20px 12px}
.search input{border:0;outline:0;flex:1;background:transparent;font-weight:500;font-size:15px;min-width:0}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:4px 20px 120px}
@media (min-width:520px){.grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.card{background:#fff;border:1px solid #E4E6EB;border-radius:16px;overflow:hidden;display:flex;flex-direction:column;text-align:left;padding:0;cursor:pointer;width:100%}
.card:hover{border-color:#B8BCC6}
.ph{background:#EEF0F3;display:flex;align-items:center;justify-content:center;color:#8A90A0;position:relative;aspect-ratio:1/1}
.ph .initial{font-size:34px;font-weight:800;color:#C9CDD6}
.badge{position:absolute;top:10px;left:10px;font-size:11px;font-weight:700;padding:4px 8px;border-radius:999px}
.badge.promo{background:#FF6600;color:#000033}
.badge.out{background:#FDECEA;color:#A8201A}
.card .body{padding:10px 12px 12px}
.card .name{font-weight:600;font-size:14px}
.card .sub{font-size:12px;margin-top:2px}
.price{font-weight:800;font-size:15px}
.strike{text-decoration:line-through;font-size:12px;color:#5B6070;font-weight:500}
.low{color:#7A4B00;font-weight:600}
.ok{color:#0B6B3F;font-weight:600}
.empty{padding:40px 24px;text-align:center}

/* Boutons et formulaires */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 18px;border-radius:12px;font-weight:700;font-size:15px;border:0;cursor:pointer;text-decoration:none;width:100%}
.btn.primary{background:#FF6600;color:#000033}
.btn.dark{background:#000033;color:#fff}
.btn.ghost{background:#fff;color:#000033;border:1px solid #D5D8DE}
.btn[disabled]{opacity:.55;cursor:not-allowed}
.field{display:flex;flex-direction:column;gap:6px}
.label{font-size:12px;font-weight:600;color:#3A3F4D}
.input{height:48px;border:1px solid #D5D8DE;border-radius:12px;padding:0 12px;background:#fff;font-weight:500;font-size:16px;width:100%}
.input[aria-invalid="true"]{border-color:#A8201A}
.err{color:#A8201A;font-size:12px;font-weight:600;min-height:0}
.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.opts{display:flex;flex-wrap:wrap;gap:8px}
.opt{min-height:44px;padding:0 14px;border-radius:10px;border:1px solid #D5D8DE;background:#fff;font-weight:600;font-size:14px;cursor:pointer}
.opt[aria-pressed="true"]{background:#000033;color:#fff;border-color:#000033}
.opt[disabled]{color:#9AA0AC;text-decoration:line-through;background:#F5F6F8;cursor:not-allowed}
.qty{display:flex;align-items:center;border:1px solid #D5D8DE;border-radius:12px;background:#fff}
.qty button{width:44px;height:44px;border:0;background:none;font-size:18px;font-weight:700;cursor:pointer}
.qty button[disabled]{color:#B8BCC6;cursor:not-allowed}
.qty span{min-width:28px;text-align:center;font-weight:700}

/* Panneaux (fiche produit, panier) */
.page{padding:16px 20px 32px;display:flex;flex-direction:column;gap:14px;flex:1}
.alert{border-radius:12px;padding:10px 12px;font-size:13px;line-height:1.45;font-weight:500}
.alert.warn{background:#FFF1DC;color:#7A4B00}
.alert.error{background:#FDECEA;color:#A8201A}
.alert.info{background:#E9EBF5;color:#000033}
.line{display:flex;gap:12px;align-items:center}
.line .ph{width:56px;height:56px;border-radius:10px;aspect-ratio:auto;flex:none}
.line .ph .initial{font-size:18px}
.line .grow{flex:1;min-width:0}
.sep{border-top:1px solid #E4E6EB;padding-top:10px;display:flex;justify-content:space-between}
.note{font-size:11px;text-align:center;line-height:1.4}
.ts{min-height:65px;display:flex;justify-content:center}

/* Barre panier */
.cartbar{position:fixed;left:50%;transform:translateX(-50%);bottom:max(16px,env(safe-area-inset-bottom));width:calc(100% - 24px);max-width:536px;background:#000033;color:#fff;border-radius:16px;padding:12px 12px 12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-shadow:0 10px 30px rgba(0,0,51,.25);z-index:10}
.cartbar .btn{width:auto}
.cartbar small{display:block;color:#C9CBDB;font-size:12px}

/* Confirmation et suivi */
.success{width:52px;height:52px;border-radius:16px;background:#E6F4EC;color:#0B6B3F;display:flex;align-items:center;justify-content:center}
.ref{color:#000033;font-size:18px;font-weight:800;letter-spacing:.04em}
.steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;font-size:14px}
.steps li{display:flex;gap:10px;align-items:center}
.dot{width:26px;height:26px;border-radius:999px;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex:none;border:1px solid #B8BCC6;color:#5B6070}
.dot.done{background:#0B6B3F;color:#fff;border-color:#0B6B3F}
.dot.now{background:#FF6600;color:#000033;border-color:#FF6600}
.msg{background:#F5F6F8;border-radius:14px;padding:12px 14px;font-size:13px;line-height:1.55;white-space:pre-line;word-break:break-word}
.status{display:inline-flex;align-items:center;height:30px;padding:0 12px;border-radius:999px;font-size:13px;font-weight:700;background:#E9EBF5}
.status.delivered{background:#E6F4EC;color:#0B6B3F}
.status.cancelled,.status.expired{background:#FDECEA;color:#A8201A}
.foot{padding:16px 20px 120px;font-size:12px;text-align:center}
.grow{flex:1;min-width:0}
.row{align-items:center}
h1[tabindex="-1"]:focus,h2[tabindex="-1"]:focus{outline:none}
.hero{aspect-ratio:auto;height:min(56vw,280px)}
.has-cart .page,.has-cart .grid{padding-bottom:120px}
