/* The Card Locker — v7 « éditorial sport », thème clair par défaut (sombre disponible) : blanc franc, noir profond, capitales condensées géantes,
   photos éclairées comme en studio. L'orange n'est qu'un détail (point actif, focus). Aucune bordure. */

/* Tokens ------------------------------------------------------------ */
:root {
  /* Thème clair (par défaut) — fond gris très clair, surfaces blanches à ombre douce */
  --bg: #F4F4F5;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --surface-3: #ECECEE;
  --soft-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 10px 28px -14px rgba(17, 17, 17, .18);
  --text: #111111;
  --muted: #707072;
  --faint: #9E9EA0;
  --inv-muted: #A3A3A3;          /* texte secondaire sur carte inversée (noire) */
  --accent: #FF6A00;                                              /* orange fluo basket */
  --accent-grad: linear-gradient(135deg, #FFA126 0%, #FF6A00 52%, #FF4800 100%);
  --accent-ink: #1A0A00;                                          /* texte sur orange : 6:1 */
  --accent-glow: rgba(255, 106, 0, .45);
  --accent-wash: rgba(255, 122, 26, .16);
  --alert: #D30005;
  --warn: #9A6700;
  --rc: #FF6B1A; --auto: #8A4DFF; --memo: #0AA5D8; --num: #E3A500;
  --stage: #FFFFFF;
  --dialog: #FFFFFF;
  --overlay: rgba(255, 255, 255, .78);
  --drop: rgba(0, 0, 0, .20);
  --drop-strong: rgba(0, 0, 0, .26);
  --float-shadow: rgba(0, 0, 0, .28);
  --backdrop: rgba(0, 0, 0, .32);
  --vignette: rgba(255, 255, 255, .35);
  --vignette-edge: rgba(255, 255, 255, .7);
  --ghost-type: rgba(0, 0, 0, .08);
  --name-blend: multiply;
  --name-opacity: .35;
  --spot: rgba(255, 255, 255, .95);
  --spot-soft: rgba(255, 255, 255, .85);
  --stage-blur: blur(44px) saturate(1.3) brightness(1.15);
  --stage-blur-opacity: .35;
  --back-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M9 2 4 7l5 5' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --r-tile: 14px; --r-ui: 12px; --r-pill: 999px;
  --font: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Thème sombre (v6), conservé : App.config.theme = 'dark'.
   Attribut propre à l'app (data-app-theme) : la visionneuse claude.ai pose son propre data-theme, qui ne doit pas l'emporter. */
:root[data-app-theme="dark"] {
  --bg: #0A0A0A;
  --surface: #151515;
  --surface-2: #1F1F1F;
  --surface-3: #2A2A2A;
  --text: #FFFFFF;
  --muted: #A3A3A3;
  --faint: #6E6E6E;
  --inv-muted: #6B6B6B;
  --alert: #FF4D5E;
  --warn: #FFCC4D;
  --rc: #FF8A3D; --auto: #B77CFF; --memo: #43D8FF; --num: #FFCC4D;
  --stage: #0F0F0F;
  --soft-shadow: none;
  --dialog: #141414;
  --overlay: rgba(10, 10, 10, .62);
  --drop: rgba(0, 0, 0, .6);
  --drop-strong: rgba(0, 0, 0, .7);
  --float-shadow: rgba(0, 0, 0, .9);
  --backdrop: rgba(0, 0, 0, .6);
  --vignette: rgba(10, 10, 10, .6);
  --vignette-edge: rgba(10, 10, 10, .85);
  --ghost-type: rgba(255, 255, 255, .10);
  --name-blend: screen;
  --name-opacity: .45;
  --spot: rgba(255, 255, 255, .22);
  --spot-soft: rgba(255, 255, 255, .10);
  --stage-blur: blur(44px) saturate(1.5) brightness(.6);
  --stage-blur-opacity: .55;
  --back-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M9 2 4 7l5 5' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; background: var(--bg); }
*, *::before, *::after { box-sizing: inherit; }
body { margin: 0; min-height: 100vh; background: radial-gradient(140% 420px at 50% -140px, var(--accent-wash), transparent 72%) no-repeat, var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; border: 0; }
fieldset { border: 0; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#app { position: relative; max-width: 1320px; margin: 0 auto; padding: 0 16px 56px; }
@media (min-width: 720px) { #app { padding: 0 40px 72px; } }

/* Voix d'affiche : capitales condensées (Nike / image 2) */
.wm-main, .search-label, .detail-player, .page-title, .login-title, .empty-title, .sheet-head h2, .modal-inner h2,
.detail-price, .dash b, .cart-total b, .stand-ref, .stage-name {
  font-stretch: 62%; font-weight: 900; text-transform: uppercase; letter-spacing: -0.005em;
}

/* Header -------------------------------------------------------------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.wordmark { background: none; padding: 6px 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1; text-decoration: none; }
.wm-nba { font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.wm-main { font-size: clamp(19px, 6.4vw, 26px); line-height: .9; white-space: nowrap; }
.wm-main::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 4px; vertical-align: 2px; }
.stock { font-size: 14px; color: var(--muted); white-space: nowrap; }
@media (max-width: 349px) { .stock { display: none; } }
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-size: 16px; font-weight: 600; text-decoration: none; }
.back::before { content: ''; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2) no-repeat center / 14px;
  background-image: var(--back-icon); }
.linkbtn { background: none; padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--faint); }

/* Recherche : l'affiche --------------------------------------------- */
.search { position: relative; margin: 20px 0 16px; }
.nowrap { white-space: nowrap; }
.search-label { display: block; font-size: clamp(34px, 10.4vw, 80px); line-height: .9; margin-bottom: 18px; text-wrap: balance; }
[data-space="public"] .search-label { animation: rise .7s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.search-input { width: 100%; height: 54px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 18px; font-weight: 500;
  padding: 0 56px 0 52px; outline: none; -webkit-appearance: none; appearance: none; transition: background .2s; }
.search-input::placeholder { color: var(--faint); }
.search-input:focus { background: var(--surface-2); box-shadow: 0 0 0 2px var(--accent), 0 10px 30px -14px var(--accent-glow); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 18px; bottom: 16px; width: 22px; height: 22px; color: var(--text); pointer-events: none; }
.search-icon svg { width: 100%; height: 100%; display: block; }
.search-clear { position: absolute; right: 7px; bottom: 7px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-3); font-size: 22px; line-height: 1; }
[data-space="admin"] .search-label { font-size: 34px; line-height: .9; margin-bottom: 12px; }

/* Filtres (pilules Nike) --------------------------------------------- */
.chips, .segs { display: flex; flex-wrap: wrap; gap: 8px; }
.segs { margin-bottom: 10px; }
.chip, .seg { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  background: var(--surface-2); font-size: 15px; font-weight: 600; transition: background .15s, color .15s; }
.chip[aria-pressed="true"], .seg[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.chip.chip-more { background: transparent; padding: 0 12px 0 4px; }
.chip.chip-more::before { content: ''; width: 16px; height: 12px; margin-right: 8px;
  background: linear-gradient(currentColor 0 0) top/100% 2px no-repeat, linear-gradient(currentColor 0 0) center/66% 2px no-repeat, linear-gradient(currentColor 0 0) bottom/33% 2px no-repeat; }
.chip.chip-more[aria-pressed="true"] { background: var(--text); color: var(--bg); padding: 0 16px; }
.resultline { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 12px; }
.count { font-size: 14px; color: var(--muted); }

/* Grille produit ----------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 8px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 12px; } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1240px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sentinel { grid-column: 1 / -1; height: 1px; }
.tile { position: relative; min-width: 0; }
.tile-link { display: block; text-decoration: none; }
/* Photo en studio : fond neutre, spot par le haut, soupçon de la couleur de la carte */
.tile-media { --a1: #FF5A1F33; --a2: #FF5A1F1a; position: relative; border-radius: var(--r-tile); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(80% 50% at 50% 0%, var(--spot-soft), transparent 70%),
    radial-gradient(90% 70% at 50% 100%, var(--a1), transparent 75%),
    var(--surface); }
.ph { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: transparent; }
.tile-media .ph { padding: 12% 14% 10%; }
.ph img { width: 100%; height: 100%; object-fit: contain; }  /* jamais rognée */
.tile-media .ph img { border-radius: 6px; filter: drop-shadow(0 16px 20px var(--drop)); transition: transform .5s var(--ease); }
.tile-link:hover .ph img { transform: scale(1.03); }
.tile-link:active .ph img { transform: scale(.985); }
.ph > span { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; text-align: center; padding: 12px; color: var(--muted); font-size: 14px; }
.ph.ph-missing img { display: none; }
.ph.ph-missing > span { display: flex; }
.tags { position: absolute; left: 8px; top: 8px; right: 54px; display: flex; flex-wrap: wrap; gap: 4px; z-index: 1; }
.tag { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-pill); padding: 3px 8px; font-size: 12px; font-weight: 700; line-height: 1.3;
  background: var(--overlay); color: var(--text); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--text); }
.tag-rc::before { background: var(--rc); }
.tag-auto::before { background: var(--auto); }
.tag-memo::before { background: var(--memo); }
.tag-num::before { background: var(--num); }
.tile-body { padding: 12px 2px 0; }
.tile-player { font-size: 16px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { margin-top: 2px; font-size: 14px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-price { margin-top: 8px; font-size: 20px; font-weight: 700; line-height: 1; }
.tile-add { position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  background: var(--overlay); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text); font-size: 22px; font-weight: 400; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s, transform .2s var(--ease); }
.tile-add[aria-pressed="true"] { background: var(--accent-grad); color: var(--accent-ink); font-size: 17px; font-weight: 900; box-shadow: 0 8px 18px -8px var(--accent-glow); }
.tile-add:active { transform: scale(.9); }
.tile.is-sold .ph img { opacity: .35; filter: grayscale(1); }
.sold-flag { position: absolute; left: 8px; bottom: 8px; z-index: 1; background: var(--text); color: var(--bg); border-radius: var(--r-pill); padding: 5px 11px; font-weight: 700; font-size: 14px; }

/* Fiche : scène studio (image 3) + nom géant (image 2) + carrousel (validé) */
.top-overlay { position: absolute; z-index: 4; left: 28px; right: 28px; top: calc(clamp(18px, 3vw, 32px) + 12px); min-height: 44px; pointer-events: none; }
@media (min-width: 720px) { .top-overlay { left: 52px; right: 52px; } }
@media (min-width: 840px) { .top-overlay { left: calc(50% - 368px); right: calc(50% - 368px); } }
.top-overlay > * { pointer-events: auto; }
.top-overlay .back { font-size: 0; gap: 0; }
.top-overlay .back::before { width: 44px; height: 44px; background-color: var(--overlay); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.overlay-pill { padding: 10px 16px; border-radius: var(--r-pill); background: var(--overlay); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-weight: 600; font-size: 14px; text-decoration: none; }
.detail { max-width: 760px; margin: 0 auto; }
.stage { --a1: #FF5A1F80; --a2: #FF5A1F40; position: relative; height: min(43vh, 400px); min-height: 290px; margin-top: clamp(18px, 3vw, 32px); border-radius: 22px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(55% 45% at 50% -5%, var(--spot), transparent 70%),       /* spot par le haut */
    radial-gradient(70% 60% at 50% 30%, var(--a1), transparent 72%),                       /* couleur de la carte */
    var(--stage); }
.stage-bg { position: absolute; inset: -20%; z-index: -2; background: center / cover no-repeat; filter: var(--stage-blur); opacity: var(--stage-blur-opacity); }
.stage::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(110% 80% at 50% 35%, transparent 40%, var(--vignette-edge) 100%), linear-gradient(to bottom, transparent 65%, var(--vignette)); }
.stage-name { position: absolute; z-index: -1; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
  font-size: clamp(90px, 30vw, 220px); line-height: .8; color: var(--name, var(--ghost-type)); mix-blend-mode: var(--name-blend); opacity: 0; transition: opacity .3s; }
.stage-name.is-fitted { opacity: var(--name-opacity); }   /* discret : se fond dans le halo */
.carousel { height: 100%; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; padding: 56px 20% 26px; background: none; }
.slide .ph { height: 100%; aspect-ratio: auto; }
.slide .ph img { filter: drop-shadow(0 28px 34px var(--drop-strong)); }
.zoom { display: block; }
.dots { display: flex; justify-content: center; gap: 0; margin: 6px 0 0; }
.dot { width: 28px; height: 28px; padding: 0; background: none; display: flex; align-items: center; justify-content: center; }  /* cible tactile */
.dot::before { content: ''; width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--faint); transition: width .25s var(--ease), background .25s; }
.dot[aria-selected="true"]::before { width: 22px; background: var(--accent); }
.dot[aria-selected="true"] { width: 40px; }
.detail-head { margin-top: 16px; }
.ref { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.detail-head .ref { display: block; margin-bottom: 6px; }
.detail-player { font-size: clamp(46px, 14vw, 88px); line-height: .86; margin: 0; }
.detail-meta { margin-top: 10px; font-size: 16px; color: var(--muted); }
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.info, .flag { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 13px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; background: var(--surface-2); color: var(--text); }
.flag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.flag-rookie::before { background: var(--rc); }
.flag-autograph::before { background: var(--auto); }
.flag-memorabilia::before { background: var(--memo); }
.flag-serial_numbered::before { background: var(--num); }
/* Prix : carte blanche sur fond noir (image 2) — lisible de loin */
.detail-priceline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 18px; border-radius: 16px; background: var(--surface); color: var(--text); }
.detail-price { font-size: clamp(34px, 9.5vw, 48px); line-height: .9; }
.price-note { font-size: 13px; font-weight: 600; color: var(--muted); }
.title-ref { margin: 14px 0 0; color: var(--muted); font-size: 14px; }

/* Boutons (pilules Nike) -------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 16px; text-decoration: none; background: var(--surface-2); color: var(--text); transition: background .2s, transform .12s; }
.btn:active { transform: scale(.98); }
.btn-dark { background: var(--surface-2); color: var(--text); }
.btn-volt { background: var(--accent-grad); color: var(--accent-ink); font-weight: 800; box-shadow: 0 14px 30px -14px var(--accent-glow); }
.btn-volt:active { box-shadow: 0 6px 16px -10px var(--accent-glow); }
.btn-ghost { background: var(--surface-2); }
.btn-lg { width: 100%; min-height: 60px; font-size: 17px; font-weight: 700; }
.btn-sm { min-height: 42px; font-size: 15px; padding: 0 18px; }
.btn:disabled { opacity: .4; cursor: default; }
.actionbar { position: sticky; bottom: 0; z-index: 5; max-width: 760px; margin: 24px auto 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 60%, transparent); }
.actionrow { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.actionrow .btn-dark { background: var(--accent-grad); color: var(--accent-ink); font-weight: 800; box-shadow: 0 14px 30px -14px var(--accent-glow); }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); font-size: 22px; line-height: 1; }

/* Admin ---------------------------------------------------------------- */
.top-admin { flex-wrap: wrap; }
.admin-title { display: flex; align-items: baseline; gap: 12px; }
.top-admin .wordmark { font-size: 30px; font-weight: 900; font-stretch: 62%; text-transform: uppercase; }
.admin-links { display: flex; gap: 18px; }
.sync { font-size: 13px; color: var(--muted); }
.sync-live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34D17A; margin-right: 6px; vertical-align: 1px; }
.sync-err { color: var(--alert); }
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
@media (min-width: 720px) { .dash { grid-template-columns: repeat(4, 1fr); } }
.dash div { padding: 16px 16px 14px; border-radius: 16px; background: var(--surface); }
.dash b { display: block; font-size: 48px; line-height: .85; }
.dash div > span { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.dash .dash-alert { background: var(--text); color: var(--bg); }
.dash .dash-alert b { color: var(--accent); }
.dash .dash-alert > span { color: var(--inv-muted); }
.tabs { display: flex; gap: 22px; margin: 22px 0 0; overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; padding: 8px 0 10px; font-size: 16px; font-weight: 600; text-decoration: none; color: var(--muted); position: relative; }
.tab[aria-current="true"] { color: var(--text); }
.tab[aria-current="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--accent); }
.pill { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; text-align: center; }
.vinted { max-width: 760px; }
.hint { color: var(--muted); margin: 18px 0 10px; font-size: 15px; }
.rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.row { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px; border-radius: 16px; background: var(--surface); }
.row-thumb .ph { border-radius: 10px; background: var(--surface-2); padding: 6px; }
.row-player { font-size: 17px; font-weight: 700; line-height: 1.2; }
.row-player .ref { font-size: 13px; margin-left: 4px; }
.row-title { font-size: 14px; color: var(--muted); margin-top: 2px; }
.row-prices { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 10px; font-size: 15px; color: var(--muted); }
.row-prices b { color: var(--text); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions .btn-dark { background: var(--text); color: var(--bg); }
.soldbox { max-width: 760px; margin: 0 auto 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); }
.soldbox p { margin: 0; }
.soldbox p + p { color: var(--muted); margin-top: 2px; }
.vinted-link { max-width: 760px; margin: 22px auto 0; }
.vinted-link .err:empty { display: none; }
.vinted-link-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.login { max-width: 440px; margin: 8px auto 0; }
.login-title { font-size: 64px; line-height: .86; margin: 12px 0 14px; }
.login .btn-lg { margin-top: 10px; }
.login .btn-dark { background: var(--text); color: var(--bg); }

/* Vides ---------------------------------------------------------------- */
.empty { grid-column: 1 / -1; padding: 40px 0; }
.empty-page { max-width: 520px; margin: 0 auto; }
.empty-title { font-size: 40px; line-height: .9; margin: 0 0 10px; }
.empty p { margin: 0 0 16px; color: var(--muted); }
.empty .btn-dark { background: var(--text); color: var(--bg); }
.foot { margin-top: 56px; color: var(--faint); font-size: 13px; }

/* Dialogues ------------------------------------------------------------ */
dialog { border: 0; padding: 0; color: var(--text); background: var(--dialog); }
dialog::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet { width: 100%; max-width: 560px; margin: auto auto 0; border-radius: 24px 24px 0 0; max-height: 92vh; }
@media (min-width: 720px) { .sheet { margin: auto; border-radius: 24px; } }
.sheet-inner, .modal-inner { padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sheet-head h2, .modal-inner h2 { font-size: 40px; margin: 0; line-height: .88; }
.field { display: block; margin: 16px 0 0; padding: 0; }
.field > span, .field legend { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; padding: 0; color: var(--muted); }
select, .field input { width: 100%; min-height: 50px; border-radius: var(--r-ui); background: var(--surface-2); padding: 0 14px; font-size: 16px; color: var(--text); }
select option { background: var(--dialog); color: var(--text); }
select:focus, .field input:focus { outline: none; box-shadow: 0 0 0 2px var(--text); }
.field input::placeholder { color: var(--faint); }
.price-range { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.price-range label { flex: 1; }
.toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.toggle { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border-radius: var(--r-ui); background: var(--surface-2); font-weight: 600; font-size: 15px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--text); }
.toggle:has(input:checked) { background: var(--text); color: var(--bg); }
.toggle:has(input:checked) input { accent-color: var(--bg); }
.sheet-foot, .modal-foot { display: flex; gap: 8px; margin-top: 24px; }
.sheet-foot .btn:last-child, .modal-foot .btn:last-child { flex: 1; }
.sheet-foot .btn-dark, .modal-foot .btn-dark { background: var(--text); color: var(--bg); }
.modal { width: calc(100% - 24px); max-width: 460px; border-radius: 24px; }
.modal-card { margin: 12px 0 0; color: var(--muted); }
.modal-card b { color: var(--text); }
.modal-price { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); color: var(--muted); }
.modal-price b { font-size: 28px; font-weight: 800; color: var(--text); }
.money { position: relative; }
.money input { font-size: 32px; font-weight: 800; min-height: 64px; padding-right: 44px; }
.money span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 700; color: var(--text); }
.err { color: var(--alert); min-height: 1.4em; margin: 8px 0 0; font-weight: 600; font-size: 15px; }
.warn { font-weight: 600; color: var(--warn); }
.viewer { width: 100%; height: 100%; max-width: none; max-height: none; background: var(--bg); }
.viewer-inner { height: 100%; display: flex; flex-direction: column; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.viewer-switch { display: flex; gap: 8px; }
.viewer-img { flex: 1; min-height: 0; padding-top: 12px; }
.viewer-img .ph { height: 100%; aspect-ratio: auto; }

/* Notification --------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, calc(100% + 60px)); visibility: hidden;
  width: calc(100% - 32px); max-width: 520px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--text); color: var(--bg); border-radius: 16px; padding: 10px 10px 10px 18px; font-weight: 600; font-size: 15px;
  box-shadow: 0 20px 50px -20px var(--float-shadow); transition: transform .3s var(--ease), visibility 0s .3s; z-index: 50; }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .3s var(--ease); }
.toast-action { flex: none; min-height: 42px; padding: 0 16px; border-radius: var(--r-pill); background: var(--accent-grad); color: var(--accent-ink); font-weight: 800; }

/* Panier ---------------------------------------------------------------- */
#cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 0 16px calc(14px + env(safe-area-inset-bottom, 0px)); pointer-events: none; }
.cartbar { pointer-events: auto; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 20px 0 8px;
  border-radius: var(--r-pill); background: var(--text); color: var(--bg); text-decoration: none; font-weight: 700; font-size: 16px;
  box-shadow: 0 18px 44px -14px var(--float-shadow); }
.cartbar-count { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-grad); color: var(--accent-ink); font-weight: 900; font-size: 16px; }
.cartbar-label { flex: 1; }
.cartbar b { font-weight: 800; font-size: 16px; }
body.has-cartbar #app { padding-bottom: 116px; }
body.has-cartbar .toast { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
.page-title { font-size: clamp(54px, 16vw, 104px); line-height: .84; margin: 6px 0 20px; text-wrap: balance; }
.cart, .stand, .admin-cart { max-width: 760px; }
.row-price { font-size: 20px; font-weight: 700; margin: 6px 0 2px; }
.row-note { margin: 6px 0 2px; font-weight: 600; color: var(--muted); }
.row-off .ph img { opacity: .35; filter: grayscale(1); }
.cart-total { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 14px; padding: 16px 20px 14px; border-radius: 18px; background: var(--surface); color: var(--text); }
.cart-total > span { font-size: 15px; font-weight: 600; color: var(--muted); padding-bottom: 4px; }
.cart-total b { font-size: 48px; line-height: .85; }
.cart-actions { display: flex; flex-direction: column; align-items: stretch; gap: 8px; margin-top: 16px; }
.cart-actions .linkbtn { align-self: center; }
.qr { width: min(240px, 70vw); margin: 4px 0 22px; padding: 14px; background: #fff; border-radius: 18px; }
.qr svg { display: block; width: 100%; height: auto; }
.stand-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.stand-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--surface); }
.stand-ref { font-size: 40px; line-height: .85; }
.stand-player { font-size: 16px; font-weight: 600; }
.stand-price { font-weight: 800; font-size: 20px; }
.refs-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 18px; }
.refs-form .field { flex: 1; margin: 0; }
.refs-form .btn-dark { background: var(--text); color: var(--bg); }
.row-sale { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.money-sm { width: 116px; }
.money-sm input { width: 100%; min-height: 46px; border-radius: var(--r-ui); background: var(--surface-2); padding: 0 32px 0 12px; font-size: 20px; font-weight: 800; color: var(--text); }
.money-sm input:focus { outline: none; box-shadow: 0 0 0 2px var(--text); }
.money-sm span { right: 12px; font-size: 16px; }
.lot { margin-top: 8px; }
.lot-list { list-style: none; padding: 0; margin: 12px 0 0; }
.lot-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }

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

/* v9 — profondeur douce, montants façon tableau de bord, raretés -------- */
.tile-media, .chip, .seg, .search-input, .info, .flag, .detail-priceline, .row, .dash div, .cart-total, .stand-list li,
.stage, .btn:not(.btn-volt), .toggle, select, .field input, .money-sm input, .soldbox, .round-btn { box-shadow: var(--soft-shadow); }
.chip[aria-pressed="true"], .seg[aria-pressed="true"], .chip.chip-more:not([aria-pressed="true"]) { box-shadow: none; }
.actionrow .btn-dark { box-shadow: 0 14px 30px -14px var(--accent-glow); }
.tile-media { border-radius: 18px; }
.stage { border-radius: 26px; clip-path: inset(0 round 26px); -webkit-clip-path: inset(0 round 26px); box-shadow: none; }

/* Montant : chiffre en grand, unité en petit (comme « 74.4 Kg ») */
.amt { font-variant-numeric: tabular-nums; }
.cur { font-size: .5em; font-weight: 700; font-stretch: 100%; margin-left: .14em; color: var(--muted); }
.tile-price .cur { font-size: .7em; }
.detail-price .cur, .cart-total b .cur, .dash b .cur { font-size: .42em; }
.dash .dash-alert .cur { color: var(--inv-muted); }

/* En-tête : bouton rond du panier avec pastille */
.top-right { display: flex; align-items: center; gap: 12px; }
.round-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); color: var(--text); display: flex; align-items: center; justify-content: center; text-decoration: none; }
.round-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); background: var(--accent-grad); color: var(--accent-ink);
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px -4px var(--accent-glow); }
.badge[hidden] { display: none; }

