/* CariShelf — style iOS / macOS, clair/sombre automatique */
/* Jeu de couleurs partagé avec CariView (Caribou Labs) : rouge du logo, gris Apple, filets fins */
:root {
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --surface-2: #F2F2F5;
  --fg: #1D1D1F;
  --muted: #6E6E73;
  --line: rgba(0, 0, 0, .1);
  --accent: #C40504;          /* rouge du logo */
  --accent-hover: #A80403;
  --accent-soft: rgba(196, 5, 4, .09);
  --accent-ink: #FFFFFF;
  --done: #248A3D;
  --focus: rgba(196, 5, 4, .45);
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, "Cascadia Mono", Consolas, monospace;
  --orange: #C2410C;          /* mentions d'édition */
  --green: #248A3D;
  --red: #C40504;
  --purple: #8944AB;
  --teal: #0E7C86;
  --indigo: #3634A3;
  --tabbar-h: 56px;
  /* alias historiques */
  --bg-grouped: var(--surface);
  --bg-elev: color-mix(in srgb, var(--surface) 82%, transparent);
  --fill: var(--surface-2);
  --fill-2: rgba(120, 120, 128, .2);
  --label: var(--fg);
  --label-2: var(--muted);
  --label-3: rgba(60, 60, 67, .3);
  --separator: var(--line);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F11;
    --surface: #1C1C1E;
    --surface-2: #2C2C2E;
    --fg: #F5F5F7;
    --muted: #98989D;
    --line: rgba(255, 255, 255, .12);
    --accent: #FF453A;
    --accent-hover: #FF6259;
    --accent-soft: rgba(255, 69, 58, .14);
    --done: #30D158;
    --focus: rgba(255, 69, 58, .5);
    --shadow: none;
    --orange: #FF9F0A;
    --green: #30D158;
    --red: #FF453A;
    --purple: #BF5AF2;
    --teal: #40C8E0;
    --indigo: #5E5CE6;
    --fill-2: rgba(120, 120, 128, .36);
    --label-3: rgba(235, 235, 245, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--label); }
body {
  font: 16px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

#view {
  max-width: 1100px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 8px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
}

/* ---------- Barre d'onglets ---------- */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-elev);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--separator);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--label-2); font-size: 10.5px; font-weight: 500;
}
.tabbar a svg { font-size: 25px; }
.tabbar a.active { color: var(--accent); }

/* ---------- En-têtes ---------- */
.large-title { font-size: 34px; font-weight: 700; letter-spacing: .37px; margin: 12px 0 10px; }
.subtitle { color: var(--label-2); font-size: 15px; margin: -6px 0 12px; }
.nav-back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 17px; padding: 8px 0; background: none; border: 0; cursor: pointer; }
.nav-back svg { font-size: 22px; stroke-width: 2.4; }

/* ---------- Contrôles ---------- */
.search {
  display: flex; align-items: center; gap: 6px;
  background: var(--fill); border-radius: 10px; padding: 0 10px; height: 38px; color: var(--label-2);
}
.search input { flex: 1; border: 0; background: transparent; outline: none; color: var(--label); font-size: 17px; min-width: 0; }
.search svg { font-size: 17px; }

