/* ==========================================================================
   CURATOR & QUILL - POP 80S
   Tokens, shell, composants partagés. CSS pur, sans build.
   ========================================================================== */
:root { /* Palette verrouillée par DESIGN.md */
  --ink: #14121F; --paper: #FFF6E9; --paper-2: #FFEFD6; --magenta: #FF2E88; --cyan: #00E5FF; --yellow: #FFD93D; --violet: #6C2BD9; --mint: #00E39A; --muted: #6B6478; --danger: #D7263D; /* Typographie */
  --font-display: "Bungee", "Impact", "Arial Black", sans-serif; --font-body: "Space Grotesk", "Trebuchet MS", sans-serif; --font-mono: "Rubik Mono One", "Courier New", monospace; /* Structure */
  --sidebar-w: 240px; --header-h: 64px; --gutter: 56px; --content-max: 1240px; --bw: 3px; --radius: 4px; --pill: 999px; --shadow: 6px 6px 0 var(--ink); --shadow-sm: 3px 3px 0 var(--ink); --shadow-lg: 8px 8px 0 var(--ink); --ease: cubic-bezier(0.2, 0, 0, 1); --speed: 150ms; color-scheme: light; }
/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image:
    linear-gradient(to right, color-mix(in oklch, var(--cyan) 11%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--cyan) 11%, transparent) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: linear-gradient(to bottom, var(--ink) 0%, color-mix(in oklch, var(--ink) 25%, transparent) 78%, transparent 100%); mask-image: linear-gradient(to bottom, var(--ink) 0%, color-mix(in oklch, var(--ink) 25%, transparent) 78%, transparent 100%); }
::selection { background: var(--yellow); color: var(--ink); }
h1, h2, h3, h4, p, figure, ol, ul { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.01em; line-height: 1.05; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
svg { display: block; }
[hidden] { display: none !important; }
:where(a, button, input, select):focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
.on-dark :where(a, button):focus-visible,
.banner :where(a, button):focus-visible { outline-color: var(--yellow); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-180%); padding: 10px 14px; border: var(--bw) solid var(--ink); background: var(--yellow); box-shadow: var(--shadow-sm); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
[aria-disabled="true"] { cursor: default; }
.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; line-height: 1.35; }
.muted { color: var(--muted); }
/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */
.app { position: relative; z-index: 1; min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; gap: 20px; width: var(--sidebar-w); padding: 18px 16px; overflow-y: auto; background: var(--paper); border-right: var(--bw) solid var(--ink); }
.sidebar-top { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand-mark { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border: var(--bw) solid var(--ink); background: var(--violet); box-shadow: 4px 4px 0 var(--ink); color: var(--yellow); font-family: var(--font-display); font-size: 20px; line-height: 1; letter-spacing: 0.02em; transform: rotate(-2deg); }
.brand-word { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-name { font-family: var(--font-display); font-size: 10px; line-height: 1.15; letter-spacing: 0.03em; }
.brand-tag { color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; line-height: 1.2; }
.nav-label { padding: 0 4px; color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; }
.nav { display: flex; flex-direction: column; gap: 9px; }
.nav-link { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 10px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper-2); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); font-family: var(--font-mono); font-size: 11px; line-height: 1.2; letter-spacing: 0.06em; text-decoration: none; transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background-color var(--speed) var(--ease); }
.nav-link .material-symbols-outlined { font-size: 18px; }
.nav-link:hover { background: color-mix(in oklch, var(--cyan) 22%, var(--paper)); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.nav-link[aria-current="page"] { background: var(--violet); color: var(--yellow); box-shadow: 6px 6px 0 var(--ink); transform: rotate(-0.6deg); }
.nav-link[aria-current="page"]:hover { background: var(--violet); transform: rotate(-0.6deg) translate(-1px, -1px); box-shadow: 7px 7px 0 var(--ink); }
.nav-link[aria-current="page"]:focus-visible { outline-color: var(--ink); }
.sidebar-cta { margin-top: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 14px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); color: var(--ink); font-family: var(--font-mono); font-size: 11px; line-height: 1.2; letter-spacing: 0.06em; text-align: center; text-decoration: none; white-space: nowrap; transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background-color var(--speed) var(--ease), color var(--speed) var(--ease); }
.btn .material-symbols-outlined { font-size: 17px; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
.btn--primary { background: var(--magenta); color: var(--ink); }
.btn--secondary { background: var(--paper); }
.btn--secondary:hover { background: var(--cyan); }
.btn--danger { background: var(--danger); color: var(--paper); }
.btn--danger-ghost { background: var(--paper); color: var(--danger); }
.btn--danger-ghost:hover { background: var(--danger); color: var(--paper); }
.btn--block { width: 100%; padding-inline: 9px; font-size: 10.5px; }
.sidebar-foot { margin-top: auto; padding-top: 8px; }
.profile { display: flex; align-items: center; gap: 9px; padding: 8px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper-2); box-shadow: 4px 4px 0 var(--ink); }
.profile img { flex: 0 0 auto; width: 40px; height: 44px; border: var(--bw) solid var(--ink); background: var(--ink); object-fit: cover; object-position: 50% 20%; }
.profile-copy { min-width: 0; }
.profile-name { font-family: var(--font-display); font-size: 10px; line-height: 1.15; letter-spacing: 0.02em; }
.profile-role { color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; }
.sidebar-close { display: none; margin-left: auto; }
.main { margin-left: var(--sidebar-w); min-width: 0; }
/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: var(--header-h); padding: 0 32px; border-bottom: var(--bw) solid var(--ink); background: var(--paper); }
.topbar::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg,
    var(--magenta) 0 25%,
    var(--cyan) 25% 50%,
    var(--yellow) 50% 75%,
    var(--mint) 75% 100%); }
