/* Pages Collection et Boutique */
.view-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.view-scroll.active { display: block; }
body.modal-open { overflow: hidden; }
.page { width: 100%; max-width: 1100px; margin: 0 auto; padding: 22px 18px 48px; }
.page-head h2 { margin: 0; font-family: var(--font-display); font-size: 36px; font-weight: 600; line-height: 1.05; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Collection ---------- */
.rar-bar { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 12px; }
.rar-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: var(--radius-pill); cursor: pointer;
  background: rgba(20, 24, 43, .7); box-shadow: inset 0 0 0 1px var(--night-line-2); color: var(--paper-2); font-size: 13px;
  transition: box-shadow .15s, background .15s, transform .12s;
}
.rar-chip:hover { box-shadow: inset 0 0 0 1px var(--gold-500); }
.rar-chip.on { background: rgba(226, 190, 106, .14); box-shadow: inset 0 0 0 1.5px var(--gold-400); }
.rar-chip:active { transform: scale(.97); }
.rar-chip:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }
.rar-chip .rar-name { display: none; }
.rar-chip b { font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--gold-300); }
@media (min-width: 560px) { .rar-chip .rar-name { display: inline; } }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.field { display: block; flex: 1 1 160px; }
.field.search { flex: 2 1 240px; }
.field input, .field select {
  width: 100%; height: 42px; padding: 0 14px; border-radius: 12px; border: 0; color: var(--paper-2); font: inherit; font-size: 15px;
  background: rgba(20, 24, 43, .8); box-shadow: inset 0 0 0 1px var(--night-line-2); appearance: none; -webkit-appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 18px, calc(100% - 14px) 18px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
.field select option { background: var(--night-800); }
.field input::placeholder { color: var(--muted); }
.field input:focus-visible, .field select:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 1px; }

.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; --s: .5; }
.cell {
  position: relative; aspect-ratio: 300 / 440; cursor: pointer; border-radius: 14px;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1);
}
.cell:hover { transform: translateY(-4px) scale(1.02); z-index: 2; }
.cell:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 4px; }
.tile-scale { position: absolute; left: 0; top: 0; width: 300px; height: 440px; transform: scale(var(--s, .5)); transform-origin: 0 0; pointer-events: none; }
.dup {
  position: absolute; left: -6px; top: -6px; z-index: 3; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 99px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--night-800); background: var(--btn-gold); box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.empty { text-align: center; padding: 56px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty[hidden] { display: none; }
.empty-ico { width: 84px; height: 84px; background: url(../assets/wc-piece-violet.svg) center / contain no-repeat; opacity: .9; }
.empty h3 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 600; }
.empty p { margin: 0; color: var(--muted); max-width: 36ch; }
.empty .btn { flex: none; height: 48px; padding: 0 26px; margin-top: 8px; }

