/* Kanto Korner — feuille de style unique. Mobile d'abord, couleurs du logo (noir #080808, jaune #FED219). */
:root {
  --yellow: #fed219;
  --yellow-soft: #fff6c7;
  --yellow-dark: #c9a400;
  --black: #080808;
  --ink: #141414;
  --ink-2: #3a3a3a;
  --muted: #6d6a62;
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --line: #e5e2d9;
  --line-2: #d6d2c6;
  --green: #137a4b;
  --green-soft: #e3f4ea;
  --red: #c0352b;
  --red-soft: #fbe6e3;
  --orange: #b85e00;
  --orange-soft: #fdf0dc;
  --blue: #1f5fbf;
  --blue-soft: #e5eefb;
  --purple: #6b3fa0;
  --purple-soft: #efe7f8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.06), 0 4px 16px rgba(20, 20, 20, 0.05);
  --sidebar: 240px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Oswald', 'Inter', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg);
  min-height: 100vh; font-feature-settings: 'tnum' 1, 'cv11' 1;
}
a { color: inherit; }
a:hover { color: #000; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.08rem; font-weight: 700; }
h3 { font-size: 0.98rem; font-weight: 700; }
p { margin: 0.4em 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, .mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 0.88em; }
.break-any { overflow-wrap: anywhere; } /* chemins de fichiers longs : coupés plutôt que de déborder sur téléphone */
.icon { flex: none; vertical-align: middle; }

/* ── Structure ─────────────────────────────────────────── */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--black); color: #f2f2f2;
  display: flex; flex-direction: column; z-index: 40; transform: translateX(-100%);
  padding-left: env(safe-area-inset-left);
  /* Tiroir fermé (téléphone, tablette) : invisible, donc hors du parcours au clavier et des lecteurs d'écran ;
     « visibility » change après la fin du glissement à la fermeture, tout de suite à l'ouverture. */
  visibility: hidden; transition: transform 0.2s ease, visibility 0s linear 0.2s;
}
.sidebar.open { transform: none; visibility: visible; transition: transform 0.2s ease, visibility 0s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; text-decoration: none; color: var(--yellow); }
.brand-kk { width: 54px; height: auto; }
.brand-name { font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.78rem; }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: #cfcfcf; text-decoration: none;
  font-weight: 500; font-size: 0.93rem;
}
.nav-link:hover { background: #1c1c1c; color: #fff; }
.nav-link.active { background: var(--yellow); color: var(--black); font-weight: 700; }
.nav-badge { margin-left: auto; background: #2c2c2c; color: var(--yellow); font-size: 0.72rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.nav-link.active .nav-badge { background: var(--black); }
.nav-badge-alert { background: var(--red); color: #fff; }
.nav-badge[hidden], .dot-badge[hidden] { display: none; }
.sidebar-foot { padding: 12px 16px 18px; border-top: 1px solid #1f1f1f; display: flex; flex-direction: column; gap: 8px; }
.who { color: #bbb; font-size: 0.85rem; display: flex; align-items: center; gap: 6px; }
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 35; }

.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 10px;
  background: var(--black); color: #fff; padding-top: env(safe-area-inset-top);
  padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right));
}
.topbar-brand img { height: 28px; display: block; }
.topbar-title { font-weight: 600; font-size: 0.95rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-icon { background: none; border: 0; color: inherit; padding: 8px; border-radius: 8px; cursor: pointer; display: inline-flex; position: relative; text-decoration: none; }
.btn-icon:hover { background: rgba(255, 255, 255, 0.08); color: inherit; }
.dot-badge { position: absolute; top: 2px; right: 0; background: var(--red); color: #fff; font-size: 0.65rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

.main {
  padding: 16px max(14px, env(safe-area-inset-right)) 96px max(14px, env(safe-area-inset-left));
  max-width: 1400px; margin: 0 auto;
}
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: flex; background: var(--black);
  border-top: 1px solid #1f1f1f; padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; color: #a9a9a9;
  text-decoration: none; font-size: 0.68rem; font-weight: 600; position: relative;
}
.bottomnav a.active { color: var(--yellow); }
.bottomnav .dot-badge { right: calc(50% - 22px); top: 3px; }

@media (min-width: 1024px) {
  .sidebar { transform: none; visibility: visible; transition: none; }
  .scrim, .topbar, .bottomnav { display: none !important; }
  .main { margin-left: var(--sidebar); padding: 26px 32px 48px; max-width: none; }
}
@media (min-width: 1700px) { .main > * { max-width: 1440px; } }

/* ── En-tête de page ───────────────────────────────────── */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; font-size: 0.92rem; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

/* ── Grilles & utilitaires ─────────────────────────────── */
/* minmax(0, …) : une colonne ne s'élargit jamais au contenu (tableau, vignettes) au-delà de l'écran (320 px). */
.grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
@media (min-width: 720px) { .g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-nowrap { flex-wrap: nowrap; }
.spacer { flex: 1; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; }
.tiny { font-size: 0.75rem; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.right, .num { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }
.hide-mobile { display: none; }
@media (min-width: 720px) { .hide-mobile { display: revert; } .show-mobile { display: none !important; } }
[x-cloak] { display: none !important; }
.up { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--muted); }
.pct { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Cartes (panneaux) ─────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; flex-wrap: wrap; }
.card-head .sub { color: var(--muted); font-size: 0.84rem; }
.card-body { padding: 4px 16px 16px; }
.card-body.flush { padding: 0; }
.card + .card { margin-top: 14px; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
.card-dark { background: var(--black); color: #f3f3f3; border-color: #1c1c1c; }
.card-yellow { background: var(--yellow); border-color: var(--yellow-dark); }

/* ── Indicateurs ───────────────────────────────────────── */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* 5 indicateurs sur 2 colonnes : le dernier prend toute la largeur (pas de case vide) ; valeurs réduites sur petit écran. */
@media (max-width: 1099px) { .kpis-5 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 1.55rem; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 479px) { .kpi-value { font-size: clamp(1.05rem, 5.4vw, 1.55rem); } }
.kpi-sub { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.kpi-dark { background: var(--black); color: #fff; border-color: #000; }
.kpi-dark .kpi-label, .kpi-dark .kpi-sub { color: #a8a8a8; }
.kpi-dark .kpi-value { color: var(--yellow); }

/* ── Tableaux ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
  text-align: left; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600;
  padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2);
}
.table th a { text-decoration: none; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fcfbf7; }
.table .num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tr.clickable { cursor: pointer; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
.table-compact td, .table-compact th { padding: 7px 10px; }

/* ── Badges ────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 99px;
  background: #eeece6; color: var(--ink-2); white-space: nowrap; line-height: 1.5;
}
.b-ok { background: var(--green-soft); color: var(--green); }
.b-warn { background: var(--orange-soft); color: var(--orange); }
.b-err { background: var(--red-soft); color: var(--red); }
.b-info { background: var(--blue-soft); color: var(--blue); }
.b-muted { background: #eeece6; color: var(--muted); }
.b-dark { background: var(--black); color: var(--yellow); }
.b-yellow { background: var(--yellow); color: var(--black); }
.b-purple { background: var(--purple-soft); color: var(--purple); }
.b-hot { background: #fff0e0; color: #c2410c; }
.st-achete { background: var(--purple-soft); color: var(--purple); }
.st-en_transit { background: var(--blue-soft); color: var(--blue); }
.st-recu { background: #eeece6; color: var(--ink-2); }
.st-en_vente { background: var(--green-soft); color: var(--green); }
.st-reserve { background: var(--orange-soft); color: var(--orange); }
.st-vendu { background: #222; color: #ddd; }
.st-sorti { background: var(--red-soft); color: var(--red); } /* exemplaire sorti du stock (perte, casse, vol…) */
.status-qty { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tcg { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.tcg-pokemon { color: #b8860b; } .tcg-one_piece { color: #c8102e; } .tcg-lorcana { color: #5b3fa0; } .tcg-yugioh { color: #8a5a2b; } .tcg-magic { color: #333; }
.lang { font-size: 0.68rem; font-weight: 700; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; color: var(--ink-2); }

/* ── Boutons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: 0.9rem;
  padding: 9px 15px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.12s, border-color 0.12s, transform 0.05s;
  min-height: 40px;
}
.btn:hover { background: #f3f1ea; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: 0.5; pointer-events: none; }
.btn-primary { background: var(--yellow); border-color: var(--yellow-dark); color: var(--black); }
.btn-primary:hover { background: #ffdb3d; color: var(--black); }
.btn-dark { background: var(--black); border-color: var(--black); color: var(--yellow); }
.btn-dark:hover { background: #222; color: var(--yellow); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(0, 0, 0, 0.05); }
.btn-on-dark { color: #ddd; border-color: #333; }
.btn-on-dark:hover { background: #1c1c1c; color: #fff; }
.btn-danger { color: var(--red); border-color: #efc9c4; }
.btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn-ok:hover { background: #0f6a40; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 0.82rem; min-height: 32px; border-radius: 7px; }
.btn-lg { padding: 13px 20px; font-size: 1rem; min-height: 50px; }
.btn-block { width: 100%; }

/* ── Formulaires ───────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .field-label { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }
input, select, textarea {
  font: inherit; font-size: 0.93rem; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 8px;
  padding: 8px 10px; min-height: 40px; width: 100%; min-width: 0;
}
textarea { min-height: 84px; resize: vertical; }
input[type='checkbox'], input[type='radio'] { width: 18px; height: 18px; min-height: 0; accent-color: var(--black); padding: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--yellow); outline-offset: 0; border-color: var(--yellow-dark); }
input[type='file'] { padding: 6px; }
/* iOS Safari agrandit la page à chaque saisie dans un champ de moins de 16 px : 16 px sur écran tactile. */
@media (pointer: coarse), (max-width: 719px) { input, select, textarea { font-size: 16px; } }
.help, .field > .help { font-size: 0.78rem; font-weight: 400; color: var(--muted); }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .span-2 { grid-column: span 2; } }
@media (min-width: 1100px) { .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; cursor: pointer; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.inline-form { display: inline; }

/* ── Filtres, onglets, puces ───────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.filters input[type='search'], .filters .search { flex: 1 1 220px; }
.filters select { width: auto; flex: 0 1 auto; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--black); }
.tab .count { background: #eeece6; border-radius: 99px; padding: 0 7px; font-size: 0.74rem; }
@media (max-width: 719px) { .tabs { flex-wrap: wrap; overflow-x: visible; row-gap: 2px; } .tab { padding: 8px 10px; } }
.tab.active .count { background: var(--yellow); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font-size: 0.84rem; font-weight: 600; text-decoration: none; color: var(--ink-2); cursor: pointer; }
.chip.active, .chip:hover { background: var(--black); color: var(--yellow); border-color: var(--black); }

/* ── Références (vignettes) ────────────────────────────── */
.item-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.thumb { width: 38px; height: 53px; object-fit: contain; border-radius: 4px; background: #eeece6; flex: none; }
.thumb-lg { width: 100%; max-width: 280px; height: auto; border-radius: 10px; background: #eeece6; display: block; }
/* Image de remplacement d'une carte Pokémon / One Piece (services/cardimages.badgeOf) : « à confirmer », « image indicative » */
.thumb-wrap { position: relative; display: inline-flex; flex: none; }
.thumb-badge { position: absolute; left: 50%; bottom: -3px; transform: translateX(-50%); max-width: 46px; padding: 1px 3px; border-radius: 3px; font-size: 7.5px; line-height: 1.05; font-weight: 600; text-align: center; color: #fff; background: #b45309; box-shadow: 0 0 0 1px #fff; pointer-events: none; }
.thumb-badge-indicative { background: #57534e; }
.thumb-badge-autre-version { background: #1e40af; }
.thumb-wrap-lg { position: relative; display: block; max-width: 280px; }
.thumb-wrap-lg .thumb-badge { left: 8px; bottom: 8px; transform: none; max-width: none; font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; }
.item-cell-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.item-name { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
a.item-name:hover { text-decoration: underline; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 0.78rem; color: var(--muted); }
.item-sub { font-size: 0.78rem; color: var(--muted); }

/* ── Messages ──────────────────────────────────────────── */
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-weight: 500; border: 1px solid; }
.flash-ok { background: var(--green-soft); border-color: #bfe3cd; color: #0b5c37; }
.flash-erreur { background: var(--red-soft); border-color: #f0c6c0; color: #8f241c; }
.flash-info { background: var(--yellow-soft); border-color: #f1df85; color: #5c4a00; }
/* Zone des messages de page : fixe en haut de l'écran, visible quel que soit le défilement. */
.flash-zone {
  position: fixed; z-index: 45; top: calc(env(safe-area-inset-top) + 64px); left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.flash-zone:empty { display: none; }
.flash-zone .flash {
  pointer-events: auto; margin: 0; position: relative; padding-right: 42px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.08);
}
.flash-close {
  position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent;
  color: inherit; font: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: 0.7;
}
.flash-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.06); }
@media (min-width: 1024px) { .flash-zone { top: 16px; left: calc(50% + var(--sidebar) / 2); width: min(620px, calc(100% - var(--sidebar) - 48px)); } }
.notice { padding: 10px 14px; border-radius: 10px; background: var(--yellow-soft); border: 1px solid #f1df85; font-size: 0.88rem; }
.notice-dark { background: #171717; border-color: #2a2a2a; color: #ddd; }
.empty { text-align: center; padding: 42px 16px; color: var(--muted); }
.empty h2, .empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 12px; }

/* ── Barre de confiance / progression ──────────────────── */
.bar { height: 6px; border-radius: 99px; background: #ebe8df; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.bar.warn > span { background: var(--orange); }
.bar.err > span { background: var(--red); }

/* ── File « à valider » (mobile d'abord) ───────────────── */
.queue { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .queue { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .queue { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.queue-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.queue-card.verify { border-color: #f0c98a; box-shadow: 0 0 0 1px #f0c98a inset, var(--shadow); }
.queue-media { display: flex; gap: 12px; padding: 12px; }
.queue-media img { width: 96px; height: 134px; object-fit: contain; border-radius: 8px; background: #eeece6; flex: none; }
.queue-fields { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 0.86rem; align-content: start; min-width: 0; }
.queue-fields dt { color: var(--muted); }
.queue-fields dd { margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.queue-src { padding: 8px 12px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }
.queue-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 10px 12px 12px; }
.queue-actions .btn { min-height: 46px; }

/* ── Graphiques ────────────────────────────────────────── */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.chart .area { fill: rgba(254, 210, 25, 0.22); }
.chart .dot { fill: var(--yellow); stroke: var(--ink); stroke-width: 2; }
.chart .ref { stroke: var(--red); stroke-dasharray: 5 4; stroke-width: 1.3; }
.chart .ref-label { fill: var(--red); font-size: 10.5px; font-weight: 600; font-family: var(--font); }
.chart-empty { color: var(--muted); font-size: 0.88rem; padding: 18px 0; }
.spark { display: block; }
.spark-up { color: var(--green); } .spark-down { color: var(--red); } .spark-flat { color: var(--muted); }

/* ── Divers ────────────────────────────────────────────── */
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.9rem; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
dialog.modal { border: 0; border-radius: 14px; padding: 0; max-width: 560px; width: calc(100% - 24px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); }
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.45); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 16px; }
details.disclosure > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.slides { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .slides { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.slides img { width: 100%; border-radius: 10px; display: block; box-shadow: var(--shadow); background: #111; aspect-ratio: 1080 / 1350; object-fit: cover; }
.pick-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pick { position: relative; border: 2px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; }
.pick img { width: 100%; aspect-ratio: 63 / 88; object-fit: contain; background: #f1efe9; border-radius: 6px; }
.pick input { position: absolute; top: 10px; left: 10px; }
.pick:has(input:checked) { border-color: var(--black); box-shadow: 0 0 0 3px var(--yellow); }
.htmx-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--yellow); z-index: 100; transition: width 0.3s; }
.htmx-request.htmx-progress, body.htmx-busy .htmx-progress { width: 70%; }
.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.fade-out { animation: fadeout 0.35s forwards; }
@keyframes fadeout { to { opacity: 0; transform: scale(0.97); } }

/* ── Connexion ─────────────────────────────────────────── */
.login-page { background: var(--black); display: grid; place-items: center; padding: 20px; color: #eee; }
.login-box { width: 100%; max-width: 360px; }
.login-logo { width: 190px; display: block; margin: 0 auto 4px; }
.login-sub { text-align: center; color: #9a9a9a; margin-bottom: 22px; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.75rem; }
.login-box .field > span { color: #cfcfcf; }
.login-box input { background: #151515; border-color: #2c2c2c; color: #fff; }
.login-demo { margin-top: 26px; padding-top: 18px; border-top: 1px solid #222; display: flex; flex-direction: column; gap: 8px; }
.login-demo p { color: #9a9a9a; font-size: 0.85rem; text-align: center; margin: 0 0 4px; }
.error-box { text-align: center; }
.error-box h1 { color: #fff; margin: 18px 0 8px; font-size: 1.2rem; }
.error-box p { color: #cfcfcf; }

/* Image agrandie (vignettes du catalogue, voir app.js : data-zoom-src) */
.zoom-layer { position: fixed; inset: 0; z-index: 90; background: rgba(12, 12, 12, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; cursor: zoom-out; }
.zoom-layer img { max-width: min(100%, 520px); max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; border-radius: 10px; background: #f1efe9; }
.zoom-caption { color: #eee; margin: 0; font-size: 0.9rem; text-align: center; }
.zoom-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.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; }

@media print { .sidebar, .topbar, .bottomnav, .flash-zone, .zoom-layer { display: none !important; } .main { margin: 0; padding: 0; } }