.topbar-search { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; width: 100%; max-width: 380px; height: 44px; padding: 0 10px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); }
.topbar-search:focus-within { outline: 3px solid var(--violet); outline-offset: 2px; }
.topbar-search .material-symbols-outlined { font-size: 18px; }
.topbar-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; outline: 0; }
.topbar-search input::placeholder { color: var(--muted); opacity: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); text-decoration: none; transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background-color var(--speed) var(--ease); }
.icon-btn:hover { background: var(--cyan); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.icon-btn .material-symbols-outlined { font-size: 20px; }
.menu-btn,
.mobile-brand,
.mobile-search-link { display: none; }
.bell { position: relative; }
.bell::after { content: ""; position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; background: var(--magenta); }
.topbar-avatar { flex: 0 0 auto; width: 44px; height: 44px; border: var(--bw) solid var(--ink); background: var(--paper-2); box-shadow: 3px 3px 0 var(--ink); object-fit: cover; object-position: 50% 18%; }
/* --------------------------------------------------------------------------
   Page frame
   -------------------------------------------------------------------------- */
.page { padding: 32px var(--gutter) 72px; }
.page-inner { width: 100%; max-width: var(--content-max); margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.page-title-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: clamp(34px, 3.4vw, 44px); line-height: 1.02; letter-spacing: 0.01em; }
.page-sub { max-width: 58ch; margin-top: 5px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.sticker { display: inline-block; padding: 6px 11px; border: var(--bw) solid var(--ink); border-radius: var(--pill); background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); font-family: var(--font-mono); font-size: 10.5px; line-height: 1.2; letter-spacing: 0.08em; white-space: nowrap; transform: rotate(-5deg); }
.sticker--cyan { background: var(--cyan); }
.sticker--magenta { background: var(--magenta); }
.sticker--mint { background: var(--mint); }
.sticker--violet { background: var(--violet); color: var(--yellow); }
.zigzag { width: 116px; height: 16px; color: var(--magenta); }
.checker-strip { height: 14px; margin-top: 14px; border-top: var(--bw) solid var(--ink); border-bottom: var(--bw) solid var(--ink); background: repeating-conic-gradient(var(--ink) 0 25%, var(--paper) 0 50%) 0 0 / 14px 14px; }
.page-head + .checker-strip,
.poster-media + .checker-strip { margin-top: 0; }

#main,
#outils,
#activite,
#tags-populaires { scroll-margin-top: 84px; }
.checker-strip + .kpis { margin-top: 20px; }
.checker-strip + .toolbar { margin-top: 18px; }
/* --------------------------------------------------------------------------
   KPI scoreboard
   -------------------------------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
.kpi { display: flex; flex-direction: column; min-height: 138px; padding: 12px 13px 0; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--kpi-bg, var(--yellow)); box-shadow: var(--shadow); }
.kpi--yellow { --kpi-bg: var(--yellow); }
.kpi--cyan { --kpi-bg: var(--cyan); }
.kpi--magenta { --kpi-bg: var(--magenta); }
.kpi--mint { --kpi-bg: var(--mint); }
.kpi-kicker { font-family: var(--font-mono); font-size: 10.5px; line-height: 1.2; letter-spacing: 0.1em; }
.kpi-num { margin: 10px 0 12px; font-family: var(--font-mono); font-size: clamp(23px, 2.3vw, 33px); line-height: 1; letter-spacing: 0; white-space: nowrap; }
.kpi-band { margin: auto -13px 0; padding: 6px 13px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 10.5px; line-height: 1.3; letter-spacing: 0.08em; }
/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 22px; align-items: start; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: 19px; line-height: 1.1; }
.text-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-decoration: none; white-space: nowrap; }
.text-link .material-symbols-outlined { font-size: 14px; }
.text-link:hover { background: var(--yellow); }
.collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.vhs-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease); }
.vhs-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.vhs-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: var(--bw) solid var(--ink); background: var(--ink); }
.vhs-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 240ms var(--ease); }
.vhs-card:hover .vhs-media img { transform: scale(1.03); }
.badge-sticker { position: absolute; top: 10px; left: 10px; z-index: 1; display: inline-block; padding: 4px 9px; border: var(--bw) solid var(--ink); border-radius: var(--pill); box-shadow: 3px 3px 0 var(--ink); font-family: var(--font-mono); font-size: 10.5px; line-height: 1.2; letter-spacing: 0.06em; transform: rotate(-4deg); }
.badge-sticker--public { background: var(--mint); color: var(--ink); }
.badge-sticker--private { background: var(--magenta); color: var(--ink); }
.vhs-body { display: flex; flex: 1; flex-direction: column; gap: 7px; padding: 11px 13px 13px; }
.vhs-title { font-family: var(--font-display); font-size: 17px; line-height: 1.08; }
.vhs-count { display: flex; align-items: center; gap: 5px; color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em; }
.vhs-count .material-symbols-outlined { font-size: 14px; }
.vhs-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1px; }
.vhs-band { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 6px 11px; border-top: var(--bw) solid var(--ink); background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 10px; line-height: 1.3; letter-spacing: 0.06em; }
.vhs-reels { display: flex; gap: 3px; }
.vhs-reels i { display: block; width: 8px; height: 8px; border: 2px solid var(--paper); border-radius: 50%; }
.vhs-date { margin-left: auto; color: var(--yellow); }
.rail { position: sticky; top: 84px; }
.rail-card { overflow: hidden; margin-bottom: 20px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; }
.rail-head span:last-child { color: var(--yellow); }
.activity { list-style: none; padding: 0; }
.activity li { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 9px 11px; font-size: 13px; line-height: 1.4; }
.activity li + li { border-top: 2px solid var(--ink); }
.activity time { color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; line-height: 1.5; letter-spacing: 0.02em; }
.activity strong { font-weight: 700; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: var(--bw) solid var(--ink); border-radius: var(--pill); background: var(--tag-bg, var(--paper-2)); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); font-family: var(--font-mono); font-size: 9.5px; line-height: 1.3; letter-spacing: 0.06em; white-space: nowrap; transform: rotate(var(--r, 0deg)); }
.tag--yellow { --tag-bg: var(--yellow); }
.tag--cyan { --tag-bg: var(--cyan); }
.tag--magenta { --tag-bg: var(--magenta); }
.tag--mint { --tag-bg: var(--mint); }
.tag--violet { --tag-bg: var(--violet); color: var(--yellow); }
.tag--paper { --tag-bg: var(--paper); }
/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.crumbs { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 14px; font-family: var(--font-mono); font-size: 10.5px; line-height: 1.4; letter-spacing: 0.05em; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.crumbs .sep { color: var(--muted); }
.crumbs [aria-current="page"] { color: var(--muted); }
/* --------------------------------------------------------------------------
   Collection banner
   -------------------------------------------------------------------------- */
.banner { position: relative; overflow: hidden; aspect-ratio: 21 / 9; min-height: 360px; margin-bottom: 0; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--ink); box-shadow: var(--shadow-lg); }
.banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-tint { position: absolute; inset: 0; background: linear-gradient(112deg,
    color-mix(in oklch, var(--magenta) 88%, transparent) 0%,
    color-mix(in oklch, var(--violet) 82%, transparent) 100%); }
.banner-shade { position: absolute; inset: 0; background: linear-gradient(to top,
    var(--ink) 0%,
    color-mix(in oklch, var(--ink) 92%, transparent) 32%,
    transparent 76%); }
.banner-inner { position: absolute; inset: auto 26px 22px 26px; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.banner-copy { max-width: 640px; }
.banner-title { color: var(--paper); font-family: var(--font-display); font-size: clamp(38px, 4.2vw, 56px); line-height: 1.02; letter-spacing: 0.01em; text-shadow: 4px 4px 0 var(--ink); }
.banner-desc { max-width: 56ch; margin-top: 7px; color: var(--paper); font-size: 15px; line-height: 1.55; }
.banner-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 13px; color: var(--paper); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; }
.banner-meta span { display: inline-flex; align-items: center; gap: 6px; }
.banner-meta span::before { content: ""; width: 6px; height: 6px; border: 1.5px solid var(--ink); background: var(--yellow); }
.banner-badge { position: absolute; top: 16px; right: 18px; left: auto; z-index: 3; transform: rotate(3deg); }
.banner-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex: 0 0 auto; }
.banner .btn { box-shadow: 6px 6px 0 var(--yellow); }
.banner .btn:hover { box-shadow: 8px 8px 0 var(--yellow); }
.banner .btn:active { box-shadow: 3px 3px 0 var(--yellow); }
/* --------------------------------------------------------------------------
   Toolbar and filters
   -------------------------------------------------------------------------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0; padding: 11px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: color-mix(in oklch, var(--paper-2) 62%, var(--paper)); box-shadow: var(--shadow); }
.toolbar-search { display: flex; align-items: center; gap: 7px; flex: 1 1 200px; max-width: 290px; height: 40px; padding: 0 9px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); }
.toolbar-search:focus-within { outline: 3px solid var(--violet); outline-offset: 2px; }
.toolbar-search .material-symbols-outlined { font-size: 17px; }
.toolbar-search input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; outline: 0; }
.toolbar-search input::placeholder { color: var(--muted); opacity: 1; }
.filter-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 3px 10px; border: var(--bw) solid var(--ink); border-radius: var(--pill); background: var(--paper); box-shadow: 2px 2px 0 var(--ink); color: var(--ink); font-family: var(--font-mono); font-size: 10px; line-height: 1.2; letter-spacing: 0.06em; transform: rotate(var(--r, -1deg)); transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background-color var(--speed) var(--ease); }
.filter:hover { background: color-mix(in oklch, var(--cyan) 32%, var(--paper)); }
.filter[aria-pressed="true"] { background: var(--cyan); box-shadow: 3px 3px 0 var(--ink); text-decoration: underline; text-underline-offset: 3px; transform: rotate(0deg) translateY(-1px); }
.filter:nth-child(2) { --r: 1.2deg; }
.filter:nth-child(3) { --r: -1.6deg; }
.filter:nth-child(4) { --r: 0.8deg; }
.sort-field { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.sort-field > span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; }
.sort-select { height: 38px; max-width: 220px; padding: 0 8px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; cursor: pointer; }
.result-count { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; white-space: nowrap; }
.result-count strong { font-weight: 400; }
/* --------------------------------------------------------------------------
   Object cards
   -------------------------------------------------------------------------- */
