/* ============================================================
   Funko Collection : styles communs (public + admin)
   Design, composants, accessibilité. Chargé avant style.css / admin.css
   ============================================================ */
:root {
    /* Couleur d'accent de la collection affichée (modifiée par common.js) */
    --ac: #00b8f5;
    --ac-ink:  color-mix(in srgb, var(--ac) 62%, #000);
    --ac-soft: color-mix(in srgb, var(--ac) 13%, #fff);

    --bg: #f5f6fa;
    --surface: #fff;
    --ink: #1a1f2e;
    --muted: #586078;          /* contraste 6,2:1 sur blanc */
    --line: #e2e5ee;
    --line2: #cdd3e2;

    --cyan: #00b8f5;
    --cyan-ink: #00698f;
    --cyan-soft: #e0f5fd;
    --pink: #ff007f;
    --pink-btn: #d4006a;
    --pink-ink: #c2005c;       /* texte rose lisible (6,1:1) */
    --pink-soft: #ffe5f1;
    --green: #00c27a;
    --green-btn: #067a4c;
    --green-ink: #0a6a45;      /* texte vert lisible (6,6:1) */
    --green-soft: #dff7ec;
    --gold: #ffc933;
    --gold-ink: #7a5600;
    --gold-soft: #fff3cc;
    --violet-ink: #5b32c8;
    --violet-soft: #ece6ff;

    --shadow: 0 1px 2px rgba(26, 31, 46, .06), 0 8px 22px rgba(26, 31, 46, .07);
    --safe-b: env(safe-area-inset-bottom, 0px);

    /* Compatibilité avec la page de connexion */
    --color-cyan: #00c6ff;
    --color-pink: #ff007f;
    --color-green: #00D084;
    --color-yellow: #ffcc33;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ac-ink); text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Focus clavier visible partout */
:focus-visible { outline: 3px solid var(--ac); outline-offset: 2px; border-radius: 6px; }
.search:focus-within { outline: 3px solid var(--ac); outline-offset: 2px; }

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

/* Icônes (sprite images/icons.svg) */
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.s { width: 16px; height: 16px; }
.i.l { width: 24px; height: 24px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; }
.grow { flex: 1; min-width: 0; }
.wrap { max-width: 1250px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.fig { display: block; }

/* ---------- Logo ---------- */
.logo { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.logo .p { color: var(--pink); }
.logo .c { color: var(--cyan); }
.logo-link { color: inherit; display: block; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--line2); background: #fff; font-weight: 700; color: #3a4157; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--ac); }
.btn.cyan { border-color: var(--ac); color: var(--ac-ink); }
.btn.cyan:hover { background: var(--ac-soft); }
.btn.accent { background: var(--ac-ink); border-color: var(--ac-ink); color: #fff; }
.btn.accent:hover { background: color-mix(in srgb, var(--ac-ink) 85%, #000); border-color: color-mix(in srgb, var(--ac-ink) 85%, #000); }
.btn.pink { background: var(--pink-btn); border-color: var(--pink-btn); color: #fff; }
.btn.pink:hover { background: #b80058; border-color: #b80058; }
.btn.green { background: var(--green-btn); border-color: var(--green-btn); color: #fff; }
.btn.green:hover { background: #056a42; border-color: #056a42; }
.btn.danger { border-color: #e3a3c2; color: var(--pink-ink); }
.btn.danger:hover { background: var(--pink-soft); border-color: var(--pink-ink); }
.btn.link { border-color: transparent; background: transparent; color: var(--ac-ink); }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line2); background: #fff; color: #3a4157; display: inline-grid; place-items: center; flex: none; padding: 0; transition: background .15s, border-color .15s; }
.icon-btn:hover { border-color: var(--ac); }
.icon-btn.cyan { border-color: var(--ac); color: var(--ac-ink); }
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.ghost:hover { background: var(--line); }

/* ---------- Sélecteur de collection (bouton + menu qui défile ; le select natif reste caché dessous) ---------- */
.pill-select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    min-width: 250px; height: 42px; padding: 0 42px 0 18px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23586078' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center;
    border: 2px solid var(--ac); border-radius: 999px;
    font-weight: 700; color: #2a3042; cursor: pointer; text-overflow: ellipsis;
}
.pill-select:hover { box-shadow: 0 4px 12px color-mix(in srgb, var(--ac) 25%, transparent); }

.coll-pick { position: relative; }
.coll-btn { display: inline-flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-weight: 700; }
.coll-btn .coll-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--ac); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(15, 20, 35, .12); }
.coll-menu { position: absolute; z-index: 300; top: calc(100% + 8px); left: 0; min-width: max(100%, 260px); max-width: min(380px, calc(100vw - 24px)); max-height: min(60vh, 420px); overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(15, 20, 35, .22); }
.coll-menu.droite { left: auto; right: 0; }
.coll-menu[hidden] { display: none; }
.coll-menu [role="option"] { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-weight: 600; color: #2a3042; cursor: pointer; outline: 0; }
.coll-menu [role="option"] .coll-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-menu [role="option"]:hover, .coll-menu [role="option"]:focus-visible { background: var(--bg); }
.coll-menu [role="option"]:focus-visible { box-shadow: inset 0 0 0 2px var(--ac); }
.coll-menu [aria-selected="true"] { background: var(--ac-soft); color: var(--ac-ink); font-weight: 800; }
.coll-nb { font-size: 12px; font-weight: 700; color: var(--muted); }
.coll-coche { width: 16px; height: 16px; flex: none; stroke-width: 3; visibility: hidden; color: var(--ac-ink); }
.coll-menu [aria-selected="true"] .coll-coche { visibility: visible; }

/* ---------- Recherche, segmenté, pastilles ---------- */
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; background: #fff; border: 1px solid var(--line2); border-radius: 14px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); }
.search input::placeholder { color: #6a728a; }
.search .clear { border: 0; background: transparent; color: var(--muted); display: none; padding: 4px; border-radius: 50%; }
.search.filled .clear { display: grid; place-items: center; }

.seg { display: inline-flex; padding: 4px; background: #e8ebf3; border-radius: 999px; gap: 2px; }
.seg button { height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"], .seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(26, 31, 46, .15); }

.seg button .n { margin-left: 6px; font-size: 12px; font-weight: 600; opacity: .7; font-variant-numeric: tabular-nums; }
.seg button .n:empty { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: #fff; font-weight: 600; color: #343b50; white-space: nowrap; transition: background .15s, border-color .15s; }
.chip:hover:not([disabled]) { border-color: var(--ac); }
.chip[aria-pressed="true"], .chip.on { background: var(--ac-soft); border-color: var(--ac); color: var(--ac-ink); }
.chip[disabled] { opacity: .38; cursor: not-allowed; }
.chip.pink { background: var(--pink-soft); border-color: #f3a6cb; color: var(--pink-ink); height: 32px; padding: 0 10px 0 12px; }
.chip.more { border-style: dashed; color: var(--muted); }
.chip .i { width: 14px; height: 14px; stroke-width: 2.5; }
.chip .n { color: var(--muted); font-weight: 600; font-size: 12px; }

.sel { appearance: none; -webkit-appearance: none; height: 42px; padding: 0 38px 0 14px; border-radius: 12px; border: 1px solid var(--line2); font-weight: 600; color: #343b50; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23586078' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.vtoggle { display: inline-flex; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; background: #fff; }
.vtoggle button { width: 46px; height: 42px; border: 0; background: #fff; color: var(--muted); display: grid; place-items: center; }
.vtoggle button[aria-pressed="true"] { background: var(--ac-soft); color: var(--ac-ink); }

/* ---------- Jauge / progression ---------- */
.gauge { height: 14px; border-radius: 999px; background: #e8ebf3; overflow: hidden; }
.gauge > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ac), var(--green)); transition: width .5s ease; }
.pct { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); font-weight: 800; font-size: 14px; }

/* ---------- Cartes d'objets ---------- */
.item { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.item.clickable { cursor: pointer; }
.item.clickable:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(26, 31, 46, .08), 0 14px 30px rgba(26, 31, 46, .13); }
.item.clickable:hover .fig { transform: scale(1.05); }
.item .fig, .item .pic { transition: transform .25s; }
.item .open { position: absolute; inset: 0; z-index: 1; background: transparent; border: 0; border-radius: 20px 20px 0 0; }
.photo { position: relative; height: 210px; display: grid; place-items: center; background: var(--ac-soft); overflow: hidden; }
.photo .fig { height: 168px; width: auto; }
.photo .pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.item.missing .photo { background: #eceef4; }
.item.missing .fig, .item.missing .pic { filter: grayscale(1); opacity: .5; }
.b-num { position: absolute; left: 12px; top: 12px; z-index: 2; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; font-variant-numeric: tabular-nums; pointer-events: none; }
.b-stack { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: calc(100% - 70px); pointer-events: none; }
.b-ed, .b-exclu { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; box-shadow: 0 0 0 2px #fff; max-width: 100%; }
.b-ed > span, .b-exclu > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-ed { background: var(--bc, #5b6478); color: var(--bt, #fff); }
.b-exclu { background: linear-gradient(135deg, #ffe27a, #ffb800); color: #5c4000; }
.b-ed .i, .b-exclu .i { width: 14px; height: 14px; stroke-width: 2.4; }
.b-ed .i.f { fill: currentColor; stroke: none; }
.item .body { padding: 11px 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.item h3, .item h4 { font-size: 15px; font-weight: 800; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .sub { font-size: 13px; color: var(--muted); font-weight: 500; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; background: #eceff6; color: #3a4157; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag.type  { background: var(--ac-soft); color: var(--ac-ink); }
.tag.ed    { background: color-mix(in srgb, var(--bc, #6a3de8) 14%, #fff); color: color-mix(in srgb, var(--bc, #6a3de8) 78%, #000); }
.tag.exclu { background: var(--gold-soft); color: var(--gold-ink); }
.status { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; position: relative; z-index: 2; }
.status.own  { background: var(--green-soft); color: var(--green-ink); }
.status.miss { background: var(--pink-soft); color: var(--pink-ink); }
.status .i { width: 16px; height: 16px; stroke-width: 3; }

/* Silhouette quand il n'y a pas de photo */
.sil-note { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); }

/* ---------- Modales (overlay + boîte) ---------- */
body.no-scroll { overflow: hidden; }
.overlay { position: fixed; inset: 0; background: rgba(15, 20, 35, .55); backdrop-filter: blur(3px); z-index: 300; display: none; align-items: center; justify-content: center; padding: 24px; }
.overlay.open { display: flex; }
.modal { background: #fff; border-radius: 22px; box-shadow: 0 24px 70px rgba(15, 20, 35, .35); overflow: hidden; display: flex; flex-direction: column; width: 100%; max-height: 100%; }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 26px; border-bottom: 1px solid var(--line); flex: none; }
.m-head h2 { font-size: 20px; font-weight: 800; }
.m-body { padding: 22px 26px; overflow-y: auto; flex: 1; min-height: 0; }
.m-foot { padding: 16px 26px; border-top: 1px solid var(--line); display: flex; gap: 12px; justify-content: flex-end; background: #fff; flex: none; }

/* Boîte de confirmation */
.dlg { max-width: 440px; padding: 24px; }
.dlg .row { align-items: flex-start; gap: 14px; }
.dlg .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--pink-soft); color: var(--pink-ink); display: grid; place-items: center; flex: none; }
.dlg h2 { font-size: 17px; font-weight: 800; }
.dlg p { color: var(--muted); font-weight: 500; margin-top: 4px; }
.dlg .acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ---------- Notifications (toasts) ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 600; display: flex; flex-direction: column; gap: 10px; align-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 18px 8px 14px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: 0 12px 30px rgba(15, 20, 35, .3); pointer-events: auto; animation: toast-in .25s ease; }
.toast .ic { width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #0b2a1d; display: grid; place-items: center; flex: none; }
.toast.err .ic { background: #ff8fc2; color: #4a0025; }
.toast .ic .i { width: 16px; height: 16px; stroke-width: 3; }
.toast button { border: 0; background: transparent; color: #7fd7f7; font-weight: 800; padding: 8px 0 8px 8px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Interrupteur ---------- */
.toggle { position: relative; width: 56px; height: 32px; border-radius: 999px; background: #7b849c; border: 0; padding: 0; flex: none; transition: background .2s; }
.toggle::after { content: ""; position: absolute; left: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: left .2s; }
.toggle[aria-checked="true"] { background: var(--green-btn); }
.toggle[aria-checked="true"]::after { left: 28px; }

/* ---------- Formulaires ---------- */
.fsec { margin-bottom: 24px; }
.fsec h3 { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.fsec h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld.full { grid-column: 1 / -1; }
.fld label { font-size: 13px; font-weight: 700; color: #3a4157; }
.inp { width: 100%; height: 46px; border: 1px solid var(--line2); border-radius: 12px; padding: 0 14px; background: #fff; color: var(--ink); font-size: 15px; }
select.inp { appearance: none; -webkit-appearance: none; padding-right: 38px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23586078' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.inp::placeholder { color: #6a728a; }
.inp:focus { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); outline: none; }
.inp.err { border-color: var(--pink-btn); box-shadow: 0 0 0 3px var(--pink-soft); }
.hint { font-size: 12px; color: var(--muted); font-weight: 500; }
.hint.err { color: var(--pink-ink); font-weight: 700; }

/* ---------- Navigation du bas (mobile) et boutons flottants ---------- */
.bnav { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; height: calc(68px + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); grid-template-columns: repeat(4, 1fr); }
.bnav a, .bnav button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--muted); position: relative; }
.bnav .on { color: var(--ac-ink); }
.bnav .badge-n { position: absolute; top: 8px; left: calc(50% + 6px); }
.badge-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pink-btn); color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.fab { position: fixed; right: 16px; bottom: calc(84px + var(--safe-b)); z-index: 140; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: none; place-items: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.fab.show { display: grid; }

/* ---------- États vides ---------- */
.empty { grid-column: 1 / -1; text-align: center; padding: 54px 20px; }
.empty .sil { width: 130px; height: 130px; border-radius: 50%; background: #eceef4; display: grid; place-items: center; margin: 0 auto 18px; }
.empty h3 { font-size: 20px; font-weight: 800; }
.empty p { color: var(--muted); font-weight: 500; margin: 6px 0 20px; }

/* Pied de page */
.ftr { border-top: 1px solid var(--line); background: #fff; margin-top: 48px; }
.ftr .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; color: var(--muted); font-size: 13px; font-weight: 600; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.ftr a { font-weight: 700; }

/* Bandeau d'installation (application) */
.install { position: fixed; left: 12px; right: 12px; bottom: calc(80px + var(--safe-b)); z-index: 160; max-width: 460px; margin: 0 auto; padding: 16px; border-radius: 22px; background: #fff; border: 1px solid var(--line); box-shadow: 0 14px 36px rgba(15, 20, 35, .28); display: none; }
.install.show { display: block; }
.install .appicon { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.install h2 { font-size: 16px; font-weight: 800; }
.install p { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; }

/* ---------- Carte compacte : une ligne par rubrique, texte coupé par « … » ---------- */
.item .l { margin: 0; font-size: 12.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .l1 { color: var(--ink2, #3a4157); font-weight: 600; }
.item .l2 { color: var(--muted); font-weight: 500; }
.item .l3 { color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.item .cds { display: flex; flex-wrap: nowrap; gap: 4px; margin-top: 6px; overflow: hidden; }
.item .cds .tag { flex: none; height: 22px; font-size: 11px; padding: 0 8px; }

/* Conditionnement + sa rareté : « 4 Pack | 1/6 » */
.cd { display: inline-flex; flex: none; align-items: stretch; border: 1px solid color-mix(in srgb, var(--ac) 35%, #fff); border-radius: 7px; overflow: hidden; font-size: 11px; line-height: 1; max-width: 100%; }
.cd i { font-style: normal; font-weight: 700; padding: 5px 7px; background: var(--ac-soft); color: var(--ac-ink); white-space: nowrap; }
.cd b { font-weight: 800; padding: 5px 7px; color: var(--ac-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cd.solo { border-style: dashed; }
.cd-plus { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 7px; background: #eceff6; color: #3a4157; font-size: 11px; font-weight: 800; }

/* Icône du type, en rond blanc en bas à gauche de la photo */
.b-type { position: absolute; left: 10px; bottom: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--ac-ink); display: grid; place-items: center; box-shadow: 0 1px 4px rgba(26, 31, 46, .18); pointer-events: none; }
.b-type .i { width: 20px; height: 20px; stroke-width: 1.8; }

/* Rond de statut en bas à droite de la photo : coche verte = possédé, loupe en pointillé = recherché */
.st-dot { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; padding: 0; border: 2px solid transparent; transition: transform .12s, box-shadow .12s; }
.st-dot .i { width: 18px; height: 18px; stroke-width: 3; }
.st-dot.own  { background: #1c8a4f; color: #fff; box-shadow: 0 2px 6px rgba(28, 138, 79, .45); }
.st-dot.miss { background: #fff; color: #6d7488; border: 2px dashed #9aa1b5; }
.st-dot.miss .i { stroke-width: 2.6; }
button.st-dot { cursor: pointer; }
button.st-dot:hover { transform: scale(1.1); }
button.st-dot:active { transform: scale(.94); }
button.st-dot:focus-visible { outline: 3px solid var(--ac); outline-offset: 2px; }
.item.missing .photo { background: #eceef4; }

/* Pastilles de filtre : icône du type et effectif */
.chip .ti { width: 18px; height: 18px; stroke-width: 1.8; }
.chip .n:empty { display: none; }
.chip .n { margin-left: 2px; }
@media (max-width: 820px) {
    .b-type { left: 7px; bottom: 7px; width: 26px; height: 26px; }
    .b-type .i { width: 17px; height: 17px; }
    .st-dot { right: 7px; bottom: 7px; width: 32px; height: 32px; }
    .item .l { font-size: 11.5px; }
}

/* ---------- Listes déroulantes soignées (selecteurs.js) ---------- */
.csel-src { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; }
.csel-btn { display: flex; align-items: center; gap: 8px; text-align: left; font-family: inherit; cursor: pointer; }
.csel-btn .csel-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csel-btn.inp { padding-right: 38px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23586078' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.csel-btn.csel-aucun .csel-val { color: var(--muted); font-weight: 500; }
.csel-btn:hover { border-color: var(--ac); }
.csel-btn[aria-expanded="true"] { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
.csel-btn:disabled { opacity: .55; cursor: not-allowed; }

.csel-pop { position: fixed; z-index: 800; display: flex; flex-direction: column; overflow: hidden; padding: 6px; max-width: min(420px, calc(100vw - 24px)); }
.csel-q { flex: none; height: 38px; margin: 2px 2px 6px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 10px; font-size: 14px; background: #fff; color: var(--ink); }
.csel-q:focus { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); outline: none; }
.csel-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; outline: 0; }
.csel-pop [role="option"] { min-height: 38px; font-size: 14px; }
.csel-pop [role="option"][hidden] { display: none; }
.csel-pop .csel-vide { color: var(--muted); font-weight: 500; }
.csel-pop [role="option"] .i:not(.coll-coche) { width: 18px; height: 18px; flex: none; color: var(--ac-ink); }

/* ---------- Champs à compléter avec suggestions ---------- */
.cbox { position: relative; display: block; width: 100%; }
.cbox > .inp { padding-right: 40px; }
.cbox-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.cbox-btn:hover { background: var(--bg); color: var(--ink); }
.cbox-btn .i { width: 14px; height: 14px; stroke-width: 2.5; }
.cbox-pop mark { background: var(--ac-soft); color: var(--ac-ink); border-radius: 3px; padding: 0 1px; }
.cbox-pop li.actif { background: var(--bg); box-shadow: inset 0 0 0 2px var(--ac); }
.cbox-note { flex: none; padding: 8px 12px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cbox-nouveau { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; color: var(--ac-ink); }
.cbox-nouveau .i { width: 14px; height: 14px; flex: none; stroke-width: 3; }