/* Rangée « Les raretés » : encart en verre, compact, distinct de la grille */
.rail { position: relative; margin: 24px 0 8px; padding: 16px 0 6px; border-radius: 24px; isolation: isolate; overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .42));
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 1px 2px rgba(17, 17, 17, .05), 0 18px 40px -22px rgba(17, 17, 17, .28); }
.rail::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 90% at 0% 0%, var(--accent-wash), transparent 70%), radial-gradient(50% 80% at 100% 100%, rgba(138, 77, 255, .10), transparent 70%); }
:root[data-app-theme="dark"] .rail { background: linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04)); }
.rail-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 16px; }
.rail-title { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.rail-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-grad); box-shadow: 0 0 0 4px var(--accent-wash); }
.rail-count { font-size: 13px; color: var(--muted); }
.rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: 36%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px;
  padding: 12px 16px 12px; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track .tile { scroll-snap-align: start; }
.rail-track .tile-media { border-radius: 14px; box-shadow: none; }
.rail-track .tile-add { width: 34px; height: 34px; font-size: 19px; top: 6px; right: 6px; }
.rail-track .tags { right: 44px; }
.rail-track .tag { font-size: 11px; padding: 2px 7px; }
.rail-track .tile-body { padding-top: 8px; }
.rail-track .tile-player { font-size: 14px; }
.rail-track .tile-meta { display: none; }
.rail-track .tile-price { font-size: 16px; margin-top: 4px; }
@media (min-width: 640px) { .rail-track { grid-auto-columns: 22%; } }
@media (min-width: 980px) { .rail-track { grid-auto-columns: 15%; } }