.object-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.object-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease); }
.object-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.object-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: var(--bw) solid var(--ink); background: var(--ink); }
.object-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 240ms var(--ease); }
.object-card:hover .object-media img { transform: scale(1.03); }
.object-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 10px 11px 12px; }
.inv { color: var(--muted); font-family: var(--font-mono); font-size: 10px; line-height: 1.3; letter-spacing: 0.06em; }
.object-title { font-family: var(--font-display); font-size: 14px; line-height: 1.12; }
.value-tag { align-self: flex-start; margin-top: 1px; padding: 2px 7px; border: var(--bw) solid var(--ink); border-radius: var(--pill); background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); font-family: var(--font-mono); font-size: 10.5px; line-height: 1.3; letter-spacing: 0.02em; transform: rotate(-2deg); }
.object-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 4px; }
/* --------------------------------------------------------------------------
   Pagination and empty state
   -------------------------------------------------------------------------- */
.pager { display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap; margin-top: 26px; }
.pager-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 8px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); font-family: var(--font-mono); font-size: 10px; text-decoration: none; }
.pager-btn:hover { background: var(--cyan); }
.pager-btn[aria-current="page"] { background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); }
.pager-btn[aria-disabled="true"],
.pager-btn:disabled { opacity: 0.45; cursor: default; }
.pager-btn:disabled:hover { background: var(--paper); }
.pager-label { margin: 0 5px; color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; }
.empty { margin-top: 8px; padding: 30px 20px; border: var(--bw) dashed var(--ink); border-radius: var(--radius); background: var(--paper-2); text-align: center; }
.empty h2 { font-size: 22px; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
/* --------------------------------------------------------------------------
   Item detail
   -------------------------------------------------------------------------- */
.item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas:
    "gallery cartel"
    "desc cartel"
    "hist cartel"
    "other other"; align-items: start; gap: 0 24px; }
.gallery-area { grid-area: gallery; min-width: 0; }
.cartel { grid-area: cartel; position: sticky; top: 84px; align-self: start; }
.desc-area { grid-area: desc; }
.hist-area { grid-area: hist; }
.other-area { grid-area: other; margin-top: 34px; padding-top: 16px; border-top: var(--bw) solid var(--ink); }
.gallery-frame { overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--ink); box-shadow: var(--shadow-lg); }
.gallery-main { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; transition: transform 260ms var(--ease); }
.gallery-caption { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease), border-color var(--speed) var(--ease); }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(var(--zoom, 1)); }
.thumb:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.thumb[aria-pressed="true"] { border-color: var(--magenta); box-shadow: 4px 4px 0 var(--ink); }
.thumb[aria-pressed="true"]::after { content: ""; position: absolute; inset: auto 5px 5px; height: 4px; background: var(--magenta); }
.block { margin-top: 26px; padding-top: 16px; border-top: var(--bw) solid var(--ink); }
.block-title { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-family: var(--font-display); font-size: 18px; line-height: 1.1; }
.block-title::before { content: ""; width: 11px; height: 11px; border: 2px solid var(--ink); background: var(--yellow); transform: rotate(8deg); }
.block p { max-width: 68ch; font-size: 15.5px; line-height: 1.65; }
.block p + p { margin-top: 10px; }
.timeline { position: relative; padding: 4px 0 0 20px; list-style: none; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 14px; left: 4px; width: var(--bw); background: var(--ink); }
.timeline li { position: relative; padding: 0 0 16px 16px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; top: 4px; left: -22px; width: 12px; height: 12px; border: var(--bw) solid var(--ink); background: var(--dot, var(--magenta)); box-shadow: 2px 2px 0 var(--ink); }
.timeline li:nth-child(2) { --dot: var(--cyan); }
.timeline li:nth-child(3) { --dot: var(--yellow); }
.timeline li:nth-child(4) { --dot: var(--violet); }
.timeline time { display: block; margin-bottom: 2px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; }
.timeline strong { display: block; font-size: 13.5px; line-height: 1.4; }
.timeline span { display: block; margin-top: 1px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
/* Cartel */
.cartel { overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-lg); }
.cartel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 13px; background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; }
.cartel-head span:last-child { color: var(--yellow); }
.cartel-body { padding: 14px 14px 16px; }
.cartel-inv { color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; }
.cartel-title { margin: 3px 0 10px; font-family: var(--font-display); font-size: 25px; line-height: 1.06; letter-spacing: 0.01em; }
.badges { display: flex; flex-wrap: wrap; gap: 7px; }
.meta-list { margin: 14px 0 16px; border-top: var(--bw) solid var(--ink); }
.meta-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 2px solid var(--ink); }
.meta-key { color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; line-height: 1.5; letter-spacing: 0.06em; }
.meta-val { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.meta-val .value-tag { margin-top: -1px; }
.cartel-actions { display: grid; gap: 9px; }
.cartel-actions .btn { width: 100%; padding-inline: 8px; font-size: 10px; white-space: normal; line-height: 1.25; min-height: 44px; }
.other-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 10px; }
/* --------------------------------------------------------------------------
   Index / hub
   -------------------------------------------------------------------------- */
.hub { position: relative; z-index: 1; width: 100%; max-width: 1352px; margin: 0 auto; padding: 0 56px; }
.hub-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; border-bottom: var(--bw) solid var(--ink); }
.hub-brand { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.hub-brand .brand-mark { width: 38px; height: 38px; font-size: 16px; box-shadow: 3px 3px 0 var(--ink); }
.hub-brand .brand-name { font-size: 10px; }
.hub-edition { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; white-space: nowrap; }
.hub-edition span { padding: 2px 5px; background: var(--magenta); color: var(--ink); }
.hub-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr); gap: 40px; align-items: center; padding: 48px 0 52px; border-bottom: var(--bw) solid var(--ink); }
.floor { position: absolute; inset: auto 0 0; z-index: -1; height: 178px; opacity: 0.5; pointer-events: none; background-image:
    linear-gradient(to right, color-mix(in oklch, var(--cyan) 38%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--cyan) 38%, transparent) 1px, transparent 1px); background-size: 48px 48px; transform: perspective(320px) rotateX(62deg); transform-origin: bottom center; -webkit-mask-image: linear-gradient(to top, var(--ink), transparent 88%); mask-image: linear-gradient(to top, var(--ink), transparent 88%); }
