/* Colis : interface façon app shopping.
   Formes : cartes 16 px, vignettes 12 px, boutons et champs en pilule.
   Couleurs : base neutre (zinc), un seul accent orange ; les couleurs de statut portent un sens. */

@font-face { font-family: "Geist"; src: url("/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0c0c0e;
  --surface: #161619;
  --surface-2: #1f1f23;
  --line: #2b2b31;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --accent: #ff7a1a;
  --accent-ink: #1c0d02;
  --accent-soft: rgb(255 122 26 / .13);
  --wait: #f2b84b;
  --move: #a594ff;
  --stock: #5aa9ff;
  --done: #4ad295;
  --off: #8b8b94;
  --alert: #ff6363;
  --info: #5aa9ff;
  --r-card: 16px;
  --r-img: 12px;
  --shadow: 0 12px 32px rgb(0 0 0 / .4);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f6f7;
    --surface: #ffffff;
    --surface-2: #efeff1;
    --line: #e2e2e6;
    --text: #18181b;
    --muted: #5b5b64;
    --faint: #8e8e97;
    --accent: #c2410c;
    --accent-ink: #ffffff;
    --accent-soft: rgb(194 65 12 / .09);
    --wait: #a86b00;
    --move: #5b45d6;
    --stock: #1866c2;
    --done: #0f7f52;
    --off: #6e6e78;
    --alert: #c92a2a;
    --info: #1866c2;
    --shadow: 0 12px 32px rgb(24 24 27 / .1);
    color-scheme: light;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.45 var(--font);
  font-feature-settings: "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overscroll-behavior-y: contain;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
img { display: block; }
svg { display: block; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app {
  max-width: 620px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 32px;
}
body.has-nav .app { padding-bottom: calc(env(safe-area-inset-bottom) + 96px); }

/* ---------- Barre du haut ---------- */
.appbar { display: flex; align-items: center; gap: 8px; padding: 8px 0 18px; }
.appbar-txt { flex: 1; min-width: 0; }
.appbar h1 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.035em; }
.sync { margin: 6px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.sync::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.sync-ok::before { background: var(--done); }
.sync-bad::before { background: var(--alert); }

.icon-btn {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: transform .2s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Boutons, champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap;
  text-decoration: none; color: var(--text); background: var(--surface-2);
  transition: transform .2s var(--ease), opacity .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.btn.small { height: 38px; padding: 0 15px; font-size: 14px; }
.btn.block { width: 100%; height: 52px; font-size: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 8px 4px; }
.input {
  width: 100%; height: 52px; padding: 0 20px; border-radius: 999px; outline: none;
  background: var(--surface); border: 1px solid var(--line); font-size: 16px; transition: border-color .2s;
}
.input:focus { border-color: var(--accent); }
.input.area { height: auto; min-height: 120px; padding: 14px 18px; border-radius: var(--r-card); resize: vertical; font-size: 12.5px; line-height: 1.45; }
.error { color: var(--alert); font-size: 13.5px; min-height: 1.4em; margin: 8px 4px 10px; }

/* ---------- Bandeaux ---------- */
.notice {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; margin-bottom: 12px;
  border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line);
}
.notice-accent { background: var(--accent-soft); border-color: transparent; }
.notice-alert { border-color: color-mix(in srgb, var(--alert) 40%, var(--line)); }
.notice-ico { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); flex: none; }
.notice-ico svg { width: 19px; height: 19px; }
.notice-accent .notice-ico { color: var(--accent); }
.notice-alert .notice-ico { color: var(--alert); }
.notice-txt { flex: 1; min-width: 0; }
.notice-txt b { display: block; font-weight: 600; font-size: 14.5px; }
.notice-txt span { display: block; color: var(--muted); font-size: 13px; }

/* ---------- Titres de groupe ---------- */
.group-title {
  display: flex; align-items: baseline; gap: 8px; margin: 26px 2px 12px;
  font-size: 18px; font-weight: 650; letter-spacing: -.02em;
}
.group-title span { font-size: 14px; font-weight: 500; color: var(--faint); }
#panel > .group-title:first-child { margin-top: 6px; }

/* ---------- Carte « dernier changement » ---------- */
.spotlight {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px 10px 10px; margin-bottom: 16px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  transition: transform .2s var(--ease);
}
.spotlight:active { transform: scale(.985); }
.spotlight-img { width: 76px; height: 92px; border-radius: var(--r-img); object-fit: cover; background: var(--surface-2); flex: none; }
.spotlight-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.spotlight-kicker { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.spotlight-kicker svg { width: 15px; height: 15px; }
.spotlight-title { font-weight: 600; font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.spotlight-change { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.spotlight-change svg { width: 13px; height: 13px; color: var(--faint); }
.spotlight-go { color: var(--faint); }
.spotlight-go svg { width: 18px; height: 18px; }

/* ---------- Recherche et filtres ---------- */
.search {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px; margin-bottom: 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--faint);
  transition: border-color .2s;
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 19px; height: 19px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; color: var(--text); font-size: 15px; }
.search input::placeholder { color: var(--faint); }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 4px; padding: 0 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 550; color: var(--muted);
  transition: background .2s, color .2s;
}
.chip span { font-size: 12.5px; color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: none; }
.chip[aria-pressed="true"] span { color: inherit; opacity: .6; }

/* ---------- Grille produit ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.pcard { display: flex; flex-direction: column; min-width: 0; transition: transform .2s var(--ease); }
.pcard:active { transform: scale(.975); }
.pcard-media { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--r-card); overflow: hidden; background: var(--surface-2); }
.pcard-img { width: 100%; height: 100%; object-fit: cover; }
.img-missing { display: grid; place-items: center; color: var(--faint); background: var(--surface-2); }
.img-missing svg { width: 30%; max-width: 40px; height: auto; }
.pcard-body { display: grid; justify-items: start; gap: 4px; padding: 10px 2px 0; min-width: 0; }
.pcard-body .status { max-width: 100%; margin-bottom: 2px; }
.pcard-body > :not(.status) { justify-self: stretch; }
.pcard-title { font-size: 14px; font-weight: 550; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { font-size: 15px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; margin-top: 2px; }
.days { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.days-warn { color: var(--alert); }

.qc-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.qc-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.qc-more { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--muted); }

/* Statut : libellé teinté, la couleur dit l'étape. */
.status {
  --c: var(--info);
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; min-width: 0;
  font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.t-wait { --c: var(--wait); } .t-move { --c: var(--move); } .t-stock { --c: var(--stock); }
.t-done { --c: var(--done); } .t-off { --c: var(--off); } .t-alert { --c: var(--alert); } .t-info { --c: var(--info); }

/* ---------- Colis ---------- */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.feed { grid-template-columns: minmax(0, 1fr); }
.parcel { min-width: 0; overflow: hidden; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.parcel-head { display: flex; align-items: center; gap: 12px; width: 100%; }
.parcel-ico { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); flex: none; }
.parcel-ico svg { width: 21px; height: 21px; }
.parcel-id { flex: 1; min-width: 0; display: grid; gap: 1px; }
.parcel-id b { font-family: var(--mono); font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.parcel-id span { font-size: 12.5px; color: var(--muted); }

.stepper { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 4px; padding: 0; }
.stepper li { position: relative; display: grid; justify-items: center; gap: 8px; font-size: 11.5px; color: var(--faint); text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.stepper li:first-child::before { display: none; }
.stepper li i { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line); }
.stepper li.done { color: var(--muted); }
.stepper li.done::before { background: var(--accent); }
.stepper li.done i { background: var(--accent); box-shadow: none; }
.stepper li.now { color: var(--text); font-weight: 600; }
.stepper li.now i { box-shadow: 0 0 0 4px var(--accent-soft); }

.rail { display: flex; gap: 8px; overflow-x: auto; margin: 14px -14px 0; padding: 0 14px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-item { flex: none; }
.rail-img { width: 64px; height: 80px; border-radius: var(--r-img); object-fit: cover; background: var(--surface-2); }
.parcel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tracking { display: grid; gap: 1px; min-width: 0; font-size: 12.5px; color: var(--muted); }
.tracking button { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 13.5px; }
.tracking svg { width: 14px; height: 14px; color: var(--faint); }

/* ---------- Activité ---------- */
.feed { display: grid; gap: 8px; }
.feed-item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px 12px 8px 8px; border-radius: var(--r-card); background: var(--surface); transition: transform .2s var(--ease); }
.feed-item:active { transform: scale(.985); }
.feed-img { width: 56px; height: 68px; border-radius: var(--r-img); object-fit: cover; background: var(--surface-2); flex: none; }
.feed-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.feed-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--faint); }
.feed-stage { font-weight: 600; }
.feed-title { font-size: 14.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-change { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; }
.feed-change s { text-decoration: none; color: var(--faint); }
.feed-change svg { width: 13px; height: 13px; color: var(--faint); }

/* ---------- États vides et chargement ---------- */
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 56px 24px; color: var(--muted); font-size: 14px; }
.empty b { color: var(--text); font-size: 16px; font-weight: 600; }
.empty-ico { width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); color: var(--faint); margin-bottom: 8px; }
.empty-ico svg { width: 28px; height: 28px; }
.empty.compact { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px; border-radius: var(--r-card); background: var(--surface); }
.empty.compact .empty-ico { width: 40px; height: 40px; margin: 0; background: var(--surface-2); }
.empty.compact .empty-ico svg { width: 20px; height: 20px; }

.skeleton-page { padding-top: 18px; display: grid; gap: 14px; }
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.sk-title { height: 30px; width: 55%; }
.sk-line { height: 13px; width: 80%; }
.sk-line.short { width: 45%; }
.sk-img { aspect-ratio: 4 / 5; border-radius: var(--r-card); margin-bottom: 8px; }
.sk-card { display: grid; gap: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Barre d'onglets ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px max(8px, calc((100vw - 620px) / 2)) calc(env(safe-area-inset-bottom) + 6px);
  background: var(--bg); border-top: 1px solid var(--line);
}
.tab { display: grid; justify-items: center; gap: 3px; padding: 6px 0 4px; font-size: 11.5px; font-weight: 550; color: var(--faint); transition: color .2s; text-align: center; }
.tab.on { color: var(--text); }
.tab-ico { position: relative; }
.tab-ico svg { width: 25px; height: 25px; transition: transform .25s var(--ease); }
.tab:active .tab-ico svg { transform: scale(.88); }
.tab-count {
  position: absolute; top: -6px; left: 19px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.tab-dot { position: absolute; top: -1px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }

/* ---------- Feuilles ---------- */
.scrim { position: fixed; inset: 0; background: rgb(0 0 0 / .55); z-index: 20; animation: fade .2s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain;
  max-width: 620px; margin: 0 auto; background: var(--bg); border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow); padding-bottom: calc(env(safe-area-inset-bottom) + 20px);
  animation: up .32s var(--ease);
}
.sheet.closing { animation: down .2s ease forwards; }
.scrim.closing { animation: fade .2s ease reverse forwards; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.sheet-close { position: sticky; top: 12px; margin: 12px 12px -54px auto; z-index: 2; }
.sheet-pad { padding: 22px 18px 0; }
.sheet-kicker { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sheet-title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.03em; padding-right: 48px; }
.sheet-title.mono { font-size: 22px; }
.sheet-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.sheet-lead { margin: 8px 0 18px; color: var(--muted); }
.actions { display: flex; gap: 10px; margin-top: 24px; }
.actions .btn { flex: 1; }

/* Fiche article, comme une page produit */
.product-hero { position: relative; }
.product-cover { display: block; width: 100%; }
.product-img { width: 100%; aspect-ratio: 4 / 5; max-height: 62dvh; object-fit: cover; border-radius: 24px 24px 0 0; background: var(--surface-2); }
.product-actions { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; }
.product-actions .btn { box-shadow: 0 6px 20px rgb(0 0 0 / .35); }
.product-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.product-head .sheet-title { padding-right: 0; }
.product-price { font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.product-price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.product-option { margin: 6px 0 0; color: var(--muted); }
.mine-tag { font-size: 12px; font-weight: 600; color: var(--accent); }

.journey { list-style: none; margin: 20px 0 0; padding: 0; display: grid; border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.journey li > * { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; }
.journey li + li > * { border-top: 1px solid var(--line); }
.journey-ico { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--faint); flex: none; }
.journey-ico svg { width: 19px; height: 19px; }
.journey li.on .journey-ico { background: var(--accent-soft); color: var(--accent); }
.journey-txt { flex: 1; min-width: 0; display: grid; }
.journey-txt b { font-size: 14px; font-weight: 600; }
.journey li:not(.on) .journey-txt b { color: var(--faint); }
.journey-txt span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journey-go { color: var(--faint); }
.journey-go svg { width: 18px; height: 18px; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo { aspect-ratio: 1; border-radius: var(--r-img); overflow: hidden; background: var(--surface-2); }
.photo-img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s var(--ease); }
.photo:active .photo-img { transform: scale(.95); }

.facts { margin: 24px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-radius: var(--r-card); overflow: hidden; background: var(--line); }
.facts > div { background: var(--surface); padding: 12px 14px; min-width: 0; }
.facts dt { font-size: 12.5px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.facts .link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.facts .link svg { width: 14px; height: 14px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { --c: var(--faint); position: relative; padding: 0 0 16px 24px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 20px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline b { display: block; font-size: 14px; font-weight: 600; }
.timeline span { font-size: 12.5px; color: var(--muted); }

.settings { display: grid; border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.setting { display: flex; align-items: center; gap: 12px; padding: 14px; }
.setting + .setting { border-top: 1px solid var(--line); }
.setting-ico { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.setting-ico svg { width: 19px; height: 19px; }
.setting-txt { flex: 1; min-width: 0; display: grid; }
.setting-txt b { font-weight: 600; font-size: 14.5px; }
.setting-txt span { color: var(--muted); font-size: 13px; }

.guide { counter-reset: g; list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.guide li { counter-increment: g; display: flex; gap: 12px; font-size: 14px; color: var(--muted); }
.guide li::before { content: counter(g); flex: none; width: 24px; height: 24px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.guide b { color: var(--text); font-weight: 600; }
code { font: 12.5px var(--mono); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; color: var(--text); }

/* ---------- Visionneuse ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: #050506; animation: fade .2s ease; }
.viewer-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer-track::-webkit-scrollbar { display: none; }
.viewer-slide { flex: 0 0 100%; height: 100%; display: grid; place-items: center; scroll-snap-align: center; }
.viewer-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-bar {
  position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px; color: #f4f4f5;
}
.viewer-count { font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 999px; background: rgb(255 255 255 / .1); }
.viewer .icon-btn { background: rgb(255 255 255 / .1); border-color: transparent; color: #f4f4f5; }

/* ---------- Connexion ---------- */
.login { min-height: 86dvh; display: flex; flex-direction: column; justify-content: center; padding: 0 4px; }
.app-mark { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); margin-bottom: 22px; }
.app-mark svg { width: 32px; height: 32px; }
.login h1 { margin: 0; font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.login p { margin: 10px 0 30px; color: var(--muted); font-size: 16px; max-width: 30ch; }
.login-form { width: 100%; max-width: 380px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 90px); z-index: 40;
  transform: translate(-50%, 20px); opacity: 0; visibility: hidden;
  transition: transform .3s var(--ease), opacity .3s, visibility .3s;
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); max-width: calc(100vw - 32px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Apparition des cartes au changement d'onglet ---------- */
@media (prefers-reduced-motion: no-preference) {
  #panel.enter .pcard, #panel.enter .parcel, #panel.enter .feed-item, #panel.enter .spotlight {
    animation: rise .5s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 35ms);
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.parcel-list { margin-top: 14px; }
