/* Portail retours Shapeheart — charte officielle, mobile-first */
@font-face { font-family:'Folsom'; src:url('/static/fonts/folsom-black-web.otf') format('opentype'); font-weight:900; font-display:swap; }
@font-face { font-family:'Lato'; src:url('/static/fonts/Lato-Regular.ttf') format('truetype'); font-weight:400; font-display:swap; }
@font-face { font-family:'Lato'; src:url('/static/fonts/Lato-Bold.ttf') format('truetype'); font-weight:700; font-display:swap; }
@font-face { font-family:'Lato'; src:url('/static/fonts/Lato-Light.ttf') format('truetype'); font-weight:300; font-display:swap; }

:root{
  --red:#EF3340; --blue:#1C4E9A; --green:#4EBDA1; --black:#171717;
  --muted:#737373; --border:#e7e7e7; --bg:#f4f4f5; --card:#fff;
  --radius:16px; --shadow:0 1px 3px rgba(0,0,0,.06),0 8px 24px rgba(0,0,0,.05);
}
*{margin:0;padding:0;box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{font-family:'Lato',system-ui,sans-serif;background:var(--bg);color:var(--black);
  min-height:100vh;display:flex;flex-direction:column;-webkit-font-smoothing:antialiased;line-height:1.5}

/* Header */
header{background:#fff;border-bottom:1px solid var(--border)}
.header-inner{max-width:560px;margin:0 auto;display:flex;align-items:center;gap:.7rem;
  height:58px;padding:0 1.25rem}
.header-inner img{height:26px}
.header-inner .tag{font-family:'Folsom',sans-serif;text-transform:uppercase;font-size:.95rem;
  letter-spacing:1px;color:var(--black);border-left:2px solid var(--border);padding-left:.7rem}
.header-inner .devmode{margin-left:auto;display:inline-flex;align-items:center;gap:.4rem;
  font-family:'Lato',sans-serif;font-weight:700;font-size:.72rem;letter-spacing:.5px;
  text-transform:uppercase;color:#8a5a00;background:#fff4d6;border:1px solid #f0c44c;
  padding:.3rem .6rem;border-radius:999px;cursor:default;white-space:nowrap}
.header-inner .devmode-dot{width:8px;height:8px;border-radius:50%;background:#e6a700;
  animation:devpulse 1.6s ease-in-out infinite}
@keyframes devpulse{0%,100%{opacity:1}50%{opacity:.35}}

/* Layout */
.main{flex:1;display:flex;justify-content:center;padding:1.5rem 1rem 3rem}
.wrap{width:100%;max-width:560px}
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);padding:1.75rem 1.5rem}
h1{font-family:'Folsom',sans-serif;text-transform:uppercase;letter-spacing:.5px;
  font-size:1.45rem;line-height:1.15;margin-bottom:.4rem}
.sub{color:var(--muted);font-weight:300;font-size:.95rem;margin-bottom:1.5rem}

/* Stepper */
.steps{display:flex;gap:.4rem;margin-bottom:1.25rem}
.steps .s{flex:1;height:4px;border-radius:2px;background:var(--border)}
.steps .s.on{background:var(--red)}

/* Forms */
label.fld{display:block;font-size:.72rem;font-weight:700;color:#555;margin:0 0 .35rem;
  text-transform:uppercase;letter-spacing:.6px}
input[type=text],input[type=email],select{width:100%;padding:.85rem .9rem;border:1px solid var(--border);
  border-radius:10px;font-size:1rem;font-family:inherit;background:#fff;color:var(--black)}
input:focus,select:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px rgba(28,78,154,.12)}
.field{margin-bottom:1.1rem}
.hint{font-size:.8rem;color:var(--muted);margin-top:.35rem}

/* Slider anti-bot */
.slider{position:relative;height:50px;border-radius:10px;background:#f1f1f3;
  border:1px solid var(--border);overflow:hidden;user-select:none;touch-action:none}
.slider-track{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  font-size:.85rem;color:var(--muted);font-weight:700;pointer-events:none}
.slider-handle{position:absolute;top:3px;left:3px;width:44px;height:42px;border-radius:8px;
  background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:1.4rem;font-weight:700;cursor:grab;box-shadow:0 1px 4px rgba(0,0,0,.2);touch-action:none}
.slider-handle.grab{cursor:grabbing}
.slider.ok{background:rgba(78,189,161,.15);border-color:var(--green)}
.slider.ok .slider-track{color:var(--green)}
.slider.ok .slider-handle{background:var(--green);cursor:default}