.hub-logo-row { display: flex; align-items: center; gap: 12px; }
.hub-logo-row .brand-mark { width: 58px; height: 58px; font-size: 25px; box-shadow: 5px 5px 0 var(--ink); }
.hub-logo-copy { display: flex; flex-direction: column; gap: 3px; }
.hub-logo-copy strong { font-family: var(--font-display); font-size: 11px; font-weight: 400; line-height: 1.15; letter-spacing: 0.03em; }
.hub-logo-copy span { color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; }
.hub-title-row { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-top: 18px; }
.hub-title { font-family: var(--font-display); font-size: clamp(56px, 6.4vw, 92px); line-height: 0.98; letter-spacing: 0.01em; text-shadow: 5px 5px 0 var(--cyan); }
.hub-title span { display: block; }
.hub-sub { margin-top: 14px; font-size: 16px; color: var(--ink); }
.hub-sub .sep { color: var(--violet); padding: 0 2px; }
.sticker--pop { padding: 9px 15px; background: var(--yellow); box-shadow: 5px 5px 0 var(--ink); font-size: 12px; transform: rotate(6deg); }
.hub-poster { position: relative; overflow: hidden; width: 100%; max-width: 360px; margin-left: auto; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--ink); box-shadow: 10px 10px 0 var(--ink); transform: rotate(2.4deg); }
.poster-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: var(--bw) solid var(--ink); }
.poster-media img { width: 100%; height: 100%; object-fit: cover; }
.poster-sticker { position: absolute; top: 12px; right: 12px; z-index: 1; }
.poster-band { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-top: var(--bw) solid var(--ink); background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; }
.poster-band span:last-child { color: var(--yellow); }
.hub-section { padding: 42px 0; border-bottom: var(--bw) solid var(--ink); }
.hub-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.hub-section-title { font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
.hub-section-meta { color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; }
.swatches { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 18px; }
.swatch { display: flex; flex-direction: column; gap: 7px; }
.swatch-dot { width: 78px; height: 78px; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--swatch, var(--paper)); box-shadow: 4px 4px 0 var(--ink); }
.swatch-name { font-family: var(--font-mono); font-size: 10px; line-height: 1.3; letter-spacing: 0.06em; }
.swatch-hex { color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em; }
.type-list { border-top: var(--bw) solid var(--ink); }
.type-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: center; padding: 18px 0; border-bottom: 2px solid var(--ink); }
.type-row:last-child { border-bottom: 0; padding-bottom: 0; }
.type-specimen { min-width: 0; overflow-wrap: break-word; }
.type-specimen--bungee { font-family: var(--font-display); font-size: clamp(28px, 3vw, 42px); line-height: 1.08; letter-spacing: 0.01em; }
.type-specimen--space { font-family: var(--font-body); font-size: 28px; line-height: 1.25; font-weight: 500; }
.type-specimen--rubik { font-family: var(--font-mono); font-size: 21px; line-height: 1.3; letter-spacing: 0.04em; }
.type-meta { display: flex; flex-direction: column; gap: 4px; }
.type-name { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; }
.type-role { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.type-use { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.05em; color: var(--ink); }
.screen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.screen-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-lg); color: var(--ink); text-decoration: none; transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease); }
.screen-card:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--ink); }
.screen-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: var(--bw) solid var(--ink); background: var(--ink); }
.screen-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 260ms var(--ease); }
.screen-card:hover .screen-media img { transform: scale(1.04); }
.screen-body { display: flex; flex: 1; flex-direction: column; gap: 7px; padding: 14px; }
.screen-heading { display: flex; align-items: center; gap: 9px; }
.screen-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--icon-bg, var(--cyan)); box-shadow: 2px 2px 0 var(--ink); }
.screen-icon .material-symbols-outlined { font-size: 18px; }
.screen-title { font-family: var(--font-display); font-size: 19px; line-height: 1.08; }
.screen-desc { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.screen-cta { display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 10px; border-top: 2px solid var(--ink); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; }
.screen-cta .material-symbols-outlined { font-size: 15px; transition: transform var(--speed) var(--ease); }
.screen-card:hover .screen-cta .material-symbols-outlined { transform: translateX(3px); }
.confetti-band { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 42px; padding: 0 8px; border-bottom: var(--bw) solid var(--ink); overflow: hidden; }
.confetti-band i { display: block; flex: 0 0 auto; width: 10px; height: 10px; background: var(--c, var(--magenta)); transform: rotate(var(--r, 18deg)); }
.confetti-band i:nth-child(3n) { border-radius: 50%; }
.confetti-band i:nth-child(4n) { width: 14px; height: 6px; }
.confetti-band i:nth-child(5n) { width: 7px; height: 14px; }
.hub-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 22px 0 30px; }
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-left .brand-mark { width: 30px; height: 30px; font-size: 13px; box-shadow: 2px 2px 0 var(--ink); }
.footer-note { color: var(--muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; }
.footer-right { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-align: right; }
/* --------------------------------------------------------------------------
   Mobile shells
   -------------------------------------------------------------------------- */
.nav-overlay { display: none; }
@media (max-width: 1320px) {
  .object-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .other-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1240px) {
  .dash-grid { grid-template-columns: 1fr; }
  .rail { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .rail-card { margin-bottom: 0; }
  .object-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1240px) {
  .sidebar { z-index: 50; width: 280px; transform: translateX(-100%); visibility: hidden; transition: transform 240ms var(--ease), visibility 240ms var(--ease); }
  body.nav-open .sidebar { transform: translateX(0); visibility: visible; }
  .sidebar-close { display: inline-flex; }
  .nav-overlay { position: fixed; inset: 0; z-index: 45; background: color-mix(in oklch, var(--ink) 58%, transparent); }
  body.nav-open .nav-overlay { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .mobile-brand { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--violet); box-shadow: 3px 3px 0 var(--ink); color: var(--yellow); font-family: var(--font-display); font-size: 15px; line-height: 1; text-decoration: none; transform: rotate(-2deg); }
  .page { padding: 26px 24px 40px; }
  .item-layout { grid-template-columns: minmax(0, 1fr) 316px; }
}
@media (max-width: 900px) {
  .hub { padding: 0 28px; }
  .hub-hero { grid-template-columns: 1fr; gap: 30px; padding: 36px 0 42px; }
  .hub-poster { max-width: 390px; margin: 0; transform: rotate(1.6deg); }
  .hub-title { font-size: clamp(52px, 9vw, 74px); }
  .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .screen-grid { grid-template-columns: 1fr; }
  .screen-media { aspect-ratio: 21 / 9; }
  .type-row { grid-template-columns: 1fr; gap: 8px; }
  .item-layout { grid-template-columns: 1fr; grid-template-areas:
      "gallery"
      "cartel"
      "desc"
      "hist"
      "other"; }
  .cartel { position: static; margin-top: 22px; }
  .object-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .other-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .banner { aspect-ratio: auto; min-height: 0; padding-top: 214px; }
  .banner-img,
  .banner-tint { height: 258px; }
  .banner-shade { inset: 120px 0 auto; height: 200px; background: linear-gradient(to bottom, transparent, var(--ink)); }
  .banner-inner { position: relative; inset: auto; display: block; padding: 16px 18px 18px; background: var(--ink); }
  .banner-title { font-size: clamp(36px, 7.4vw, 48px); }
  .banner-badge { top: 12px; right: 12px; }
  .banner-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 15px; }
  .banner-actions > * { min-width: 0; }
  .banner-actions .btn { width: 100%; padding-inline: 8px; white-space: normal; line-height: 1.2; }
  .toolbar { align-items: stretch; }
  .toolbar-search { max-width: none; flex-basis: 100%; }
  .sort-field { margin-left: 0; width: 100%; }
  .sort-select { flex: 1; max-width: none; }
  .result-count { margin-left: auto; }
}
@media (max-width: 700px) {
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar-search { display: none; }
  .mobile-search-link { display: inline-flex; }
  .page { padding: 22px 16px 144px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .kpi { min-height: 128px; }
  .kpi-num { font-size: clamp(19px, 5.2vw, 26px); }
  .collection-grid { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
  .page-title { font-size: 34px; }
  .banner-desc { font-size: 13.5px; }
  .filter { min-height: 44px; padding-inline: 12px; }
  .sort-select { height: 44px; }
  .toolbar-search { height: 44px; }
  .text-link { min-height: 44px; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 560px) {
  .object-grid { grid-template-columns: 1fr; }
  .other-grid { grid-template-columns: 1fr; }
  .object-title { font-size: 16px; }
  .object-body { padding: 11px 12px 13px; }
  .thumbs { gap: 7px; }
  .gallery-caption { display: block; }
  .gallery-caption span + span { display: block; margin-top: 3px; }
  .cartel-title { font-size: 23px; }
  .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .swatch-dot { width: 66px; height: 66px; }
  .hub { padding: 0 20px; }
  .hub-top { height: 64px; }
  .hub-title { font-size: clamp(46px, 12vw, 60px); }
  .hub-title-row { gap: 14px; }
  .sticker--pop { padding: 7px 11px; font-size: 10px; }
  .screen-media { aspect-ratio: 16 / 9; }
  .confetti-band { height: 34px; }
  .confetti-band i:nth-child(n + 11) { display: none; }
  .hub-section { padding: 32px 0; }
  .type-specimen--space { font-size: 22px; }
  .type-specimen--rubik { font-size: 16px; }
  /* Une seule colonne sur téléphone : les libellés ("AJOUTER UN OBJET") ne
     peuvent plus déborder de la carte. */
  .banner-actions { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .page { padding-inline: 14px; }
  .topbar { padding-inline: 12px; }
  .kpi-num { font-size: clamp(19px, 5.2vw, 22px); }
  .kpi-band { font-size: 9.5px; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub { padding: 0 16px; }
  .hub-edition { display: none; }
  .banner-inner { padding-inline: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
/* Material Symbols */
.material-symbols-outlined { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 20px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24; }

@media (pointer: coarse) {
  .filter { min-height: 44px; }
  .sort-select { height: 44px; }
  .toolbar-search { height: 44px; }
  .text-link { min-height: 44px; }
  .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 350px) {
  .kpis { grid-template-columns: 1fr; }
  .banner-actions { grid-template-columns: 1fr; }
}

/* ==========================================================================
   EXTENSION APPLICATIVE — écrans non couverts par la maquette
   (formulaires, tableaux, auth, profil, partage, tags, admin)
   ========================================================================== */

/* Utilitaires ------------------------------------------------------------ */
.stack { display: grid; gap: 18px; }
.stack--sm { display: grid; gap: 10px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.full { width: 100%; }
.center { text-align: center; }
.text-danger { color: var(--danger); }
.text-primary { color: var(--violet); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--sm { min-height: 36px; padding: 0 10px; font-size: 9.5px; box-shadow: var(--shadow-sm); }
.btn--sm:hover { box-shadow: 4px 4px 0 var(--ink); }

/* Panneaux --------------------------------------------------------------- */
.panel { overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; border-bottom: var(--bw) solid var(--ink); background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; }
.panel-head a { color: var(--yellow); text-decoration: none; }
.panel-title { font-family: var(--font-display); font-size: 17px; line-height: 1.1; }
.panel-body { padding: 16px; }
.panel-body > * + * { margin-top: 14px; }

/* Alertes ---------------------------------------------------------------- */
.flash-stack { display: grid; gap: 10px; padding: 16px var(--gutter) 0; }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 10px 13px; border: var(--bw) solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-sm); font-size: 14px; line-height: 1.45; }
.alert--success { background: var(--mint); }
.alert--error { background: var(--magenta); }
.alert .material-symbols-outlined { font-size: 18px; margin-top: 1px; }

/* Confirmation ----------------------------------------------------------- */
/* Boîte de dialogue des actions destructrices (voir public/js/confirm.js). */
.confirm { display: grid; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); color: var(--ink); }
dialog.confirm { position: fixed; inset: 0; margin: auto; height: fit-content; }
dialog.confirm:not([open]) { display: none; }
dialog.confirm::backdrop { background: color-mix(in oklch, var(--ink) 58%, transparent); backdrop-filter: blur(2px); }
dialog.confirm[open] { animation: confirm-pop 220ms var(--ease); }
@keyframes confirm-pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
.confirm__inner { display: grid; gap: 10px; padding: 22px 24px 20px; }
.confirm__head { display: flex; align-items: center; gap: 12px; }
.confirm__icon { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); }
.confirm__icon .material-symbols-outlined { font-size: 20px; }
.confirm__copy { min-width: 0; }
.confirm__kicker { color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; }
.confirm__title { font-size: 16px; line-height: 1.1; text-transform: uppercase; }
.confirm__message { font-size: 14.5px; line-height: 1.5; }
.confirm__detail { justify-self: start; max-width: 100%; overflow: hidden; padding: 3px 9px; border: 2px solid var(--ink); background: var(--yellow); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.06em; text-overflow: ellipsis; white-space: nowrap; }
.confirm__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 6px; }
@media (max-width: 420px) { .confirm__actions .btn { flex: 1 1 100%; } }
@media (prefers-reduced-motion: reduce) { dialog.confirm[open] { animation: none; } }

/* Formulaires ------------------------------------------------------------ */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; line-height: 1.4; letter-spacing: 0.08em; text-transform: uppercase; }
.input, .textarea, .select { width: 100%; min-height: 44px; padding: 9px 11px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); font-family: var(--font-body); font-size: 14.5px; line-height: 1.4; }
.input:focus, .textarea:focus, .select:focus { outline: 3px solid var(--violet); outline-offset: 2px; }
.textarea { min-height: 120px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: color-mix(in oklch, var(--muted) 70%, var(--paper)); opacity: 1; }
.checkbox { width: 18px; height: 18px; accent-color: var(--violet); }
.field--check { display: flex; align-items: center; gap: 8px; }
.field-error { color: var(--danger); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.04em; }
.field-error ul { padding-left: 14px; margin: 0; }
.field-help { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.choice-list { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-list label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: var(--bw) solid var(--ink); border-radius: var(--pill); background: var(--paper); box-shadow: 2px 2px 0 var(--ink); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.05em; cursor: pointer; transform: rotate(-0.5deg); }
.choice-list label:has(input:checked) { background: var(--violet); color: var(--yellow); }
.choice-list input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 9px; }
.choice-card { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 2px 2px 0 var(--ink); font-family: var(--font-mono); font-size: 10px; cursor: pointer; }
.choice-card:has(input:checked) { background: var(--cyan); }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 16px; border-top: var(--bw) solid var(--ink); }
.form-actions--sticky { position: sticky; bottom: 0; z-index: 5; margin: 24px calc(-1 * var(--gutter)) 0; padding: 14px var(--gutter); background: var(--paper); border-top: var(--bw) solid var(--ink); }
.upload-zone { position: relative; display: grid; place-items: center; gap: 6px; padding: 26px 16px; border: var(--bw) dashed var(--ink); border-radius: var(--radius); background: var(--paper-2); text-align: center; cursor: pointer; }
.upload-zone:hover { background: color-mix(in oklch, var(--cyan) 18%, var(--paper)); }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone .material-symbols-outlined { font-size: 30px; }
.upload-preview { aspect-ratio: 16 / 9; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--ink); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload--deleted .upload-preview { opacity: .35; filter: grayscale(1); }
.remove-image[aria-pressed="true"] { box-shadow: none; transform: translate(2px, 2px); }

/* Tableaux --------------------------------------------------------------- */
.table-shell { overflow-x: auto; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table thead th { padding: 9px 12px; border-bottom: var(--bw) solid var(--ink); background: var(--ink); color: var(--paper); font-family: var(--font-mono); font-size: 9.5px; font-weight: 400; letter-spacing: 0.08em; text-align: left; white-space: nowrap; }
.table tbody td { padding: 10px 12px; border-bottom: 2px solid var(--ink); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in oklch, var(--cyan) 12%, var(--paper)); }
.table .cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-thumb { display: grid; place-items: center; flex: 0 0 auto; width: 60px; height: 46px; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper-2); }
.cell-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cell-thumb .material-symbols-outlined { font-size: 20px; color: var(--muted); }
.table .cell-actions { display: flex; align-items: center; gap: 5px; justify-content: flex-end; }
.table .icon-btn { width: 34px; height: 34px; box-shadow: 2px 2px 0 var(--ink); }

/* Avatars ---------------------------------------------------------------- */
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 44px; border: var(--bw) solid var(--ink); background: var(--paper-2); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); font-family: var(--font-display); font-size: 15px; line-height: 1; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.avatar--round { border-radius: 50%; }
.avatar--lg { width: 96px; height: 104px; font-size: 32px; box-shadow: var(--shadow); }

