/* Étagères en bois clair. Onglet Livres = chaque livre posé sur des planches ; onglet Séries = suivi des tomes. */
:root {
  color-scheme: light;
  --wall: #f7f1e7;
  --card: #fffdf9;
  --ink: #3a2a1c;
  --muted: #7d6a57;
  --line: #e6d9c5;
  --oak: #d8b88a;
  --oak-deep: #b98f5c;
  --oak-light: #ead2ab;
  --accent: #4f7a5c;
  --accent-ink: #ffffff;
  --brass: #a87a2c;
  --danger: #a5402f;
  --st-lu: #4f7a5c;
  --st-encours: #3f6e96;
  --st-alire: #8b7558;
  --st-prete: #a87a2c;
  --font-display: "Young Serif", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --cover-w: 124px;
}
@media (max-width: 560px) { :root { --cover-w: 96px; } }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--wall); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; display: flex; flex-direction: column; gap: 20px; }
header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: 2.2rem; line-height: 1.1; margin: 0; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 4px; }
.counts { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 0; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.counts b { color: var(--ink); font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
.btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 6px; font-weight: 500; }
.btn:hover:not(:disabled) { border-color: var(--oak-deep); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.07); border-color: var(--accent); }
.btn.small { padding: 5px 10px; font-size: .85rem; }
.btn.danger { color: var(--danger); }
.btn.danger.confirm { background: var(--danger); color: #fff; border-color: var(--danger); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; color: var(--muted); font-weight: 600; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--oak-deep); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { flex: 1 1 260px; min-width: 0; position: relative; }
.search input { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font: inherit; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--muted); fill: none; }
select, .field input, .field textarea, .field select { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 5px 11px; border-radius: 999px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--wall); border-color: var(--ink); }
.notice { font-size: .88rem; color: var(--muted); border: 1px dashed var(--oak); border-radius: 6px; padding: 10px 14px; background: var(--card); }
.notice.err { color: var(--danger); border-color: var(--danger); }