.segmented {
  display: flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; margin: 12px 0;
}
.segmented button {
  flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 6px 4px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--label);
}
.segmented button.on { background: var(--bg-grouped); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); font-weight: 600; }
@media (prefers-color-scheme: dark) { .segmented button.on { background: #636366; } }

.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--label-2); font-size: 13px; margin-bottom: 10px; }
.toolbar-row select { background: transparent; border: 0; color: var(--accent); font-size: 13px; cursor: pointer; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 11px 16px; font-size: 17px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff;
}
.btn.secondary { background: var(--fill); color: var(--accent); }
.btn.danger { background: var(--fill); color: var(--red); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { font-size: 19px; }

/* ---------- Grille de la collection ---------- */
.grid {
  display: grid; gap: 18px 14px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.card { display: block; color: inherit; min-width: 0; }
.cover {
  position: relative; aspect-ratio: 0.78; border-radius: 8px; overflow: hidden; background: var(--fill);
  box-shadow: var(--shadow); border: 0.5px solid var(--separator);
}
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--label-3); font-size: 40px; }
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; padding: 2px 6px; border-radius: 5px; color: #fff; background: var(--label-2); white-space: nowrap;
}
.badge.uhd { background: #1C1C1E; border: 1px solid #E5C76B; color: #E5C76B; }
.badge.bd { background: #0A84FF; }
.badge.dvd { background: #8E8E93; }
.cover .badge { position: absolute; top: 6px; left: 6px; }
.card-title { font-size: 13px; font-weight: 600; margin-top: 7px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 12px; color: var(--label-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty { text-align: center; color: var(--label-2); padding: 60px 20px; }
.empty svg { font-size: 54px; color: var(--label-3); margin-bottom: 10px; }
.empty h2 { color: var(--label); font-size: 20px; margin: 0 0 6px; }

/* ---------- Listes groupées iOS ---------- */
.section-title { font-size: 13px; text-transform: uppercase; color: var(--label-2); letter-spacing: .2px; margin: 26px 16px 7px; }
.group { background: var(--bg-grouped); border-radius: var(--radius); overflow: hidden; }
.row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 11px 16px; position: relative; min-height: 44px;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--separator); }
.row .k { color: var(--label); flex-shrink: 0; }
.row .v { color: var(--label-2); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.row.col { flex-direction: column; align-items: stretch; gap: 4px; }
.row.col .v { text-align: left; }
.row.link { cursor: pointer; color: var(--accent); }
.row input[type=text], .row textarea {
  border: 0; background: transparent; outline: none; text-align: right; color: var(--label-2); width: 60%; font-size: 17px;
}
.row textarea { text-align: left; width: 100%; min-height: 70px; resize: vertical; color: var(--label); }
.switch { position: relative; width: 51px; height: 31px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--fill-2); border-radius: 31px; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 27px; height: 27px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 3px 8px rgba(0,0,0,.15); transition: .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ---------- Fiche ---------- */
.hero { display: grid; grid-template-columns: 132px 1fr; gap: 16px; margin-top: 4px; }
@media (min-width: 700px) { .hero { grid-template-columns: 220px 1fr; gap: 24px; } }
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 8px; }
.gallery img { width: 100%; flex: 0 0 100%; scroll-snap-align: start; border-radius: 8px; aspect-ratio: .78; object-fit: cover; background: var(--fill); border: 0.5px solid var(--separator); cursor: zoom-in; }
.dots { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--label-3); }
.hero h1 { font-size: 26px; line-height: 1.12; margin: 2px 0 4px; font-weight: 700; }
@media (min-width: 700px) { .hero h1 { font-size: 34px; } }
.hero .vo { color: var(--label-2); font-style: italic; margin-bottom: 6px; }
.hero .meta { color: var(--label-2); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: 12.5px; font-weight: 600; padding: 4px 9px; border-radius: 7px; background: var(--fill); color: var(--label); }
.chip.ed { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }
.actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.owned { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; font-size: 15px; margin-top: 12px; }

.synopsis { font-size: 16px; line-height: 1.45; padding: 12px 16px; }
.people { padding: 10px 16px 12px; font-size: 15px; color: var(--label-2); line-height: 1.5; }
.people b { color: var(--label); font-weight: 600; }

/* Bonus */
.bonus-summary { display: flex; gap: 18px; padding: 12px 16px; border-bottom: 0.5px solid var(--separator); }
.stat b { display: block; font-size: 22px; font-weight: 700; }
.stat span { font-size: 12px; color: var(--label-2); }
.bonus { list-style: none; margin: 0; padding: 0; }
.bonus li { padding: 10px 16px 10px 52px; position: relative; }
.bonus li + li { border-top: 0.5px solid var(--separator); }
.bonus .ico { position: absolute; left: 14px; top: 10px; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 16px; }
.bonus .t { font-weight: 600; font-size: 15.5px; }
.bonus .d { color: var(--label-2); font-size: 14px; margin-top: 1px; }
.bonus .dur { float: right; font-variant-numeric: tabular-nums; color: var(--label-2); font-size: 14px; margin-left: 10px; }
.bonus .ann { display: inline-block; font-size: 11px; font-weight: 600; color: var(--label-2); border: 1px solid var(--separator); border-radius: 4px; padding: 0 4px; margin: 3px 4px 0 0; }
.bonus ul.bonus { margin: 8px 0 0 -36px; border-left: 2px solid var(--fill-2); }
.bonus ul.bonus li { padding: 6px 0 6px 14px; border: 0; }
.bonus ul.bonus .ico { display: none; }
.bonus ul.bonus ul.bonus { margin: 6px 0 0 0; }
.bonus ul.bonus .t { font-weight: 500; font-size: 14.5px; }
.raw { white-space: pre-wrap; font-size: 13px; color: var(--label-2); padding: 12px 16px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

.audio-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.audio-table td { padding: 9px 16px; border-top: 0.5px solid var(--separator); }
.audio-table tr:first-child td { border-top: 0; }
.audio-table td:last-child { text-align: right; color: var(--label-2); }
.audio-table .ch { display: inline-block; min-width: 34px; text-align: center; font-size: 12px; font-weight: 700; background: var(--fill); border-radius: 5px; padding: 1px 5px; margin-left: 6px; color: var(--label); }

/* ---------- Scanner ---------- */
.scanner { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 3/4; max-height: 62dvh; margin: 0 auto; width: 100%; }
@media (min-width: 700px) { .scanner { aspect-ratio: 4/3; max-width: 640px; } }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame {
  position: absolute; left: 10%; right: 10%; top: 38%; height: 24%;
  border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.85);
}
.scanner .laser { position: absolute; left: 14%; right: 14%; top: 50%; height: 2px; background: var(--red); box-shadow: 0 0 10px var(--red); animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateY(-28px); } to { transform: translateY(28px); } }
@media (prefers-reduced-motion: reduce) { .scanner .laser { animation: none; } }
.scanner .hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scanner .off { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-align: center; padding: 24px; }
.scanner.flash { animation: flash .35s; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 6px var(--green); } 100% { box-shadow: inset 0 0 0 0 var(--green); } }
.manual { display: flex; gap: 8px; margin-top: 14px; }
.manual .search { flex: 1; height: 44px; min-width: 0; }
.row:has(.switch) { align-items: center; }
.manual .btn { height: 44px; }
.note { font-size: 13px; color: var(--label-2); margin: 8px 4px; }