/* Authentification ------------------------------------------------------- */
.auth { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); min-height: 100dvh; }
.auth-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 26px; padding: 34px 38px; overflow: hidden; border-right: var(--bw) solid var(--ink); background: var(--violet); color: var(--paper); }
.auth-visual > * { position: relative; z-index: 1; }
.auth-title { max-width: 12ch; color: var(--paper); font-family: var(--font-display); font-size: clamp(38px, 4vw, 58px); line-height: 1.02; text-shadow: 4px 4px 0 var(--ink); }
.auth-sub { max-width: 42ch; margin-top: 12px; font-size: 15px; line-height: 1.55; }
.auth-collage { display: flex; gap: 12px; }
.auth-collage img { width: 33%; aspect-ratio: 3 / 4; border: var(--bw) solid var(--ink); box-shadow: 5px 5px 0 var(--ink); object-fit: cover; transform: rotate(-2deg); }
.auth-collage img:nth-child(2) { transform: rotate(2deg) translateY(12px); }
.auth-collage img:nth-child(3) { transform: rotate(-1deg) translateY(-6px); }
.auth-quote { max-width: 40ch; font-size: 14px; font-style: italic; line-height: 1.5; }
.auth-quote figcaption { margin-top: 8px; font-family: var(--font-mono); font-size: 9.5px; font-style: normal; letter-spacing: 0.08em; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 34px 44px; background: var(--paper); }
.auth-form-wrap { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-eyebrow { color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; }
.auth-form-title { margin-top: 6px; font-family: var(--font-display); font-size: 34px; line-height: 1.05; }
.auth-switch { margin-top: 20px; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 13.5px; }
.auth-switch a { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.05em; text-decoration: underline; text-underline-offset: 3px; }

/* Profil ----------------------------------------------------------------- */
.profile-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-hero { display: grid; justify-items: center; gap: 10px; padding: 22px 18px; text-align: center; }
.profile-hero h2 { font-size: 22px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 8px; }
.profile-stats strong { display: block; font-family: var(--font-mono); font-size: 20px; font-weight: 400; }
.profile-stats span { color: var(--muted); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.06em; }

/* Partage ---------------------------------------------------------------- */
.share-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.member-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* Tags ------------------------------------------------------------------- */
.tag-dot { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }

/* Admin ------------------------------------------------------------------ */
.role-badge { display: inline-flex; align-items: center; padding: 2px 8px; border: 2px solid var(--ink); border-radius: var(--pill); background: var(--paper); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.05em; }
.role-badge--admin { background: var(--mint); }

/* Responsive ------------------------------------------------------------- */
@media (min-width: 760px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid .field--full { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .share-summary { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .flash-stack { padding: 12px 16px 0; }
  .form-actions--sticky { margin-inline: -16px; padding-inline: 16px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .auth-panel { padding: 28px 18px; }
  .table { font-size: 13px; }
}

/* Soumission en cours ----------------------------------------------------- */
.alert--warning { background: var(--yellow); }

.btn:disabled,
.btn[aria-disabled="true"] { cursor: progress; opacity: 0.75; transform: none; box-shadow: var(--shadow); }
.btn:disabled:hover,
.btn[aria-disabled="true"]:hover { transform: none; box-shadow: var(--shadow); }
.btn.is-loading .material-symbols-outlined { animation: submit-spin 0.9s linear infinite; }

/* Rideau de soumission */
.submit-curtain { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: var(--ink); color: var(--paper); opacity: 0; pointer-events: none; transition: opacity 140ms var(--ease); }
.submit-curtain[hidden] { display: none; }
.submit-curtain.is-on { opacity: 1; pointer-events: auto; }
.submit-curtain-inner { display: grid; justify-items: center; gap: 20px; text-align: center; }

.submit-curtain-stamp { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 8vw, 92px); line-height: 0.92; color: var(--magenta); text-shadow: 7px 7px 0 var(--yellow); transform: rotate(-2deg); text-transform: uppercase; }
.submit-curtain-info { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--paper-2); text-transform: uppercase; }
.submit-curtain-info .material-symbols-outlined { font-size: 18px; color: var(--cyan); animation: submit-spin 0.9s linear infinite; }
.submit-curtain-bar { width: min(520px, 78vw); height: 12px; border: var(--bw) solid var(--paper); overflow: hidden; }
.submit-curtain-bar span { display: block; height: 100%; width: 35%; background: var(--yellow); animation: submit-slide 1.1s ease-in-out infinite; }
.submit-curtain-caps { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.16em; color: var(--paper); text-transform: uppercase; }

body.is-submitting { overflow: hidden; }

@keyframes submit-spin { to { transform: rotate(360deg); } }
@keyframes submit-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(330%); }
}