/* Tri ------------------------------------------------------------------ */
.resultline { align-items: center; gap: 12px; }
.result-tools { display: flex; align-items: center; gap: 16px; }
.sort { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.sort > span { font-weight: 500; }
select.sort-select { width: auto; min-height: 40px; padding: 0 18px 0 0; border-radius: 0; background: transparent no-repeat right center / 10px 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23707072' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-appearance: none; appearance: none; box-shadow: none; font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer; }
select.sort-select:focus { box-shadow: none; outline: none; }
select.sort-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sort.is-active select.sort-select { color: var(--accent); }

/* Panier : code, récapitulatif, remise, offre ------------------------------ */
.cart-code { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; margin: 0 0 14px; padding: 14px 18px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--soft-shadow); }
.cart-code span { font-size: 13px; color: var(--muted); font-weight: 600; }
.cart-code b { grid-row: span 2; font-stretch: 62%; font-weight: 900; font-size: 40px; line-height: 1; letter-spacing: .02em; color: var(--accent); }
.cart-code small { font-size: 13px; color: var(--muted); }
.cart-code-big b { font-size: 56px; }
.summary { margin-top: 14px; padding: 16px 20px; border-radius: 18px; background: var(--surface); box-shadow: var(--soft-shadow); }
.sum-row > span { min-width: 0; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 3px 0; color: var(--muted); }
.sum-row .strike, .strike { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.sum-discount { color: var(--accent); font-weight: 700; }
.sum-final { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 8px; padding-top: 10px; box-shadow: inset 0 1px 0 var(--surface-3); }
.sum-final > span { font-size: 15px; font-weight: 700; }
.sum-final b { font-stretch: 62%; font-weight: 900; font-size: 44px; line-height: .85; }
.sum-offer { color: var(--text); font-weight: 700; }
.tier-hint { margin: 10px 2px 0; font-size: 14px; color: var(--muted); }
.tier-hint b { color: var(--text); }
.offer { margin-top: 16px; }
.offer-row { display: flex; gap: 8px; }
.offer-row .money { flex: 1; }
.offer-row .money input { min-height: 54px; font-size: 24px; }
.offer-row .btn-dark { background: var(--text); color: var(--bg); min-height: 54px; }
.offer-sent { margin: 0; font-size: 16px; }
.offer-actions { display: flex; gap: 18px; }
.offer .err:empty { display: none; }
.notice { margin: 0 0 14px; padding: 12px 16px; border-radius: 16px; background: rgba(52, 209, 122, .14); font-size: 15px; }
.section-title { font-size: 20px; font-weight: 800; margin: 22px 0 10px; letter-spacing: -0.01em; }
.hint.small { font-size: 13px; }

/* Admin : paniers en cours ------------------------------------------------- */
.carts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cart-card { display: block; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--soft-shadow); text-decoration: none; }
.cc-head { display: flex; justify-content: space-between; align-items: baseline; }
.cc-code { font-stretch: 62%; font-weight: 900; font-size: 34px; line-height: 1; color: var(--accent); letter-spacing: .02em; }
.cc-time { font-size: 13px; color: var(--muted); }
.cc-thumbs { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.cc-thumbs .ph { width: 44px; aspect-ratio: 5 / 7; border-radius: 6px; background: var(--surface-3); }
.cc-more { font-size: 13px; font-weight: 700; color: var(--muted); padding-left: 4px; }
.cc-names { margin-top: 8px; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-totals { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.cc-totals b { font-size: 20px; color: var(--text); }
.cc-rate { color: var(--accent); font-weight: 700; }
.cc-offer { margin-top: 6px; font-size: 14px; }
.cc-offer b { color: var(--accent); }
.admin-carts .refs-form { margin-top: 22px; }
.admin-cart .back { margin-bottom: 8px; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.quick .chip { min-height: 38px; font-size: 14px; }
.chip.chip-offer { background: var(--accent-wash); }

/* Admin : stats --------------------------------------------------------------- */
.dash-stats { margin-top: 14px; }
.stat-line { display: flex; justify-content: space-between; margin-top: 6px; font-size: 14px; color: var(--muted); }
.stat-line b { color: var(--text); font-size: 18px; }
