/* Inventaire — feuille de style */
:root {
  color-scheme: light dark;
  --bg: #f6f5f3;
  --bg-elev: #ffffff;
  --bg-sunken: #ecebe7;
  --line: #e0ddd6;
  --line-strong: #cfcabf;
  --text: #1c1a17;
  --muted: #726d64;
  --faint: #9b958a;
  --accent: #b4532a;
  --accent-soft: rgba(180, 83, 42, 0.12);
  --accent-text: #ffffff;
  --ok: #2f7d55;
  --warn: #b07a12;
  --danger: #b3382f;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28, 26, 23, .06), 0 8px 24px rgba(28, 26, 23, .07);
  --shadow-lg: 0 24px 60px rgba(20, 18, 15, .22);
  --header-h: 116px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14130f;
    --bg-elev: #1d1c18;
    --bg-sunken: #100f0c;
    --line: #2c2a24;
    --line-strong: #3b382f;
    --text: #f2efe8;
    --muted: #a7a094;
    --faint: #7c766a;
    --accent: #e0794a;
    --accent-soft: rgba(224, 121, 74, 0.16);
    --accent-text: #1a1209;
    --ok: #5ac08a;
    --warn: #e0b357;
    --danger: #e8776c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);
  }
}

html[data-theme="dark"] {
  --bg: #14130f;
  --bg-elev: #1d1c18;
  --bg-sunken: #100f0c;
  --line: #2c2a24;
  --line-strong: #3b382f;
  --text: #f2efe8;
  --muted: #a7a094;
  --faint: #7c766a;
  --accent: #e0794a;
  --accent-soft: rgba(224, 121, 74, 0.16);
  --accent-text: #1a1209;
  --ok: #5ac08a;
  --warn: #e0b357;
  --danger: #e8776c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }

/* une classe qui pose display: flex bat la règle navigateur [hidden] :
   sans ceci, la barre de sélection et « Afficher plus » restent visibles */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

/* ---------------------------------------------------------------- header */
header.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.brand svg { width: 24px; height: 24px; color: var(--accent); }
.brand small { color: var(--muted); font-weight: 500; font-size: 12px; display: block; }

.spacer { flex: 1; }

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.search-wrap svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--faint);
  pointer-events: none;
}

input[type="search"], input[type="text"], input[type="number"], input[type="date"],
input[type="password"], input[type="url"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input[type="search"] { padding-left: 36px; border-radius: 999px; }

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea { resize: vertical; min-height: 80px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--muted);
  flex: none;
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  font-weight: 560;
  font-size: 14px;
  white-space: nowrap;
  transition: transform .1s, background .15s, border-color .15s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* segmented + filters */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.segmented {
  display: inline-flex;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  flex: none;
}
.segmented button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 560;
  transition: background .15s, color .15s;
}
.segmented button[aria-selected="true"] {
  background: var(--bg-elev);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

.chip {
  flex: none;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip[aria-pressed="true"], .chip.active {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
}
.chip svg { width: 15px; height: 15px; }

select.chip-select {
  flex: none;
  width: auto;
  padding: 7px 30px 7px 13px;
  border-radius: 999px;
  background-color: transparent;
  color: var(--muted);
  font-size: 13.5px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b958a' stroke-width='2.2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 15px;
}

/* ----------------------------------------------------------------- stats */
.stats {
  max-width: 1400px;
  margin: 18px auto 0;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.stat b { display: block; font-size: 21px; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }

/* ------------------------------------------------------------------ grid */
main { max-width: 1400px; margin: 0 auto; padding: 18px 16px 120px; }

.result-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin: 6px 2px 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px 16px;
}

.card {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .16s ease;
}
.card:hover { transform: translateY(-3px); }

.cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cover .placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 12px;
  text-align: center;
  color: var(--faint);
  font-family: var(--serif);
  font-size: 13px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--bg-elev)), var(--bg-sunken));
}
.cover .placeholder svg { width: 26px; height: 26px; opacity: .5; }

.badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 620;
  background: rgba(0,0,0,.62);
  color: #fff;
  backdrop-filter: blur(6px);
  letter-spacing: .01em;
}
.badge.status { left: auto; right: 8px; background: rgba(0,0,0,.62); }
.badge.wishlist { background: rgba(176,122,18,.92); }
.badge.lent { background: rgba(47,125,85,.92); }
.badge.sold { background: rgba(179,56,47,.92); }