@media (prefers-reduced-motion: reduce) {
  .btn.is-loading .material-symbols-outlined,
  .submit-curtain-info .material-symbols-outlined { animation: none; }
  .submit-curtain-bar span { width: 100%; opacity: 0.7; animation: none; }
}

/* --------------------------------------------------------------------------
   Recherche transverse et filtres par étiquette
   -------------------------------------------------------------------------- */
.filter-panel { margin-top: 18px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper-2); box-shadow: var(--shadow); }
.filter-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 9px 13px; background: var(--ink); color: var(--paper); }
.filter-panel-title { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; }
.filter-panel-title .material-symbols-outlined { font-size: 16px; color: var(--yellow); }
.filter-panel-head a { color: var(--yellow); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-decoration: underline; text-underline-offset: 3px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 12px 13px 4px; }
.filter-grid .field > span:first-child { color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; }
.filter-grid .control { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 8px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 2px 2px 0 var(--ink); }
.filter-grid .control .material-symbols-outlined { font-size: 15px; color: var(--muted); }
.filter-grid .control input,
.filter-grid .control select { width: 100%; min-width: 0; border: 0; background: transparent; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.03em; outline: 0; }
.filter-grid .control select { cursor: pointer; }
.filter-seg { display: flex; align-items: stretch; height: 38px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: 2px 2px 0 var(--ink); overflow: hidden; }
.filter-seg label { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; cursor: pointer; }
.filter-seg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.filter-seg label span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 0 6px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.04em; text-align: center; }
.filter-seg label + label { border-left: var(--bw) solid var(--ink); }
.filter-seg input:checked + span { background: var(--violet); color: var(--yellow); }
.filter-seg input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: -3px; }
.filter-tagrow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 10px 13px 2px; margin-top: 8px; border-top: 2px dashed color-mix(in oklch, var(--ink) 32%, var(--paper-2)); }
.filter-label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; }
.filter-label .material-symbols-outlined { font-size: 15px; }
.tag-filter-inline-note { color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.filter-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 13px 12px; }
.filter-hint { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.05em; }
.filter-hint .material-symbols-outlined { font-size: 14px; color: var(--magenta); }
.sidebar-cta { white-space: normal; font-size: 9.5px; line-height: 1.25; padding-inline: 6px; }

