/* WINK Envoi — espace des clients particuliers (envoi.winkexpress.online).
   Mêmes jetons que le site vitrine (landing_site/css/styles.css) : orange WINK, bleu nuit, Nexa. */
@font-face { font-family: 'Nexa'; src: url('/fonts/Nexa/Nexa-Book.otf') format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nexa'; src: url('/fonts/Nexa/Nexa-Bold.otf') format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Nexa'; src: url('/fonts/Nexa/Nexa-Heavy.otf') format('opentype'); font-weight: 900; font-display: swap; }

:root {
    --primary: #F76D2F;
    --primary-dark: #DE5A1F;
    --primary-soft: #FFF1E9;
    --navy: #0D1B2A;
    --navy-2: #1B263B;
    --bg: #F6F8FB;
    --card: #FFFFFF;
    --text: #1E293B;
    --muted: #64748B;
    --line: #E7ECF2;
    --ok: #12A150;
    --ok-soft: #E8F7EE;
    --info: #2563EB;
    --info-soft: #EAF1FE;
    --wait: #B7791F;
    --wait-soft: #FEF6E7;
    --bad: #DC2626;
    --bad-soft: #FDECEC;
    --wa: #25D366;
    --mtn: #FFCB05;
    --om: #FF7900;
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(13,27,42,.06), 0 1px 2px rgba(13,27,42,.04);
    --shadow-md: 0 10px 30px rgba(13,27,42,.10);
    --shadow-primary: 0 10px 24px rgba(247,109,47,.32);
    --ease: cubic-bezier(.4,0,.2,1);
    --font: 'Nexa', 'Segoe UI', Roboto, system-ui, sans-serif;
    --dock-h: 84px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: var(--primary-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; color: var(--navy); }
b { font-weight: 700; }

/* ---------- Barre du haut ---------- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top));
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
/* wink.png a de larges marges blanches : on les rogne visuellement. */
.brand img { height: 46px; width: auto; display: block; margin: -8px -14px -8px -18px; }
.topnav { display: flex; gap: 6px; }
.topnav-btn {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: #fff; border-radius: 999px;
    padding: 8px 12px; font-weight: 700; font-size: .85rem;
    transition: all .2s var(--ease);
}
.topnav-btn.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (max-width: 420px) { .topnav-btn span { display: none; } .topnav-btn { padding: 9px 12px; } }

main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 20px 16px 32px; }
.view { animation: fadeUp .35s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 14px; padding: 13px 20px;
    font-weight: 700; font-size: .98rem; text-decoration: none; line-height: 1.2;
    transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-light { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 10px 24px rgba(37,211,102,.3); }
.btn-dashed {
    width: 100%; background: #fff; color: var(--primary-dark);
    border: 1.5px dashed #F6B595; border-radius: var(--r-md); padding: 14px;
}
.btn-xl { padding: 16px 24px; font-size: 1.05rem; border-radius: 16px; }
.btn-block { width: 100%; }
.icon-btn {
    width: 40px; height: 40px; display: inline-grid; place-items: center;
    border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 1.05rem;
}

/* ---------- Accueil ---------- */
.hero {
    position: relative; overflow: hidden; border-radius: 26px;
    background: #333333; /* même gris que le fond de l'image du scooter : aucun raccord visible */
    color: #fff; padding: 26px 22px 0; box-shadow: var(--shadow-md);
}
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #FFC3A6; }
.hero-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(247,109,47,.25); }
.hero h1 { color: #fff; font-size: clamp(1.75rem, 7vw, 2.3rem); font-weight: 900; margin: 12px 0 10px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { color: rgba(255,255,255,.78); margin: 0 0 20px; font-size: .95rem; }
.hero .btn-xl { width: 100%; }
.hero-text { position: relative; z-index: 1; }
.hero-img { position: relative; z-index: 0; display: block; width: 112%; max-width: none; margin: 6px -6% -4px; height: auto; }
@media (min-width: 560px) {
    .hero { display: flex; align-items: center; gap: 8px; padding: 32px 0 0 30px; }
    .hero-text { flex: 1 1 55%; padding-bottom: 30px; }
    .hero .btn-xl { width: auto; }
    .hero-img { flex: 0 0 48%; width: 48%; margin: 0; align-self: flex-end; }
}
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.trust div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 10px; text-align: center; }
.trust b { display: block; color: var(--navy); font-weight: 900; font-size: 1rem; white-space: nowrap; }
.trust span { display: block; color: var(--muted); font-size: .74rem; line-height: 1.25; margin-top: 2px; }
.home-h2 { font-size: 1.15rem; font-weight: 900; margin: 26px 0 12px; }
.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.how li { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.how li > span { flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 900; display: grid; place-items: center; }
.how b { color: var(--navy); font-size: .95rem; }
.how p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.prices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.price { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.price small { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; }
.price b { display: block; font-size: 1.15rem; font-weight: 900; color: var(--navy); margin-top: 2px; }
.price span { display: block; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.price.price-exp { background: var(--navy); border-color: var(--navy); }
.price.price-exp small, .price.price-exp span { color: rgba(255,255,255,.7); }
.price.price-exp b { color: #FFB38F; }
.center { text-align: center; }
.home-cta { margin-top: 22px; }
.link-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; padding: 12px; border: none; background: none; color: var(--navy); font-weight: 700; font-size: .92rem; }

/* ---------- Recherche de quartier / ville (suggestions sous le champ, pas de liste déroulante) ---------- */
.ac { position: relative; }
.ac-box { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 0 12px; transition: border .15s, box-shadow .15s; }
.ac-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(247,109,47,.12); }
.ac-box > i { color: var(--muted); }
.ac.is-set .ac-box > i { color: var(--ok); }
.ac.is-unlisted .ac-box > i { color: var(--wait); }
.ac-input { flex: 1; min-width: 0; border: none !important; box-shadow: none !important; outline: none; padding: 13px 0 !important; font-size: 1rem; background: transparent; }
.ac-badge { flex: none; font-size: .8rem; font-weight: 700; color: var(--primary-dark); white-space: nowrap; }
.ac-clear { flex: none; border: none; background: none; color: var(--muted); padding: 4px; font-size: 1rem; }
.ac-list { margin-top: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden; }
.ac-opt { width: 100%; display: flex; align-items: center; gap: 10px; border: none; background: #fff; text-align: left; padding: 12px 14px; font-size: .97rem; border-bottom: 1px solid #F1F4F8; }
.ac-opt:last-child { border-bottom: none; }
.ac-opt.is-active, .ac-opt:hover { background: var(--primary-soft); }
.ac-opt mark { background: none; color: var(--primary-dark); font-weight: 900; padding: 0; }
.ac-opt .ac-name { flex: 1; min-width: 0; }
.ac-opt small { color: var(--muted); font-weight: 700; font-size: .8rem; white-space: nowrap; }
.ac-opt.ac-unlisted { background: #FFFBF3; color: #7A4E0B; }
.ac-opt.ac-unlisted i { color: var(--wait); }
.ac-opt.ac-unlisted.is-active, .ac-opt.ac-unlisted:hover { background: var(--wait-soft); }
.ac-opt.ac-guess { color: var(--navy); }
.ac-note { font-size: .8rem; margin-top: 6px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; line-height: 1.35; }
.ac-note:empty { display: none; }
.ac-note.is-ok { color: var(--ok); }
.ac-note.is-warn { color: var(--wait); }
.ac-note.is-err { color: var(--bad); }
.ac-note button { border: none; background: none; padding: 0; color: var(--primary-dark); font-weight: 700; text-decoration: underline; font-size: inherit; }

/* ---------- Assistant ---------- */
.wizard-head { margin-bottom: 18px; }
.steps { display: flex; align-items: flex-start; }
.step-dot { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; width: 64px; }
.step-dot span {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 900; font-size: .85rem; background: #fff; border: 2px solid var(--line); color: var(--muted);
    transition: all .25s var(--ease);
}
.step-dot small { font-size: .72rem; color: var(--muted); font-weight: 700; }
.step-dot.is-on span { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 5px rgba(247,109,47,.15); }
.step-dot.is-on small { color: var(--navy); }
.step-dot.is-done span { background: var(--navy); border-color: var(--navy); color: #fff; }
.step-bar { flex: 1; height: 2px; background: var(--line); margin-top: 15px; border-radius: 2px; }
.step-bar.is-done { background: var(--navy); }

.notice {
    margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md);
    background: var(--wait-soft); color: #7A4E0B; font-size: .88rem; display: flex; gap: 10px;
}

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 18px; box-shadow: var(--shadow-sm); }
.panel-title { font-size: 1.35rem; font-weight: 900; }
.panel-sub { color: var(--muted); font-size: .9rem; margin: 6px 0 16px; }
.panel-title + .field, .panel-title + .choice-row { margin-top: 16px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 700; font-size: .85rem; color: var(--navy); margin-bottom: 6px; }
.field > span em { font-style: normal; color: var(--muted); font-weight: 400; }
.field input, .field textarea, .link-input {
    width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
    padding: 13px 14px; font-size: 1rem; outline: none; transition: border .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field textarea:focus, .link-input:focus, .input-prefix:focus-within {
    border-color: var(--primary); box-shadow: 0 0 0 4px rgba(247,109,47,.12);
}
.input-prefix { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: border .15s, box-shadow .15s; }
.input-prefix b { padding: 0 4px 0 14px; color: var(--muted); font-weight: 700; font-size: .95rem; }
.input-prefix input { border: none !important; box-shadow: none !important; padding-left: 6px; }
.field.has-error input, .field.has-error .input-prefix, .field.has-error .picker { border-color: var(--bad); }
.hint-unlisted { display: flex; gap: 6px; align-items: flex-start; color: var(--wait); font-size: .78rem; margin-top: 6px; line-height: 1.35; }
.err-msg { color: var(--bad); font-size: .8rem; margin-top: 5px; display: block; }

.picker {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    border: 1.5px solid var(--line); border-radius: 12px; background: #fff; padding: 13px 14px; text-align: left;
}
.picker .picker-value { color: var(--muted); }
.picker.has-value .picker-value { color: var(--text); font-weight: 700; }
.picker .picker-fee { margin-left: auto; color: var(--primary-dark); font-weight: 700; font-size: .85rem; }

.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.choice {
    text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 14px;
    display: flex; flex-direction: column; gap: 3px; transition: all .2s var(--ease);
}
.choice i { font-size: 1.3rem; color: var(--muted); margin-bottom: 4px; }
.choice b { font-size: .92rem; color: var(--navy); }
.choice small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.choice.is-on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(247,109,47,.12); }
.choice.is-on i { color: var(--primary); }

.seg { display: flex; gap: 6px; background: #EEF2F6; padding: 4px; border-radius: 12px; }
.seg-btn { flex: 1; border: none; background: transparent; padding: 10px 8px; border-radius: 9px; font-weight: 700; font-size: .88rem; color: var(--muted); }
.seg-btn.is-on { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }
.seg-op .op-mtn.is-on { background: var(--mtn); color: #1a1a1a; }
.seg-op .op-om.is-on { background: var(--om); color: #fff; }
.date-input { margin-top: 10px; width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; }

/* Destinations */
.dest {
    border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 16px 14px 6px;
    margin-bottom: 12px; background: #FCFDFE; position: relative;
}
.dest-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.dest-num { font-weight: 900; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.dest-num span { width: 24px; height: 24px; border-radius: 8px; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: .78rem; }
.dest-remove { border: none; background: none; color: var(--muted); font-size: 1.1rem; padding: 4px; }
.switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; margin-bottom: 14px;
}
.switch-row b { font-size: .9rem; color: var(--navy); display: block; }
.switch-row small { color: var(--muted); font-size: .78rem; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #CBD5E1; border-radius: 999px; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px rgba(247,109,47,.25); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .two { grid-template-columns: 1fr; gap: 0; } }
.cod-row { display: flex; gap: 8px; align-items: stretch; }
.cod-row .input-prefix { flex: 1; }
.cod-row .input-prefix b { padding: 0 12px 0 4px; order: 2; }
.cod-row .input-prefix input { padding-left: 14px; }
.paid-toggle {
    border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 0 12px;
    font-weight: 700; font-size: .8rem; color: var(--muted); white-space: nowrap;
}
.paid-toggle.is-on { background: var(--ok-soft); border-color: #9FD9B6; color: var(--ok); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: .82rem; font-weight: 700; color: var(--navy); }
.chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.dest-fee { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); padding: 2px 2px 10px; }
.dest-fee b { color: var(--navy); }
.dest .hint { font-size: .78rem; color: var(--muted); margin: -8px 0 12px; display: block; }

.payout { margin-top: 18px; padding: 16px 14px; border-radius: var(--r-md); background: linear-gradient(180deg, #FFF8F3, #fff); border: 1px solid #FBD9C6; }
.payout h3 { font-size: 1rem; display: flex; gap: 8px; align-items: center; }
.payout h3 i { color: var(--primary); }
.payout .seg { margin-bottom: 14px; }

/* Récapitulatif */
.recap { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.recap-block { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.recap-block h4 { margin: 0 0 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.recap-line { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; padding: 4px 0; }
.recap-line span:first-child { color: var(--text); }
.recap-line span:last-child { font-weight: 700; white-space: nowrap; }
.recap-line small { display: block; color: var(--muted); font-size: .78rem; }
.recap-total {
    background: var(--navy); color: #fff; border-radius: var(--r-md); padding: 16px;
    display: flex; flex-direction: column; gap: 6px;
}
.recap-total .recap-line span:first-child { color: rgba(255,255,255,.75); }
.recap-total .big { font-size: 1.05rem; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.14); margin-top: 4px; }
.recap-total .big span:first-child { color: #fff; font-weight: 700; white-space: nowrap; }
.recap-total .big span:last-child { color: #FFB38F; font-size: 1.2rem; font-weight: 900; white-space: normal; text-align: right; }
.fine { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }

/* Barre fixe du bas */
#view-new { padding-bottom: calc(var(--dock-h) + 16px + env(safe-area-inset-bottom)); }
.dock {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    max-width: 640px; margin: 0 auto;
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
}
.dock-total { flex: 1; min-width: 0; }
.dock-total small { display: block; color: var(--muted); font-size: .75rem; font-weight: 700; }
.dock-total b { display: block; font-size: 1.1rem; line-height: 1.15; font-weight: 900; color: var(--navy); }
.dock #backBtn { padding: 13px 15px; flex: none; }
.dock #nextBtn { flex: none; padding-left: 18px; padding-right: 18px; }
.dock.is-final .dock-total { display: none; }
.dock.is-final #nextBtn { flex: 1; }

/* ---------- Confirmation ---------- */
.done { text-align: center; padding-top: 12px; }
.done-check {
    width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%;
    background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 2.4rem;
    box-shadow: 0 0 0 10px var(--ok-soft); animation: pop .5s cubic-bezier(.34,1.56,.64,1);
}
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done h1 { font-size: 1.7rem; font-weight: 900; }
.done > p { color: var(--muted); margin: 8px auto 16px; max-width: 440px; }
.done-ref { display: inline-block; background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 8px 14px; font-weight: 700; margin-bottom: 18px; }
.done .btn-wa { width: 100%; max-width: 380px; }
.done-actions { display: flex; flex-direction: column; gap: 6px; align-items: center; margin-top: 18px; }
.done-actions .btn { width: 100%; max-width: 380px; }

.linkcard { text-align: left; margin-top: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.linkcard h3 { font-size: 1rem; display: flex; gap: 8px; align-items: center; }
.linkcard h3 i { color: var(--primary); }
.linkcard p { color: var(--muted); font-size: .88rem; margin: 6px 0 12px; }
.linkbox { background: var(--bg); border-radius: 10px; padding: 10px 12px; overflow-x: auto; }
.linkbox code { font-size: .82rem; white-space: nowrap; color: var(--navy); }
.linkcard-actions { display: flex; gap: 8px; margin-top: 12px; }
.linkcard-actions .btn { flex: 1; padding: 11px 12px; font-size: .88rem; }
.linkcard-soft { background: linear-gradient(180deg, #fff, #FAFBFD); margin-top: 26px; }

/* ---------- Mes envois ---------- */
.orders-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }
.orders-head small { color: var(--muted); font-weight: 700; }
.orders-head h1 { font-size: 1.5rem; font-weight: 900; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.stat small { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; }
.stat b { display: block; font-size: 1.15rem; font-weight: 900; color: var(--navy); margin-top: 2px; white-space: nowrap; }
.stat.stat-money { background: var(--navy); border-color: var(--navy); }
.stat.stat-money small { color: rgba(255,255,255,.7); }
.stat.stat-money b { color: #FFB38F; }
.debt { background: var(--wait-soft); color: #7A4E0B; border-radius: var(--r-md); padding: 12px 14px; font-size: .88rem; margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; background: #EEF2F6; padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.tab { flex: 1; border: none; background: transparent; padding: 10px 6px; border-radius: 9px; font-weight: 700; font-size: .86rem; color: var(--muted); }
.tab.is-on { background: #fff; color: var(--navy); box-shadow: var(--shadow-sm); }

.orders-list { display: flex; flex-direction: column; gap: 12px; }
.req { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.req-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: #FAFBFD; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); font-weight: 700; }
.order { padding: 14px; border-bottom: 1px solid var(--line); }
.order:last-child { border-bottom: none; }
.order-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.order-kind { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 1.05rem; }
.order-kind.k-pickup { background: #EEF2FF; color: #4F46E5; }
.order-kind.k-expedition { background: #ECFEFF; color: #0E7490; }
.order-main { flex: 1; min-width: 0; }
.order-main b { display: block; color: var(--navy); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-main small { display: block; color: var(--muted); font-size: .8rem; }
.order-main .badge { margin-top: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-ok { background: var(--ok-soft); color: var(--ok); }
.t-info { background: var(--info-soft); color: var(--info); }
.t-wait { background: var(--wait-soft); color: var(--wait); }
.t-bad { background: var(--bad-soft); color: var(--bad); }
.track { display: flex; gap: 4px; margin: 12px 0 8px; }
.track i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.track i.on { background: var(--primary); }
.track.is-ok i.on { background: var(--ok); }
.order-money { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); }
.order-money b { color: var(--navy); }
.order-reason { margin-top: 8px; font-size: .82rem; color: var(--bad); background: var(--bad-soft); padding: 8px 10px; border-radius: 10px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty i { font-size: 2rem; color: #CBD5E1; display: block; margin-bottom: 8px; }
.empty .btn { margin-top: 14px; }
.remit { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.remit-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; flex: none; }
.remit-ic.paid { background: var(--ok-soft); color: var(--ok); }
.remit-ic.pending { background: var(--wait-soft); color: var(--wait); }
.remit-main { flex: 1; }
.remit-main b { display: block; color: var(--navy); }
.remit-main small { color: var(--muted); font-size: .8rem; }
.remit-amt { font-weight: 900; font-size: 1.05rem; color: var(--navy); white-space: nowrap; }

/* ---------- Feuilles (bas d'écran) ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(13,27,42,.45); z-index: 60; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
    max-width: 640px; margin: 0 auto; max-height: 86vh;
    background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(13,27,42,.2);
    display: flex; flex-direction: column; animation: slideUp .28s var(--ease);
    padding-bottom: env(safe-area-inset-bottom);
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: #D9E0E8; margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; }
.sheet-head h3 { font-size: 1.1rem; font-weight: 900; }
.sheet-search { margin: 0 16px 8px; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; }
.sheet-search:focus-within { border-color: var(--primary); }
.sheet-search i { color: var(--muted); }
.sheet-search input { flex: 1; border: none; outline: none; padding: 12px 0; font-size: 1rem; background: transparent; }
.sheet-list { overflow-y: auto; padding: 0 8px 12px; -webkit-overflow-scrolling: touch; }
.sheet-group { font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 6px; display: flex; justify-content: space-between; }
.sheet-item { width: 100%; text-align: left; border: none; background: none; padding: 13px 10px; border-radius: 10px; display: flex; justify-content: space-between; gap: 10px; font-size: .98rem; }
.sheet-item:hover, .sheet-item:focus-visible { background: var(--bg); outline: none; }
.sheet-item small { color: var(--muted); font-weight: 700; white-space: nowrap; }
.sheet-item.is-selected { background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.sheet-body { padding: 4px 16px 20px; }
.link-input { margin-bottom: 12px; }

/* ---------- Divers ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
    position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    z-index: 80; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px;
    font-size: .9rem; font-weight: 700; box-shadow: var(--shadow-md); max-width: calc(100% - 32px);
    animation: fadeUp .25s var(--ease);
}
.toast.is-error { background: var(--bad); }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.foot a { color: var(--muted); text-decoration: none; font-weight: 700; }
#view-new ~ .foot { display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Confirmation : étape WhatsApp ---------- */
.done-step { text-align: left; background: #fff; border: 1.5px solid #BDEBCB; border-radius: var(--r-lg); padding: 18px; margin: 16px 0 4px; box-shadow: var(--shadow-sm); }
.done-step-num { display: inline-block; font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--ok); background: var(--ok-soft); padding: 3px 8px; border-radius: 999px; }
.done-step b { display: block; font-size: 1.1rem; color: var(--navy); margin: 8px 0 4px; }
.done-step p { color: var(--muted); font-size: .88rem; margin: 0 0 14px; }
.field.has-error .ac-box { border-color: var(--bad); }
.recap-total .recap-sum { border-top: 1px solid rgba(255,255,255,.14); margin-top: 4px; padding-top: 8px; }
.recap-total .recap-sum span { color: #fff !important; font-weight: 700; }
.recap-courses { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #FFB38F; padding-bottom: 4px; }