/* fiche d'une carte */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(5, 6, 12, .8); backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.modal-card {
  position: relative; width: min(860px, 100%); max-height: 100%; overflow-y: auto; padding: 28px; border-radius: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  background: radial-gradient(circle at 30% 20%, var(--night-600), var(--night-800) 70%); box-shadow: inset 0 0 0 1px var(--night-line-2), 0 30px 80px rgba(0, 0, 0, .6);
}
@media (min-width: 720px) { .modal-card { flex-direction: row; align-items: center; gap: 36px; padding: 34px; } }
.modal-x { position: absolute; right: 12px; top: 8px; width: 40px; height: 40px; border: 0; background: none; color: var(--muted); font-size: 30px; cursor: pointer; border-radius: 50%; }
.modal-x:hover { color: var(--paper-2); }
.modal-art { position: relative; flex: none; width: calc(300px * var(--s, 1)); height: calc(440px * var(--s, 1)); }
.modal-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rar-tag { align-self: flex-start; padding: 3px 12px; border-radius: 6px; color: var(--ink); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.modal-info h3 { margin: 2px 0 0; font-family: var(--font-display); font-size: 36px; font-weight: 700; line-height: 1.05; }
.mcat { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mcat b { color: var(--gold-400); font-weight: 500; }
.mdesc { margin: 4px 0; color: var(--paper-2); line-height: 1.45; }
.modal-info dl { display: grid; grid-template-columns: repeat(3, auto); gap: 6px 22px; margin: 6px 0 4px; justify-content: start; }
.modal-info dt { font-size: 12px; color: var(--muted); }
.modal-info dd { margin: 2px 0 0; font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.modal-actions .btn { flex: none; height: 48px; font-size: 16px; text-decoration: none; }
.modal-nav button {
  position: fixed; top: 50%; width: 44px; height: 64px; margin-top: -32px; border: 0; border-radius: 12px; cursor: pointer; font-size: 34px; line-height: 1;
  color: var(--paper-2); background: rgba(20, 24, 43, .75); box-shadow: inset 0 0 0 1px var(--night-line-2);
}
.modal-nav button:hover { box-shadow: inset 0 0 0 1px var(--gold-500); color: var(--gold-300); }
.modal-nav button:first-child { left: 10px; } .modal-nav button:last-child { right: 10px; }
@media (min-width: 980px) { .modal-nav button:first-child { left: calc(50% - 470px); } .modal-nav button:last-child { right: calc(50% - 470px); } }

/* ---------- Boutique ---------- */
.shop-free {
  display: flex; align-items: center; gap: 14px; margin: 20px 0 6px; padding: 12px 16px; border-radius: 16px; color: inherit; text-decoration: none;
  background: linear-gradient(90deg, rgba(226, 190, 106, .12), rgba(20, 24, 43, .6)); box-shadow: inset 0 0 0 1px var(--gold-500);
  transition: filter .2s;
}
.shop-free:hover { filter: brightness(1.12); text-decoration: none; }
.sf-pips { display: flex; gap: 4px; }
.sf-pips .pip { width: 11px; height: 16px; border-radius: 3px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--night-line-2); }
.sf-pips .pip.on { background: linear-gradient(180deg, #F2D283, #C9A24A); box-shadow: inset 0 0 0 1px var(--gold-500), 0 0 8px rgba(226, 190, 106, .4); }
.sf-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sf-txt b { font-size: 15px; color: var(--paper-2); }
.sf-txt i { font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.sf-go { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--gold-400); white-space: nowrap; }

/* emballage de la boutique (design) : dessiné à sa vraie taille (pas de zoom, donc net) ; --u = largeur / 110 px ; variables de couleur posées par JS */
.pk { --u: 1; position: relative; flex: none; width: calc(110px * var(--u)); height: calc(174px * var(--u)); border-radius: calc(7px * var(--u)); overflow: hidden; background: var(--bodybg); box-shadow: inset 0 0 0 1px var(--ring, #C9A24A), 0 0 22px -4px var(--glowc, transparent), 0 12px 20px -8px rgba(0, 0, 0, .7); }
.pk .jig { position: absolute; inset: 0; background: var(--jig) 0 0 / calc(22px * var(--u)) calc(22px * var(--u)); }
.pk .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(40,30,70,.3), transparent 14%, transparent 86%, rgba(40,30,70,.3)); }
.pk .shine { position: absolute; inset: 0; background: var(--shine, none); }
.pk .ed { position: absolute; left: 0; right: 0; height: calc(9px * var(--u)); background: var(--edge, repeating-linear-gradient(90deg, #E2BE6A 0 3px, #6E521A 3px 6px)); }
.pk .ed.t { top: 0; } .pk .ed.b { bottom: 0; }
.pk .lab { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: calc(26px * var(--u)); color: var(--txt); text-shadow: 0 0 6px var(--halo), 0 0 2px var(--halo); }
.pk .lab em { height: calc(10px * var(--u)); font-family: var(--font-mono); font-style: normal; font-size: calc(7.5px * var(--u)); font-weight: 500; letter-spacing: .12em; color: var(--lab, var(--txt)); }
.pk .lab b { font-family: var(--font-display); font-size: calc(21px * var(--u)); font-weight: 700; line-height: 1.1; }
.pk .lab .tg { margin-top: calc(4px * var(--u)); font-family: var(--font-display); font-style: italic; font-size: calc(7px * var(--u)); }
.pk .lab strong { margin-top: calc(28px * var(--u)); font-family: var(--font-display); font-size: calc(34px * var(--u)); font-weight: 700; line-height: .8; }
.pk .lab i { font-family: var(--font-display); font-style: italic; font-size: calc(11px * var(--u)); }
.pk[data-k="mega"] { --bodybg: linear-gradient(135deg, #FBE7A6, #E2BE6A 40%, #F3D27A 65%, #C9A24A); --ring: #FFF1C2; --glowc: rgba(243,210,122,.55); --halo: #FFF4D0; }
.pk[data-k="prestige"] { --bodybg: linear-gradient(135deg, #FFF0F7, #EAF6FF 30%, #F1ECFF 55%, #FFF9E6 80%, #EFFFF7); --ring: #C2A8FF; --glowc: rgba(217,184,255,.7); --edge: repeating-linear-gradient(90deg, #FFD6E8 0 3px, #B8E6FF 3px 6px, #D9C8FF 6px 9px, #FFF0B8 9px 12px); --shine: linear-gradient(115deg, transparent 18%, rgba(255,170,220,.28) 28%, rgba(170,220,255,.32) 36%, rgba(200,180,255,.28) 44%, transparent 60%); }
.pk[data-k="prestige"] .lab b.pb { background: linear-gradient(90deg, #C2367A, #3B6FD9 35%, #7A4FD0 60%, #C98A1C); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.pk.hero .lab em { color: #3B1E7A; }
.pk.sc { --u: 1; }
.pk.sp { --u: .873; }
.pk.hero { --u: 1.02; }

/* ---------- Boutique (design) ---------- */
#shopRoot { max-width: 1280px; position: relative; }
#shopRoot::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 360px; pointer-events: none; background: url(../assets/puzzle-jig-seam-violet.svg) 0 0 / 52px 52px; opacity: .16; -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }
.shop2 { position: relative; }
.shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.head-note { display: none; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--muted); padding-bottom: 6px; }
@media (min-width: 700px) { .head-note { display: block; } }
.shop2 { display: block; }
.shop-main { min-width: 0; display: flex; flex-direction: column; }
.shop-free { margin: 16px 0 0; }
.shop-sub { margin: 26px 0 12px; font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.shop-note { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

.pill-price, .gold-pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 14px; }
.pill-price { height: 34px; padding: 0 12px; border-radius: 17px; background: var(--night-900); box-shadow: inset 0 0 0 1px var(--gold-500); color: var(--paper-2); }
.pill-price .coin, .gold-pill .coin, .buy-btn .coin { display: inline-block; width: 15px; height: 15px; background: url(../assets/wc-piece-gold.svg) center / contain no-repeat; }
.gold-pill { height: 40px; padding: 0 16px; border-radius: 20px; background: var(--btn-gold); color: var(--night-800); font-weight: 500; }
.gold-pill .coin { filter: brightness(.4); width: 18px; height: 18px; }
.g-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 5px; background: var(--night-line); color: #14161C; font-family: var(--font-mono); font-size: 11px; font-weight: 500; white-space: nowrap; }
.g-tag:not([style*="background"]) { color: var(--muted); }
.is-lot .g-tag { background: linear-gradient(135deg, #FBE7A6, #C9A24A 50%, #F3D27A); color: #14161C; }

/* à la une */
.shop-hero {
  position: relative; margin-top: 18px; padding: 22px 18px; border-radius: 22px; cursor: pointer; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center;
  background: radial-gradient(circle at 18% 50%, rgba(217, 184, 255, .28), transparent 55%), linear-gradient(160deg, #1C1A3A, #141830);
  box-shadow: inset 0 0 0 1px #3A3870; transition: box-shadow .2s;
}
.shop-hero:hover, .shop-hero.on { box-shadow: inset 0 0 0 1.5px var(--gold-500); }
.shop-hero:focus-visible, .shop-card:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; padding: 10px; }
.hero-art .pk { transform: rotate(-4deg); }
.hero-glow { position: absolute; inset: 0; border-radius: 28px; filter: blur(20px); background: conic-gradient(from 0deg, rgba(255, 150, 210, .45), rgba(140, 210, 255, .45), rgba(190, 160, 255, .45), rgba(255, 230, 140, .45), rgba(150, 255, 210, .45), rgba(255, 150, 210, .45)); }
.hero-txt { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hero-kick { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: #D9C8FF; }
.hero-txt h3 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 700; line-height: 1; }
.hero-txt p { margin: 0; font-size: 14px; line-height: 1.4; color: #CFC6B0; max-width: 46ch; }
.hero-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
@media (min-width: 700px) {
  .shop-hero { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; padding: 26px 36px 26px 28px; }
  .pk.hero { --u: 1.49; }
  .hero-txt h3 { font-size: 42px; }
  .hero-txt p { font-size: 16px; }
}

/* cartes des boosters */
.shop-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .shop-cards { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; } }
.shop-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 12px 14px; border-radius: 18px; cursor: pointer;
  background: #151A30; box-shadow: inset 0 0 0 1px #262B45; transition: box-shadow .2s, transform .15s;
}
.shop-card:hover { box-shadow: inset 0 0 0 1px var(--gold-500); }
.shop-card.on { background: #1A1F38; box-shadow: inset 0 0 0 1.5px var(--gold-500), 0 0 0 4px rgba(201, 162, 74, .12); }
.shop-card:active { transform: scale(.985); }
.sc-art { position: relative; display: flex; justify-content: center; }
.sc-txt { text-align: center; display: flex; flex-direction: column; gap: 3px; }
.sc-txt h4 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 700; line-height: 1.05; text-wrap: balance; }
.sc-txt p { margin: 0; font-size: 13px; color: var(--muted); }
.sc-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: auto; }
.sc-stock { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 99px; font-family: var(--font-mono); font-size: 10.5px; color: var(--gold-300); background: rgba(11, 13, 24, .75); box-shadow: inset 0 0 0 1px var(--gold-500); }
.lot-qty {
  position: absolute; right: -8px; top: -8px; min-width: 34px; height: 26px; padding: 0 8px; border-radius: 99px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--night-800); background: var(--btn-gold); box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

/* fiche d'achat : feuille en bas sur mobile, panneau fixe à droite sur grand écran */
.shop-panel { display: none; }
.shop-panel.open {
  display: flex; position: fixed; inset: 0; z-index: 70; align-items: flex-end; justify-content: center;
  background: rgba(6, 8, 16, .78); backdrop-filter: blur(6px);
}
.sp-inner {
  width: min(560px, 100%); max-height: 92%; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 16px;
  padding: 22px 22px calc(26px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #151A30; border-top: 1px solid var(--night-line);
  animation: sheet-up .25s cubic-bezier(.2, .8, .2, 1);
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sp-inner::before { content: ''; width: 40px; height: 4px; border-radius: 2px; background: var(--night-line-2); align-self: center; flex: none; margin-top: -8px; }
@media (min-width: 1000px) {
  .shop2 { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; align-items: start; }
  .shop-panel.open { display: block; position: sticky; top: 8px; z-index: 1; inset: auto; background: none; backdrop-filter: none; }
  .sp-inner { width: auto; max-height: calc(100dvh - var(--header-h) - 40px); border-radius: 22px; border: 0; background: #131729; box-shadow: inset 0 0 0 1px #232842; animation: none; min-height: 520px; }
  .sp-inner::before { display: none; }
}
.sp-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.sp-title h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1; text-wrap: balance; }
.sp-title p { margin: 0; font-size: 14px; line-height: 1.4; color: #CFC6B0; }
.lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.sp-sec { display: flex; flex-direction: column; gap: 8px; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip { height: 36px; padding: 0 14px; border-radius: 18px; border: 0; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15px; font-weight: 500; color: #CFC6B0; background: #181D33; box-shadow: inset 0 0 0 1px var(--night-line); }
.cat-chip i { width: 8px; height: 8px; border-radius: 50%; }
.cat-chip.on { background: var(--paper-2); color: var(--night-800); box-shadow: none; }
.sp-rates { display: flex; flex-direction: column; gap: 9px; padding: 15px 17px; border-radius: 14px; background: var(--night-900); box-shadow: inset 0 0 0 1px #262B45; }
.lbl-row { display: flex; justify-content: space-between; gap: 8px; }
.rate { display: grid; grid-template-columns: 98px minmax(0, 1fr) 46px; gap: 10px; align-items: center; }
.rate b { font-size: 14px; }
.rate .bar { height: 6px; border-radius: 3px; background: #1E2338; overflow: hidden; }
.rate .bar i { display: block; height: 100%; border-radius: 3px; transition: width .3s; }
.rate em { font-style: normal; font-family: var(--font-mono); font-size: 13px; text-align: right; }
.sp-qty { display: flex; justify-content: space-between; align-items: center; }
.sp-qty > div { display: flex; gap: 6px; }
.qty { width: 54px; height: 40px; border-radius: 10px; border: 0; cursor: pointer; font-family: var(--font-mono); font-size: 14px; color: #CFC6B0; background: #181D33; box-shadow: inset 0 0 0 1px var(--night-line); }
.qty.on { background: var(--paper-2); color: var(--night-800); box-shadow: none; }
.sp-buy { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sp-buy small { text-align: center; font-size: 13px; color: var(--muted); }
.sp-stock { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--gold-300); }
.linkish { background: none; border: 0; cursor: pointer; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--gold-400); }
.linkish:hover { color: var(--paper-2); }
.buy-btn { height: 56px; border: 0; border-radius: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--night-800); background: var(--btn-gold); transition: filter .15s, transform .12s; }
.buy-btn:hover:not(:disabled) { filter: brightness(1.08); }
.buy-btn:active:not(:disabled) { transform: scale(.985); }
.buy-btn b { font-size: 17px; font-weight: 700; }
.buy-btn span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 15px; }
.buy-btn .coin { filter: brightness(.4); }
.buy-btn.no { cursor: not-allowed; background: #1E2338; color: #8C8699; box-shadow: inset 0 0 0 1px var(--night-line); }
.buy-btn.no .coin { filter: none; opacity: .5; }
.sp-done { flex: 1; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 12px; text-align: center; padding: 18px 0 6px; }
.sp-done h3 { margin: 0; font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1.05; text-wrap: balance; }
.sp-done p { margin: 0 0 10px; color: var(--muted); }
.sp-done .btn { flex: none; height: 54px; font-size: 17px; }
.sp-coin { width: 68px; height: 68px; margin: 0 auto 4px; background: url(../assets/wc-piece-gold.svg) center / contain no-repeat; }

/* ---------- Connexion / inscription ---------- */
body.auth-open { overflow: hidden; }
.auth {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
  background: radial-gradient(circle at 50% 25%, var(--night-600), var(--night-900) 70%);
}
.auth[hidden] { display: none; }
.auth-card { width: min(420px, 100%); margin: auto; padding: 30px 26px 26px; border-radius: 24px; background: rgba(20, 24, 43, .88); box-shadow: inset 0 0 0 1px var(--night-line-2), 0 30px 80px rgba(0, 0, 0, .55); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1; }
.auth-brand img { width: 42px; height: 42px; }
.auth-tag { margin: 8px 0 22px; text-align: center; font-family: var(--font-display); font-style: italic; font-size: 18px; color: var(--gold-400); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .3); margin-bottom: 18px; }
.auth-tabs button { height: 40px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 700 15px var(--font-body); cursor: pointer; transition: background .15s, color .15s; }
.auth-tabs button[aria-selected="true"] { background: var(--btn-gold); color: var(--night-800); }
.auth-tabs button:not([aria-selected="true"]):hover { color: var(--paper-2); }
.af { display: block; margin-bottom: 12px; }
.af span { display: block; margin-bottom: 5px; font-size: 13px; color: var(--muted); }
.af input { width: 100%; height: 46px; padding: 0 14px; border: 0; border-radius: 12px; color: var(--paper-2); font: inherit; font-size: 16px; background: rgba(0, 0, 0, .32); box-shadow: inset 0 0 0 1px var(--night-line-2); }
.af input::placeholder { color: #6E7490; }
.af input:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 1px; }
.auth-msg { min-height: 20px; margin: 4px 0 10px; font-size: 14px; line-height: 1.35; }
.auth-msg.err { color: var(--wine-soft); }
.auth-msg.ok { color: var(--gold-300); }
.auth-go { width: 100%; height: 50px; flex: none; font-size: 17px; }
.auth-note { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- Profil ---------- */
.profile-card { display: flex; align-items: center; gap: 18px; margin: 22px 0 16px; padding: 20px; border-radius: 18px; background: linear-gradient(180deg, rgba(38, 45, 82, .55), rgba(20, 24, 43, .85)); box-shadow: inset 0 0 0 1px var(--night-line); }
.avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--night-800); background: var(--btn-gold); box-shadow: 0 6px 16px -6px rgba(226, 190, 106, .7); }
.who h3 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.1; }
.who p { margin: 3px 0 0; color: var(--muted); font-size: 14px; word-break: break-all; }
.who .since { font-size: 13px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { padding: 16px; border-radius: 16px; background: rgba(20, 24, 43, .7); box-shadow: inset 0 0 0 1px var(--night-line); display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--gold-300); line-height: 1; }
.stat span { font-size: 13px; color: var(--muted); }
.logout { flex: none; height: 48px; padding: 0 26px; font-size: 16px; }