.tag-filter { margin-top: 14px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: color-mix(in oklch, var(--paper-2) 62%, var(--paper)); box-shadow: var(--shadow); }
.tag-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; background: var(--ink); color: var(--paper); }
.tag-filter-head .filter-label { color: var(--paper); }
.tag-filter-head .filter-label .material-symbols-outlined { color: var(--yellow); }
.tag-filter-hint { color: #B9B3C9; font-size: 11.5px; line-height: 1.4; }
.tag-filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; }
.tag-mode { display: inline-flex; border: 2px solid var(--paper); border-radius: var(--pill); overflow: hidden; }
.tag-mode a { padding: 4px 8px; color: var(--paper); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.05em; text-decoration: none; }
.tag-mode a + a { border-left: 2px solid var(--paper); }
.tag-mode a.is-on { background: var(--yellow); color: var(--ink); }
.filter-count { opacity: 0.55; font-size: 9px; }
.tag-filter .filter[aria-pressed="true"] { background: var(--cyan); box-shadow: 3px 3px 0 var(--ink); text-decoration: underline; text-underline-offset: 2px; transform: rotate(0) translateY(-1px); }

.result-tabs { display: flex; align-items: flex-end; gap: 6px; flex-wrap: wrap; margin-top: 16px; border-bottom: var(--bw) solid var(--ink); }
.tab { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 13px; border: var(--bw) solid var(--ink); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--paper-2); color: var(--ink); font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-decoration: none; transform: translateY(3px); }
.tab:hover { background: var(--cyan); }
.tab[aria-current="page"] { background: var(--yellow); box-shadow: 4px -3px 0 var(--ink); }
.tab-count { padding: 1px 5px; border: 2px solid var(--ink); border-radius: var(--pill); background: var(--paper); font-size: 9px; }
.tab[aria-current="page"] .tab-count { background: var(--ink); color: var(--yellow); }

.result-section { margin-top: 22px; }
.section-count { color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.05em; }
.section-head .text-link { margin-left: auto; }
.search-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.view-toggle { display: flex; gap: 5px; margin-left: auto; }

@media (max-width: 1240px) {
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .filter-grid { grid-template-columns: 1fr; }
  .filter-panel-head,
  .tag-filter-head { align-items: flex-start; }
  .result-tabs .tab { flex: 1; justify-content: center; padding: 0 6px; font-size: 8.5px; }
  .search-toolbar .result-count { margin-left: 0; }
}

/* Étiquetage groupé ------------------------------------------------------- */
.bulk-page [hidden] { display: none !important; }

.bulk-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.bulk-step { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 2px solid var(--ink); border-radius: var(--pill); background: var(--paper); box-shadow: 2px 2px 0 var(--ink); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.05em; }
.bulk-step > span:first-child { display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper-2); font-size: 8.5px; }
.bulk-step--active { background: var(--yellow); }
.bulk-step--active > span:first-child { background: var(--magenta); }

.bulk-form { margin-top: 18px; }
.bulk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; align-items: start; }
.bulk-content { min-width: 0; }

.bulk-selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--ink); color: var(--paper); box-shadow: var(--shadow-sm); }
.bulk-selection-count { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.05em; }
.bulk-selection-count strong { display: grid; place-items: center; flex: 0 0 auto; min-width: 28px; height: 28px; padding: 0 6px; border: 2px solid var(--paper); border-radius: 50%; background: var(--yellow); color: var(--ink); font-family: var(--font-display); font-size: 14px; line-height: 1; }
.bulk-selection-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.bulk-selection-actions .btn { min-height: 34px; padding: 0 10px; font-size: 8.5px; }
.bulk-scope-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); font-family: var(--font-mono); font-size: 8.5px; line-height: 1.25; cursor: pointer; }
.bulk-scope-toggle:has(input:checked) { background: var(--cyan); }
.bulk-scope-toggle:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.bulk-scope-toggle input { flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--magenta); }

.bulk-limit { margin-top: 12px; padding: 12px 14px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--yellow); box-shadow: var(--shadow-sm); font-size: 13px; }
.bulk-limit strong { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; }
.bulk-limit p { margin-top: 4px; }

.bulk-scope-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--cyan); box-shadow: var(--shadow-sm); }
.bulk-scope-banner h2 { font-family: var(--font-display); font-size: 15px; line-height: 1.1; }
.bulk-scope-banner p { margin-top: 3px; font-size: 12.5px; }

.bulk-table-shell { margin-top: 14px; }
.bulk-table th:first-child,
.bulk-table td:first-child { width: 42px; padding-inline: 8px; text-align: center; }
.bulk-table tbody tr { cursor: pointer; }
.bulk-table tbody tr.is-selected,
.bulk-table tbody tr.is-selected:hover { background: color-mix(in oklch, var(--yellow) 42%, var(--paper)); }
.bulk-table tbody tr.is-selected td:first-child { box-shadow: inset 4px 0 0 var(--magenta); }
.bulk-check { width: 22px; height: 22px; margin: 0; accent-color: var(--magenta); cursor: pointer; }
.bulk-check:disabled { cursor: default; }
.bulk-table .cell-thumb { width: 48px; height: 42px; }
.bulk-table td.bulk-cell-value { white-space: nowrap; }
.bulk-table .value-tag { padding: 2px 6px; font-size: 9.5px; white-space: nowrap; }
.bulk-item-name { display: block; overflow-wrap: anywhere; font-weight: 600; line-height: 1.25; }
.bulk-item-inv { display: block; margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.05em; }
.bulk-row-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.bulk-ghost { display: inline-flex; align-items: center; gap: 2px; padding: 2px 7px; border: 2px dashed var(--ink); border-radius: var(--pill); background: var(--paper); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.04em; opacity: 0.9; }
.bulk-ghost--remove { background: color-mix(in oklch, var(--danger) 16%, var(--paper)); text-decoration: line-through; }
.bulk-muted { color: var(--muted); font-size: 12px; }

/* Colonne explicitement bornée : sans minmax(0, 1fr), le libellé nowrap du
   bouton Appliquer impose sa largeur à toute la grille du panneau. */