/* ---------- Divers ---------- */
.spinner { width: 28px; height: 28px; border: 3px solid var(--fill-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); border-radius: var(--radius); padding: 14px 16px; margin-top: 16px; font-size: 15px; }
.error-box b { display: block; margin-bottom: 4px; }
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); transform: translate(-50%, 20px);
  background: rgba(30,30,32,.92); color: #fff; padding: 10px 16px; border-radius: 14px; font-size: 15px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100% - 32px); z-index: 40;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
textarea.eans { width: 100%; min-height: 140px; border: 0; background: var(--bg-grouped); border-radius: var(--radius); padding: 12px 14px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; outline: none; color: var(--label); }
.progress { height: 6px; background: var(--fill); border-radius: 3px; overflow: hidden; margin: 10px 0; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }

/* ---------- 0.1.0 : vue liste, genre, personnes ---------- */
.toolbar-right { display: inline-flex; align-items: center; gap: 10px; }
.vue-toggle { display: inline-flex; background: var(--fill); border-radius: 8px; padding: 2px; }
.vue-toggle button { border: 0; background: transparent; width: 32px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--label-2); cursor: pointer; }
.vue-toggle button svg { font-size: 17px; }
.vue-toggle button.on { background: var(--bg-grouped); color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
@media (prefers-color-scheme: dark) { .vue-toggle button.on { background: #636366; color: #fff; } }

.list-head { margin: 22px 4px 8px; font-weight: 600; }
.list-head:first-child { margin-top: 4px; }
.grid + .list-head, .group + .list-head { margin-top: 26px; }

.group.list { padding: 0; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; color: inherit; position: relative; }
.li + .li::before { content: ""; position: absolute; top: 0; left: 72px; right: 0; border-top: 0.5px solid var(--separator); }
.li:active { background: var(--fill); }
.li-cover { position: relative; width: 46px; flex-shrink: 0; aspect-ratio: .78; border-radius: 5px; overflow: hidden; background: var(--fill); border: 0.5px solid var(--separator); }
.li-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.li-cover .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--label-3); font-size: 20px; }
.li-body { flex: 1; min-width: 0; }
.li-title { font-weight: 600; font-size: 14.5px; line-height: 1.25; text-wrap: balance; overflow-wrap: break-word; hyphens: manual; }
.li-sub { font-size: 13.5px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-ed { font-size: 12.5px; color: var(--orange); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.li .badge { flex-shrink: 0; }
.li .chev { color: var(--label-3); font-size: 15px; flex-shrink: 0; stroke-width: 2.4; }

.genre-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--label); background: var(--fill); padding: 4px 10px 4px 8px; border-radius: 8px; }
.genre-line svg { font-size: 14px; color: var(--label-2); }
a.plink { color: var(--accent); font-weight: 500; }
.hero .meta a.plink { font-weight: 600; }
.people a.plink { font-weight: 500; }
.map-select { background: transparent; border: 0; color: var(--accent); font-size: 16px; text-align: right; max-width: 55%; cursor: pointer; }
.row:has(.map-select) { align-items: center; }
details > summary.section-title { list-style: none; }


/* ================= 0.1.2 : alignement visuel sur CariView ================= */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#view { max-width: 1200px; padding-top: 8px; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }

/* Barre du haut (comme CariView) */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand img { width: 34px; height: 34px; flex: none; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font: 650 16px/1.15 var(--font-display); letter-spacing: -.01em; }
.brand-who { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: none; gap: 2px; background: var(--surface-2); border-radius: 8px; padding: 2px; }
.topnav a { padding: 5px 12px; border-radius: 6px; font-size: 13.5px; font-weight: 550; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.topnav a svg { font-size: 16px; }
.topnav a.active { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.badge-outline { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
@media (min-width: 900px) {
  .topnav { display: inline-flex; }
  .tabbar { display: none; }
  #view { padding-bottom: 48px; }
  #toast { bottom: 24px; }
}

/* Titres de page : sur-titre rouge + titre (comme CariView) */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 18px 0 2px; }
.large-title { font: 700 clamp(26px, 3vw, 32px)/1.15 var(--font-display); letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance; }
.eyebrow + .large-title { margin-top: 0; }
.section-title { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 26px 4px 8px; }

/* Cartes et listes groupées : filet 1 px + ombre légère */
.group { border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); }
.row + .row::before, .li + .li::before { border-top: 1px solid var(--line); }
.bonus li + li, .bonus-summary, .audio-table td { border-color: var(--line); }

/* Contrôles */
.btn { border-radius: 8px; padding: 9px 16px; font-size: 15px; font-weight: 550; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.btn:hover:not(:disabled) { background: var(--accent-hover); }
.btn.secondary, .btn.danger { background: var(--surface); border-color: var(--line); }
.btn.secondary { color: var(--fg); }
.btn.secondary:hover:not(:disabled), .btn.danger:hover:not(:disabled) { background: var(--surface-2); }
.search { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; height: 40px; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.segmented { background: var(--surface-2); border-radius: 8px; }
.segmented button { border-radius: 6px; font-weight: 550; color: var(--muted); }
.segmented button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.12); font-weight: 600; }
@media (prefers-color-scheme: dark) { .segmented button.on, .vue-toggle button.on, .topnav a.active { background: #48484A; color: var(--fg); } }
.vue-toggle { background: var(--surface-2); }
.vue-toggle button.on { color: var(--accent); }
.toolbar-row select { color: var(--accent); font-weight: 550; }
.chip { background: var(--surface-2); color: var(--fg); border-radius: 999px; padding: 3px 10px; font-weight: 600; }
.chip.ed { background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); }
.genre-line { border-radius: 999px; background: var(--surface-2); }
.li-ed { color: var(--orange); }
.owned { color: var(--done); }
.badge { border-radius: 999px; padding: 2px 8px; }
.cover .badge { top: 6px; left: 6px; }
.badge.bd { background: #0A60D0; }
.tabbar a.active { color: var(--accent); }
.cover, .li-cover { border: 1px solid var(--line); }
.error-box { background: var(--accent-soft); color: var(--accent); }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 8px; }
/* Fiche : une colonne sur téléphone, deux colonnes sur grand écran (comme le lecteur + commentaires de CariView) */
.fiche-body { display: flex; flex-direction: column; }
.fiche-body .fcol { display: contents; }
.fs:empty { display: none; }
@media (min-width: 900px) {
  .fiche-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0 28px; align-items: start; }
  .fiche-body .fcol { display: block; }
  .hero { grid-template-columns: 240px 1fr; gap: 28px; }
}
.chip { border-radius: 8px; }
.genre-line { border-radius: 8px; }

/* ================= 0.1.3 : sources multiples, recherche, saisie manuelle ================= */
.badge.vhs { background: #6B4F3A; }
.badge.autre { background: #8E8E93; }
.badge.score { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.chip.pays { background: color-mix(in srgb, #3A82F7 14%, transparent); color: #3A82F7; }
.audio-table tr.grp td { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
.row.src .k { color: var(--accent); }
.row.src .v { font-size: 14px; }
#dvdc-pick .k { color: var(--accent); }
#dvdc-pick .v { font-size: 13.5px; }
.muted { color: var(--muted); font-weight: 400; }
b.ok { color: var(--done); font-weight: 600; }
button.li { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.li > svg:last-child { color: var(--label-3); font-size: 15px; flex-shrink: 0; stroke-width: 2.4; }
.li .badge { flex-shrink: 0; }
#mf .row input, #mf .row select { width: 62%; }
#mf textarea.eans { min-height: 90px; }
.actions .btn { text-decoration: none; }

/* Feuille modale (choix d'édition DVDCompare) */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.35); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 88dvh; border-radius: 16px 16px 0 0; display: flex; flex-direction: column; box-shadow: 0 -8px 40px rgba(0,0,0,.25); }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 16px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.sheet-body { overflow-y: auto; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.icon-btn { background: var(--surface-2); border: 0; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.diag-detail { font-family: var(--mono); font-size: 12.5px; text-align: left !important; line-height: 1.6; }