.fav-dot {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: rgba(0,0,0,.6);
  display: grid; place-items: center;
  color: #ffcf6b;
}
.fav-dot svg { width: 13px; height: 13px; }

.card h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card p { margin: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* list view */
.grid.list { grid-template-columns: 1fr; gap: 8px; }
.grid.list .card {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px 8px 8px;
}
.grid.list .card:hover { transform: none; border-color: var(--line-strong); }
.grid.list .cover { width: 46px; aspect-ratio: 2/3; flex: none; border-radius: 7px; }
.grid.list .cover .badge, .grid.list .cover .fav-dot, .grid.list .cover .placeholder span { display: none; }
.grid.list .meta { min-width: 0; flex: 1; }
.grid.list h3 { -webkit-line-clamp: 1; font-size: 14.5px; }

.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}
.empty svg { width: 42px; height: 42px; opacity: .35; margin-bottom: 14px; }
.empty h2 { margin: 0 0 6px; font-size: 17px; color: var(--text); font-weight: 600; }
.empty p { margin: 0 0 18px; font-size: 14px; }

.skeleton {
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--bg-sunken) 20%, var(--bg-elev) 40%, var(--bg-sunken) 60%);
  background-size: 240% 100%;
  animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer { to { background-position: -240% 0; } }

/* ------------------------------------------------------------------- FAB */
.fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 640;
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  transition: transform .12s;
}
.fab:active { transform: scale(.95); }
.fab svg { width: 19px; height: 19px; }

/* ---------------------------------------------------------------- modals */
dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  max-width: 100vw;
  max-height: 100dvh;
}
dialog::backdrop { background: rgba(10, 9, 7, .55); backdrop-filter: blur(3px); }