.bulk-panel { position: sticky; top: calc(var(--header-h) + 16px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; max-height: calc(100dvh - var(--header-h) - 32px); overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.bulk-panel-head { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-bottom: var(--bw) solid var(--ink); background: var(--ink); color: var(--paper); }
.bulk-panel-head h2 { font-family: var(--font-display); font-size: 15px; line-height: 1.1; letter-spacing: 0.02em; }
.bulk-panel-count { margin-left: auto; padding: 2px 8px; border: 2px solid var(--paper); border-radius: var(--pill); background: var(--yellow); color: var(--ink); font-family: var(--font-mono); font-size: 8.5px; white-space: nowrap; }
.bulk-panel-close { display: none; width: 34px; height: 34px; border-color: var(--paper); background: var(--paper); color: var(--ink); box-shadow: 2px 2px 0 var(--paper); }

.bulk-panel-body { display: grid; gap: 12px; align-content: start; min-width: 0; min-height: 0; padding: 14px; overflow-x: hidden; overflow-y: auto; }
.bulk-segmented { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: var(--bw) solid var(--ink); border-radius: var(--radius); }
.bulk-segmented label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 38px; cursor: pointer; }
.bulk-segmented label + label { border-left: var(--bw) solid var(--ink); }
.bulk-segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bulk-segmented span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.05em; }
.bulk-segmented input:checked + span { background: var(--magenta); }
.bulk-segmented input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: -3px; }

.bulk-panel-search { position: relative; display: block; }
.bulk-panel-search .material-symbols-outlined { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 1; font-size: 17px; color: var(--muted); }
.bulk-panel-search .input { padding-left: 34px; }

.bulk-tag-list { display: grid; gap: 7px; }
.bulk-tag-option { display: grid; grid-template-columns: 18px 16px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; padding: 8px 9px; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.bulk-tag-option:has(input:checked) { background: color-mix(in oklch, var(--cyan) 28%, var(--paper)); box-shadow: 2px 2px 0 var(--ink); }
.bulk-tag-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--magenta); cursor: pointer; }
.bulk-tag-dot { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; }
.bulk-tag-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.03em; }
.bulk-tag-meta { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; }
.bulk-tag-count { color: var(--muted); font-family: var(--font-mono); font-size: 8px; white-space: nowrap; }
.bulk-tag-badge { padding: 1px 5px; border: 1.5px solid var(--ink); border-radius: var(--pill); background: var(--mint); font-family: var(--font-mono); font-size: 7px; white-space: nowrap; }

.bulk-create { border-top: 2px dashed var(--ink); padding-top: 10px; }
.bulk-create summary { cursor: pointer; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.04em; }
.bulk-create-form { display: grid; gap: 7px; margin-top: 8px; }
.bulk-create-form .input { min-height: 36px; }
.bulk-create-row { display: flex; gap: 7px; }
.bulk-create-row .input[type="color"] { flex: 0 0 54px; padding: 3px; }
.bulk-create-row .btn { flex: 1; min-height: 36px; padding: 0 8px; font-size: 8.5px; }
.bulk-manage-tags { font-size: 8.5px; }

.bulk-pending { min-width: 0; padding: 10px 14px; border-top: var(--bw) solid var(--ink); background: var(--paper-2); }
.bulk-pending-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.06em; }
.bulk-pending-head .text-link { padding: 0; border: 0; background: none; font-size: 8px; cursor: pointer; }
.bulk-pending-diff { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; min-height: 22px; margin-top: 7px; }
.bulk-diff { max-width: 100%; overflow-wrap: anywhere; padding: 2px 7px; border: 2px solid var(--ink); border-radius: var(--pill); font-family: var(--font-mono); font-size: 8px; }
.bulk-diff--add { background: var(--mint); }
.bulk-diff--remove { background: color-mix(in oklch, var(--danger) 20%, var(--paper)); }
.bulk-pending-empty { color: var(--muted); font-size: 11px; line-height: 1.35; }

.bulk-panel-foot { display: grid; gap: 7px; min-width: 0; padding: 12px 14px; border-top: var(--bw) solid var(--ink); background: var(--paper); }
.bulk-panel-foot .btn { width: 100%; min-width: 0; padding-inline: 10px; line-height: 1.25; white-space: normal; }
.bulk-panel-foot small { color: var(--muted); font-family: var(--font-mono); font-size: 7.5px; line-height: 1.4; text-align: center; }

.bulk-mobile-bar { display: none; }
.bulk-sheet-backdrop { display: none; }
.bulk-manage-tags { display: none; }
html.js .bulk-manage-tags { display: none; }
html:not(.js) .bulk-manage-tags { display: inline-flex; }
html:not(.js) [data-bulk-create],
html:not(.js) [data-bulk-select-page],
html:not(.js) [data-bulk-clear] { display: none; }

@media (max-width: 1180px) {
  .bulk-layout { grid-template-columns: minmax(0, 1fr); }
  .bulk-page { padding-bottom: 100px; }

  html.js .bulk-panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 60; max-height: 86dvh; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; box-shadow: 0 -8px 0 var(--ink); transform: translateY(105%); transition: transform 180ms var(--ease); }
  html.js .bulk-panel.is-open { transform: translateY(0); }
  html.js .bulk-panel-close { display: inline-flex; }
  html.js .bulk-sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: color-mix(in oklch, var(--ink) 58%, transparent); opacity: 0; pointer-events: none; transition: opacity 180ms var(--ease); }
  html.js .bulk-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
  html.js .bulk-mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: var(--bw) solid var(--ink); background: var(--paper); box-shadow: 0 -4px 0 var(--ink); }
  html.js .bulk-mobile-bar .btn { min-height: 42px; }
  html.js .bulk-panel-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

  html:not(.js) .bulk-panel { position: static; max-height: none; }
  html:not(.js) .bulk-mobile-bar { display: none; }
}

@media (max-width: 720px) {
  .bulk-selection-bar { align-items: flex-start; }
  .bulk-selection-actions { width: 100%; justify-content: flex-start; }
  .bulk-selection-actions .btn,
  .bulk-scope-toggle { flex: 1 1 auto; justify-content: center; }
  .bulk-scope-toggle { min-height: 36px; }
  .bulk-table-shell { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .bulk-table,
  .bulk-table tbody,
  .bulk-table tr,
  .bulk-table td { display: block; width: 100%; }
  .bulk-table thead { display: none; }
  .bulk-table tr { position: relative; padding: 12px 12px 12px 48px; border: var(--bw) solid var(--ink); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); }
  .bulk-table tr + tr { margin-top: 10px; }
  .bulk-table td { border: 0; padding: 3px 0; }
  .bulk-table td:first-child { position: absolute; left: 13px; top: 14px; width: auto; padding: 0; }
  .bulk-table td[data-label]::before { content: attr(data-label) " · "; color: var(--muted); font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.04em; }
  .bulk-table td.bulk-cell-item::before { content: ""; }
  .bulk-table td.bulk-cell-item { padding-top: 0; }
  .bulk-check { width: 28px; height: 28px; }
  .bulk-table .cell-thumb { width: 44px; height: 38px; }
  .bulk-tag-option { grid-template-columns: 20px 16px minmax(0, 1fr) auto; }
  .bulk-panel-head h2 { font-size: 14px; }
}

@media (max-width: 420px) {
  .bulk-selection-actions .btn,
  .bulk-scope-toggle { flex-basis: 100%; }
  .bulk-panel-body { padding: 12px; }
}


