/* ==========================================================================
   Booster Club — style "album papier / stickers"
   ========================================================================== */
:root {
  --paper: #f3ead7;
  --paper-2: #fbf7ee;
  --paper-3: #e8dcc3;
  --ink: #221d17;
  --ink-2: #5f5546;
  --ink-3: #8f8473;
  --accent: #ff5a36;
  --accent-2: #e5431f;
  --yellow: #ffd23f;
  --blue: #3b6fd8;
  --green: #2e9b68;
  --red: #d8433b;
  --b: 2.5px;
  --r: 14px;
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3 { font-weight: 800; line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 0.45em; }
h1 { font-size: clamp(30px, 5.4vw, 44px); }
h2 { font-size: 21px; }
h3 { font-size: 17px; margin-top: 1.4em; }
p { margin: 0 0 0.8em; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
img { max-width: 100%; }
code { font-size: 0.92em; background: var(--paper-3); padding: 1px 6px; border-radius: 6px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 16px 120px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.center { text-align: center; }
.grow { flex: 1 1 200px; }
.lead { font-size: 19px; }
.hl {
  background: linear-gradient(transparent 56%, var(--yellow) 56% 92%, transparent 92%);
  padding: 0 0.08em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hand { font-family: var(--hand); font-weight: 700; font-size: 1.45em; line-height: 1.1; }
.kicker {
  display: inline-block;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 26px;
  color: var(--accent-2);
  transform: rotate(-3deg);
  margin-bottom: 4px;
}
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* --- Barre du haut ------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: var(--paper);
  background-image: var(--grain);
  border-bottom: var(--b) solid var(--ink);
}
.topbar-in {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.logo-text {
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo-mark { position: relative; width: 28px; height: 32px; flex: none; }
.logo-mark::before, .logo-mark::after {
  content: '';
  position: absolute;
  width: 19px;
  height: 26px;
  border: 2px solid var(--ink);
  border-radius: 4px;
}
.logo-mark::before { left: 0; top: 4px; background: var(--yellow); transform: rotate(-12deg); }
.logo-mark::after { right: 0; top: 1px; background: var(--accent); transform: rotate(9deg); }

.mainnav { display: flex; gap: 4px; }
.mainnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: var(--b) solid transparent;
  border-radius: 11px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.mainnav a:hover { border-color: var(--ink); background: var(--paper-2); }
.mainnav a.on { background: var(--yellow); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.mainnav .avatar { border-width: 2px; }

@media (max-width: 760px) {
  .mainnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    justify-content: space-around;
    gap: 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--paper-2);
    border-top: var(--b) solid var(--ink);
  }
  .mainnav a { flex-direction: column; gap: 2px; padding: 5px 8px; font-size: 11.5px; border-width: 2px; }
  .mainnav a .ic { width: 22px; height: 22px; }
  .mainnav a.on { box-shadow: none; }
  .mainnav .avatar { --s: 22px !important; }
}

/* --- Boutons ------------------------------------------------------------ */
.btn {
  --bg: var(--paper-2);
  --fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font: 700 15px/1.2 var(--font);
  color: var(--fg);
  background: var(--bg);
  border: var(--b) solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled, .btn.is-busy { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: 2px 2px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn-primary { --bg: var(--accent); --fg: #fff; }
.btn-yellow { --bg: var(--yellow); }
.btn-danger { --bg: #ffe9e4; --fg: #b42f22; }
.btn-ghost { --bg: transparent; box-shadow: none; }
.btn-ghost:hover { --bg: var(--paper-2); box-shadow: 2px 2px 0 var(--ink); }
.btn-small { padding: 6px 12px; font-size: 14px; border-radius: 10px; border-width: 2px; box-shadow: 2px 2px 0 var(--ink); }
.btn-block { width: 100%; }
.btn small { font-weight: 600; opacity: 0.8; }
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font-weight: 700;
  font-size: 14px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linklike.danger { color: #b42f22; }
.linklike:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Panneaux, formulaires --------------------------------------------- */
.panel {
  background: var(--paper-2);
  border: var(--b) solid var(--ink);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 20px;
}
a.panel { display: block; text-decoration: none; transition: transform 0.12s, box-shadow 0.12s; }
a.panel:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.panel > :last-child { margin-bottom: 0; }
.empty { text-align: center; padding: 32px 20px; }
.empty .hand { font-size: 30px; margin-bottom: 6px; }

.field { display: grid; gap: 6px; margin: 0 0 16px; min-width: 0; }
.field > span, .field > legend { font-weight: 700; font-size: 14.5px; }
.field small { color: var(--ink-2); font-size: 13px; }
fieldset.field { border: 0; padding: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
input:not([type]), input[type='text'], input[type='password'], input[type='number'], input[type='search'],
select, textarea {
  width: 100%;
  font: 500 16px/1.3 var(--font);
  color: var(--ink);
  background: #fffdf8;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}
input[readonly] { background: var(--paper); }
select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23221d17' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
textarea { resize: vertical; min-height: 84px; line-height: 1.4; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
input[type='color'] {
  width: 54px;
  height: 44px;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fffdf8;
  cursor: pointer;
}
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0 0 12px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.check.small { font-size: 14px; font-weight: 600; margin: 0; }
.row-2, .row-3 { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: 1fr 1.4fr 1fr; }
@media (max-width: 560px) {
  .row-2, .row-3 { grid-template-columns: 1fr; }
}
.combo { display: flex; gap: 8px; align-items: center; }
.combo > input[type='number'] { width: 90px; flex: none; }
.combo.wrap { flex-wrap: wrap; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hint { font-family: var(--hand); font-size: 21px; color: var(--accent-2); margin: -4px 0 8px; }

.flash, .alert, .note-box {
  margin: 0 0 22px;
  padding: 12px 16px;
  border: var(--b) solid var(--ink);
  border-radius: 12px;
  background: #dff3e6;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
/* Message de confirmation : bulle flottante, visible même si la page est défilée. */
.flash {
  position: fixed;
  top: 78px;
  left: 50%;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 32px);
  margin: 0;
  transform: translateX(-50%) rotate(-0.6deg);
  cursor: pointer;
  animation: flash-in 0.4s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.flash.out { animation: flash-out 0.3s forwards; }
@keyframes flash-in { from { transform: translateX(-50%) translateY(-14px) rotate(-2deg); opacity: 0; } }
@keyframes flash-out { to { transform: translateX(-50%) translateY(-10px); opacity: 0; } }
@media (max-width: 760px) { .flash { top: 66px; } }
.flash-error, .alert { background: #ffe4de; }
.alert { box-shadow: none; margin-bottom: 16px; }
.note-box { background: #fff6cf; box-shadow: none; font-weight: 500; }
@keyframes drop-in { from { transform: translateY(-10px) rotate(-2deg); opacity: 0; } }

.tag {
  display: inline-block;
  padding: 2px 9px;
  font-size: 12.5px;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-3);
  vertical-align: middle;
  white-space: nowrap;
}
.tag-on { background: #bfe8cf; }
.tag-off { background: #e6ded0; color: var(--ink-2); }
.tag-warn { background: #ffd9a8; }

.bar {
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 8px, #ff7a5c 8px 16px);
  border-right: 2px solid var(--ink);
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar > i[style*='width:0%'] { border-right: 0; }
.bar.big { height: 20px; }
.bar.small { height: 10px; border-width: 1.5px; }
.bar.small > i { border-right-width: 1.5px; }

.tape {
  display: inline-block;
  padding: 5px 18px 6px;
  margin: 0;
  background: rgba(255, 210, 63, 0.88);
  transform: rotate(-1.6deg);
  clip-path: polygon(1.5% 0, 98.5% 0, 100% 18%, 98.6% 38%, 100% 58%, 98.4% 80%, 99.5% 100%, 1% 100%, 0 82%, 1.6% 60%, 0 40%, 1.4% 20%);
}

/* --- Avatars ------------------------------------------------------------ */
.avatar {
  --s: 32px;
  width: var(--s);
  height: var(--s);
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: inline-grid;
  place-items: center;
  object-fit: cover;
  font-weight: 800;
  font-size: calc(var(--s) * 0.46);
  line-height: 1;
  vertical-align: middle;
}

/* --- Toasts ------------------------------------------------------------- */
#toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 300;
  display: grid;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
@media (max-width: 760px) { #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); } }
/* En « popover » (au-dessus des fenêtres ouvertes) : on annule le style par défaut du navigateur. */
#toasts[popover] { top: auto; right: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible; }
.toast {
  padding: 11px 18px;
  border: var(--b) solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper-2);
  font-weight: 700;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25);
  animation: toast-in 0.3s cubic-bezier(0.3, 1.4, 0.5, 1);
  text-align: center;
}
.toast.error { background: #ffe4de; color: var(--ink); }
.toast.out { animation: toast-out 0.25s forwards; }
@keyframes toast-in { from { transform: translateY(16px) scale(0.95); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(10px); opacity: 0; } }

/* --- Connexion / inscription ------------------------------------------- */
.auth {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 18px;
  min-height: calc(100dvh - 190px);
}
.auth-panel { width: min(100%, 460px); }
.auth-panel h1 { font-size: clamp(30px, 7vw, 40px); }
.auth-deco { position: relative; width: 230px; height: 170px; }
.auth-deco .card-back { position: absolute; width: 104px; left: 63px; top: 8px; }
.auth-deco .card-back:nth-child(1) { transform: translate(-58px, 16px) rotate(-17deg); }
.auth-deco .card-back:nth-child(2) { transform: rotate(3deg); z-index: 1; }
.auth-deco .card-back:nth-child(3) { transform: translate(60px, 20px) rotate(19deg); }
.auth .note { text-align: center; margin: 16px 0 0; color: var(--ink-2); font-size: 22px; }
.invite-label { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; background: #fff6cf; border: 2px solid var(--ink); border-radius: 10px; padding: 4px 10px; }
@media (min-width: 900px) {
  .auth { grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
  .auth-deco { width: 380px; height: 320px; justify-self: end; }
  .auth-deco .card-back { width: 180px; left: 100px; top: 20px; }
  .auth-deco .card-back:nth-child(1) { transform: translate(-96px, 26px) rotate(-17deg); }
  .auth-deco .card-back:nth-child(3) { transform: translate(100px, 34px) rotate(19deg); }
  .auth-panel { justify-self: start; }
}

.error-page { display: grid; justify-items: center; text-align: center; gap: 24px; padding: 40px 0; }
.error-card { width: 150px; transform: rotate(-8deg); }
.error-page .lead { max-width: 520px; margin-inline: auto; }

/* --- Accueil ------------------------------------------------------------ */
.hello { margin-bottom: 8px; }
.welcome {
  display: inline-block;
  background: #fff6cf;
  border: 2px solid var(--ink);
  border-radius: 4px 14px 6px 12px;
  padding: 10px 16px;
  font-weight: 600;
  transform: rotate(-0.6deg);
  box-shadow: 3px 3px 0 var(--ink);
  max-width: 640px;
}

.shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px 56px;
  margin: 32px 0 48px;
}
.booster {
  width: min(100%, 280px);
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 16px;
  text-align: center;
}
.booster-pack {
  position: relative;
  width: min(196px, 56vw);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: rotate(-3deg);
  transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1), filter 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.booster:nth-child(even) .booster-pack { transform: rotate(2.5deg); }
.booster.is-ready .booster-pack:hover { transform: rotate(0deg) translateY(-8px) scale(1.04); }
.booster:not(.is-ready) .booster-pack { cursor: default; filter: saturate(0.35) brightness(0.96); }
.booster-pack:focus-visible { outline: 3px solid var(--blue); outline-offset: 8px; border-radius: 6px; }
.ready-badge {
  position: absolute;
  top: 9%;
  right: -16px;
  z-index: 2;
  padding: 5px 12px;
  border: var(--b) solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(12deg);
  display: none;
}
.booster.is-ready .ready-badge { display: block; animation: badge-bob 2.6s ease-in-out infinite; }
@keyframes badge-bob {
  0%, 100% { transform: rotate(12deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-4px); }
}
.booster-info { display: grid; justify-items: center; gap: 8px; }
.booster-info h2 { margin: 0; font-size: 22px; }
.booster-info p { margin: 0; max-width: 280px; }
.stock { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 22px; }
.stock i {
  width: 13px;
  height: 19px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: transparent;
  transform: rotate(-4deg);
}
.stock i.full { background: var(--accent); }
.stock .bonus { font-weight: 800; font-size: 14px; padding: 1px 8px; border-radius: 999px; background: var(--yellow); border: 2px solid var(--ink); margin-left: 4px; }
.timer { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; min-height: 22px; }
.timer.ready { color: var(--green); }

.home-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); align-items: start; }
.big-num { margin: 0 0 10px; }
.big-num b { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; }
.big-num span { color: var(--ink-2); font-weight: 600; }
.progress-panel .bar { margin-bottom: 10px; }
.sparkle-panel h2 { display: flex; gap: 8px; align-items: center; }
.sparkle-panel h2 .ic { color: #d79b00; }
.sparkle-panel .gain { color: var(--accent-2); }
.shop { margin-top: 16px; border-top: 2px dashed var(--ink-3); padding-top: 12px; display: grid; gap: 8px; }
.shop-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }

/* --- Album -------------------------------------------------------------- */
.album-head { display: grid; gap: 14px; margin-bottom: 22px; }
.album-title { display: flex; align-items: center; gap: 14px; }
.album-title h1 { margin-bottom: 4px; }
.album-title p { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.chip.on { background: var(--ink); color: var(--paper-2); }
.chip-rarity i {
  width: 10px;
  height: 10px;
  background: var(--rc);
  border: 1.5px solid var(--ink);
  transform: rotate(45deg);
}
.chip-rarity.on { background: var(--rc); color: var(--ink); }
.chip-rarity.on i { background: var(--paper-2); }

.album-collection { margin-bottom: 44px; }
.collection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.collection-head h2 { font-size: 22px; }
.collection-count { font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.collection-count b { color: var(--ink); font-size: 20px; }
.collection-desc { margin: 8px 0 0; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 22px 18px;
  margin-top: 18px;
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
}
.slot { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.slot.owned { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.slot.owned .card-in { transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1); }
.slot.owned:hover .card-in { transform: translateY(-5px) rotate(-1.5deg); }
.slot.owned:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; border-radius: 8px; }
.slot .count {
  position: absolute;
  top: -9px;
  right: -7px;
  z-index: 2;
  min-width: 34px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font-weight: 800;
  font-size: 13.5px;
  text-align: center;
  transform: rotate(8deg);
  box-shadow: 2px 2px 0 var(--ink);
}
.slot.missing {
  aspect-ratio: 63 / 88;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border: 2.5px dashed rgba(34, 29, 23, 0.32);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.28);
  color: rgba(34, 29, 23, 0.45);
}
.slot-num { font-weight: 800; font-size: clamp(14px, 3.4vw, 19px); letter-spacing: 0.02em; }
.slot-pips { display: flex; gap: 5px; }
.slot-pips i {
  width: 8px;
  height: 8px;
  background: var(--rc);
  opacity: 0.55;
  border: 1.5px solid rgba(34, 29, 23, 0.5);
  transform: rotate(45deg);
}
/* Pastille « versions proposées » (crayon + nombre) */
.slot .props {
  position: absolute;
  left: -7px;
  bottom: -8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px 2px 6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  font-size: 12.5px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-6deg);
}
.slot .props b { font-weight: 800; }
.slot .props .ic { width: 13px; height: 13px; }
.slot.is-hidden { display: none; }
.album-collection.is-hidden { display: none; }
.empty-filter { text-align: center; font-size: 18px; padding: 30px 0; }

/* Fenêtre carte zoomée */
.card-modal {
  width: min(94vw, 760px);
  max-height: 94dvh;
  padding: 26px;
  border: var(--b) solid var(--ink);
  border-radius: 18px;
  background: var(--paper-2);
  box-shadow: 6px 6px 0 var(--ink);
  color: var(--ink);
  overflow: auto;
}
.card-modal[open] { display: grid; grid-template-columns: minmax(0, 330px) 1fr; gap: 26px; align-items: center; animation: modal-in 0.3s cubic-bezier(0.3, 1.3, 0.5, 1); }
.card-modal::backdrop { background: rgba(27, 23, 19, 0.72); backdrop-filter: blur(3px); }
@keyframes modal-in { from { transform: scale(0.92) rotate(-1deg); opacity: 0; } }
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-2);
  cursor: pointer;
  z-index: 2;
}
.modal-stage { min-width: 0; }
.modal-cardbox { position: relative; width: 100%; max-width: 330px; margin: 0 auto; touch-action: pan-y; }
.modal-card { width: 100%; }
.modal-info h2 { font-size: 26px; }
.modal-count { font-weight: 800; font-size: 20px; margin-bottom: 4px; }
.modal-actions { display: grid; gap: 10px; margin-top: 18px; justify-items: start; }

/* Versions proposées : flèches collées sur les bords de la carte, auteur, likes, points */
.ver-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: var(--b) solid var(--ink);
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s cubic-bezier(0.3, 1.4, 0.5, 1), background-color 0.15s;
}
.ver-nav.prev { left: -22px; }
.ver-nav.next { right: -22px; }
.ver-nav:hover { background: var(--yellow); transform: scale(1.08); }
.ver-nav:active { transform: scale(0.94); box-shadow: 0 0 0 var(--ink); }
.ver-nav:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ver-nav .ic { width: 22px; height: 22px; stroke-width: 2.6; }
.ver-bar { display: grid; justify-items: center; gap: 8px; margin-top: 14px; }
.ver-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; min-height: 34px; }
.ver-who { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin: 0; font-weight: 600; text-align: center; }
.ver-who b { font-weight: 800; }
.ver-author, .ver-credit { display: inline-flex; align-items: center; gap: 7px; }
.ver-tag { font-family: var(--hand); font-weight: 700; font-size: 24px; line-height: 1; color: var(--accent-2); transform: rotate(-2deg); }
.ver-credit { font-size: 14px; color: var(--ink-2); }
.ver-credit b { color: var(--ink); }
.ver-like {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  font-weight: 800;
  font-size: 15px;
  box-shadow: 2px 2px 0 var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s;
}
.ver-like:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.ver-like:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.ver-like:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ver-like .ic { width: 18px; height: 18px; color: var(--red); }
.ver-like[aria-pressed='true'] { background: #ffe1da; }
.ver-like[aria-pressed='true'] .ic { fill: currentColor; }
.ver-like:disabled { cursor: default; transform: none; box-shadow: none; background: transparent; border-style: dashed; }
.ver-like.pop .ic { animation: like-pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes like-pop { 40% { transform: scale(1.5); } }
.ver-dots { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; min-height: 13px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.ver-dots i { width: 9px; height: 9px; border: 2px solid var(--ink); border-radius: 50%; opacity: 0.4; transition: opacity 0.2s, background-color 0.2s, transform 0.2s; }
.ver-dots i.on { opacity: 1; background: var(--ink); transform: scale(1.15); }
.ver-dots i.off { border-radius: 1px; transform: rotate(45deg) scale(0.9); } /* la version officielle */
.ver-dots i.off.on { transform: rotate(45deg) scale(1.05); }
/* Changement de version : le titre et la description glissent */
.card.ver-in-r .c-head, .card.ver-in-r .c-desc { animation: ver-in-r 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card.ver-in-l .c-head, .card.ver-in-l .c-desc { animation: ver-in-l 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes ver-in-r { from { opacity: 0; transform: translateX(12%); } }
@keyframes ver-in-l { from { opacity: 0; transform: translateX(-12%); } }

@media (max-width: 640px) {
  .card-modal { padding: 58px 16px 22px; }
  .card-modal[open] { grid-template-columns: 1fr; gap: 16px; }
  .modal-cardbox { max-width: min(76vw, 300px); }
  .modal-info { text-align: center; }
  .modal-actions { justify-items: center; }
  .ver-nav { width: 40px; height: 40px; margin-top: -20px; }
  .ver-nav.prev { left: -20px; }
  .ver-nav.next { right: -20px; }
}

/* Fenêtre « Ta version » : aperçu en direct + formulaire */
.prop-editor {
  width: min(94vw, 660px);
  max-height: 94dvh;
  padding: 26px;
  border: var(--b) solid var(--ink);
  border-radius: 18px;
  background: var(--paper-2);
  box-shadow: 6px 6px 0 var(--ink);
  color: var(--ink);
  overflow: auto;
}
.prop-editor[open] {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  animation: modal-in 0.3s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.prop-editor::backdrop { background: rgba(27, 23, 19, 0.6); backdrop-filter: blur(2px); }
.prop-preview { width: 100%; }
.prop-form h2 { margin: 2px 44px 8px 0; font-size: 24px; }
.prop-form .field { margin-bottom: 14px; }
.prop-form .form-actions { margin-top: 4px; }
.prop-error { margin: 0 0 12px; }
.prop-remove { margin: 16px 0 0; }
@media (max-width: 640px) {
  .prop-editor { padding: 18px 16px 20px; }
  .prop-editor[open] { grid-template-columns: 1fr; gap: 14px; }
  .prop-preview { width: min(40vw, 160px); margin: 0 auto; }
  .prop-form h2 { margin-right: 0; text-align: center; }
}

/* --- Classement --------------------------------------------------------- */
.awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 24px 0 30px; }
.award {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px 16px 16px;
  border: var(--b) solid var(--ink);
  border-radius: 14px;
  background: var(--paper-2);
  box-shadow: var(--shadow-sm);
}
.award:nth-child(3n + 1) { transform: rotate(-1deg); }
.award:nth-child(3n + 2) { transform: rotate(0.8deg); }
.award-title {
  justify-self: start;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--yellow);
}
.award-collector .award-title { background: #bfe8cf; }
.award-lucky .award-title { background: #ffe08a; }
.award-unlucky .award-title { background: #d8d0c2; }
.award-hunter .award-title { background: #f7c3a3; }
.award-recycler .award-title { background: #c5d8ff; }
.award-who { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; }
.award-detail { color: var(--ink-2); font-size: 14px; }

.board { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.board-row {
  display: grid;
  grid-template-columns: 44px minmax(150px, 1.2fr) minmax(140px, 1.3fr) minmax(150px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--paper-2);
  border: var(--b) solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.board-row.me { background: #fff6cf; }
.board-row .pos {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-weight: 800;
  font-size: 17px;
  background: var(--paper);
}
.board-row.top1 .pos { background: #f0b429; }
.board-row.top2 .pos { background: #d5d9df; }
.board-row.top3 .pos { background: #e0a173; }
.who { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; text-decoration: none; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who:hover span { text-decoration: underline; }
.prog { display: grid; gap: 4px; }
.prog small { color: var(--ink-2); }
.nums { display: flex; gap: 14px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.nums b { color: var(--ink); font-size: 16px; }
.rar { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rar-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  background: var(--paper);
}
.rar-pill i, .dist-name i, .rar-name i, .pull i, .rate span i, .rarity-opt i {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--rc);
  border: 1.5px solid var(--ink);
  transform: rotate(45deg);
  flex: none;
}
@media (max-width: 820px) {
  .board-row { grid-template-columns: 40px 1fr; gap: 8px 12px; }
  .board-row .prog, .board-row .nums, .board-row .rar { grid-column: 2; }
  .board-row .rar { justify-content: flex-start; }
}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 0 0 28px; }
.panel.stat { display: grid; align-content: start; gap: 2px; padding: 16px 18px; }
.stat-num { font-weight: 800; font-size: 34px; letter-spacing: -0.03em; line-height: 1.05; }
.stat-num small { font-size: 18px; color: var(--ink-2); }
.stat-label { color: var(--ink-2); font-weight: 600; font-size: 14px; }

.dist { display: grid; gap: 10px; margin: 6px 0 14px; }
.dist-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr auto; gap: 12px; align-items: center; }
.dist-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.dist-bar { height: 16px; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: var(--rc); }
.dist-val { font-weight: 800; font-size: 15px; white-space: nowrap; }

/* --- Profil ------------------------------------------------------------- */
.profile-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.profile-head h1 { margin-bottom: 4px; }
.profile-avatar { display: grid; justify-items: center; gap: 8px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 24px; align-items: start; }
.prog-row { display: grid; grid-template-columns: minmax(80px, 1fr) 1.4fr auto; gap: 12px; align-items: center; margin-bottom: 10px; }
.prog-row > span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rar-name { display: inline-flex !important; align-items: center; gap: 8px; }
.rar-bar > i { background: var(--rc); }
.logout { text-align: center; margin-top: 12px; }

/* --- Admin -------------------------------------------------------------- */
.admin-tabs {
  display: flex;
  gap: 6px;
  margin: -6px 0 26px;
  padding: 0 0 12px;
  overflow-x: auto;
  scrollbar-width: thin;
  border-bottom: 2px dashed rgba(34, 29, 23, 0.25);
}
.admin-tabs a {
  flex: none;
  padding: 7px 13px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-2);
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
}
.admin-tabs a:hover { background: #fff; }
.admin-tabs a.on { background: var(--ink); color: var(--paper-2); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.page-head h1 { margin: 0; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; align-items: start; }
.checklist { margin-bottom: 26px; background: #fff6cf; }
.checklist ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-weight: 600; }
.checklist li.done { color: var(--ink-3); text-decoration: line-through; }
.checklist li.done::marker { content: '✓  '; color: var(--green); font-weight: 800; }

.recent { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.recent li { display: flex; gap: 12px; align-items: flex-start; }
.recent p { margin: 0 0 4px; }
.pulls { display: flex; flex-wrap: wrap; gap: 6px; }
.pull {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--paper);
}

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 24px; }
.toolbar select { width: auto; min-width: 200px; }
.toolbar input[type='search'] { width: auto; flex: 1 1 200px; }

.bulk { margin: 16px 0 8px; }
.bulk h2 { display: flex; align-items: center; gap: 8px; }
.bulk.drag { outline: 3px dashed var(--accent); outline-offset: 4px; background: #fff6cf; }
.bulk.is-busy .inline-form { opacity: 0.5; pointer-events: none; }
.bulk-progress { display: grid; gap: 6px; }
.publish-drafts { display: flex; align-items: center; gap: 12px; margin: -8px 0 22px; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px 18px; }
.admin-card { display: grid; gap: 8px; text-decoration: none; }
.admin-card .card-in { transition: transform 0.2s; }
.admin-card:hover .card-in { transform: translateY(-4px) rotate(-1deg); }
.admin-card.draft .card { opacity: 0.55; }
.admin-card-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; line-height: 1.3; }
.tag .ic { width: 12px; height: 12px; vertical-align: -2px; }
.tag-prop { background: #fff6cf; }

/* Versions proposées par les joueurs (éditeur de carte, tableau de bord) */
.credit-check { margin: -4px 0 16px; }
.credit-check span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.props-admin { margin-top: 28px; }
.props-admin h2 { display: flex; align-items: center; gap: 8px; }
.props-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; margin-top: 14px; }
.prop-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 2px dashed rgba(34, 29, 23, 0.3);
  border-radius: 12px;
  background: var(--paper);
}
.prop-item p { margin: 0 0 4px; }
.prop-author { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.prop-text { margin-top: 8px !important; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.prop-text i { font-family: var(--serif); font-size: 16px; }
.prop-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.prop-quote { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.editor-preview { position: sticky; top: 90px; display: grid; gap: 14px; justify-items: center; }
.preview-card { width: 300px; max-width: 100%; }
.preview-pack { width: 210px; }
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; order: -1; }
  .preview-card { width: 240px; }
  .preview-pack { width: 170px; }
}
.image-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.counter { font-weight: 600; color: var(--ink-3) !important; }
.rarity-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.rarity-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rarity-opt span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-2);
  font-weight: 700;
  cursor: pointer;
}
.rarity-opt input:checked + span { background: var(--rc); box-shadow: 2px 2px 0 var(--ink); }
.rarity-opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.odds { display: grid; gap: 4px; margin: -6px 0 16px; font-size: 14px; }
.odds p { margin: 0; }
.odds b { font-weight: 800; }
.pool-collections { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 8px 0 0 30px; }
.pool-collections.is-off { opacity: 0.45; pointer-events: none; }
.rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.rate { display: grid; gap: 4px; }
.rate span { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 14px; }

.odds-table { width: 100%; padding: 16px; font-size: 14px; }
.odds-table h3 { margin: 0 0 10px; font-size: 16px; }
.odds-table table { width: 100%; border-collapse: collapse; }
.odds-table th, .odds-table td { padding: 5px 4px; text-align: right; border-bottom: 1.5px dashed rgba(34, 29, 23, 0.2); }
.odds-table th:first-child, .odds-table td:first-child { text-align: left; }
.odds-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
.odds-table .r-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.odds-table .r-name i { width: 9px; height: 9px; background: var(--rc); border: 1.5px solid var(--ink); transform: rotate(45deg); }
.odds-table details { margin-top: 10px; }
.odds-table summary { cursor: pointer; font-weight: 700; }
.odds-table .card-odds { max-height: 260px; overflow: auto; margin-top: 8px; }

.admin-list { display: grid; gap: 16px; margin: 20px 0 28px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: flex-end; }
.inline-form .field { margin-bottom: 12px; }
.inline-form .btn { margin-bottom: 12px; }
.inline-form .grow { flex: 1 1 180px; }
.inline-form .grow-2 { flex: 2 1 240px; }
.inline-form .narrow { flex: 0 1 110px; }
.row-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.rarity-row { border-left: 12px solid var(--rc); }

/* Accès d'une rareté réservée */
.access { flex: 1 1 100%; margin: 0 0 12px; padding: 10px 14px; border: 2px dashed rgba(34, 29, 23, 0.25); border-radius: 12px; background: var(--paper-2); }
.access summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 14px; }
.access[open] summary { margin-bottom: 10px; }
.access .check { margin: 0; }
.access-users { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 0 10px 30px; }
.access .btn { margin: 0; }

/* Collections d'une carte (cases à cocher + numéro dans chacune) */
.col-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.col-opt {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper-2);
}
.col-opt:has(input[type=checkbox]:checked) { background: #fff6cf; box-shadow: 2px 2px 0 var(--ink); }
.col-num { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.col-num input { width: 64px; padding: 4px 6px; font-size: 14px; }
.col-num input:disabled { opacity: 0.35; }
.quick-col { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 0; }
.quick-col .linklike { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.quick-col-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.quick-col-form[hidden] { display: none; }
.quick-col-form input { width: min(240px, 60vw); padding: 6px 10px; }
.bulk .quick-col { margin: -4px 0 10px; }
.explain { margin: 14px 0 6px; background: #fff6cf; }

.admin-boosters { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; margin-top: 20px; }
.admin-booster { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: start; }
.admin-booster.inactive { opacity: 0.65; }
.admin-booster h2 { margin-bottom: 6px; }
.facts { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 3px; font-size: 14px; color: var(--ink-2); }
.facts b { color: var(--ink); }

.invite.highlight { background: #fff6cf; animation: drop-in 0.4s; }
.invite.is-off { opacity: 0.7; }
.invite-top { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 12px; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.copy-row input { flex: 1 1 260px; font-size: 14px; padding: 8px 10px; }
.joined { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.who-small { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; font-size: 14px; }

.user-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.user-main p { margin: 0; }
.user-nums { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.user-nums b { color: var(--ink); }
.user-row .copy-row { margin: 14px 0 0; }
.user-actions { margin-top: 12px; }
.user-actions summary { cursor: pointer; font-weight: 700; font-size: 14px; width: max-content; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
.mini-form { display: grid; gap: 6px; padding: 12px; border: 2px dashed rgba(34, 29, 23, 0.3); border-radius: 12px; }
.mini-form > span { font-weight: 700; font-size: 14px; }
.mini-form select { font-size: 14px; padding: 8px 30px 8px 10px; }
.mini-form input[type='number'] { font-size: 14px; padding: 8px 10px; }
.gift-all { margin: 16px 0 6px; background: #fff6cf; }
.gift-all h2 { display: flex; align-items: center; gap: 8px; }
.narrow-panel { max-width: 640px; margin-bottom: 24px; }

/* --- Recadrage d'image -------------------------------------------------- */
.crop {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(27, 23, 19, 0.75);
  backdrop-filter: blur(3px);
  animation: fade-in 0.2s;
}
@keyframes fade-in { from { opacity: 0; } }
.crop-box { display: grid; gap: 12px; justify-items: center; max-width: 100%; }
.crop-box h3 { margin: 0; }
.crop-view {
  position: relative;
  overflow: hidden;
  border: var(--b) solid var(--ink);
  border-radius: 8px;
  background: #222;
  cursor: grab;
  touch-action: none;
}
.crop-view:active { cursor: grabbing; }
.crop-view img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; pointer-events: none; transform-origin: 0 0; }
.crop-view.round::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.crop-view .crop-bg {
  left: -10%;
  top: -10%;
  width: 120%;
  height: 120%;
  object-fit: cover;
  filter: blur(16px) brightness(0.8);
  transform: none;
}
.crop-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: 100%; font-weight: 700; font-size: 14px; }
.crop-zoom input { flex: 1; accent-color: var(--accent); }
.crop-actions { display: flex; gap: 10px; justify-content: flex-end; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