/* Buttons */
.btn{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;
  padding:.95rem 1rem;border:none;border-radius:10px;font-family:'Lato',sans-serif;
  font-weight:700;font-size:1rem;cursor:pointer;text-decoration:none;transition:filter .15s,opacity .15s}
.btn-primary{background:var(--red);color:#fff}
.btn-primary:hover{filter:brightness(.93)}
.btn-primary:disabled{opacity:.45;cursor:not-allowed}
.btn-ghost{background:#fff;color:var(--black);border:1px solid var(--border)}
.btn-ghost:hover{background:#fafafa}
.btn-row{display:flex;gap:.7rem;margin-top:1.25rem}

/* Order meta */
.ordermeta{display:flex;flex-wrap:wrap;gap:.4rem 1.25rem;background:#fafafa;border:1px solid var(--border);
  border-radius:12px;padding:.8rem 1rem;margin-bottom:1.25rem;font-size:.9rem}
.ordermeta b{font-weight:700}
.ordermeta .muted{color:var(--muted)}

/* Product lines */
.line{display:flex;gap:.85rem;padding:1rem 0;border-top:1px solid var(--border)}
.line:first-child{border-top:none}
.line .cb{flex:0 0 auto;padding-top:.15rem}
.line input[type=checkbox]{width:22px;height:22px;accent-color:var(--red);cursor:pointer}
.line .body{flex:1;min-width:0}
.line .ttl{font-weight:700;font-size:.98rem}
.line .sku{display:inline-block;font-size:.72rem;font-weight:700;letter-spacing:.5px;
  color:var(--blue);background:rgba(28,78,154,.08);padding:.12rem .45rem;border-radius:6px;margin-top:.2rem}
.line .qtyrow{font-size:.82rem;color:var(--muted);margin-top:.25rem}
.line .opts{margin-top:.7rem;display:none}
.line.checked .opts{display:block}
.line .opts select{margin-bottom:.6rem}
.pack{display:flex;align-items:flex-start;gap:.5rem;font-size:.85rem;color:#444;
  background:#fff;border:1px dashed var(--border);border-radius:10px;padding:.6rem .7rem}
.pack[hidden]{display:none}  /* sinon display:flex écrase l'attribut hidden */
.pack input{width:18px;height:18px;accent-color:var(--green);margin-top:.1rem}

/* Info / states */
.box{border-radius:12px;padding:1rem 1.1rem;font-size:.9rem;margin-bottom:1rem}
.box-info{background:rgba(28,78,154,.07);border:1px solid rgba(28,78,154,.2);color:#1b3a6b}
.box-warn{background:rgba(239,51,64,.07);border:1px solid rgba(239,51,64,.25);color:#8f1f29}
.box-ok{background:rgba(78,189,161,.12);border:1px solid rgba(78,189,161,.4);color:#1f5e4f}
.err{color:var(--red);font-size:.85rem;margin-top:.5rem;font-weight:700}

/* Confirmation */
.bigcheck{width:64px;height:64px;border-radius:50%;background:var(--green);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:2rem;margin:0 auto 1rem}
.center{text-align:center}
.summary{list-style:none;margin:1rem 0}
.summary li{display:flex;justify-content:space-between;gap:1rem;padding:.55rem 0;
  border-top:1px solid var(--border);font-size:.92rem}
.summary li:first-child{border-top:none}
.track{font-family:'Lato';font-weight:700;letter-spacing:1px;font-size:1.1rem;color:var(--black)}

/* Timeline de suivi */
.timeline{list-style:none;margin:1.3rem 0 .5rem}
.timeline li{position:relative;padding:0 0 1.15rem 2rem}
.timeline li::before{content:'';position:absolute;left:7px;top:18px;bottom:-2px;width:2px;background:var(--border)}
.timeline li:last-child{padding-bottom:.2rem}
.timeline li:last-child::before{display:none}
.timeline .dot{position:absolute;left:0;top:2px;width:16px;height:16px;border-radius:50%;
  background:#fff;border:2px solid var(--border)}
.timeline li.done .dot{background:var(--green);border-color:var(--green)}
.timeline li.curr .dot{border-color:var(--red);box-shadow:0 0 0 3px rgba(239,51,64,.15)}
.timeline li.todo{opacity:.45}
.timeline .lbl{font-weight:700;font-size:.92rem}
.timeline .when{font-size:.78rem;color:var(--muted)}

footer{text-align:center;color:var(--muted);font-size:.78rem;padding:1.5rem 1rem}
footer a{color:var(--muted)}