.sheet {
  width: min(680px, 100vw);
  max-height: min(88dvh, 900px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet.wide { width: min(880px, 100vw); }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.sheet-head h2 { margin: 0; font-size: 16px; font-weight: 640; letter-spacing: -0.01em; }
/* le <form> de la fiche d'édition doit rester une colonne flex, sinon le pied
   de page (bouton Enregistrer) déborde et se fait rogner par le overflow:hidden */
.sheet > form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.sheet-body {
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}
.sheet-foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex: none;
  background: var(--bg-elev);
}

/* detail */
.detail-hero { display: flex; gap: 18px; margin-bottom: 18px; }
.detail-hero .cover { width: 132px; flex: none; }
.detail-hero h1 { margin: 0 0 4px; font-size: 21px; line-height: 1.2; letter-spacing: -0.02em; }
.detail-hero .by { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.desc { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0 0 18px; }
.desc.clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 560; letter-spacing: .01em; }
.field.full { grid-column: 1 / -1; }

.kv { display: grid; grid-template-columns: 116px 1fr; gap: 7px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.stars { display: inline-flex; gap: 3px; }
.stars button { background: none; border: 0; padding: 2px; color: var(--line-strong); }
.stars button svg { width: 22px; height: 22px; }
.stars button.on { color: #e8ae3c; }

/* search results in add modal */
.res-list { display: flex; flex-direction: column; gap: 6px; }
.res {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background .12s, border-color .12s;
}
.res:hover { background: var(--bg-sunken); border-color: var(--line); }
.res img, .res .ph {
  width: 44px; height: 66px;
  object-fit: cover;
  border-radius: 6px;
  flex: none;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
}
.res .info { min-width: 0; flex: 1; }
.res .info b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.res .info span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res .add { color: var(--accent); flex: none; }
.res .add svg { width: 20px; height: 20px; }

/* import */
.map-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.map-table th { text-align: left; color: var(--muted); font-weight: 560; font-size: 12px; padding: 6px 8px; }
.map-table td { padding: 5px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.map-table td:first-child { font-weight: 560; max-width: 150px; }
.map-table .sample { color: var(--faint); font-size: 12px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-table select { padding: 6px 8px; }

.progress {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-sunken);
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.log {
  margin-top: 12px;
  max-height: 210px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  white-space: pre-wrap;
}

.help {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.help ol { margin: 6px 0 0; padding-left: 18px; }
.help li { margin-bottom: 3px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button {
  border: 0; background: none; padding: 9px 12px;
  color: var(--muted); font-size: 14px; font-weight: 560;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.switch { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }

#scanner { width: 100%; border-radius: var(--radius); background: #000; aspect-ratio: 4/3; object-fit: cover; }

/* toast */
.toasts {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 90;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(420px, calc(100vw - 32px));
}
.toast {
  background: var(--text);
  color: var(--bg);
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 540;
  box-shadow: var(--shadow-lg);
  animation: rise .22s ease;
}
.toast.err { background: var(--danger); color: #fff; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* menu */
.menu {
  position: absolute;
  top: 52px; right: 16px;
  z-index: 60;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 220px;
}
.menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 11px;
  border: 0; background: none; border-radius: 9px;
  font-size: 14px; text-align: left;
}
.menu button:hover { background: var(--bg-sunken); }
.menu button svg { width: 16px; height: 16px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 2px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 720px) {
  .top-inner { padding: 8px 12px 0; }
  .brand small { display: none; }
  .brand span.name { display: none; }
  main { padding: 14px 12px 130px; }
  .stats { padding: 0 12px; grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 14px 10px; }
  .sheet {
    width: 100vw;
    max-height: 94dvh;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
  }
  dialog { margin: auto auto 0; }
  .detail-hero { flex-direction: column; }
  .detail-hero .cover { width: 118px; }
  .kv { grid-template-columns: 96px 1fr; }
  .fab { padding: 13px 17px; }
  .fab span { display: none; }
}

@media (min-width: 721px) {
  dialog { margin: auto; }
}

/* ------------------------------------------------------ sélection multiple */
.card .pick {
  position: absolute;
  top: 7px; left: 7px;
  width: 24px; height: 24px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: rgba(0, 0, 0, .45);
  display: none;
  place-items: center;
  color: #fff;
  z-index: 2;
}
.card .pick svg { width: 14px; height: 14px; opacity: 0; }
body.selecting .card .pick { display: grid; }
body.selecting .card .cover .badge { display: none; }
body.selecting .card:hover { transform: none; }
.card.selected .pick { background: var(--accent); border-color: var(--accent); }
.card.selected .pick svg { opacity: 1; }
.card.selected .cover { outline: 3px solid var(--accent); outline-offset: 2px; }

.bulkbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 55;
  width: min(760px, calc(100vw - 24px));
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.bulkbar::-webkit-scrollbar { display: none; }
.bulkbar b { flex: none; font-size: 14px; padding: 0 4px; }
.bulkbar .btn { padding: 8px 12px; font-size: 13.5px; }

/* --------------------------------------------------- fiches à compléter */
.fix-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; min-height: 340px; }
.fix-list {
  min-width: 0;
  border-right: 1px solid var(--line);
  padding-right: 12px;
  max-height: 58dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fix-list button {
  display: block;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
  border: 0;
  background: none;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  line-height: 1.35;
}
.fix-list button:hover { background: var(--bg-sunken); }
.fix-list button[aria-current="true"] { background: var(--accent-soft); color: var(--accent); }
.fix-list small {
  display: block;
  color: var(--faint);
  font-size: 11.5px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fix-list button[aria-current="true"] small { color: inherit; opacity: .8; }
.fix-done { text-decoration: line-through; opacity: .45; }

.owned-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 620;
  background: color-mix(in srgb, var(--ok) 18%, transparent);
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
}
.owned-flag svg { width: 12px; height: 12px; }

.scan-banner {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  background: var(--bg-sunken);
}
.scan-banner.owned {
  background: color-mix(in srgb, var(--ok) 14%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--ok) 45%, transparent);
}
.scan-banner.new {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.scan-banner b { display: block; font-size: 16px; margin-bottom: 3px; letter-spacing: -.01em; }
.scan-banner span { font-size: 13.5px; color: var(--muted); }
.scan-banner.owned b { color: var(--ok); }

.offline-note {
  display: none;
  font-size: 12.5px;
  color: var(--warn);
  padding: 4px 8px;
}
body.offline .offline-note { display: block; }

/* --------------------------------------------------------- statistiques */
.stat-block { margin-bottom: 22px; }
.stat-block h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  font-weight: 620;
}
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 104px 1fr 42px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row span:first-child { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 9px; border-radius: 99px; background: var(--bg-sunken); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 99px; background: var(--accent); }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

@media (max-width: 720px) {
  .fix-layout { grid-template-columns: minmax(0, 1fr); }
  .fix-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 10px;
    max-height: 168px;
  }
  .bar-row { grid-template-columns: 84px 1fr 36px; }
  .bulkbar { width: calc(100vw - 20px); }
}