/* Étagères */
.shelves { display: flex; flex-direction: column; gap: 26px; }
.shelf-books { display: flex; gap: 18px; align-items: end; padding: 0 14px; min-height: 40px; }
.plank {
  height: 16px; border-radius: 3px;
  background:
    repeating-linear-gradient(92deg, rgb(120 80 40 / .07) 0 2px, transparent 2px 23px),
    repeating-linear-gradient(88deg, rgb(255 255 255 / .18) 0 1px, transparent 1px 41px),
    linear-gradient(180deg, var(--oak-light), var(--oak) 45%, var(--oak-deep));
  box-shadow: 0 6px 10px -6px rgb(90 60 30 / .45);
}
.shelf-caps { display: flex; gap: 18px; padding: 8px 14px 0; }
.bk { width: var(--cover-w); flex: 0 0 var(--cover-w); cursor: pointer; background: none; border: 0; padding: 0; text-align: left; color: inherit; }
.cover {
  width: 100%; aspect-ratio: 2 / 3; border-radius: 2px 4px 4px 2px; overflow: hidden; position: relative; background: var(--oak-light);
  box-shadow: 0 1px 0 rgb(0 0 0 / .08), 4px 6px 10px -4px rgb(80 50 20 / .45);
  transition: transform .15s ease;
}
.bk:hover .cover, .bk:focus-visible .cover { transform: translateY(-4px); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 10px 9px; color: #fffaf2; background-image: linear-gradient(90deg, rgb(0 0 0 / .18) 0 5px, rgb(255 255 255 / .12) 5px 6px, transparent 6px); }
.ph .t { font-family: var(--font-display); font-size: .86rem; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; padding-left: 4px; }
.ph .a { font-size: .68rem; opacity: .85; padding-left: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ph .v { font-family: var(--font-mono); font-size: 1.3rem; padding-left: 4px; }
.vol-tag { position: absolute; left: 5px; bottom: 5px; background: rgb(40 28 18 / .82); color: #fff; font-family: var(--font-mono); font-size: .72rem; padding: 1px 6px; border-radius: 3px; }
.dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; }
.dot.lu { background: var(--st-lu); } .dot.encours { background: var(--st-encours); } .dot.alire { display: none; } .dot.prete { background: var(--st-prete); }
.cap { width: var(--cover-w); flex: 0 0 var(--cover-w); min-width: 0; cursor: pointer; }
.cap .ct { font-weight: 600; font-size: .86rem; line-height: 1.25; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cap .cm { color: var(--muted); font-size: .78rem; margin: 2px 0 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Séries */
.series-list { display: flex; flex-direction: column; gap: 14px; }
.series { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; scroll-margin-top: 16px; }
.series.flash { outline: 2px solid var(--oak-deep); outline-offset: 2px; }
.series > .cover { width: 92px; }
.s-body { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.s-body h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
.s-meta { color: var(--muted); font-size: .88rem; margin: 0; }
.s-note { font-size: .84rem; color: var(--muted); margin: 0; font-style: italic; }
.prog { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { flex: 1; max-width: 260px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: flex; }
.bar span { display: block; height: 100%; }
.tomes { display: flex; flex-wrap: wrap; gap: 5px; }
.tome { min-width: 30px; height: 28px; padding: 0 6px; border-radius: 4px; font-family: var(--font-mono); font-size: .78rem; border: 1px dashed var(--oak); background: transparent; color: var(--muted); font-variant-numeric: tabular-nums; }
.tome.own { border-style: solid; background: var(--oak-light); border-color: var(--oak); color: var(--ink); }
.tome.lu { background: var(--st-lu); border-color: var(--st-lu); color: #fff; }
.tome.encours { background: var(--card); border: 2px solid var(--st-encours); color: var(--st-encours); font-weight: 500; }
.tome.prete { background: var(--card); border: 2px solid var(--st-prete); color: var(--st-prete); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 14px; height: 12px; border-radius: 3px; }
.s-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) { .series { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px; } .series > .cover { width: 64px; } }

.empty { padding: 40px 8px; text-align: center; color: var(--muted); }
.empty h2 { font-family: var(--font-display); font-weight: 400; color: var(--ink); font-size: 1.3rem; margin: 0 0 6px; }

/* Fenêtres */
dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); padding: 0; width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); }
dialog.wide { width: min(1040px, calc(100vw - 24px)); }
dialog.narrow { width: min(520px, calc(100vw - 24px)); }
dialog::backdrop { background: rgb(58 42 28 / .4); }
.sheet { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.sheet h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; margin: 0; }
.sheet-cols { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; }
@media (max-width: 600px) { .sheet-cols { grid-template-columns: 1fr; } .cover-col { flex-direction: row !important; align-items: end; } .cover-col .cover { width: 110px !important; flex: 0 0 110px; } }
.cover-col { display: flex; flex-direction: column; gap: 8px; }
.cover-col .cover { width: 150px; }
.cover-btns { display: flex; flex-direction: column; gap: 6px; }
.filebtn { position: relative; overflow: hidden; text-align: center; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fields { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; }
.field textarea { min-height: 64px; resize: vertical; }
.field input.mono { font-family: var(--font-mono); }
.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; }
.sheet-foot { display: flex; justify-content: space-between; align-items: end; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.sheet-foot .right { display: flex; gap: 8px; margin-left: auto; }
.hint { font-size: .82rem; color: var(--muted); margin: 0; }
.hint.err { color: var(--danger); }
.hint.ok { color: var(--accent); }

/* Recherche en ligne */
.big-search { flex: none; }
.big-search input { font-size: 1.05rem; padding: 12px 14px 12px 40px; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; }
.srcpill { font-size: .75rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.srcpill.ok { border-color: var(--accent); color: var(--accent); }
.srcpill.err { border-color: var(--danger); color: var(--danger); }
.scroll { overflow-y: auto; max-height: calc(100vh - 300px); padding: 4px 4px 8px 2px; display: flex; flex-direction: column; gap: 18px; }
.sec-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 8px; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; }
.res { display: flex; flex-direction: column; gap: 6px; background: none; border: 0; padding: 0; text-align: left; color: inherit; min-width: 0; }
.res .cover { width: 100%; }
.res:hover .cover, .res:focus-visible .cover { transform: translateY(-3px); }
.res .rt { font-weight: 600; font-size: .88rem; line-height: 1.25; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.res .rm { font-size: .78rem; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 3px; background: var(--oak-light); color: var(--ink); margin-right: 4px; }
.badge.own { background: var(--st-lu); color: #fff; }
.src { font-size: .7rem; color: var(--muted); }
.series-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cand { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 6px; text-align: left; color: inherit; }
.cand:hover { border-color: var(--oak-deep); }
.cand .cover { width: 48px; box-shadow: none; }
.cand b { display: block; font-size: .88rem; overflow-wrap: anywhere; }
.cand span { font-size: .78rem; color: var(--muted); }
.tg { border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.tg > summary { cursor: pointer; padding: 10px 14px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tg > summary b { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.tg > summary span { font-size: .82rem; color: var(--muted); }
.tg-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.tg-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.tg-head .field { flex: 1 1 280px; }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px; }
.pick { position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; }
.pick input { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; z-index: 2; accent-color: var(--accent); }
.pick .cover { width: 100%; }
.pick.owned .cover { opacity: .5; }
.pick .pn { font-family: var(--font-mono); font-size: .78rem; }
.pick .pt { font-size: .74rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pick.sel .cover { outline: 3px solid var(--accent); outline-offset: 2px; }
.o-select { flex-wrap: wrap; align-items: center; }
.o-upto { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.o-upto input { width: 64px; }
.o-bulk { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.o-bulk .hint { margin: 0 4px 0 0; }
.pick .edit { background: none; border: 0; padding: 0; text-align: left; color: var(--ink); font-size: .78rem; text-decoration: underline; text-underline-offset: 2px; }
.s-open { background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; }
.s-open:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px; }
.gallery button { background: none; border: 2px solid transparent; border-radius: 6px; padding: 3px; }
.gallery button:hover, .gallery button.sel { border-color: var(--accent); }
.gallery .cover { width: 100%; }
.sCover { display: flex; gap: 10px; align-items: center; }
.sCover .cover { width: 56px; }
.series > .s-open { align-self: start; }
.cover.has-vol .ph { padding-bottom: 30px; } /* l'auteur reste au-dessus du badge « T.3 » */
.count-badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.count-badge.fresh { background: var(--brass); }
.badge.new { background: var(--brass); color: #fff; }
.bl-series { display: flex; flex-direction: column; gap: 10px; }
.bl-series h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; margin: 0; }
.bl-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bl-item .cover { width: 100%; }
.bl-item .pn { font-family: var(--font-mono); font-size: .78rem; }
.bl-item .pt { font-size: .74rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.watch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; }
.watch-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 10px; border-left: 3px solid var(--line); background: var(--wall); border-radius: 0 4px 4px 0; }
.watch-list li span { color: var(--muted); }
.watch-list .watch-ok { border-left-color: var(--st-lu); }
.watch-list .watch-notfound { border-left-color: var(--brass); }
.watch-list .watch-error { border-left-color: var(--danger); }
.bl-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.bl-actions .btn { padding: 3px 8px; font-size: .78rem; }
.bl-item .pp { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.bl-mode { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.bl-mode select { font-size: .8rem; padding: 3px 6px; }
.bl-total { margin: 0; padding: 8px 12px; background: var(--oak-light); border-radius: 4px; font-variant-numeric: tabular-nums; }
.bl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tome-chip { font-family: var(--font-mono); font-size: .78rem; min-width: 44px; padding: 5px 8px; border: 1px dashed var(--line); border-radius: 4px; background: transparent; color: var(--ink); }
.tome-chip:hover { border-style: solid; border-color: var(--oak); }
.tome-chip.fresh { border-color: var(--brass); color: var(--brass); }
.badge.soon { background: var(--oak-deep); color: #fff; }
.buy-price { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.buy-price .hint { margin: 0; }
.buy { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.buy .sec-title { margin: 0; }
#buyBox { display: flex; flex-direction: column; gap: 10px; }
.buy-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.buy-label { margin: 0; font-size: .8rem; color: var(--muted); min-width: 170px; }
.buy-links { display: flex; flex-wrap: wrap; gap: 6px; }
.buy-links a { text-decoration: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
.cands-list { grid-template-columns: 1fr; max-height: 260px; overflow-y: auto; }
.foot-field { flex: 0 0 180px; }
.confirm-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 1px solid var(--danger); border-radius: 6px; padding: 10px 12px; background: var(--card); font-size: .88rem; }
.confirm-box p { margin: 0; flex: 1 1 220px; }
.settings-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.settings-sec h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; margin: 0; }
/* ---------- Téléphone ---------- */
.phone-only { display: none !important; }
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.icon-btn { padding: 8px; line-height: 0; }
.icon-btn svg, .bb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 640px) {
  .phone-only { display: revert !important; }
  .phone-only[hidden] { display: none !important; }
  .desktop-only { display: none !important; }
  .wrap {
    gap: 14px;
    padding: calc(14px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
  }
  header { flex-wrap: nowrap; align-items: start; }
  h1 { font-size: 1.7rem; }
  .eyebrow { display: none; }
  .counts { gap: 10px; font-size: .82rem; }
  /* iOS zoome sur les champs en dessous de 16 px */
  input, select, textarea, .search input, .field input, .field select, .field textarea { font-size: 16px !important; }
  .toolbar { gap: 8px; }
  .toolbar select { flex: 1 1 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .chip { white-space: nowrap; padding: 7px 12px; }
  .btn { min-height: 40px; }
  .btn.small { min-height: 34px; }
  .tome { min-width: 34px; height: 32px; }
  .shelf-books, .shelf-caps { gap: 12px; padding-left: 8px; padding-right: 8px; }
  .shelves { gap: 20px; }

  /* Barre du bas */
  .bottom-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    display: grid !important; grid-template-columns: repeat(5, 1fr); align-items: end;
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px -8px rgb(80 50 20 / .35);
  }
  .bb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; font-size: .7rem; font-weight: 600; cursor: pointer; }
  .bb[aria-current="page"] { color: var(--ink); }
  .bb-add { justify-self: center; width: 52px; height: 52px; margin-top: -18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 10px -4px rgb(40 70 50 / .6); justify-content: center; }
  .bb-add svg { width: 26px; height: 26px; stroke-width: 2.4; }
  .bb-badge { position: absolute; top: -2px; left: calc(50% + 6px); margin: 0; font-size: .65rem; line-height: 16px; min-width: 16px; padding: 0 4px; }

  /* Fenêtres en plein écran */
  dialog, dialog.wide, dialog.narrow { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .sheet { min-height: 100%; padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .sheet-foot { position: sticky; bottom: 0; margin: auto calc(-1 * max(16px, env(safe-area-inset-right, 0px))) 0; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-top: 1px solid var(--line); z-index: 2; }
  .scroll { max-height: none; overflow: visible; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .series-res { grid-template-columns: 1fr; }
  .tg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .buy-label { min-width: 0; flex: 1 1 100%; }
  .foot-field { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
