:root {
  /* V1.11 « Kodachrome 70s » : voir docs/design/DESIGN.md (jetons de couleur, polices, formes) */
  --creme: #FBEED3;
  --creme-2: #F5E0B8;
  --papier: #FFFAF0;
  --cacao: #3A1F12;
  --texte-doux: #53402F; /* V1.11.1 : plus foncé (7,4:1 sur le fond, 9,4:1 sur papier) */
  --moutarde: #F2A516;
  --orange: #E8681C;
  --brique: #C0392B;
  --brique-texte: #A93226; /* V1.11.1 : brique pour du texte (5:1 sur le fond) */
  --orange-fonce: #B5461A; /* V1.11.1 : fond des boutons orange, texte papier 5,2:1 */
  --fond: #F3DDB2; /* V1.11.1 : fond de page un ton plus soutenu, les panneaux papier s'en détachent */
  --rouille: #6B2D1A;
  --sapin: #2F6B5E;
  --onglet: #D9B48A;
  --bandes: linear-gradient(90deg, var(--moutarde) 0 25%, var(--orange) 25% 50%, var(--brique) 50% 75%, var(--rouille) 75%);
  --soleil: repeating-conic-gradient(from 0deg at 50% 115%, var(--moutarde) 0 9deg, var(--orange) 9deg 18deg, var(--brique) 18deg 27deg, var(--rouille) 27deg 36deg);
  --r-sm: 6px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --ombre: 0 4px 0 var(--cacao);
  --ombre-sm: 0 3px 0 var(--cacao);
  --contour: 2px solid var(--cacao);
  --f-titre: 'Shrikhand', 'DM Sans', serif;
  --f-texte: 'DM Sans', system-ui, sans-serif;
  --f-chiffres: 'DM Mono', ui-monospace, monospace;
  /* Anciens noms (utilisés partout) → nouvelles valeurs */
  --common: var(--papier);
  --special: var(--moutarde);
  --special-2: var(--orange);
  --legendary: var(--orange);
  --legendary-2: var(--brique);
  --bg: var(--fond);
  --bg-2: var(--creme-2);
  --card: var(--papier);
  --line: var(--cacao);
  --text: var(--cacao);
  --muted: var(--texte-doux);
  --accent: var(--moutarde);
  --accent-2: var(--orange);
  --accent-3: var(--sapin);
  --danger: var(--brique);
  --radius: var(--r-md);
  --trait: rgba(58,31,18,.18); /* séparateurs internes (pas cliquables) */
  --tabbar-h: 64px;
  font-family: var(--f-texte);
  font-synthesis: none; /* Shrikhand n'a qu'une graisse : pas de faux gras */
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100dvh; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
h2 { font-family: var(--f-texte); font-size: 1.12rem; margin: 1.5rem 0 .6rem; color: var(--brique-texte); font-weight: 700; letter-spacing: .01em; }
a { color: var(--sapin); }
::selection { background: var(--moutarde); color: var(--cacao); }

/* ---------- Logo ---------- */
.logo { font-family: var(--f-titre); font-weight: 400; font-size: 2.3rem; letter-spacing: 0; color: var(--cacao); }
.logo span { color: var(--orange); }
.topbar .logo span { color: var(--moutarde); }
.logo.small { font-size: 1.3rem; }

/* ---------- Boutons (V1.11 : contour cacao + ombre pleine, enfoncés à l'appui) ---------- */
.btn { border: var(--contour); border-radius: var(--r-pill); padding: .75rem 1.3rem; font-weight: 700; min-height: 44px;
  background: var(--moutarde); color: var(--cacao); box-shadow: var(--ombre-sm); transition: transform .08s, box-shadow .08s; }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--cacao); }
.btn.primary { background: var(--orange-fonce); color: var(--papier); font-family: var(--f-titre); font-weight: 400; font-size: 1.15rem; letter-spacing: .01em; padding: .65rem 1.4rem; }
/* Petits boutons orange : même orange foncé, texte papier en DM Sans (5,2:1) */
.btn.primary.small { color: var(--papier); font-family: var(--f-texte); font-weight: 700; font-size: .9rem; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:active:not(:disabled) { transform: none; background: var(--creme-2); }
.btn.small { padding: .4rem .9rem; min-height: 40px; font-size: .9rem; }
.btn.danger { background: var(--papier); border-color: var(--brique-texte); color: var(--brique-texte); box-shadow: 0 3px 0 var(--brique); }
.btn:disabled { opacity: 1; background: var(--creme-2); color: var(--texte-doux); border-color: var(--texte-doux); border-style: dashed; box-shadow: none; font-family: var(--f-texte); }
:focus-visible { outline: 3px solid var(--moutarde); outline-offset: 2px; }

/* ---------- Connexion (V1.11 : fond crème, grand soleil en bas, carte papier) ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px 40vw; position: relative; overflow: hidden; background: var(--creme); }
.login::before { content: ''; position: absolute; left: 50%; bottom: -55vw; width: 150vw; max-width: 1100px; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: var(--soleil); opacity: .9; pointer-events: none; }
.login-card { position: relative; width: 100%; max-width: 380px; background: var(--papier); border: var(--contour); border-radius: var(--r-lg); box-shadow: var(--ombre); padding: 22px 18px; }
.login-card .logo { display: flex; align-items: center; white-space: nowrap; font-size: clamp(1.35rem, 6.6vw, 1.9rem); }
.login-card .logo-ico { width: 46px; height: 46px; margin-right: 10px; }
.tagline { color: var(--muted); margin: .3rem 0 1.4rem; }
.login label { display: block; font-size: .9rem; font-weight: 600; color: var(--cacao); margin-bottom: .4rem; }
.login input, .add-friend input { width: 100%; padding: .8rem 1rem; border-radius: var(--r-md); border: var(--contour); background: var(--papier); color: var(--text); font-size: 16px; }
.login input:focus, .add-friend input:focus { outline: 3px solid var(--moutarde); outline-offset: 0; }
.login .btn { width: 100%; margin-top: 1rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Structure (V1.11 : barres cacao, liseré de bandes sous la barre du haut) ---------- */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: var(--cacao); color: var(--creme); border-bottom: 0; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background: var(--bandes); }
.topbar .logo { color: var(--creme); display: flex; align-items: center; font-size: 1.2rem; white-space: nowrap; }
.topbar .logo-ico { width: 32px; height: 32px; margin-right: 8px; }
/* Écran étroit : l'icône seule (le nom ne tient pas avec la cloche, le sac et le compte) */
@media (max-width: 400px) { .topbar .logo { font-size: 0; } .topbar .logo span { font-size: 0; } .topbar .logo-ico { margin: 0; } }
.me-chip { background: transparent; color: var(--creme); border: 2px solid var(--onglet); border-radius: var(--r-pill); padding: .3rem .75rem; font-size: .85rem; font-weight: 600; max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { padding: 22px 16px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
.tabbar { position: fixed; inset: auto 0 0 0; z-index: 5; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--cacao); border-top: 0; }
.tabbar button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .82rem; font-weight: 600; color: var(--onglet); position: relative; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.active { color: var(--moutarde); }
.tabbar button.active::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 4px; border-radius: 0 0 4px 4px; background: var(--moutarde); }
.badge { position: absolute; top: 8px; left: calc(50% + 8px); background: var(--brique); color: var(--papier); border: 2px solid var(--cacao); font-style: normal; font-family: var(--f-chiffres); font-size: .68rem; font-weight: 500; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.empty.small { padding: .5rem 0; text-align: left; }
.section-hint { font-size: .85rem; color: var(--muted); margin: .8rem 0; }

/* ---------- Pack ---------- */
.pack-stage { display: grid; justify-items: center; padding-top: 12px; }
/* V1.11 : le pack = le soleil (dégradé réservé aux moments forts), contour + ombre pleine, flottement doux */
.pack { position: relative; width: min(240px, 62vw); aspect-ratio: 5 / 8; border: 3px solid var(--cacao); border-radius: var(--r-lg); overflow: hidden; color: var(--papier);
  background: var(--soleil); box-shadow: 0 6px 0 var(--cacao);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; animation: float 3.4s ease-in-out infinite; }
.pack::before, .pack::after { content: ''; position: absolute; left: 0; right: 0; height: 14px; background: repeating-linear-gradient(90deg, var(--cacao) 0 7px, transparent 7px 14px); opacity: .55; }
.pack::before { top: 0; } .pack::after { bottom: 0; }
.pack-foil { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,250,240,.35) 47%, transparent 60%); background-size: 250% 100%; animation: shine 3.2s linear infinite; pointer-events: none; }
.pack-title { font-family: var(--f-titre); font-weight: 400; font-size: 2.3rem; line-height: 1; text-align: center; color: var(--papier); text-shadow: 0 3px 0 var(--cacao); }
/* Pastille ronde inclinée (nombre de cartes) */
.pack-count { position: absolute; top: 26px; right: 14px; width: 66px; height: 66px; display: grid; place-items: center; text-align: center; line-height: 1.05;
  background: var(--papier); color: var(--cacao); border: 2px dashed var(--brique); border-radius: 50%; transform: rotate(12deg); font-size: .82rem; font-weight: 700; padding: 6px; }
.pack-count #pack-size { display: block; font-family: var(--f-chiffres); font-size: 1.15rem; }
.pack-tear { position: absolute; bottom: 26px; font-size: .82rem; font-weight: 700; background: var(--cacao); color: var(--creme); padding: .2rem .7rem; border-radius: var(--r-pill); }
.pack.opening { animation: shake .45s ease-in-out, burst .35s .45s ease-in forwards; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-1deg); } }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@keyframes shake { 20%,60% { transform: rotate(-4deg); } 40%,80% { transform: rotate(4deg); } }
@keyframes burst { to { transform: scale(1.4); opacity: 0; } }

/* ---------- Carte photo (pack + galerie) ---------- */
.photo-card { position: relative; width: 100%; height: 100%; display: block; min-width: 0; border-radius: 3px; overflow: hidden; background: var(--creme-2); }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card .caption { position: absolute; inset: auto 0 0 0; padding: 20px 8px 7px; color: var(--papier); background: linear-gradient(transparent, rgba(58,31,18,.82)); font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { position: absolute; top: 7px; padding: .1rem .45rem; border-radius: var(--r-pill); font-size: .7rem; font-weight: 700; border: 1.5px solid var(--cacao); }
.tag.new { left: 7px; background: var(--moutarde); color: var(--cacao); }
.tag.copies { right: 7px; background: var(--papier); color: var(--cacao); font-family: var(--f-chiffres); font-weight: 500; }
.tag.hidden-tag { left: 7px; background: var(--papier); color: var(--cacao); }

/* ---------- Grilles ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid .cell { display: block; width: 100%; aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; position: relative; }
.grid .cell.off img { filter: grayscale(1) brightness(.6); }
.cell-actions { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--cacao); background: var(--papier); color: var(--cacao); display: grid; place-items: center; font-size: .95rem; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .7rem; text-align: center; }
.stat b { display: block; font-family: var(--f-chiffres); font-size: 1.5rem; }
.stat small { color: var(--muted); font-size: .82rem; }
.bar { grid-column: 1 / -1; height: 10px; background: var(--creme-2); border: 2px solid var(--cacao); border-radius: var(--r-pill); overflow: hidden; }
.bar div { height: 100%; background: var(--bandes); border-radius: var(--r-pill); }

/* ---------- Upload ---------- */
.upload { display: flex; align-items: center; gap: 14px; padding: 16px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; }
.upload:active { background: var(--bg-2); }
.upload-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--cacao); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; flex: none; }
.upload small { color: var(--muted); }
.progress { position: relative; margin-top: 12px; height: 28px; border-radius: var(--r-md); background: var(--card); overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--accent-3); transition: width .2s; }
.progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: .82rem; font-weight: 600; }

/* ---------- Amis ---------- */
.add-friend { display: flex; gap: 8px; }
.add-friend input { flex: 1; min-width: 0; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .6rem .7rem; }
.list .who { flex: 1; min-width: 0; }
.list .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .who small { color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-titre); font-weight: 400; font-size: 1.15rem; color: var(--papier); text-shadow: 0 1px 0 var(--cacao); border: var(--contour); flex: none; }
.avatar.pic { overflow: hidden; background: var(--creme-2); }
.suggestions { margin-top: 8px; }
.suggestions li { background: var(--bg-2); }

/* ---------- Visionneuse & toast ---------- */
.viewer { position: fixed; inset: 0; z-index: 30; background: rgba(58,31,18,.92); display: grid; place-items: center; padding: 16px; }
.viewer img { max-width: 100%; max-height: 82dvh; border-radius: 10px; }
.viewer-caption { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: var(--muted); }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); z-index: 40; margin: 0 auto; max-width: 420px;
  background: var(--cacao); color: var(--creme); padding: .8rem 1rem; border-radius: var(--r-md); border-left: 6px solid var(--moutarde); font-weight: 600; text-align: center; box-shadow: var(--ombre-sm); }
.toast.error { background: var(--cacao); color: var(--creme); border-left-color: var(--brique-texte); }

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

/* ================= v0.2 : raretés, pile, albums, quotas ================= */
.link-btn { background: none; border: 0; color: var(--muted); font-size: .9rem; padding: .4rem 0; min-height: 36px; }
.link-btn.back { color: var(--sapin); font-weight: 600; }
h2 small { font-family: var(--f-texte); font-size: .82rem; color: var(--muted); }
.title { color: var(--text); font-size: 1.4rem; margin-top: 0; text-align: center; }

/* Pastille de rareté */
.rar { display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .12rem .5rem; border-radius: var(--r-pill); border: var(--contour); color: var(--cacao); background: var(--papier); }
.rar.common { background: var(--papier); }
.rar.special { background: var(--moutarde); }
.rar.legendary { background: var(--soleil); color: var(--papier); text-shadow: 0 1px 0 var(--cacao), 0 0 2px var(--cacao); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; border: 1.5px solid var(--cacao); }
.dot.common { background: var(--papier); } .dot.special { background: var(--moutarde); } .dot.legendary { background: var(--orange); }

/* Cadre de rareté */
/* V1.11 : cadre papier + contour cacao ; spéciale = cadre moutarde ; légendaire = dégradé orange → brique.
   La photo n'est jamais dénaturée (pas de noir et blanc) : la rareté se lit par le cadre et le badge. */
.frame { position: relative; display: block; border-radius: var(--r-sm); padding: 5px; background: var(--papier); border: 2px solid var(--cacao); box-shadow: var(--ombre-sm); }
.frame.special { background: var(--moutarde); }
.frame.legendary { background: linear-gradient(160deg, var(--orange), var(--brique)); }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --a: 360deg; } }
.frame > .photo-card { border-radius: 3px; }
/* Reflet doré : seulement sur la fiche et au dévoilement d'un pack (pas dans les grilles, pour la batterie) */
.sheet-photo .frame.legendary > .photo-card::after, .stack .frame.legendary > .photo-card::after {
  content: ''; position: absolute; inset: 0; z-index: 4; background: linear-gradient(115deg, transparent 35%, rgba(255,214,120,.55) 50%, transparent 65%);
  background-size: 250% 100%; animation: shine 2.6s linear infinite; pointer-events: none; mix-blend-mode: screen; }
.num { position: absolute; top: 7px; right: 7px; font-family: var(--f-chiffres); font-weight: 500; font-size: .74rem; color: var(--cacao); background: var(--papier); border: 1.5px solid var(--cacao); padding: 0 .4rem; border-radius: var(--r-pill); }
.photo-card .rar { position: absolute; top: 7px; left: 7px; }

/* Garantie */
.pity { text-align: center; color: var(--muted); font-size: .85rem; margin: 1.2rem 0 0; }
.pity b { color: var(--brique-texte); }

/* Pile de cartes */
.reveal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--muted); font-weight: 600; }
.stack { position: relative; width: min(300px, 78vw); aspect-ratio: 3 / 4; margin: 18px auto 0; }
.stack .card { position: absolute; inset: 0; border: 0; padding: 0; background: none; perspective: 1000px; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s; }
.stack .card .flip-inner { display: block; position: relative; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; }
.stack .card.flipped .flip-inner { transform: rotateY(180deg); }
.stack .card.gone { transform: translateX(130%) rotate(18deg) !important; opacity: 0; pointer-events: none; }
.face { position: absolute; inset: 0; border-radius: var(--r-md); backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
/* Dos de carte : rayures cacao / rouille, pastille papier */
.face.back { background: repeating-linear-gradient(45deg, var(--cacao) 0 14px, var(--rouille) 14px 28px); border: 3px solid var(--cacao); display: grid; place-items: center; box-shadow: var(--ombre); }
.face.back span { font-family: var(--f-titre); font-weight: 400; font-size: 1.2rem; color: var(--cacao); background: var(--papier); padding: .45rem 1rem; border-radius: var(--r-pill); border: 2px solid var(--cacao); }
.face.front { transform: rotateY(180deg); }
.face.front .frame { height: 100%; }
.face.front .photo-card { height: 100%; }
/* Une légendaire arrive : le dos passe au soleil et pulse */
.card.tease .face.back { background: var(--soleil); animation: tease 1.2s ease-in-out infinite; }
@keyframes tease { 50% { transform: scale(1.02); box-shadow: 0 6px 0 var(--cacao), 0 0 0 6px rgba(242,165,22,.35); } }
.card.boom { animation: boom .7s ease-out; }
@keyframes boom { 30% { transform: scale(1.08); } }
.reveal-hint { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 16px; }
.new-flag { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--moutarde); color: var(--cacao); border: 2px solid var(--cacao); font-weight: 700; font-size: .82rem; padding: .15rem .6rem; border-radius: var(--r-pill); }

/* Récapitulatif */
.summary-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.summary-cards .frame { height: 100%; }
.summary-cards .photo-card { height: 100%; }
@media (min-width: 560px) { .summary-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* Albums */
.albums { display: flex; flex-direction: column; gap: 10px; }
.album-card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px; }
.album-cover { width: 64px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; flex: none; background: var(--bg-2); display: grid; place-items: center; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-info { flex: 1; min-width: 0; }
.album-info b { display: block; font-size: 1.05rem; }
.album-info .count { font-family: var(--f-chiffres); font-weight: 800; }
.album-info .mini { display: flex; gap: 10px; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.album-card .bar, .album-head .bar { margin-top: 6px; }
.album-head { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 6px 0 4px; }
.album-head h1 { font-family: var(--f-texte); font-weight: 700; margin: 0; font-size: 1.6rem; }
.album-head .pct { color: var(--muted); }
.rar-section h2 { display: flex; align-items: center; gap: 6px; color: var(--text); }
.slot { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; display: block; width: 100%; min-width: 0; }
.slot .frame { height: 100%; }
.slot .photo-card { height: 100%; }
/* Emplacement vide : hachures crème, contour pointillé, numéro en DM Mono */
.slot.missing { border-radius: var(--r-sm); border: 2px dashed var(--cacao); display: grid; place-items: center; color: var(--texte-doux); font-family: var(--f-chiffres); font-weight: 500; font-size: 1.05rem;
  background: repeating-linear-gradient(45deg, var(--creme) 0 8px, var(--creme-2) 8px 16px); }
.slot.missing.special { border-color: var(--moutarde); color: var(--cacao); }
.slot.missing.legendary { border-color: var(--orange); color: var(--brique-texte); }
.slot .copies { position: absolute; bottom: 7px; right: 7px; background: var(--papier); color: var(--cacao); border: 1.5px solid var(--cacao); font-family: var(--f-chiffres); font-size: .7rem; font-weight: 500; padding: 0 .4rem; border-radius: var(--r-pill); }

/* Quotas d'ajout */
.quota { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; }
.quota h3 { margin: 0 0 2px; font-family: var(--f-texte); font-weight: 700; font-size: 1.15rem; }
.quota p { margin: 0 0 12px; color: var(--muted); font-size: .85rem; }
.quota-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--trait); }
.quota-row .what { flex: 1; min-width: 0; }
.quota-row .what b { display: flex; align-items: center; font-size: .95rem; }
.quota-row .bar { margin-top: 6px; }
.quota-row .bar div.common { background: var(--common); }
.quota-row .bar div.special { background: linear-gradient(90deg, var(--special), var(--special-2)); }
.quota-row .bar div.legendary { background: linear-gradient(90deg, var(--legendary-2), var(--legendary)); }
.quota-row small { color: var(--muted); }
.quota-done { text-align: center; color: var(--muted); padding: 6px 0 0; }
.grid .cell .frame { height: 100%; }

/* Petites cartes : pastille de rareté réduite à son point coloré */
.grid .rar, .summary-cards .rar, .variants-row .rar, .zoom-choices .rar { font-size: 0; gap: 0; padding: .3rem; }
.grid .rar::before, .summary-cards .rar::before, .variants-row .rar::before, .zoom-choices .rar::before { width: 8px; height: 8px; }
.grid .photo-card .caption { font-size: .82rem; }

/* ================= v0.3 : minuteur, admin ================= */
.next-pack { text-align: center; color: var(--muted); font-size: .9rem; margin: 1.2rem 0 0; }
.next-pack b { color: var(--text); font-family: var(--f-chiffres); font-size: 1.1rem; }
.pack.locked { filter: saturate(.25) brightness(.85); animation: none; }
.pack.locked .pack-foil { display: none; }
.admin { display: flex; flex-direction: column; gap: 10px; }
.admin-title { margin: 1.2rem 0 .2rem; color: var(--text); }
.admin-title:first-child { margin-top: 0; }
.field { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .6rem .8rem; }
.field label { flex: 1; min-width: 150px; font-size: .92rem; }
.field small { width: 100%; color: var(--muted); font-size: .82rem; }
.unit { display: flex; align-items: center; gap: 6px; }
.unit input { width: 92px; padding: .55rem .6rem; border-radius: 10px; border: 2px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 16px; text-align: right; }
.unit input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.unit span { color: var(--muted); font-size: .85rem; min-width: 34px; }
.check { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .75rem .8rem; font-size: .92rem; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.sim { background: var(--bg-2); border: 1px dashed var(--line); border-radius: var(--r-md); padding: .8rem; font-size: .88rem; line-height: 1.5; }
.sim b { color: var(--text); }
.sim .sim-title { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.sim .shares { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.btn.wide { width: 100%; }
.admin-actions { display: flex; flex-direction: column; gap: 10px; }
.reveal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }

/* ================= v0.4 : Friends, lutin, fiche carte, identifications ================= */
.top-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wallet-chip { display: flex; align-items: center; gap: 5px; background: var(--moutarde); color: var(--cacao); border: 2px solid var(--moutarde); border-radius: var(--r-pill); padding: .25rem .65rem .25rem .45rem; font-family: var(--f-chiffres); font-weight: 500; font-size: .85rem; min-height: 36px; }
.bag-ico-top { display: grid; }
.coin { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-texte); font-size: .68rem; font-weight: 700; color: var(--cacao); background: var(--papier); border: 1.5px solid var(--cacao); flex: none; }
.coin.big { width: 34px; height: 34px; font-size: 1rem; }
.me-chip { max-width: 34vw; }

.wallet-box { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0 0 12px; }
.wallet-box .w-info { flex: 1; min-width: 0; }
.wallet-box b { font-family: var(--f-titre); font-size: 1.25rem; }
.wallet-box small { display: block; color: var(--muted); font-size: .82rem; }

.lutin-box { display: flex; align-items: center; gap: 12px; background: var(--papier); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 10px 0 4px; }
.lutin-box .elf { font-size: 2rem; line-height: 1; }
.lutin-box .w-info { flex: 1; min-width: 0; font-size: .88rem; color: var(--muted); }
.lutin-box .w-info b { color: var(--text); display: block; font-size: .95rem; }

.lutin-overlay { position: fixed; inset: 0; z-index: 25; background: rgba(12,10,22,.94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; }
.lutin-title { font-family: var(--f-titre); font-weight: 800; font-size: 1.3rem; margin: 0; }
.lutin-overlay .stack { margin-top: 16px; }

.tagged-entry { margin-bottom: 10px; }
.tagged-entry .album-cover { font-size: 1.6rem; }
.page-title { font-family: var(--f-titre); margin: 6px 0 12px; font-size: 1.5rem; }
.tagged-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tagged-list li { display: flex; gap: 12px; align-items: center; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px; }
.tagged-list .thumb { width: 64px; flex: none; aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; }
.tagged-list .thumb .frame { height: 100%; }
.tagged-list .thumb .photo-card { height: 100%; }
.tagged-list .info { flex: 1; min-width: 0; font-size: .88rem; color: var(--muted); }
.tagged-list .info b { color: var(--text); display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Fiche carte */
.sheet { position: fixed; inset: 0; z-index: 22; background: rgba(58,31,18,.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet-panel { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--creme); border: 3px solid var(--cacao); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet-close { position: sticky; top: 0; float: right; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--cacao); background: var(--papier); color: var(--cacao); font-size: 1rem; z-index: 2; box-shadow: var(--ombre-sm); }
.sheet-photo { width: min(260px, 70vw); aspect-ratio: 3 / 4; margin: 4px auto 14px; border: 0; padding: 0; background: none; display: block; }
.sheet-photo .frame { height: 100%; }
.sheet-photo .photo-card { height: 100%; }
.card-title { font-family: var(--f-texte); letter-spacing: -.01em; font-size: 1.35rem; font-weight: 700; color: var(--text); margin: 0 0 4px; overflow-wrap: anywhere; }
.card-title.empty-title { color: var(--muted); font-weight: 500; font-size: 1.1rem; }
.card-meta { color: var(--muted); font-size: .85rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.card-desc { white-space: pre-line; line-height: 1.5; margin: 0 0 10px; overflow-wrap: anywhere; }
.sheet h3 { font-family: var(--f-texte); font-size: .95rem; margin: 18px 0 8px; color: var(--brique-texte); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--papier); border: var(--contour); border-radius: var(--r-pill); padding: .3rem .4rem .3rem .7rem; font-size: .85rem; color: var(--cacao); min-height: 40px; }
.chip button { border: 0; background: none; color: var(--muted); width: 26px; height: 26px; border-radius: 50%; }
.chip.add { padding: .3rem .8rem; color: var(--sapin); font-weight: 700; }
.comments { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.comments li { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .55rem .7rem; }
.comments .c-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); }
.comments .c-head b { color: var(--text); font-size: .88rem; }
.comments .c-body { margin-top: 3px; white-space: pre-line; overflow-wrap: anywhere; font-size: .92rem; }
.comments .mention { color: var(--sapin); font-weight: 600; }
.comments .c-del { border: 0; background: none; color: var(--muted); font-size: .82rem; min-height: 30px; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.comment-form textarea, .edit-form input, .edit-form textarea, .tag-search input { width: 100%; padding: .7rem .8rem; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; resize: vertical; }
.comment-form textarea:focus, .edit-form input:focus, .edit-form textarea:focus, .tag-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.comment-form .row, .edit-form .row { display: flex; gap: 8px; justify-content: space-between; align-items: center; }
.comment-form small { color: var(--muted); font-size: .82rem; }
.edit-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.counter { color: var(--muted); font-size: .82rem; text-align: right; }
.tag-search { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.tag-search ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tag-search li button { width: 100%; text-align: left; display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: .45rem .6rem; }
.dup-box { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .6rem .8rem; margin-top: 12px; font-size: .88rem; }
.sheet .muted { color: var(--muted); font-size: .88rem; }

/* ================= v0.5 : effets de cartes (variantes ✨) ================= */
.photo-card { container-type: inline-size; }
.fx-sticker { position: absolute; z-index: 2; line-height: 1; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.fx-badge { position: absolute; bottom: 7px; left: 7px; z-index: 3; font-size: .7rem; font-weight: 800; padding: .1rem .4rem; border-radius: 6px; color: #1a1400; background: linear-gradient(90deg, #ffd1f0, #c6f6ff, #fff6b3); }
.caption ~ .fx-badge, .fx-badge.up { bottom: 28px; }

/* Filtres (sur la photo) */
.fx-t-sepia img { filter: sepia(1) contrast(1.05); }
.fx-t-mono img { filter: grayscale(1) contrast(1.1); }
.fx-t-negative img { filter: invert(1) hue-rotate(180deg); }
.fx-t-neonshift img { filter: hue-rotate(160deg) saturate(1.7) contrast(1.1); }
.fx-t-noir img { filter: grayscale(1) contrast(1.7) brightness(.9); }
.fx-t-duotone img { filter: grayscale(1) contrast(1.25); }
.fx-t-duotone::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(135deg, #ff4fa3, #3b6bff); mix-blend-mode: screen; opacity: .75; pointer-events: none; }
.fx-t-glitch img { animation: glitch 2.4s steps(1) infinite; }
@keyframes glitch {
  0%, 100% { filter: none; transform: none; }
  20% { filter: hue-rotate(90deg) saturate(2); transform: translateX(-2px); }
  22% { filter: none; transform: translateX(2px); }
  60% { filter: invert(.15) hue-rotate(-60deg); transform: translateX(1px) skewX(2deg); }
  62% { filter: none; transform: none; }
}

/* Cadres (remplacent le cadre de rareté) */
.frame.fx-f-holo { padding: 5px; background: conic-gradient(from var(--a, 0deg), #ff6ad5, #c774e8, #ad8cff, #8795e8, #94d0ff, #7cffcb, #fffb96, #ff6ad5); animation: spin 2.5s linear infinite; box-shadow: 0 0 22px rgba(199,116,232,.6); }
.frame.fx-f-neon { padding: 3px; background: #0b0b16; box-shadow: 0 0 0 2px #ff2bd6, 0 0 14px #ff2bd6, 0 0 28px #00e5ff, inset 0 0 10px #00e5ff; }
.frame.fx-f-gold { padding: 6px; background: linear-gradient(135deg, #8a6514, #f7e08a 25%, #b8860b 50%, #fff3b0 70%, #9a7417); box-shadow: 0 4px 16px rgba(184,134,11,.5); }
.frame.fx-f-polaroid { padding: 6px 6px 18% 6px; background: #f6f2e9; border-radius: 6px; box-shadow: 0 6px 14px rgba(0,0,0,.4); }
.frame.fx-f-polaroid > .photo-card { border-radius: 2px; }
.frame.fx-f-stamp { padding: 8px; border-radius: 0; background: #fbf7ef;
  /* perforations sur le bord seulement : la zone intérieure (content-box) reste pleine */
  -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 5px at 5px 5px, transparent 98%, #000) -5px -5px / 14px 14px;
  mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 5px at 5px 5px, transparent 98%, #000) -5px -5px / 14px 14px; }
.frame.fx-f-stamp > .photo-card { border-radius: 0; }
.frame.fx-f-ticket { padding: 6px; background: linear-gradient(135deg, #ffcc33, #ff7a45);
  -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; }
.frame.fx-f-film { padding: 6px 14px; border-radius: 4px; background:
  repeating-linear-gradient(to bottom, transparent 0 6px, #f2f2f2 6px 12px, transparent 12px 18px) left 3px top 0 / 7px 100% no-repeat,
  repeating-linear-gradient(to bottom, transparent 0 6px, #f2f2f2 6px 12px, transparent 12px 18px) right 3px top 0 / 7px 100% no-repeat, #111; }
.frame.fx-f-film > .photo-card { border-radius: 2px; }
.frame.fx-f-pixel { padding: 6px; border-radius: 0; background: repeating-conic-gradient(#ff5c8a 0 25%, #4fd1c5 0 50%) 0 0 / 12px 12px; }
.frame.fx-f-pixel > .photo-card { border-radius: 0; image-rendering: pixelated; }
.frame.fx-f-aqua { padding: 6px; background: radial-gradient(circle at 20% 20%, #a8e6ff, transparent 50%), radial-gradient(circle at 80% 30%, #ffc3e6, transparent 50%), radial-gradient(circle at 50% 90%, #c7ffd8, transparent 55%), #e9e4ff; }
.frame.fx-f-candy { padding: 6px; background: repeating-linear-gradient(45deg, #ff7eb6 0 8px, #fff 8px 16px); }

/* Révélation d'une variante */
.card.shiny.flipped .face.front { animation: shiny 1.2s ease-out; }
@keyframes shiny { 0% { filter: brightness(2.2) saturate(0); } 100% { filter: none; } }
.card.shiny .face.back { border-color: var(--moutarde); box-shadow: 0 6px 0 var(--cacao), 0 0 0 5px rgba(242,165,22,.45); }

/* ================= v0.5 : divers ================= */
.stock { display: flex; justify-content: center; gap: 8px; margin-top: 1.2rem; }
.stock i { width: 14px; height: 20px; border-radius: 4px; background: var(--creme-2); border: 2px solid var(--cacao); }
.stock i.on { background: var(--orange); }
.stock i.bonus { background: var(--moutarde); }
.lutin-tiers { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lutin-tiers .btn { flex: 1; min-width: 90px; padding: .45rem .5rem; font-size: .82rem; }
.lutin-box { flex-wrap: wrap; }
.fav-btn { position: absolute; top: 4px; left: 4px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card); font-size: 1.25rem; z-index: 2; }
.fav-btn.on { color: var(--brique-texte); }
.variants-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.variants-row .v { flex: none; width: 92px; display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.variants-row .v .frame { aspect-ratio: 3 / 4; }
.variants-row .v .photo-card { height: 100%; }
.variants-row .v .btn { font-size: .82rem; padding: .3rem .3rem; min-height: 30px; }
.mention-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mention-list button { width: 100%; text-align: left; display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: .4rem .6rem; }
.mention-list small { color: var(--muted); margin-left: auto; }
.select-bar { position: sticky; top: 58px; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--r-md); padding: .5rem .7rem; margin: 10px 0; }
.photos-head { display: flex; justify-content: space-between; align-items: center; }
.cell .check-mark { display: none; position: absolute; top: 6px; left: 6px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--papier); background: rgba(58,31,18,.4); place-items: center; font-weight: 800; }
.cell.selected .check-mark { background: var(--accent); color: var(--cacao); border-color: var(--accent); }
.cell.selected .frame { outline: 3px solid var(--accent); outline-offset: 2px; }
.selecting .cell-actions { display: none; }
.bonus-hint { margin: 10px 0 0; font-size: .85rem; color: var(--muted); }
.bonus-hint b { color: var(--brique-texte); }

.selecting .cell .check-mark { display: grid; }

/* ================= v0.6 : noms des effets, original, catalogue ================= */
.fx-info { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: -4px 0 14px; }
.fx-chip { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(90deg, rgba(255,209,240,.14), rgba(198,246,255,.14)); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .7rem; font-size: .82rem; }
.fx-chip b { font-weight: 700; }
.fx-chip.off { opacity: .45; text-decoration: line-through; }
.small-hint { margin: 0 0 6px; font-size: .82rem !important; }
.v-thumb { display: block; width: 100%; aspect-ratio: 3 / 4; border: 0; padding: 0; background: none; }
.v-thumb .frame { height: 100%; }
.variants-row .v .caption { font-size: .82rem; padding: 14px 5px 5px; }

.fx-cat { display: flex; flex-direction: column; gap: 10px; }
.cat-sec { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .6rem .8rem; }
.cat-sec summary { cursor: pointer; padding: .3rem 0; }
.cat-sec summary small { color: var(--muted); }
.cat-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cat-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 58px 64px auto; gap: 8px; align-items: center; }
.cat-row.off .cat-prev { opacity: .35; filter: grayscale(1); }
.cat-prev { width: 44px; aspect-ratio: 3 / 4; display: grid; place-items: center; }
.cat-prev .frame { width: 100%; height: 100%; padding: 2px; border-radius: 6px; }
.cat-prev .photo-card { border-radius: 4px; }
.cat-emoji-prev { font-size: 1.7rem; }
.cat-row input, .cat-add input { width: 100%; min-width: 0; padding: .45rem .5rem; border-radius: 8px; border: 2px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 16px; }
.cat-row .cat-w { text-align: right; }
.cat-row .share { color: var(--muted); font-size: .82rem; text-align: right; }
.cat-row .icon-btn { width: 30px; height: 30px; font-size: .82rem; }
.cat-add { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--trait); }
.cat-add .cat-emoji { text-align: center; font-size: 1.3rem; }
@media (max-width: 380px) { .cat-row { grid-template-columns: 40px minmax(0, 1fr) 52px auto; } .cat-row .share { display: none; } }
.variants-row .v { width: 104px; }
.variants-row .fx-badge { font-size: .6rem; }

/* ================= v0.7 : extensions (année, événements) ================= */
.set-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; scrollbar-width: none; }
.set-chips::-webkit-scrollbar { display: none; }
.set-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: .45rem .85rem; font-size: .88rem; font-weight: 600; min-height: 38px; }
.set-chip small { color: var(--muted); font-weight: 500; font-size: .82rem; }
.set-chip.on { background: var(--moutarde); color: var(--cacao); border-color: var(--cacao); }
.set-chip.on small { color: #4a3c00; }
.set-chip.collector:not(.on) { border-color: rgba(242,165,22,.45); }
.chip-badge { font-style: normal; background: var(--accent-2); color: var(--papier); border-radius: 9px; min-width: 18px; height: 18px; display: grid; place-items: center; font-size: .7rem; padding: 0 5px; }
#pack-home .set-chips { width: 100%; justify-content: center; }
#pack-home { align-content: center; }

.pack.event { background: repeating-conic-gradient(from 0deg at 50% 115%, var(--sapin) 0 9deg, var(--moutarde) 9deg 18deg, var(--rouille) 18deg 27deg, var(--orange) 27deg 36deg); }
.pack-emoji { font-size: 2.6rem; line-height: 1; filter: drop-shadow(0 3px 0 var(--cacao)); }
.pack.event .pack-title { font-size: 1.9rem; max-width: 92%; overflow-wrap: anywhere; }
.stock.event i.on { background: var(--sapin); }
.ev-end { font-size: .82rem; margin-top: 4px; }
.event-info { width: 100%; max-width: 420px; margin-top: 1rem; display: flex; flex-direction: column; gap: 6px; }
.event-info p { margin: 0; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .6rem .8rem; font-size: .85rem; color: var(--muted); }
.event-info b { color: var(--text); }

.album-set { color: var(--muted); font-size: .82rem; font-weight: 600; margin-bottom: 2px; }
.set-tag { background: var(--card); border: 2px solid var(--line); border-radius: 6px; padding: .1rem .45rem; font-size: .82rem; color: var(--text); }

.events-admin { display: flex; flex-direction: column; gap: 10px; }
.ev-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .7rem .8rem; display: flex; flex-direction: column; gap: 6px; }
.ev-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ev-phase { font-size: .82rem; font-weight: 700; padding: .15rem .5rem; border-radius: 6px; background: var(--bg-2); color: var(--muted); }
.ev-phase.open { background: rgba(47,107,94,.15); color: var(--sapin); }
.ev-phase.deposit { background: rgba(242,165,22,.15); color: var(--brique-texte); }
.ev-phase.ended { background: rgba(242,165,22,.15); color: var(--brique-texte); }
.ev-dates { font-size: .82rem; color: var(--muted); }
.ev-card .row { display: flex; gap: 8px; justify-content: flex-end; }
.ev-form { gap: 10px; }
.ev-field { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); min-width: 0; }
.ev-field input { width: 100%; min-width: 0; padding: .55rem .6rem; border-radius: 10px; border: 2px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 16px; }
.ev-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; }
.ev-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ev-emoji { text-align: center; }
.ev-sub { font-size: .82rem; color: var(--text); font-weight: 600; margin-top: 4px; }

/* ================= v0.8 : mini-jeux ================= */
.game-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 10px; }
.g-zoom { background: linear-gradient(135deg, rgba(47,107,94,.14), var(--card) 60%); }
.g-duel { background: linear-gradient(135deg, rgba(232,104,28,.14), var(--card) 60%); }
.g-shared { background: linear-gradient(135deg, rgba(242,165,22,.14), var(--card) 60%); }
.g-head { display: flex; gap: 12px; align-items: flex-start; }
.g-head b { display: block; font-family: var(--f-texte); font-weight: 700; font-size: 1.2rem; }
.g-head small { color: var(--muted); font-size: .85rem; line-height: 1.4; display: block; margin-top: 2px; }
.g-icon { font-size: 2rem; line-height: 1; }
.g-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.g-foot .muted { color: var(--muted); font-size: .82rem; }
.g-foot .join { display: flex; gap: 6px; align-items: center; }
.code-in { width: 84px; padding: .5rem .6rem; border-radius: 10px; border: 2px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 16px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; text-align: center; }
.g-rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.g-rooms .chip { padding: .35rem .8rem; }
.g-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.g-item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--bg-2); border: 2px solid var(--line); border-radius: 10px; padding: .55rem .7rem; text-align: left; }
.g-item small { color: var(--muted); }
.g-item.turn { border-color: var(--accent); }
.g-item.turn small { color: var(--brique-texte); font-weight: 700; }
.start-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* Zoom */
.zoom-head { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 8px; color: var(--muted); }
.zoom-head b { color: var(--text); font-family: var(--f-titre); font-size: 1.1rem; }
.zoom-box { position: relative; width: min(300px, 76vw); aspect-ratio: 3 / 4; margin: 0 auto; border-radius: var(--r-md); overflow: hidden; background: var(--bg-2); border: 3px solid var(--line); }
.zoom-box img { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; }
.zoom-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.zoom-msg { text-align: center; font-weight: 600; min-height: 1.4em; margin: 10px 0; }
.zoom-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.zoom-choice { transition: transform .2s, opacity .2s; }
.zoom-choice.good .frame { outline: 4px solid var(--sapin); outline-offset: 2px; }
.zoom-choice.bad { opacity: .45; }
.zoom-choice.bad .frame { outline: 4px solid var(--danger); outline-offset: 2px; }
.zoom-done { text-align: center; padding-top: 10vh; }
.zoom-done .big { font-size: 4rem; }

/* Légendes en duel */
.room-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.room-code { font-family: var(--f-chiffres); font-weight: 800; font-size: 1.8rem; letter-spacing: .2em; color: var(--brique-texte); }
.timer { font-weight: 800; font-size: 1.1rem; background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: .3rem .8rem; }
.timer.hurry { color: var(--danger); border-color: var(--danger); }
.room-hint { text-align: center; color: var(--muted); font-size: .9rem; margin: 6px 0 12px; }
.room-hint b { color: var(--text); }
.room-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.room-actions .muted { text-align: center; color: var(--muted); }
.room-status { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.room-status .muted { color: var(--muted); }
.who-done { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chip.ok { border-color: var(--sapin); color: var(--sapin); padding-right: .7rem; }
.room-photo { display: block; width: min(240px, 64vw); aspect-ratio: 3 / 4; margin: 0 auto 10px; }
.room-photo .frame { height: 100%; }
.write-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.write-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
.write-card .room-photo { width: 96px; margin: 0; grid-row: span 2; }
.write-card .rar { display: none; }
.write-card textarea { width: 100%; padding: .7rem .8rem; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; resize: none; }
.write-card .btn { justify-self: end; }
.duel-options { display: flex; flex-direction: column; gap: 10px; }
.duel-opt { width: 100%; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .9rem 1rem; font-size: 1.05rem; font-weight: 600; text-align: center; min-height: 56px; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; overflow-wrap: anywhere; }
.duel-opt:disabled { opacity: 1; }
.duel-opt.picked { border-color: var(--accent); background: rgba(242,165,22,.12); }
.duel-opt.mine { border-style: dashed; color: var(--muted); }
.duel-opt.result small { color: var(--muted); font-weight: 500; font-size: .82rem; }
.duel-opt.won { border-color: var(--accent); box-shadow: var(--ombre-sm); }
.final-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.final-opt { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.final-opt .room-photo { width: 100%; margin: 0; }
.final-opt small { color: var(--muted); font-weight: 500; }
.final-opt.picked { border-color: var(--accent); background: rgba(242,165,22,.12); }
.final-opt.mine { opacity: .6; }
.final-opt:disabled { color: var(--text); }
.room-sub { font-family: var(--f-texte); color: var(--muted); font-weight: 500; margin: 18px 0 8px; }
.leaderboard { margin: 0; padding-left: 1.4rem; display: flex; flex-direction: column; gap: 4px; }
.leaderboard li span { float: right; color: var(--muted); }
.all-captions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.all-captions li { background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: .5rem .7rem; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.all-captions small { color: var(--muted); }
.hs-reveal { width: min(260px, 70vw); aspect-ratio: 3 / 4; margin: 0 auto 8px; animation: boom .8s ease-out; }
.hs-reveal .frame { height: 100%; }

/* Hors-séries */
.hs-num { position: absolute; top: 7px; right: 7px; z-index: 3; font-family: var(--f-chiffres); font-weight: 800; font-size: .72rem; padding: .1rem .45rem; border-radius: var(--r-pill); color: var(--papier); background: var(--brique); border: 1.5px solid var(--cacao); }
.hs-caption { position: absolute; inset: auto 0 0 0; z-index: 3; padding: 26px 10px 10px; background: linear-gradient(transparent, rgba(58,31,18,.85)); font-family: var(--f-texte); font-weight: 800; font-size: clamp(.7rem, 7cqw, 1.15rem); line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
.photo-card:has(.hs-caption) .fx-badge { bottom: auto; top: 30px; right: 7px; left: auto; }
.grid .hs-caption { font-size: clamp(.55rem, 8cqw, .8rem); padding: 18px 5px 6px; }
.hs-hidden { opacity: .45; }

/* Pack partagé */
.shared-status { text-align: center; font-weight: 700; padding: .6rem; border-radius: var(--r-md); background: var(--card); border: 2px solid var(--line); }
.shared-status.turn { border-color: var(--accent); color: var(--brique-texte); }
.shared-card:disabled { opacity: 1; }
.shared-card.taken { opacity: .45; }
.shared-card.taken.me { opacity: .75; }
.shared-card .caption { font-size: .82rem; white-space: normal; }

/* ================= v0.9 : filtres renforcés, nouveaux effets ================= */
/* Calque d'ambiance des filtres (au-dessus de la photo, sous les stickers) */
.photo-card[class*="fx-t-"]::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.fx-t-warm img { filter: sepia(.35) saturate(1.7) hue-rotate(-14deg) brightness(1.06) contrast(1.06); }
.fx-t-warm::before { background: radial-gradient(circle at 0% 0%, rgba(255,140,30,.75), transparent 55%), radial-gradient(circle at 100% 100%, rgba(255,60,40,.35), transparent 45%); mix-blend-mode: screen; }
.fx-t-cold img { filter: saturate(.6) hue-rotate(12deg) brightness(1.04) contrast(1.2); }
.fx-t-cold::before { background: radial-gradient(ellipse at center, transparent 45%, rgba(0,12,45,.7) 100%), linear-gradient(rgba(60,130,255,.32), rgba(60,130,255,.32)); mix-blend-mode: multiply; }
.fx-t-pop img { filter: saturate(2.6) contrast(1.4) brightness(1.05); }
.fx-t-pop::before { box-shadow: inset 6px 0 0 rgba(255,0,140,.55), inset -6px 0 0 rgba(0,230,255,.55), inset 0 6px 0 rgba(255,230,0,.5); background: radial-gradient(circle, rgba(255,255,255,.18) 25%, transparent 27%) 0 0 / 6px 6px; }
.fx-t-vintage img { filter: sepia(.7) saturate(.8) contrast(.92) brightness(1.08); }
.fx-t-vintage::before { background: radial-gradient(ellipse at center, transparent 50%, rgba(60,30,0,.6) 100%), repeating-linear-gradient(0deg, rgba(0,0,0,.07) 0 1px, transparent 1px 3px), linear-gradient(rgba(255,235,190,.2), rgba(255,235,190,.2)); }
.fx-t-dream img { filter: blur(1.3px) brightness(1.2) saturate(1.5); }
.fx-t-dream::before { background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.45), transparent 60%), linear-gradient(160deg, rgba(255,150,220,.35), rgba(150,180,255,.35)); mix-blend-mode: screen; }
.fx-t-duotone::before { background: linear-gradient(135deg, #ff4fa3, #3b6bff); mix-blend-mode: screen; opacity: .75; }

/* Date jetable */
.fx-t-disposable img { filter: saturate(1.25) contrast(1.1) sepia(.15); }
.fx-t-disposable::before { background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.35) 100%); }
.fx-date { position: absolute; right: 7%; bottom: 9%; z-index: 2; font-family: 'Courier New', monospace; font-weight: 700; font-size: 7cqw; letter-spacing: .05em; color: #ff8a1e; text-shadow: 0 0 3px rgba(255,110,0,.9), 0 0 8px rgba(255,110,0,.6); pointer-events: none; }
.photo-card:has(.caption) .fx-date { bottom: 18%; }
/* Bande dessinée */
.fx-t-comic img { filter: saturate(2) contrast(1.7) brightness(1.08); }
.fx-t-comic::before { background: radial-gradient(circle, rgba(0,0,0,.4) 32%, transparent 34%) 0 0 / 5px 5px; mix-blend-mode: multiply; box-shadow: inset 0 0 0 4px #111; }
/* Croquis */
.fx-t-sketch { background: #f3efe4; }
.fx-t-sketch img { filter: grayscale(1) contrast(1.7) brightness(1.12); mix-blend-mode: multiply; }
.fx-t-sketch::before { background: repeating-linear-gradient(115deg, rgba(0,0,0,.09) 0 1px, transparent 1px 4px), repeating-linear-gradient(25deg, rgba(0,0,0,.05) 0 1px, transparent 1px 5px); mix-blend-mode: multiply; }
/* Découpes */
.fx-t-cutheart, .fx-t-cutstar, .fx-t-cutcircle { background: linear-gradient(135deg, #ffd1e8, #c9d7ff 55%, #fff1b8); }
.fx-t-cutcircle img { clip-path: circle(43% at 50% 50%); }
.fx-t-cutstar img { clip-path: polygon(50% 6%, 61% 37%, 95% 38%, 68% 58%, 78% 92%, 50% 72%, 22% 92%, 32% 58%, 5% 38%, 39% 37%); }
.fx-t-cutheart img { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 90 L12 52 C-4 34 10 10 30 12 C40 13 47 20 50 27 C53 20 60 13 70 12 C90 10 104 34 88 52 Z'/%3E%3C/svg%3E") center / 92% auto no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 90 L12 52 C-4 34 10 10 30 12 C40 13 47 20 50 27 C53 20 60 13 70 12 C90 10 104 34 88 52 Z'/%3E%3C/svg%3E") center / 92% auto no-repeat; }

/* Full art : la photo prend toute la carte, liseré nacré */
.frame.fx-f-fullart { padding: 0; background: none; box-shadow: 0 0 0 2px rgba(255,255,255,.55), 0 0 18px rgba(199,116,232,.45), 0 8px 22px rgba(0,0,0,.45); }
.frame.fx-f-fullart > .photo-card { border-radius: 14px; }
.frame.fx-f-fullart > .photo-card::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 45%, rgba(170,220,255,.25) 52%, transparent 65%); background-size: 260% 100%; animation: shine 3s linear infinite; mix-blend-mode: overlay; }

/* Animations */
.fx-anim { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fx-a-snow { background-image: radial-gradient(circle at 20% 30%, #fff 0 1.6px, transparent 2.2px), radial-gradient(circle at 70% 60%, #fff 0 2.4px, transparent 3px), radial-gradient(circle at 45% 85%, rgba(255,255,255,.85) 0 1.2px, transparent 1.8px); background-size: 46px 46px, 78px 78px, 31px 31px; animation: snow 7s linear infinite; }
@keyframes snow { to { background-position: 0 46px, 0 78px, 0 62px; } }
.fx-a-confetti { background-image: radial-gradient(ellipse 4px 2px at 20% 20%, #ff5c8a 95%, transparent), radial-gradient(ellipse 2px 4px at 70% 40%, #4fd1c5 95%, transparent), radial-gradient(ellipse 4px 2px at 40% 75%, #ffcc33 95%, transparent), radial-gradient(ellipse 3px 3px at 85% 85%, #9f8bff 95%, transparent); background-size: 50px 60px, 64px 70px, 44px 52px, 70px 80px; animation: confetti 5s linear infinite; }
@keyframes confetti { to { background-position: 8px 60px, -6px 140px, 4px 104px, -10px 80px; } }
.fx-a-petals { background-image: radial-gradient(ellipse 5px 3px at 30% 30%, rgba(255,170,205,.95) 95%, transparent), radial-gradient(ellipse 4px 6px at 75% 65%, rgba(255,200,220,.9) 95%, transparent); background-size: 70px 80px, 90px 100px; animation: petals 9s linear infinite; }
@keyframes petals { to { background-position: 70px 160px, -90px 100px; } }
.fx-a-sparkle, .fx-a-sparkle::after { background-image: radial-gradient(circle, #fff 0 1.5px, transparent 2.5px), radial-gradient(circle, rgba(255,240,170,.95) 0 1px, transparent 2px); background-size: 38px 44px, 57px 51px; background-position: 6px 9px, 23px 30px; animation: twinkle 1.6s ease-in-out infinite alternate; }
.fx-a-sparkle::after { content: ''; position: absolute; inset: 0; background-position: 25px 2px, 3px 18px; animation-delay: .8s; }
@keyframes twinkle { from { opacity: .15; filter: drop-shadow(0 0 0 #fff); } to { opacity: 1; filter: drop-shadow(0 0 3px #fff); } }
.frame.fx-a-flicker { animation: flicker 3.2s steps(1) infinite; }
.frame.legendary.fx-a-flicker { animation: spin 3s linear infinite, flicker 3.2s steps(1) infinite; }
@keyframes flicker { 0%, 100% { filter: none; } 8% { filter: brightness(1.6) saturate(1.4); } 10% { filter: brightness(.6); } 12% { filter: brightness(1.4); } 14% { filter: none; } 62% { filter: brightness(1.3); } 63% { filter: brightness(.75); } 64% { filter: none; } }

/* Numérotée et signée */
.fx-serial { position: absolute; top: 7px; left: 50%; transform: translateX(-50%); z-index: 3; font-family: var(--f-chiffres); font-weight: 800; font-size: max(.62rem, 5.5cqw); padding: .05rem .5em; border-radius: 6px; color: #3a2a00; background: linear-gradient(90deg, #f7e08a, #fff6c8, #d9a930); box-shadow: 0 1px 4px rgba(0,0,0,.45); white-space: nowrap; }
.fx-sign { position: absolute; right: 8%; bottom: 13%; z-index: 2; font-family: 'Caveat', cursive; font-weight: 700; font-size: 11cqw; line-height: 1; color: #ffd76a; transform: rotate(-9deg); text-shadow: 0 1px 0 #7a5200, 0 0 6px rgba(0,0,0,.6); pointer-events: none; white-space: nowrap; max-width: 80%; overflow: hidden; }
.photo-card:has(.caption) .fx-sign { bottom: 22%; }
.photo-card:has(.fx-date) .fx-sign { bottom: 24%; }

/* ================= v0.9 : Pixel, duel ================= */
.pixel-canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.duel-box { position: relative; }
.duel-count { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(58,31,18,.82); font-family: var(--f-titre); font-weight: 800; font-size: 5rem; color: var(--accent); }
.duel-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin: 4px 0 6px; }
.duel-score span { display: flex; flex-direction: column; align-items: center; }
.duel-score b { font-family: var(--f-titre); font-size: 2rem; line-height: 1; }
.duel-score small { color: var(--muted); font-size: .82rem; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-score .me b { color: var(--brique-texte); }
.duel-score .vs { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }

/* ================= v0.9 : échanges, cloche ================= */
.bell { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--onglet); background: transparent; color: var(--creme); display: grid; place-items: center; flex: none; }
.bell .badge { top: -4px; left: auto; right: -4px; }
.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.act-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .5rem .6rem; }
.act.unread .act-btn { border-color: var(--accent-2); background: rgba(232,104,28,.08); }
.act-thumb { width: 40px; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; flex: none; }
.act-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.act-icon { width: 40px; text-align: center; font-size: 1.4rem; flex: none; }
.act-text { flex: 1; min-width: 0; font-size: .9rem; overflow-wrap: anywhere; }
.act-text small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }

.trade-card { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.trade-card.hot { border-color: var(--accent); }
.trade-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.trade-head small { color: var(--muted); }
.trade-row { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: center; }
.trade-row > small, .trade-summary small { color: var(--muted); font-size: .82rem; }
.trade-thumbs { display: flex; gap: 6px; align-items: center; overflow-x: auto; min-height: 30px; }
.trade-thumb { width: 52px; flex: none; aspect-ratio: 3 / 4; display: block; }
.trade-thumb .frame { height: 100%; padding: 2px; }
.trade-thumb .rar, .trade-thumb .num, .trade-thumb .hs-caption, .trade-thumb .fx-sign, .trade-thumb .fx-date { display: none; }
.trade-thumb .hs-num { font-size: .5rem; top: 3px; right: 3px; }
.trade-thumb .fx-badge { font-size: .5rem; bottom: 3px; left: 3px; }
.trade-thumb .gone { display: grid; place-items: center; height: 100%; border: 2px dashed var(--line); border-radius: 8px; color: var(--muted); }
.trade-f { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; background: var(--bg-2); border: 2px solid var(--line); border-radius: 999px; padding: .2rem .55rem .2rem .25rem; }
.trade-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.trade-history summary { cursor: pointer; color: var(--muted); padding: .4rem 0; margin-bottom: 6px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: 4px; margin: 6px 0 10px; }
.seg { border: 0; background: none; border-radius: 9px; padding: .55rem; font-weight: 700; color: var(--muted); }
.seg.on { background: var(--accent); color: var(--cacao); }
.trade-friends { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.trade-friends input { margin-left: auto; width: 90px; padding: .45rem .5rem; border-radius: 10px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; text-align: right; }
.trade-grid { margin-bottom: 12px; }
.trade-pick .check-mark { display: none; position: absolute; top: 6px; left: 6px; z-index: 4; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--papier); background: rgba(58,31,18,.4); place-items: center; font-weight: 800; }
.trade-pick.on .check-mark { display: grid; background: var(--accent); color: var(--cacao); border-color: var(--accent); }
.trade-pick.on .frame { outline: 3px solid var(--accent); outline-offset: 2px; }
.trade-pick:disabled { opacity: .45; }
.trade-pick.missing-for-me .caption { color: var(--accent); }
.trade-summary { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); background: var(--bg-2); border-top: 1px solid var(--trait); margin: 0 -16px; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; }
.trade-summary > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: center; }
.list li .btn.small { padding: .45rem .7rem; }
@media (max-width: 420px) {
  .top-right { gap: 6px; }
  .me-chip { max-width: 26vw; padding: .35rem .6rem; }
  .wallet-chip { padding-right: .55rem; }
}

/* ================= V1 : comptes ================= */
.auth-tabs { margin: 0 0 14px; }
.auth-form { display: flex; flex-direction: column; gap: 6px; }
.auth-form label:not(.check) { font-size: .88rem; font-weight: 600; color: var(--cacao); margin-top: 6px; }
.auth-form input:not([type=checkbox]) { width: 100%; padding: .8rem 1rem; border-radius: var(--r-md); border: var(--contour); background: var(--papier); color: var(--text); font-size: 16px; }
.auth-form input:not([type=checkbox]):focus { outline: 3px solid var(--moutarde); outline-offset: 0; }
.auth-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.auth-form .btn { width: 100%; margin-top: 12px; }
.auth-form .check { margin-top: 6px; font-size: .86rem; align-items: flex-start; }
.auth-form .check a, .legal-links a { color: var(--sapin); }
.pw-hint { color: var(--muted); font-size: .82rem; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.claim-banner { background: linear-gradient(135deg, rgba(242,165,22,.16), rgba(232,104,28,.12)); border: 1px solid var(--accent); border-radius: var(--r-md); padding: .8rem; margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.legal-links { text-align: center; font-size: .82rem; color: var(--muted); margin-top: 18px; }
.verify-banner { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: rgba(242,165,22,.14); border-bottom: 1px solid var(--accent); padding: .6rem 16px; font-size: .85rem; }
.session-row { display: flex; justify-content: space-between; background: var(--card); border: 2px solid var(--line); border-radius: 10px; padding: .5rem .7rem; font-size: .88rem; }
.session-row small { color: var(--muted); }
.users-admin { display: flex; flex-direction: column; gap: 8px; }
.login .login-card { padding-bottom: 24px; }
.login { place-items: start center; padding-top: max(24px, 6vh); }
.safety-row { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--trait); }
.safety-row .link-btn { font-size: .82rem; }
.report-target { display: flex; gap: 10px; align-items: center; font-size: .88rem; overflow-wrap: anywhere; }
.report-target img { width: 48px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; flex: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.edit-form .check { justify-content: flex-start; }
.edit-form .check input { width: 20px; height: 20px; padding: 0; flex: none; }
a.btn { color: var(--text); }
a.btn.primary { color: var(--cacao); }

/* ================= V1 étape 3 ================= */
/* Accueil : pack en haut, puis packs découverte, quêtes et fil */
.pack-stage > .home-box, .pack-stage > .feed, .pack-stage > .feed-title, .pack-stage > #feed-more, .pack-stage > #feed-empty { justify-self: stretch; width: 100%; }
.home-title { margin: 1.4rem 0 .5rem; color: var(--text); font-weight: 700; }
.home-box { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 4px 14px 12px; margin-top: 18px; }
.home-box .home-title { margin-top: .8rem; }
.home-box .section-hint { margin-top: 0; }
.disc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--trait); }
.disc-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.disc-row .who small { color: var(--muted); }
.disc-row.wait .avatar { opacity: .6; }
.quests-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.quests-head small { color: var(--muted); font-size: .82rem; }
.quest { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--trait); }
.quest .q-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.quest .q-text b { font-weight: 600; font-size: .93rem; }
.quest .q-text small { color: var(--muted); font-size: .82rem; }
.quest.ready { background: linear-gradient(90deg, rgba(242,165,22,.08), transparent); }
.quest.claimed .q-text b { color: var(--muted); text-decoration: line-through; }
.quest .q-done { color: var(--sapin); font-weight: 800; padding: 0 10px; }
.quest .bar { max-width: 160px; }

/* Fil d'actualités */
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px; }
.feed-head { display: flex; gap: 10px; align-items: flex-start; }
.feed-txt { flex: 1; min-width: 0; font-size: .93rem; line-height: 1.35; }
.feed-txt small { display: block; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.av-btn { border: 0; background: none; padding: 0; border-radius: 50%; flex: none; }
.avatar.pic { overflow: hidden; background: var(--line); }
.avatar.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px; }
.feed-grid.n2 { grid-template-columns: repeat(2, 1fr); }
.feed-ph { position: relative; border: 0; padding: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--bg-2); }
.feed-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-ph .dot { position: absolute; right: 5px; bottom: 5px; box-shadow: 0 0 0 2px rgba(58,31,18,.4); }
.feed-one { position: relative; display: block; width: 100%; border: 2px solid var(--common); padding: 0; margin-top: 10px; border-radius: var(--r-md); overflow: hidden; background: var(--bg-2); max-height: 360px; }
.feed-one.special { border-color: var(--special); }
.feed-one.legendary { border-color: var(--legendary); box-shadow: var(--ombre-sm); }
.feed-one.shiny { box-shadow: 0 0 0 2px rgba(242,165,22,.4), 0 0 22px rgba(192,57,43,.35); }
.feed-one img { width: 100%; max-height: 356px; object-fit: cover; display: block; }
.feed-one .caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; background: linear-gradient(transparent, rgba(58,31,18,.7)); font-size: .85rem; text-align: left; }
.react-bar { display: flex; gap: 6px; margin-top: 8px; }
.react { border: 2px solid var(--line); background: var(--bg-2); border-radius: 999px; padding: .3rem .7rem; font-size: .95rem; min-height: 34px; }
.react.on { border-color: var(--accent-2); background: rgba(232,104,28,.15); }
.react small { color: var(--muted); font-size: .82rem; }
.react.on small { color: var(--text); }
.sheet .react-bar { margin: 10px 0; }

/* Photos : paliers, Pellicule, thème */
.milestones { margin: 6px 0 10px; }
.milestones > small { color: var(--muted); font-size: .82rem; }
.ms-row { display: flex; gap: 6px; margin-top: 6px; }
.ms { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--bg-2); border: 2px solid var(--line); border-radius: 10px; padding: 6px 4px; text-align: center; }
.ms b { font-family: var(--f-titre); }
.ms small { color: var(--muted); font-size: .82rem; line-height: 1.15; }
.ms.done { border-color: var(--sapin); background: var(--creme-2); }
.ms.done b { color: var(--sapin); }
.pellicule { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border-radius: var(--r-md); background: linear-gradient(120deg, rgba(242,165,22,.14), rgba(232,104,28,.12)); border: 1px solid rgba(242,165,22,.35); }
.pellicule > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pellicule small { color: var(--muted); font-size: .82rem; }
.pellicule.off { background: var(--bg-2); border-color: var(--line); }
.pel-ico { font-size: 1.8rem; }
.theme-check { margin-top: 10px; padding: 10px; border-radius: var(--r-md); background: var(--bg-2); border: 1px dashed var(--line); }
.theme-check small { color: var(--muted); }

/* Filtres de collection */
.filter-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips .chip { padding: .35rem .8rem; white-space: nowrap; }
.filter-chips .chip.on { background: var(--moutarde); border-color: var(--cacao); color: var(--cacao); font-weight: 700; }
.filter-chips .chip:disabled { opacity: 1; border-style: dashed; color: var(--texte-doux); background: var(--creme-2); }
.filter-chips .chip small { color: var(--muted); }

/* Profils, succès, invitation */
.me-chip { display: inline-flex; align-items: center; gap: 6px; }
.me-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.me-chip { min-height: 38px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .card-title { margin: 0; }
.profile-av .avatar { width: 72px; height: 72px; font-size: 1.8rem; }
.profile-bio { background: var(--card); border-radius: var(--r-md); padding: 10px 12px; margin: 12px 0; font-style: italic; }
.profile-edit { display: flex; flex-direction: column; gap: 10px; }
.profile-edit textarea { width: 100%; background: var(--bg); color: var(--text); border: 2px solid var(--line); border-radius: var(--r-md); padding: .6rem .8rem; font: inherit; resize: vertical; }
.profile-edit .room-actions { flex-wrap: wrap; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-ach { width: 40px; height: 40px; display: grid; place-items: center; font-size: 1.3rem; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); }
.ach-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.ach { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: 10px; opacity: .6; }
.ach.on { opacity: 1; border-color: rgba(242,165,22,.45); }
.ach-emoji { font-size: 1.6rem; filter: grayscale(1); }
.ach.on .ach-emoji { filter: none; }
.ach-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ach-text small { color: var(--muted); font-size: .82rem; }
.ach-state { color: var(--muted); font-size: .85rem; }
.ach.on .ach-state { color: var(--sapin); font-weight: 800; }
.invite { display: flex; align-items: center; gap: 10px; background: linear-gradient(120deg, rgba(232,104,28,.15), rgba(47,107,94,.12)); border: 2px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin: 10px 0; }
.invite .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.invite .who small { color: var(--muted); font-size: .82rem; }
.inv-ico { font-size: 1.6rem; }
.list li .who { cursor: pointer; }
.rules-sec h3 { margin: 1rem 0 .3rem; }
.rules-sec ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 5px; color: var(--text); font-size: .92rem; }

/* Visite guidée */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour-spot { position: fixed; border-radius: var(--r-md); box-shadow: 0 0 0 9999px rgba(58,31,18,.78); transition: all .3s cubic-bezier(.2,.8,.2,1); pointer-events: none; outline: 2px solid var(--accent); }
.tour-bubble { position: fixed; left: 16px; right: 16px; max-width: 420px; margin: 0 auto; background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--ombre); }
.tour-bubble small { color: var(--brique-texte); font-size: .82rem; font-weight: 700; }
.tour-bubble b { display: block; font-family: var(--f-titre); font-size: 1.15rem; margin-top: 2px; }
.tour-bubble p { margin: 6px 0 12px; color: var(--muted); line-height: 1.4; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; }
.link-btn.inline { padding: 0; min-height: 0; font-size: inherit; text-decoration: underline; }

/* Confirmation avant l'ajout de photos */
.confirm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 12px 0; }
.confirm-grid.one { grid-template-columns: minmax(0, 220px); justify-content: center; }
.confirm-ph { border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 4; border: 2px solid var(--common); background: var(--bg); }
.confirm-ph.special { border-color: var(--special); }
.confirm-ph.legendary { border-color: var(--legendary); box-shadow: var(--ombre-sm); }
.confirm-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.install-steps { padding-left: 1.3rem; display: flex; flex-direction: column; gap: 8px; line-height: 1.4; }

.bonus-stock { margin-top: 6px; color: var(--brique-texte); }
.bonus-stock small { color: var(--muted); }
.bonus-stock { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 10px; }

/* Mon sac */
.bag { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bag-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.bag-ico { font-size: 1.7rem; }
.bag-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bag-txt small { color: var(--muted); font-size: .82rem; }

/* Changer une photo */
.replace-box { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; }
.replace-box > small { font-size: .82rem; }
.replace-preview { display: flex; align-items: center; gap: 10px; }
.replace-preview img { width: 72px; height: 96px; object-fit: cover; border-radius: 10px; border: 2px solid var(--accent); }
.replace-preview span { color: var(--muted); font-size: .85rem; }

/* Cadrage d'une carte */
.framer-box { position: relative; width: min(100%, 300px); aspect-ratio: 3 / 4; margin: 12px auto 8px; overflow: hidden; border-radius: 14px; background: #000; border: 2px solid var(--accent); touch-action: none; cursor: grab; }
.framer-box.fit { cursor: default; }
.framer-box img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.framer-zoom { display: flex; align-items: center; gap: 10px; max-width: 300px; margin: 0 auto; }
.framer-zoom input { flex: 1; }
.framer-hint { text-align: center; font-size: .85rem; }

/* Fil : carte pas encore obtenue, face cachée */
.feed-one.back { display: grid; place-items: center; align-content: center; gap: 4px; height: 110px;
  background: repeating-linear-gradient(135deg, var(--cacao) 0 14px, var(--rouille) 14px 28px); color: var(--accent); font-family: var(--f-titre); font-weight: 800; }
.feed-one.back small { color: var(--muted); font-family: var(--f-texte); font-weight: 500; font-size: .82rem; }

/* Zéro divulgâchage : photo face cachée, phrase à recopier */
.thumb.hidden-card { display: grid; place-items: center; border-radius: 10px; border: 2px solid var(--common); background: repeating-linear-gradient(135deg, var(--cacao) 0 10px, var(--rouille) 10px 20px); color: var(--accent); font-weight: 800; font-size: 1.4rem; aspect-ratio: 3 / 4; }
.thumb.hidden-card.special { border-color: var(--special); }
.thumb.hidden-card.legendary { border-color: var(--legendary); }
.small-link { display: block; padding: 4px 0 0; font-size: .82rem; }
.unlock-sentence { margin: 8px 0 12px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 8px; font-style: italic; user-select: none; -webkit-user-select: none; }

/* Échange à l'aveugle */
.blind-card { position: relative; display: grid; place-items: center; width: 100%; height: 100%; min-height: 48px; aspect-ratio: 3 / 4; border-radius: 10px; border: 2px solid var(--common);
  background: repeating-linear-gradient(135deg, var(--cacao) 0 10px, var(--rouille) 10px 20px); color: var(--accent); font-family: var(--f-titre); font-weight: 800; }
.blind-card.special { border-color: var(--special); }
.blind-card.legendary { border-color: var(--legendary); box-shadow: var(--ombre-sm); }
.blind-card .blind-q { font-size: 1.4rem; }
.blind-card.big .blind-q { font-size: 2.2rem; }
.blind-fx { position: absolute; top: 5px; right: 6px; font-size: .82rem; }
.blind-info { position: absolute; bottom: 6px; left: 4px; right: 4px; text-align: center; color: var(--muted); font-family: var(--f-texte); font-weight: 600; font-size: .82rem; }
.blind-label { position: absolute; left: 6px; right: 6px; bottom: 22px; text-align: center; font-size: .82rem; font-weight: 700; color: var(--sapin); }
.trade-thumb.last, .trade-pick.last { outline: 2px dashed var(--danger); outline-offset: 2px; border-radius: 10px; }
.trade-reveal .slot.boom { animation: pop .5s; }
@keyframes pop { 50% { transform: scale(1.08); } }

/* Retouches */
.retouche-result { width: min(220px, 70%); margin: 10px auto; aspect-ratio: 3 / 4; }
.retouche-result .frame { height: 100%; }
.retouche-result.ok { animation: pop .6s; }
.retouche-result.ko { filter: grayscale(1) blur(1px); opacity: .5; transform: rotate(-4deg); transition: all .6s; }
.push-box { display: flex; flex-direction: column; gap: 8px; }

.photos-actions { display: inline-flex; gap: 6px; }
.reorder-grid .slot.picked { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-md); transform: scale(.94); }
.c-head > span:last-child { display: inline-flex; gap: 8px; }

/* ================= V1.2 : navigation, À faire, sac en grille, mes albums, outils d'album ================= */
.tabbar button { font-size: .82rem; white-space: nowrap; }
.badge.dot-badge { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 10px; left: calc(50% + 10px); }
.wallet-chip { position: relative; }
.wallet-chip .bag-ico-top { font-size: 1rem; line-height: 1; }
.wallet-chip .badge.dot-badge { top: -2px; left: auto; right: -2px; }

/* Accueil : À faire */
.pack-stage > .todo-title, .pack-stage > .todo { justify-self: stretch; width: 100%; }
.todo-title { margin: 22px 0 6px; }
.todo { display: flex; flex-direction: column; gap: 8px; }
.todo-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.todo-ico { font-size: 1.5rem; width: 32px; text-align: center; flex: none; }
.todo-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.todo-row .who small { color: var(--muted); font-size: .82rem; }
.todo-calm { color: var(--muted); text-align: center; margin: 6px 0; font-size: .9rem; }

/* Collection : raccourcis */
.coll-chips { margin: 4px 0 8px; }

/* Outils d'album : recherche, rareté, tri */
.tools { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.tools-row { display: flex; gap: 8px; }
.tools-q { flex: 1; min-width: 0; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); color: var(--text); padding: .6rem .8rem; font: inherit; font-size: 16px; }
.tools-sort { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); color: var(--text); padding: .5rem .6rem; font: inherit; font-size: .85rem; max-width: 42%; }
.tools-rar { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tools-rar::-webkit-scrollbar { display: none; }
.tools-rar .chip { padding: .3rem .75rem; white-space: nowrap; }
.tools-rar .chip.on { background: var(--moutarde); border-color: var(--cacao); color: var(--cacao); font-weight: 700; }

/* Mes albums */
.my-albums { display: flex; flex-direction: column; gap: 10px; }
.my-albums .home-title { margin: 6px 0 0; }
.my-album-card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px; }
.mosaic { width: 78px; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; flex: none; display: grid; gap: 2px; background: var(--bg-2); }
.mosaic.n2 { grid-template-columns: 1fr 1fr; }
.mosaic.n3, .mosaic.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic.n3 img:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.mosaic-empty { display: grid; place-items: center; font-size: 2rem; }
.my-album-card .album-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ma-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.ma-kind { color: var(--muted); font-size: .82rem; border: 2px solid var(--line); border-radius: 999px; padding: .05rem .5rem; white-space: nowrap; }
.my-album-card .mini { display: flex; gap: 10px; color: var(--muted); font-size: .82rem; }
.ma-status { font-size: .82rem; color: var(--muted); }
.ma-status.hot { color: var(--brique-texte); font-weight: 600; }
.ma-done summary { color: var(--muted); cursor: pointer; padding: 8px 0; }
.ma-done .my-album-card { margin-top: 8px; opacity: 1; background: var(--creme-2); color: var(--texte-doux); }
.add-big { margin: 0 0 12px; font-size: 1.05rem; padding: .9rem 1rem; }
.rar-pick { justify-content: flex-start; margin-top: 8px; gap: 6px; display: flex; align-items: center; }

/* Mon sac en grille */
.bag-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 10px; }
@media (max-width: 360px) { .bag-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bag-tile { position: relative; aspect-ratio: 1; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px 4px; }
.bag-tile.off { filter: grayscale(.6); opacity: 1; background: var(--creme-2); color: var(--texte-doux); }
.bag-big { font-size: 1.9rem; line-height: 1; }
.bag-big.xl { font-size: 3.2rem; display: block; margin: 8px 0 4px; }
.bag-name { font-size: .68rem; color: var(--muted); text-align: center; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bag-n { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: .68rem; font-weight: 700; background: var(--accent-2); color: var(--papier); border-radius: 8px; padding: .05rem .35rem; }
.bag-tile.off .bag-n { background: var(--line); }
.bag-detail { text-align: center; margin-bottom: 12px; }
.muted.small { font-size: .82rem; }

/* Ajout de photos : le champ reste dans la page (iPhone) mais invisible */
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; left: -9999px; }
.prep { position: fixed; inset: 0; z-index: 60; background: rgba(10,8,18,.82); display: grid; place-items: center; padding: 24px; }
.prep-box { background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px 18px; max-width: 340px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 8px; }
.prep-box p { margin: 0; color: var(--muted); font-size: .9rem; }
.prep-spin { font-size: 2.6rem; animation: prep-bob 1.2s ease-in-out infinite; }
@keyframes prep-bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
.confirm-ph.loading { background: linear-gradient(100deg, var(--card) 30%, var(--line) 50%, var(--card) 70%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; }
.confirm-ph.loading img { opacity: 0; }
.confirm-ph.noprev::after { content: '📷'; display: grid; place-items: center; height: 100%; font-size: 1.6rem; }
.confirm-ph.noprev img { display: none; }
@keyframes shimmer { to { background-position: -100% 0; } }
.wallet-box b { white-space: nowrap; }
#sheet-body > .wallet-box { margin-top: 10px; }
.progress.up-top { position: sticky; top: 64px; z-index: 4; margin: 0 0 12px; box-shadow: var(--ombre-sm); }

/* ================= V1.3 ================= */
/* Listes pliables */
.fold-h { cursor: pointer; user-select: none; -webkit-user-select: none; position: relative; }
.fold-h .fold-arrow { display: inline-block; margin-left: 8px; font-size: .75em; color: var(--muted); transition: transform .15s; }
.fold-h .fold-arrow::before { content: '▾'; }
.fold-h.closed .fold-arrow { transform: rotate(-90deg); }
.quests-head.fold-h { display: flex; align-items: center; }
.quests-head.fold-h .fold-arrow { order: 3; }
.folded { display: none !important; }
.fold-mini { cursor: pointer; }

/* Profils : vrai nom, amis */
.real-name { color: var(--texte-doux); font-size: .9rem; font-weight: 500; margin: 2px 0; }
.pf-list li { padding: 8px 10px; }
.field-label { font-size: .82rem; color: var(--muted); margin-top: 6px; }

/* Booster */
.pack.gold { background: repeating-conic-gradient(from 0deg at 50% 115%, var(--moutarde) 0 9deg, var(--creme-2) 9deg 18deg, var(--orange) 18deg 27deg, var(--creme-2) 27deg 36deg); }
.gold-link { color: var(--sapin); font-weight: 600; }
.gold-btn:not(:disabled) { background: var(--moutarde); color: var(--cacao); }
.booster-odds { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.booster-odds li { background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: .55rem .8rem; font-size: .9rem; }
.stack-btns { display: flex; flex-direction: column; gap: 8px; }
.btn.danger.ghost, .stack-btns .btn.danger { border-color: var(--danger); color: var(--danger); background: transparent; }

/* Pixel en duel (différé) */
.zoom-title { margin: 0 0 4px; color: var(--muted); font-size: .9rem; text-align: center; }
.g-row { display: flex; gap: 6px; align-items: center; }
.g-row .g-item { flex: 1; min-width: 0; }
.g-foot.g-foot-col { flex-direction: column; align-items: stretch; }
.g-foot-col .start-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* Admin : utilisateurs */
.admin-nav { position: sticky; top: 58px; z-index: 3; background: var(--bg); padding: 6px 0 8px; margin-bottom: 6px; }
.admin-nav .chip { text-decoration: none; color: var(--text); }
.user-search input { width: 100%; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); color: var(--text); padding: .65rem .8rem; font: inherit; font-size: 16px; margin-bottom: 8px; }
.u-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; margin-bottom: 6px; }
.u-row input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.u-open { flex: 1; min-width: 0; background: none; border: 0; text-align: left; display: flex; flex-direction: column; padding: 0; }
.u-open small { color: var(--muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-arrow { color: var(--muted); font-size: 1.2rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 6px 0 12px; }
.gift-box { background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 8px; }
.gift-box h3 { margin: 4px 0 0; }
.gift-row { display: flex; align-items: center; gap: 8px; }
.gift-n { width: 70px; }
.gift-n, .gift-msg, .copy-in { background: var(--bg-2); border: 2px solid var(--line); border-radius: 10px; color: var(--text); padding: .5rem .6rem; font: inherit; font-size: 16px; }
.copy-in { flex: 1; min-width: 0; font-size: .85rem; }
.row.wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.u-out { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.gift-box .row, .u-out .row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.quests-head.fold-h h2 { white-space: nowrap; } .quests-head.fold-h small { flex: 1; text-align: right; margin-left: 8px; }

/* ================= V1.4 ================= */
/* Dévoilement : légende de la carte retournée */
.reveal-title { display: inline-block; color: var(--text); font-size: 1rem; margin-bottom: 4px; max-width: 100%; overflow-wrap: anywhere; }
/* Fiche : dates de prise de vue et d'ajout */
.card-dates { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.card-dates:empty { display: none; }
/* Exemplaires : ×1 discret */
.slot .copies.one { font-weight: 600; }
/* Recyclage au choix */
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.step-btn { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg-2); color: var(--text); font-size: 1.1rem; font-weight: 700; line-height: 1; }
.step-btn:disabled { opacity: 1; border-style: dashed; color: var(--texte-doux); background: var(--creme-2); }
.step-n { min-width: 1.4em; text-align: center; font-weight: 700; }
.recycle-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.recycle-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 8px; }
.recycle-row.off { opacity: 1; background: var(--creme-2); color: var(--texte-doux); }
.recycle-thumb { width: 52px; flex: none; }
.recycle-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.recycle-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recycle-info small { color: var(--muted); }
.recycle-total { text-align: center; margin: 6px 0 10px; }
/* Réactions libres */
.react-wrap { margin-top: 8px; }
.react-bar { flex-wrap: wrap; }
.react.more { font-weight: 700; color: var(--muted); }
.react-picker { margin-top: 8px; background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px; }
.react-picker[hidden] { display: none; }
.react-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.react-grid .react { padding: .3rem 0; font-size: 1.2rem; }
.react-own { display: flex; gap: 8px; margin-top: 8px; }
.react-input { flex: 1; min-width: 0; background: var(--card); border: 2px solid var(--line); border-radius: 10px; color: var(--text); padding: .45rem .7rem; font-size: 1rem; }
/* Collection : albums des amis en grille 3×3 */
.fa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; margin-top: 10px; }
.fa-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; color: var(--text); padding: 4px 0; min-width: 0; }
.fa-ring { position: relative; width: 82px; max-width: 100%; aspect-ratio: 1; border-radius: 50%; padding: 4px; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0); }
.fa-pic { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--card); border: 3px solid var(--bg); overflow: hidden; }
span.fa-pic { display: grid; place-items: center; }
span.fa-pic .avatar { width: 100%; height: 100%; font-size: 1.8rem; border-radius: 50%; }
.fa-star { position: absolute; right: -2px; bottom: -2px; background: var(--accent); color: var(--cacao); font-style: normal; font-size: .82rem; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.fa-name { font-size: .85rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fa-count { color: var(--muted); font-size: .82rem; }
/* Fusion de Retouches */
.bag-tile.picked { outline: 2px solid var(--accent); outline-offset: -2px; }
.fuse-pop { animation: boom .6s ease-out; }

/* ================= V1.5 ================= */
/* Cartes regroupées par album puis par ami (recyclage, échanges) */
.grouped { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.group-album { font-size: 1rem; margin: 10px 0 4px; }
.group-album small, .group-owner small { color: var(--muted); font-weight: 500; }
.group-owner { font-size: .88rem; color: var(--muted); margin: 8px 0 4px; }
.recycle-list .group-owner { margin-top: 6px; }
.slot.new-for-them .caption { color: var(--accent-3); }
.trade-pick .copies { position: absolute; top: 7px; right: 7px; background: rgba(58,31,18,.6); font-size: .7rem; font-weight: 700; padding: .1rem .4rem; border-radius: 6px; }
/* Fiche : Retoucher / Recycler côte à côte */
/* Succès par paliers */
.ach.mission { opacity: 1; align-items: flex-start; }
.ach.mission .ach-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.tiers { display: flex; gap: 4px; }
.tier { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 700; border: 2px solid var(--line); color: var(--muted); }
.tier.on { background: var(--moutarde); border-color: var(--cacao); color: var(--cacao); }
.badge-ach sup { font-size: .5rem; color: var(--brique-texte); margin-left: 1px; }
.ev-card.off { opacity: 1; background: var(--creme-2); color: var(--texte-doux); }
/* Roue de la fortune */
.wheel-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 10px 0 14px; }
.wheel { position: relative; width: min(300px, 82vw); aspect-ratio: 1; }
.wheel.small { width: min(220px, 64vw); }
.wheel-disc { position: absolute; inset: 0; border-radius: 50%; border: 6px solid var(--bg-2); box-shadow: 0 0 0 3px var(--accent), 0 10px 30px rgba(58,31,18,.4); overflow: hidden; }
.wheel-seg { position: absolute; left: 50%; top: 0; width: 0; height: 50%; transform-origin: 50% 100%; }
.wheel-lab { position: absolute; top: 8%; left: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; width: 70px; text-align: center; color: var(--cacao); }
.wheel-lab b { font-size: 1.4rem; line-height: 1; }
.wheel-lab small { font-size: .62rem; font-weight: 700; line-height: 1.1; margin-top: 2px; }
.wheel.small .wheel-lab b { font-size: 1.7rem; }
.wheel.small .wheel-lab small { font-size: .75rem; }
.wheel-pin { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 24px solid var(--accent); z-index: 2; filter: drop-shadow(0 2px 3px rgba(58,31,18,.5)); }
.wheel-prize { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.wheel-prize span { font-size: 1.8rem; }
.wheel-reel { font-family: var(--f-titre); font-weight: 800; font-size: 1.5rem; padding: .4rem 1.2rem; border-radius: var(--r-md); background: var(--card); border: 2px solid var(--line); min-width: 60%; text-align: center; }
.wheel-reel.done { border-color: var(--accent); color: var(--brique-texte); animation: boom .6s ease-out; }
.wheel-info { text-align: center; }

/* ================= V1.6 ================= */
/* Bloc « Aujourd'hui » : lignes uniformes */
.pack-stage > .today-title { justify-self: stretch; width: 100%; }
.todo-row.done { opacity: 1; background: var(--creme-2); color: var(--texte-doux); }
.todo-row.hot { background: var(--papier); box-shadow: 0 3px 0 var(--moutarde); border-color: var(--cacao); border-left: 8px solid var(--moutarde); }
/* V1.11 : quêtes du jour sur une seule carte, faits du jour résumés */
.todo-row.quests-card { flex-direction: column; align-items: stretch; gap: 6px; }
.qc-head { display: flex; align-items: center; gap: 12px; }
.qc-head .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qc-head .who small { color: var(--muted); font-size: .82rem; }
.quest-line { display: flex; align-items: center; gap: 10px; padding: 6px 0 0; border-top: 1px solid var(--trait); min-height: 40px; }
.quest-line .ql-label { flex: 1; min-width: 0; font-size: .9rem; }
.quest-line .ql-prog { font-family: var(--f-chiffres); font-size: .85rem; color: var(--texte-doux); background: var(--creme-2); border-radius: var(--r-pill); padding: .15rem .6rem; }
.quest-line.done .ql-label { color: var(--texte-doux); text-decoration: line-through; }
.todo-row.later { opacity: 1; background: var(--creme-2); color: var(--texte-doux); }
.today-done { margin: 2px 4px 0; color: var(--sapin); font-size: .85rem; font-weight: 600; }
.todo-row .q-done { color: var(--sapin); font-weight: 800; padding: 0 10px; }
.todo-row .bar { max-width: 180px; margin-top: 4px; }
.today-link { align-self: center; margin-top: 4px; }
/* Rond rouge « nouveau » */
.new-dot { position: absolute; top: 6px; left: 6px; z-index: 3; width: 12px; height: 12px; border-radius: 50%; background: var(--brique); box-shadow: 0 0 0 2px var(--bg); font-style: normal; }
.new-dot.big { width: auto; min-width: 20px; height: 20px; padding: 0 5px; top: -2px; left: auto; right: -2px; color: var(--papier); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.slot { position: relative; }
.bag-tile .new-dot { top: 6px; left: 6px; }
.seen-all { color: var(--brique-texte); font-weight: 600; margin-bottom: 6px; }
/* Objet trouvé dans un pack */
.item-face { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: radial-gradient(circle at 50% 35%, rgba(242,165,22,.35), var(--card)); border: 3px solid var(--accent); border-radius: var(--r-md); text-align: center; padding: 12px; }
.item-big { font-size: 3.4rem; line-height: 1; }
.item-face b { font-size: 1.1rem; color: var(--brique-texte); }
.item-face small { color: var(--muted); }
.found-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--card); border: 2px solid var(--accent); border-radius: var(--r-md); aspect-ratio: 3 / 4; }
.found-item .item-big { font-size: 2.2rem; }
.found-item small { font-size: .82rem; text-align: center; padding: 0 4px; }
/* Notifications : récompense à récupérer, variante avec ses effets */
.act.with-claim { display: flex; align-items: center; gap: 8px; }
.act.with-claim .act-btn { flex: 1; min-width: 0; }
.act-claim { flex: none; }
.act-claimed { color: var(--sapin); flex: none; padding-right: 6px; }
.act-thumb.fx { width: 46px; flex: none; }
.act-thumb.fx .caption, .act-thumb.fx .rar, .act-thumb.fx .num { display: none; }
.feed-one-fx { display: block; width: min(260px, 100%); margin: 6px 0; background: none; border: 0; padding: 0; }
.tier.gift { box-shadow: 0 0 0 2px var(--brique); }
.ach.claim { border-color: var(--accent); }
/* Qui est-ce ? */
.quiz-photo { width: min(260px, 70vw); margin: 6px auto 12px; }
.quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.quiz-opt { background: var(--card); border: 2px solid var(--line); color: var(--text); font-weight: 700; }
.quiz-opt.right { border-color: var(--sapin); background: rgba(47,107,94,.18); }
.quiz-opt.wrong { border-color: var(--brique-texte); background: rgba(192,57,43,.15); }
.quiz-opt.off { opacity: 1; background: var(--creme-2); color: var(--texte-doux); }
.quiz-info { text-align: center; margin-top: 10px; }
/* Roue : noms des amis */
.wheel-lab.tight small { font-size: .55rem; }
.wheel.small .wheel-lab.tight small { font-size: .62rem; }
.wheel-lab small { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Échanges façon Collection */
.trade-albums { margin: 6px 0 10px; }
.new-ribbon { position: absolute; top: 6px; left: -4px; z-index: 3; background: var(--brique); color: var(--papier); font-weight: 800; font-size: .62rem; padding: .1rem .45rem; border-radius: 4px; box-shadow: 0 2px 4px rgba(58,31,18,.35); }
.has-mark { position: absolute; top: 6px; left: 6px; z-index: 3; width: 20px; height: 20px; border-radius: 50%; background: rgba(58,31,18,.55); color: var(--creme); font-size: .7rem; display: grid; place-items: center; }
.new-ribbon.inline, .has-mark.inline { position: static; display: inline-grid; vertical-align: middle; }
.legend-row { margin: 4px 0 8px; }
.trade-summary.sticky { position: sticky; bottom: -1px; background: var(--bg-2); padding: 10px; border-radius: var(--r-md) 14px 0 0; border-top: 1px solid var(--trait); margin-top: 12px; z-index: 5; }

.trade-summary.compact { padding: 8px 10px; }
.trade-summary.compact .ts-row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.trade-summary.compact .trade-thumbs { max-height: 64px; overflow-x: auto; flex-wrap: nowrap; }

/* ================= V1.7 ================= */
/* Logo (piste B : le pack) */
.logo { display: inline-flex; align-items: center; gap: .3em; }
.logo-ico { width: 1.15em; height: 1.15em; border-radius: 24%; flex: none; }
/* Signature entière (taille adaptée au nom, plus de rognage) */
.fx-sign { max-width: none !important; overflow: visible !important; padding-right: .15em; }

/* Listes pliables : un seul style partout (titre à gauche, pastille ▾ bien visible à droite) */
.fold-h { display: flex !important; align-items: center; gap: 8px; cursor: pointer; }
.fold-h .fold-arrow { margin-left: auto !important; order: 99; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-size: .85rem; color: var(--text); transition: transform .15s; }
.fold-h .fold-arrow::before { content: '▾'; }
.fold-h.closed .fold-arrow { transform: rotate(-90deg); }
.fold-h > small { color: var(--muted); font-weight: 500; }
.cat-head { margin: 10px 0 4px; font-size: 1rem; }
/* Contenu qui défile : fondu et flèche */
.can-right { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
.can-left { -webkit-mask-image: linear-gradient(to left, #000 82%, transparent); mask-image: linear-gradient(to left, #000 82%, transparent); }
.can-left.can-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 82%, transparent); mask-image: linear-gradient(to right, transparent, #000 14%, #000 82%, transparent); }
.set-chips, .filter-chips, .variants-row, .tools-rar, .trade-thumbs, .emoji-pick { position: relative; }
.can-right::after { content: '›'; position: sticky; right: 0; flex: none; align-self: center; margin-left: -18px; width: 18px; text-align: center; font-weight: 800; font-size: 1.2rem; color: var(--brique-texte); pointer-events: none; }
/* Page Jeux */
.game-pick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; position: relative; margin-bottom: 10px; }
.game-pick .g-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.game-pick .g-txt small { color: var(--muted); }
.game-pick .g-go { font-size: 1.6rem; color: var(--muted); }
.game-pick .chip-badge { position: static; }
.game-head { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 12px; }
.game-head .title { margin: 0 0 4px; }
.game-modes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.game-modes.two { display: grid; grid-template-columns: 1fr 1fr; }
.game-modes .join { display: flex; gap: 8px; }
.mode-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 10px; color: var(--text); text-align: center; }
.mode-btn span { font-size: 1.8rem; }
.mode-btn small { color: var(--muted); font-size: .82rem; }
.mode-btn:disabled { opacity: 1; border-style: dashed; color: var(--texte-doux); background: var(--creme-2); }
.duel-friends { background: var(--bg-2); border-radius: var(--radius); padding: 10px; margin-bottom: 12px; }
.quiz-timer { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 8px 0; }
.quiz-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent-3), var(--accent)); transform-origin: left; animation: quizTime 15s linear forwards; }
@keyframes quizTime { to { transform: scaleX(0); } }
/* Légendes : écriture (effet + emoji), duels en face-à-face */
.write-card { display: flex; flex-direction: column; gap: 8px; }
.write-preview { cursor: crosshair; }
.emoji-pick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.emoji-pick .react { flex: none; font-size: 1.15rem; }
.size-label { display: flex; flex-direction: column; gap: 2px; }
.size-range { width: 100%; accent-color: var(--accent); }
.filter-chips.wrap { flex-wrap: wrap; overflow: visible; }
.duel-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.duel-tile { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 6px; color: var(--text); text-align: center; }
.duel-tile.picked { border-color: var(--accent); }
.duel-tile.won { border-color: var(--sapin); box-shadow: 0 0 0 2px rgba(47,107,94,.35); }
.duel-tile.mine { opacity: .8; }
.duel-tile:disabled { cursor: default; }
.duel-cap { font-weight: 700; font-size: .9rem; }
.duel-res { color: var(--muted); }
.cap-thumb { display: inline-block; width: 44px; vertical-align: middle; margin-right: 8px; }
.invite-box { display: flex; flex-direction: column; gap: 6px; background: var(--bg-2); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; }
/* V1.7 : retouches d'affichage */
.logo { gap: 0; }
.logo-ico { width: 1.3em; height: 1.3em; margin-right: .3em; }
.game-card.game-pick { flex-direction: row; align-items: center; text-align: left; padding: 14px; }
.game-card.game-pick .g-icon { font-size: 2rem; margin: 0; }
.game-head .title { text-align: left; }
.game-head .g-icon { font-size: 2.2rem; }

/* ---------- V1.7.1 ---------- */
.write-card { align-items: stretch; }
.write-card > * { min-width: 0; max-width: 100%; }
.write-card .write-preview { align-self: center; }
.write-card .btn { align-self: flex-end; }
.emoji-pick { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.emoji-pick .react { flex: 0 0 auto; }
.duel-vote { color: var(--brique-texte); font-weight: 700; }
.holders { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.holders > small { flex-basis: 100%; }
.holder { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; color: var(--text); font: inherit; font-size: .85rem; }
.holder .avatar { width: 24px; height: 24px; font-size: .82rem; }

/* ---------- V1.8 ---------- */
/* Cadre carte 3:4 solide (Safari compris) : Légendes, résultats, « Qui est-ce ? » */
.c34 { position: relative; display: block; width: 100%; }
.c34::before { content: ''; display: block; padding-top: 133.333%; }
.c34 > .frame { position: absolute; inset: 0; }
.c34 .photo-card { height: 100%; }
.c34 .rar, .c34 .num, .c34 .caption { display: none; }
.room-photo { width: min(240px, 64vw); }
.quiz-photo { width: min(260px, 70vw); }
.cap-thumb { width: 44px; flex: none; }
.duel-tile .c34 { border-radius: var(--r-md); }
/* Légendes : grande photo pour placer l'emoji, chrono collé sous l'en-tête */
.write-card .write-preview { display: block; width: min(100%, 280px); align-self: center; cursor: crosshair; }
.write-preview.placing { touch-action: none; }
.room-head { position: sticky; top: var(--topbar-h, 56px); z-index: 4; background: var(--bg); padding: 6px 0; margin: 0 0 8px; }
.room-head-r { display: inline-flex; align-items: center; gap: 10px; }
.room-quit { color: var(--muted); font-size: .85rem; }
/* Récap de pack */
.gold-next { margin: 10px 0 4px; }
.slot .new-flag.mini { top: 6px; bottom: auto; left: auto; right: 6px; transform: none; font-size: .82rem; padding: .1rem .35rem; }
.slot > .copies { position: absolute; bottom: 7px; right: 7px; background: rgba(58,31,18,.65); color: var(--papier); font-style: normal; font-size: .7rem; font-weight: 700; padding: .1rem .4rem; border-radius: 6px; }
.slot > .new-dot { position: absolute; top: 6px; right: 6px; z-index: 2; }
/* En-tête : compte en icône */
.me-chip { padding: .3rem .5rem; }
.me-ico { font-size: 1.05rem; line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Puces d'albums : nouveautés, et passage à la ligne */
.set-chip { position: relative; }
.set-chip .new-dot { position: absolute; top: -2px; right: -2px; }
#gal-sets, #coll-chips { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
/* Lutin : raison sous chaque bouton */
.lutin-tier { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.lutin-tier small { color: var(--muted); font-size: .82rem; }
/* Fiche */
.fav-lbl.on { border-color: var(--legendary); color: var(--brique-texte); }
.danger-text { color: var(--danger) !important; }
.link-btn.inline { padding: 6px 2px; min-height: 32px; }
/* Mes photos */
.photos-head { flex-wrap: wrap; row-gap: 6px; }
/* Listes pliables masquées (m4) */
.fold-h[hidden] { display: none !important; }
/* Échanges : pastille ×N (m5) */
.trade-pick .copies { bottom: auto; }
/* Sac : solde lisible, noms sur deux lignes (m6) */
.wallet-box { flex-wrap: wrap; }
.wallet-box .btn { flex: 1 1 auto; }
.bag-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
/* Mot de passe : bouton 👁 */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 3rem; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 1.15rem; padding: 8px; color: var(--text); }
.legal-links a { display: inline-block; padding: 8px 4px; }
/* Admin : sections repliables, bouton Enregistrer fixe, cases plus grandes */
.adm-section { padding-bottom: 6px; }
.admin-title.fold-h { margin-top: 14px; }
.save-bar { position: sticky; bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom) + 4px); z-index: 4; padding: 8px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.check input, .edit-form .check input, .u-row input[type=checkbox] { width: 24px; height: 24px; }
/* Admin : la barre de puces reste collée sous l'en-tête (la règle des rubans défilants l'avait décalée sur le titre) */
#tab-admin .admin-nav { position: sticky; top: var(--topbar-h, 56px); }
/* Bouton Enregistrer : collé en bas seulement quand une section des réglages est ouverte */
#admin-form .save-bar { position: static; }
#admin-form:has(.admin-title.fold-h:not(.closed)) .save-bar { position: sticky; }

/* V1.9 : double authentification, Admin › Santé et Journal */
#tab-admin.gated > :not(#admin-gate) { display: none !important; }
.admin-gate { background: var(--bg-2); border: 2px solid var(--line); border-radius: var(--r-md); padding: 14px; margin: 8px 0; }
.mfa-box .row, .mfa-box p { margin: .4rem 0; }
.mfa-box .row { display: flex; gap: 6px; flex-wrap: wrap; }
.mfa-qr { display: block; width: 200px; height: 200px; margin: 8px auto; background: #fff; border-radius: 12px; padding: 8px; }
.mfa-code { font-size: 1.3rem; letter-spacing: .2em; text-align: center; }
.recovery-codes { background: var(--bg-2); border: 2px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 1.05rem; line-height: 1.7; columns: 2; user-select: all; }
.health-row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.health-row small { display: block; color: var(--muted); }
.health-row.error b { color: var(--brique-texte); }
.health-row.warn b { color: var(--rouille); }
.audit-list select { width: 100%; margin-bottom: 8px; }
.audit-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--trait); }
.audit-row small { color: var(--muted); }
.audit-row.refused b { color: var(--rouille); }
.audit-details { font-size: .82rem; color: var(--muted); word-break: break-all; white-space: pre-wrap; }

/* ================= V1.11 : fiche d'une carte (infos 2 × 2, actions de même taille) ================= */
.card-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 10px; }
.card-info > div { background: var(--papier); border: 2px solid var(--cacao); border-radius: var(--r-md); padding: .45rem .7rem; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.card-info small { color: var(--texte-doux); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.card-info b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.card-info .link-btn.inline { padding: 0; min-height: 0; font-weight: 700; font-size: .95rem; color: var(--sapin); }
.mono { font-family: var(--f-chiffres); font-weight: 500; }
.card-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.card-actions .btn { width: 100%; padding: .5rem .4rem; background: var(--papier); box-shadow: var(--ombre-sm); }
.card-actions .btn.danger { background: var(--papier); }
.card-actions .fav-lbl.on { background: var(--moutarde); }
.card-dates { color: var(--texte-doux); font-size: .82rem; margin-bottom: 8px; }

/* ================= V1.11 : Mes photos (pastilles d'emplacements libres) ================= */
.free-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 4px; }
.free-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--papier); border: 2px solid var(--cacao); border-radius: var(--r-pill); padding: .2rem .65rem; font-size: .85rem; }
.free-pill.none { opacity: 1; background: var(--creme-2); color: var(--texte-doux); }
.free-pill .mono { font-size: .95rem; }
.free-hint { color: var(--texte-doux); font-size: .82rem; }
.quota .quota-detail { font-family: var(--f-texte); font-weight: 700; font-size: .95rem; color: var(--texte-doux); margin-top: 8px; }
.add-big { font-size: 1.2rem; }

/* ================= V1.11 : Collection (une ligne de progression, filtres + tri sur une ligne) ================= */
#stats { display: block; }
.coll-progress { background: var(--papier); border: 2px solid var(--cacao); border-radius: var(--r-md); box-shadow: var(--ombre-sm); padding: 10px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.cp-line { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.cp-line .mono { font-size: 1.35rem; }
.cp-line small { margin-left: auto; color: var(--texte-doux); font-size: .82rem; }
.album-tools { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.album-tools .filter-chips { flex: 1; min-width: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.album-tools .tools-sort { flex: none; width: auto; max-width: 42%; }

/* ================= V1.11 : écrans vides illustrés (petit soleil) ================= */
.empty:not(.small) { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--texte-doux); }
.empty:not(.small)::before { content: ''; display: block; width: 88px; height: 44px; border-radius: 88px 88px 0 0; background: var(--soleil);
  border: 2px solid var(--cacao); border-bottom: 0; box-shadow: inset 0 -3px 0 var(--cacao); }
.empty[hidden] { display: none !important; }

/* V1.11 : bloc Friends du sac — le bouton passe dessous plutôt que d'écraser le texte */
.wallet-box { flex-wrap: wrap; }
.wallet-box .btn { flex: 1 1 100%; }

/* ================= V1.11.1 : lisibilité ================= */
/* Texte secondaire en DM Sans 500 (le 400 paraît trop fin sur téléphone) */
small, .muted, .section-hint, .hint, .card-dates, .who small, .ql-label, .free-hint, .reveal-hint, .next-pack, .pity { font-weight: 500; }
body { font-size: 16px; }
.gold-link { text-decoration: underline; text-underline-offset: 3px; }
/* Panneaux papier : ombre pleine pour qu'ils se détachent du fond */
.todo-row, .list li, .album-card, .album-head, .quota, .game-card, .wallet-box, .lutin-box, .field, .check, .ev-card, .ach, .invite, .coll-progress { background-color: var(--papier); }
.todo-row:not(.done):not(.later), .list li, .album-card, .quota, .game-card, .ach { box-shadow: var(--ombre-sm); }

/* ================= V1.11.2 : moins de cadres, des actions qui ressortent ================= */
/* Fond un ton plus clair, panneaux presque blancs : l'écart vient de la valeur, pas d'un contour épais */
:root {
  --fond: #F6E6C4;
  --papier: #FFFCF6;
  --trait-panneau: rgba(58,31,18,.22);
  --ombre-douce: 0 1px 2px rgba(58,31,18,.08), 0 4px 12px rgba(58,31,18,.07);
}
/* Panneaux d'information (pas cliquables en entier) : trait fin + ombre douce.
   Le contour cacao de 2 px et l'ombre pleine restent pour ce qu'on touche (boutons, cartes, pack, albums, jeux). */
.todo-row, .list li, .album-head, .quota, .wallet-box, .lutin-box, .field, .check, .ev-card, .ach, .invite, .coll-progress, .card-info > div,
.stat, .tagged-list li, .comments li, .dup-box, .cat-sec, .event-info p, .write-card, .all-captions li, .shared-status, .duel-score,
.trade-card, .session-row, .home-box, .feed-item, .bag-item, .gift-box, .recycle-row, .booster-odds li, .u-row, .prep-box,
.admin-gate, .recovery-codes, .react-picker { border: 1px solid var(--trait-panneau); }
.home-box, .feed-item, .trade-card, .write-card, .gift-box, .duel-score { box-shadow: var(--ombre-douce); }
.todo-row:not(.done):not(.later), .list li, .quota, .ach, .coll-progress, .album-head, .wallet-box { box-shadow: var(--ombre-douce); }
.todo-row.hot { border: 1px solid var(--trait-panneau); border-left: 6px solid var(--moutarde); box-shadow: var(--ombre-douce); }
.todo-row.done, .todo-row.later { border: 1px dashed var(--texte-doux); box-shadow: none; }
/* Boutons d'action : cacao plein, texte crème (14:1), ombre orange pour le côté 70s */
.btn.primary, .btn.primary.small { background: var(--cacao); color: var(--creme); border-color: var(--cacao); box-shadow: 0 3px 0 var(--orange); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--orange); }
/* V1.12 : un bouton d'action désactivé doit le rester visuellement (la règle cacao ci-dessus l'emportait) */
.btn.primary:disabled, .btn.primary.small:disabled { background: var(--creme-2); color: var(--texte-doux); border-color: var(--texte-doux); border-style: dashed; box-shadow: none; }
/* Compte à rebours en DM Sans (le Mono espaçait bizarrement « 2 h 14 ») ; Mono gardé pour les nombres seuls */
.next-pack b { font-family: var(--f-texte); font-weight: 700; font-variant-numeric: tabular-nums; }
/* Stock : pastille pleine = pack dispo, pointillés = vide */
.stock i { box-shadow: none; }
.stock i:not(.on) { background: transparent; border: 2px dashed var(--texte-doux); }
/* Barre du haut : nom du logo plus petit jusqu'à 480 px (il touchait la cloche sur iPhone) */
@media (min-width: 401px) and (max-width: 479px) {
  .topbar .logo { font-size: .98rem; }
  .topbar .logo-ico { width: 28px; height: 28px; margin-right: 6px; }
}

/* ================= V1.11.3 : Mes photos (une ligne par rareté, détail dans la bulle ⓘ) ================= */
.quota-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.quota-top h3 { margin: 0; }
.info-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--cacao); background: var(--papier); color: var(--cacao);
  font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: 1.1rem; display: grid; place-items: center; box-shadow: var(--ombre-sm); }
.info-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cacao); }
.quota-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 0; }
.quota-row .what { display: flex; align-items: center; gap: 2px; font-size: 1rem; }
.quota-row .places { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cacao); }
.quota-row.full .places { color: var(--texte-doux); font-weight: 500; }
.quota-row .btn { min-width: 96px; }
.quota-done { text-align: left; color: var(--texte-doux); font-size: .9rem; padding: 6px 0 0; margin: 0; }
.rules-table { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px 14px; align-items: center; margin: 8px 0 12px; }
.rules-table small { color: var(--texte-doux); font-size: .82rem; text-align: right; }
.rules-table b { display: flex; align-items: center; gap: 2px; }
.rules-table .mono { text-align: right; font-size: 1rem; }
.rules-reserve { background: var(--creme-2); border-radius: var(--r-md); padding: .6rem .8rem; font-size: .9rem; }
.rules-list { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 6px; }

/* ================= V1.11.3 : iPhone ================= */
/* iOS zoome sur un champ écrit en moins de 16 px : tous les champs à 16 px */
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: 16px !important; }
/* Pas de zoom au double-tap (le pincement reste possible) */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ================= V1.11.4 : doublons (comme l'éditeur d'échange) ================= */
.recycle-grid { margin-bottom: 12px; }
.recycle-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.recycle-pick { position: relative; width: 100%; padding: 0; background: none; border: 0; }
.recycle-pick .copies { position: absolute; top: 7px; right: 7px; bottom: auto; z-index: 3; background: var(--papier); color: var(--cacao); border: 1.5px solid var(--cacao);
  font-family: var(--f-chiffres); font-size: .72rem; font-weight: 500; padding: 0 .4rem; border-radius: var(--r-pill); }
.recycle-pick .gift-mark { position: absolute; bottom: 7px; left: 7px; z-index: 3; background: var(--sapin); color: var(--papier); font-size: .72rem; font-weight: 700;
  padding: .05rem .4rem; border-radius: var(--r-pill); border: 1.5px solid var(--papier); }
.recycle-pick .check-mark { display: none; position: absolute; top: 6px; left: 6px; z-index: 4; width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange); color: var(--cacao); border: 2px solid var(--cacao); place-items: center; font-weight: 700; }
.recycle-pick.on .check-mark { display: grid; }
.recycle-pick.on .frame { outline: 3px solid var(--orange); outline-offset: 2px; }
.recycle-cell .stepper { gap: 6px; }
.recycle-cell .step-btn { width: 34px; height: 34px; }
.recycle-cell .step-n { font-family: var(--f-chiffres); font-size: .85rem; min-width: 2.4em; }
.recycle-keep { color: var(--texte-doux); font-size: .82rem; }
/* Barre du total collée en bas de la fiche */
.recycle-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 12px -4px 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--cacao); color: var(--creme); border-radius: var(--r-md) var(--r-md) 0 0; }
.recycle-bar > span { white-space: nowrap; }
.recycle-bar small { color: var(--onglet); font-size: .9rem; }
.recycle-bar .btn.primary { background: var(--moutarde); color: var(--cacao); border-color: var(--moutarde); box-shadow: 0 3px 0 var(--orange); }
.recycle-bar .btn:disabled { background: transparent; color: var(--onglet); border-color: var(--onglet); }
.recycle-recap { margin: 0 0 12px; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 4px; max-height: 40vh; overflow: auto; }
.recycle-recap small { color: var(--texte-doux); }

/* ================= V1.11.5 : maintenance ================= */
.maintenance { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom)); text-align: center; background: var(--fond); }
.maintenance::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--bandes); }
.maintenance h1 { font-family: var(--f-titre); font-weight: 400; font-size: 2rem; color: var(--brique-texte); margin: 0; }
.maintenance .m-logo { width: 72px; height: 72px; }
.maintenance .m-sun { width: 120px; height: 60px; border-radius: 120px 120px 0 0; border: 3px solid var(--cacao); border-bottom: 0; background: var(--soleil); }
.maintenance .m-msg { font-size: 1.1rem; max-width: 420px; margin: 0; }
.maintenance .muted { margin: 0; }
.maint-banner { display: block; width: 100%; border: 0; background: var(--brique-texte); color: var(--papier); font-weight: 700; font-size: .9rem;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px; text-align: center; }
.maint-banner + .topbar { padding-top: 10px; }
.maint-admin { display: flex; flex-direction: column; gap: 10px; }
.maint-status { margin: 0; padding: .7rem .8rem; border-radius: var(--r-md); background: var(--papier); border: 1px solid var(--trait-panneau); font-weight: 600; }
.maint-status.on { background: var(--creme-2); border: 2px dashed var(--brique-texte); color: var(--cacao); }
.maint-label { font-weight: 700; font-size: .9rem; }
.maint-admin textarea { width: 100%; padding: .7rem .8rem; border-radius: var(--r-md); border: 2px solid var(--cacao); background: var(--papier); color: var(--text); font: inherit; resize: vertical; }

/* ================= V1.11.6 : titres lisibles, fil en vraies cartes, tickets par rareté ================= */
/* Titre / légende d'une photo : banderole cacao derrière le texte (lisible sur une photo claire comme sombre) */
.photo-card .caption { inset: auto 6px 6px 6px; width: auto; padding: .2rem .55rem; border-radius: var(--r-sm); background: rgba(58,31,18,.82); color: var(--creme); text-shadow: none; }
.caption ~ .fx-badge, .fx-badge.up { bottom: 34px; }
/* Fil d'actualités : une carte 3:4 de la même taille pour toutes les raretés (comme la Collection) */
.feed-card { display: block; width: min(280px, 78%); margin: 10px 0 0; padding: 0; background: none; border: 0; }
.feed-card .frame { display: block; }
.feed-card .photo-card, .viewer-card .photo-card { aspect-ratio: 3 / 4; height: auto; }
.slot.new-for-them .caption { color: var(--moutarde); }
.feed-card.shiny .frame { box-shadow: 0 0 0 2px rgba(242,165,22,.45), 0 0 22px rgba(192,57,43,.35); }
.feed-one.back { width: min(280px, 78%); height: auto; aspect-ratio: 3 / 4; margin-top: 10px; border: 2px solid var(--cacao); padding: 12px; text-align: center; }
.feed-one.back small { color: var(--creme); font-size: .85rem; }
/* Visionneuse : la variante en grand, avec ses effets */
.viewer-card { width: min(92vw, calc(78dvh * .75)); container-type: inline-size; }
.viewer-card .frame { display: block; }
.viewer .viewer-card img { max-width: none; max-height: none; border-radius: 0; }
.viewer-caption { color: var(--creme); font-weight: 600; }
/* Sac : tickets à la couleur de leur rareté */
/* V1.12.3 : le ticket garde un fond normal ; c'est son icône qui prend la couleur de la rareté (voir plus bas) */

/* ================= V1.12 : boutique (Stripe en mode test) ================= */
.shop-box { display: flex; flex-direction: column; gap: 8px; }
.shop-box:empty { display: none; }
.shop-test { margin: 0; padding: .5rem .7rem; border-radius: var(--r-md); background: var(--creme-2); border: 2px dashed var(--brique-texte); color: var(--cacao); font-size: .88rem; font-weight: 600; }
.shop-item { display: flex; align-items: center; gap: 12px; background: var(--papier); border: 2px solid var(--cacao); border-radius: var(--r-md); padding: 10px 12px; box-shadow: var(--ombre-sm); }
.shop-item .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shop-item .who small { color: var(--texte-doux); font-size: .85rem; }
.shop-price { font-family: var(--f-texte); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.6rem; margin: 4px 0; color: var(--cacao); }
.shop-history summary { cursor: pointer; font-weight: 700; padding: 6px 0; }

/* ================= V1.12.1 : Collection plus simple, amis favoris, reflet légendaire ================= */
.coll-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.coll-chips .coll-menu { flex: 1 1 200px; max-width: none; }
.coll-chips .seen-all { margin: 0; }
.album-search { width: 100%; margin: 4px 0 8px; }
.album-tools .tools-sort { flex: 1 1 0; max-width: none; min-width: 0; }
.fa-fav { position: absolute; left: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--moutarde); color: var(--cacao); border: 2px solid var(--cacao); font-style: normal; font-size: .8rem; }
.album-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.album-title h1 { margin: 0; min-width: 0; }
.fav-friend { flex: none; }
.fav-friend.on { background: var(--moutarde); }
/* ================= V1.12.2 : réponses et réactions aux commentaires, fusions ================= */
.comments.replies { margin: 8px 0 0 10px; padding-left: 10px; border-left: 3px solid var(--moutarde); display: flex; flex-direction: column; gap: 6px; }
.comments li.c-reply { background: var(--creme); }
.c-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.c-reacts { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.c-react { min-height: 30px; padding: .1rem .5rem; border-radius: var(--r-pill); border: 1px solid var(--trait-panneau); background: var(--papier); font-size: .9rem; }
.c-react.on { background: var(--moutarde); border-color: var(--cacao); }
.c-react small { font-size: .8rem; color: var(--texte-doux); }
.c-react.add { color: var(--texte-doux); font-weight: 700; }
.c-react-pick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.reply-holder:empty { display: none; }
.reply-form { margin-top: 8px; }
.fuse-odds { font-size: .85rem; color: var(--texte-doux); background: var(--creme-2); border-radius: var(--r-md); padding: .5rem .7rem; margin: 8px 0; }
.fuse-pel { margin-top: 10px; }

.tools-menus { flex-wrap: wrap; }
.tools-menus > .tools-sort:first-child:nth-last-child(3) { flex-basis: 100%; } /* album : le filtre sur sa ligne, rareté + tri dessous */
.tools-menus .tools-sort { flex: 1 1 0; min-width: 0; max-width: none; width: auto; padding-left: .55rem; padding-right: 1.4rem; font-size: .9rem; text-overflow: ellipsis; }
/* Reflet doré : une bande qui glisse (transform, fluide sur téléphone), toujours hors de la carte au moment de
   reboucler, puis une pause — plus de saut au milieu. Remplace l'ancien dégradé animé + mode de fusion. */
.sheet-photo .frame.legendary > .photo-card::after, .stack .frame.legendary > .photo-card::after {
  content: ''; position: absolute; top: -10%; bottom: -10%; left: 0; width: 55%; z-index: 4; pointer-events: none;
  background: linear-gradient(100deg, transparent 0%, rgba(255,222,140,.42) 45%, rgba(255,240,200,.55) 50%, rgba(255,222,140,.42) 55%, transparent 100%);
  background-size: auto; mix-blend-mode: normal; transform: translateX(-130%) skewX(-14deg);
  animation: legend-shine 3.6s cubic-bezier(.45, 0, .35, 1) infinite; will-change: transform; }
@keyframes legend-shine { 0% { transform: translateX(-130%) skewX(-14deg); } 55%, 100% { transform: translateX(240%) skewX(-14deg); } }
@media (prefers-reduced-motion: reduce) {
  .sheet-photo .frame.legendary > .photo-card::after, .stack .frame.legendary > .photo-card::after { animation: none; opacity: 0; }
}

/* ================= V1.12.3 : icônes dessinées (public/icons.svg, Lucide) ================= */
.ico { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; margin-right: .32em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bag-big .ico, .act-icon .ico, .todo-ico .ico, .pel-ico .ico, .item-big .ico { width: 1em; height: 1em; margin: 0; vertical-align: middle; }
.bag-big .ico { stroke-width: 1.6; }
.bag-big.xl .ico, .item-big .ico { stroke-width: 1.4; }
.btn .ico, .chip .ico, .link-btn .ico, .set-chip .ico { margin-right: .3em; }
h1 .ico, h2 .ico, h3 .ico, .card-title .ico, .page-title .ico { color: var(--brique-texte); }
.todo-ico, .act-icon { color: var(--cacao); }
/* Tickets : l'icône à la couleur de la rareté (contour cacao) */
.ticket .ico-ticket, .ticket-btn .ico-ticket, .ticket-ico .ico-ticket { stroke: var(--cacao); }
.ticket.common .ico-ticket, .ticket-btn.common .ico-ticket, .ticket-ico.common .ico-ticket { fill: var(--papier); }
.ticket.special .ico-ticket, .ticket-btn.special .ico-ticket, .ticket-ico.special .ico-ticket { fill: var(--moutarde); }
.ticket.legendary .ico-ticket, .ticket-btn.legendary .ico-ticket, .ticket-ico.legendary .ico-ticket { fill: var(--orange); }
.btn.primary.ticket-btn .ico-ticket { stroke: var(--creme); }

/* ================= V1.13 : albums privés ================= */
.private-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.private-box:empty { display: none; }
.ma-kind.private { background: var(--cacao); color: var(--creme); border-color: var(--cacao); }
.private-share { background: var(--creme-2); border-radius: var(--r-md); padding: .6rem .8rem; margin: 6px 0 10px; }
.private-share small { color: var(--texte-doux); }
.private-member > span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.private-member .avatar { width: 28px; height: 28px; font-size: .85rem; }
.private-member .row-actions { display: inline-flex; align-items: center; gap: 6px; }
.private-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.private-form input { width: 100%; }
.private-form .emoji-in { width: 5rem; }
.link-btn.inline { padding: 0; min-height: 0; color: var(--sapin); font-weight: 700; }
.private-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--trait); }

/* V1.13.2 : places et invitations d'amis */
.private-each { margin: 0; padding: .5rem .7rem; background: var(--creme-2); border-radius: var(--r-md); font-weight: 600; font-size: .9rem; }
.private-each:empty { display: none; }
.invite-friends { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.invite-friends .act-list { max-height: 280px; overflow-y: auto; }

/* ================= V1.13.4 ================= */
/* La carte qui s'envole (translateX 130 %) élargissait la page : le téléphone dézoomait. On coupe tout débordement horizontal. */
html, body { overflow-x: clip; }
.reveal { overflow-x: clip; }
.stack .card[hidden] { display: none; }

/* V1.13.7 : couleurs des raretés (décision du propriétaire, option B) : légendaire en or vif (sans orange ni brique,
   qui la faisaient tirer vers le bordeaux), spéciale en vert sapin ; commune crème. Remplace le réglage V1.13.4. */
:root {
  --or-clair: #FFF1A8;
  --or: #FFD23F;
  --or-moyen: #F2B90F;
  --or-fonce: #C99500;
  --sapin-clair: #3E8A79;
  --special: var(--sapin);
  --special-2: var(--sapin-clair);
  --legendary: var(--or);
  --legendary-2: var(--or-fonce);
}
.rar.special { background: var(--sapin); color: var(--papier); text-shadow: none; } /* texte papier sur sapin : 5,9:1 */
.rar.legendary { background: linear-gradient(90deg, var(--or-clair), var(--or) 60%, var(--or-moyen)); color: var(--cacao); text-shadow: none; }
.dot.special { background: var(--sapin); } .dot.legendary { background: var(--or); }
.frame.special { background: var(--sapin); }
.frame.legendary { background: linear-gradient(160deg, var(--or-clair), var(--or) 35%, var(--or-moyen) 70%, var(--or-fonce)); }
.slot.missing.special { border-color: var(--sapin); color: var(--sapin); }
.slot.missing.legendary { border-color: var(--or-moyen); color: var(--cacao); }
.ticket.special .ico-ticket, .ticket-btn.special .ico-ticket, .ticket-ico.special .ico-ticket { fill: var(--sapin); }
.ticket.legendary .ico-ticket, .ticket-btn.legendary .ico-ticket, .ticket-ico.legendary .ico-ticket { fill: var(--or); }

/* V1.13.4 : légende tapée avant l'envoi */
.confirm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.confirm-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.confirm-title { width: 100%; min-width: 0; padding: .4rem .5rem; border: 1px solid var(--trait-panneau); border-radius: var(--r-sm); background: var(--papier); color: var(--text); }
@media (min-width: 480px) { .confirm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* V1.13.4 : étoile favori dans le coin d'une carte (raccourci, sans ouvrir la fiche) */
.fav-star { position: absolute; top: 5px; right: 5px; z-index: 4; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--papier); color: var(--cacao); border: 1.5px solid var(--cacao); font-size: 1rem; line-height: 1; cursor: pointer; }
.fav-star.on { background: var(--moutarde); }
.slot:has(.fav-star) .num { right: 38px; }
.slot:has(.fav-star) > .new-dot { right: 38px; }
.slot.unfaved .frame { filter: saturate(.4); }

/* V1.13.4 : légende des hors-série lisible partout (elle héritait parfois d'un texte cacao sur fond sombre) : même bandeau que les légendes */
.hs-caption { inset: auto 6px 6px 6px; padding: .3rem .55rem; border-radius: var(--r-sm); background: rgba(58,31,18,.82); color: var(--creme); text-shadow: none; }
.grid .hs-caption { padding: .2rem .4rem; }

/* V1.13.4 : menus déroulants maison */
.sel-btn { display: inline-flex; align-items: center; gap: .4rem; text-align: left; cursor: pointer; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); color: var(--text); padding: .5rem .6rem; font: inherit; font-size: .9rem; min-width: 0; }
.sel-btn > select { display: none; }
.sel-btn .sel-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-btn .sel-lead:empty { display: none; }
.sel-btn .ico { width: 16px; height: 16px; flex: none; }
.sel-btn .ico-chevron-down { margin-left: auto; }
.sel-btn:disabled { background: var(--creme-2); color: var(--texte-doux); border-style: dashed; cursor: default; }
.tools-menus .sel-btn { padding-right: .5rem; }
.sel-pop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.sel-backdrop { position: absolute; inset: 0; background: rgba(58,31,18,.45); }
.sel-panel { position: relative; width: min(480px, 100%); max-height: 70dvh; overflow-y: auto; background: var(--papier); border: 2px solid var(--cacao); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 10px 12px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 4px; animation: sel-up .18s ease-out; }
@keyframes sel-up { from { transform: translateY(24px); opacity: 0; } }
.sel-title { margin: 4px 6px 6px; font-weight: 700; color: var(--texte-doux); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.sel-opt { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 46px; padding: .55rem .7rem; border: 0; border-radius: var(--r-md); background: none; color: var(--text); font: inherit; font-size: 1rem; text-align: left; cursor: pointer; }
.sel-opt .sel-lead { width: 22px; display: grid; place-items: center; flex: none; }
.sel-opt .sel-label { flex: 1; min-width: 0; }
.sel-opt .ico { width: 20px; height: 20px; }
.sel-opt.on { background: var(--creme-2); font-weight: 700; }
.sel-opt:focus-visible { outline: 2px solid var(--cacao); outline-offset: -2px; }
.sel-opt:disabled { color: var(--texte-doux); cursor: default; }
@media (prefers-reduced-motion: reduce) { .sel-panel { animation: none; } }

/* ================= V1.13.5 : apparence d'un album (couleurs du pack, photo de fond) ================= */
/* Chaque thème : des rayons en jetons Kodachrome (--theme-bg) et une couleur de bord (--theme-main). */
.theme-kodachrome { --theme-main: var(--moutarde); --theme-bg: repeating-conic-gradient(from 0deg at 50% 115%, var(--sapin) 0 9deg, var(--moutarde) 9deg 18deg, var(--rouille) 18deg 27deg, var(--orange) 27deg 36deg); }
.theme-or { --theme-main: var(--moutarde); --theme-bg: repeating-conic-gradient(from 0deg at 50% 115%, var(--or) 0 9deg, var(--moutarde) 9deg 18deg); }
.theme-moutarde { --theme-main: var(--moutarde); --theme-bg: repeating-conic-gradient(from 0deg at 50% 115%, var(--moutarde) 0 9deg, var(--creme-2) 9deg 18deg); }
.theme-orange { --theme-main: var(--orange); --theme-bg: repeating-conic-gradient(from 0deg at 50% 115%, var(--orange) 0 9deg, var(--moutarde) 9deg 18deg); }
.theme-brique { --theme-main: var(--brique); --theme-bg: repeating-conic-gradient(from 0deg at 50% 115%, var(--brique) 0 9deg, var(--orange) 9deg 18deg); }
.theme-rouille { --theme-main: var(--rouille); --theme-bg: repeating-conic-gradient(from 0deg at 50% 115%, var(--rouille) 0 9deg, var(--brique) 9deg 18deg); }
.theme-sapin { --theme-main: var(--sapin); --theme-bg: repeating-conic-gradient(from 0deg at 50% 115%, var(--sapin) 0 9deg, var(--creme-2) 9deg 18deg); }
.theme-cacao { --theme-main: var(--cacao); --theme-bg: repeating-conic-gradient(from 0deg at 50% 115%, var(--cacao) 0 9deg, var(--rouille) 9deg 18deg); }
.theme-creme { --theme-main: var(--onglet); --theme-bg: repeating-conic-gradient(from 0deg at 50% 115%, var(--creme) 0 9deg, var(--onglet) 9deg 18deg); }
.pack[class*="theme-"] { background: var(--theme-bg); }
/* Photo de fond : la photo, assombrie en bas pour le titre, dans un cadre aux couleurs du thème */
.pack.has-cover { background: linear-gradient(rgba(58,31,18,.1), rgba(58,31,18,.55)), var(--pack-cover) center / cover no-repeat, var(--theme-bg, var(--soleil)); box-shadow: 0 6px 0 var(--cacao), inset 0 0 0 6px var(--theme-main, var(--moutarde)); }
.mini-pack { width: 120px; animation: none; gap: .3rem; }
.mini-pack .pack-emoji { font-size: 1.6rem; }
.pack.mini-pack .pack-title { font-size: .95rem; max-width: 92%; overflow-wrap: anywhere; text-shadow: 0 2px 0 var(--cacao); }
.mini-pack::before, .mini-pack::after { height: 8px; }
.look-preview { display: grid; place-items: center; padding: 8px 0 4px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.theme-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 2px solid transparent; border-radius: var(--r-md); background: none; color: var(--text); font: inherit; cursor: pointer; }
.theme-opt.on { border-color: var(--cacao); background: var(--creme-2); }
.theme-swatch { display: block; width: 44px; height: 56px; border-radius: var(--r-sm); border: 2px solid var(--cacao); background: var(--theme-bg); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.emoji-opt { aspect-ratio: 1; font-size: 1.5rem; border: 2px solid transparent; border-radius: var(--r-md); background: var(--papier); cursor: pointer; }
.emoji-opt.on { border-color: var(--cacao); background: var(--creme-2); }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
.cover-opt { aspect-ratio: 3 / 4; padding: 0; border: 3px solid transparent; border-radius: var(--r-sm); overflow: hidden; background: var(--creme-2); cursor: pointer; color: var(--texte-doux); font: inherit; font-weight: 600; }
.cover-opt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-opt.on { border-color: var(--cacao); box-shadow: 0 0 0 2px var(--moutarde); }
/* Bandeau de la fiche d'un album privé, et vignette « Mes albums » */
.album-banner { height: 96px; margin: -4px 0 8px; border-radius: var(--r-md); border: 2px solid var(--cacao); background: var(--theme-bg, var(--soleil)); display: grid; place-items: center; font-size: 2.4rem; }
.album-banner.has-cover { background: linear-gradient(rgba(58,31,18,.05), rgba(58,31,18,.35)), var(--pack-cover) center / cover no-repeat; }
.album-banner span { filter: drop-shadow(0 3px 0 var(--cacao)); }
.mosaic.album-cover { border: 3px solid var(--theme-main, var(--cacao)); }

/* V1.13.6 : étoile favori en haut à gauche (grilles et fiche) ; le badge de rareté se décale à sa droite */
.fav-star { top: 7px; right: auto; left: 7px; }
.slot:has(.fav-star) .num { right: 7px; }
.slot:has(.fav-star) > .new-dot { left: auto; right: 7px; top: 30px; }
.slot:has(.fav-star) .photo-card .rar, .photo-card:has(> .fav-star) .rar { left: 40px; }
.sheet-photo .fav-star { width: 34px; height: 34px; font-size: 1.2rem; }
.photo-card:has(> .fav-star) .rar { left: 48px; top: 10px; }

/* ================= V1.14 : boutique (Friends seulement) ================= */
.shop-qty { display: flex; flex-direction: column; align-items: center; min-width: 56px; padding: .3rem .4rem; border-radius: var(--r-sm); background: var(--moutarde); border: 2px solid var(--cacao); line-height: 1.05; }
.shop-qty b { font-family: var(--f-chiffres); font-size: 1rem; }
.shop-qty small { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.shop-badge { display: inline-block; margin-left: .4rem; padding: 0 .45rem; border-radius: var(--r-pill); background: var(--sapin); color: var(--papier); font-size: .72rem; font-weight: 700; vertical-align: middle; }
.shop-item.once { background: var(--creme-2); border-style: dashed; }
.shop-month { margin: 4px 0 0; }
.shop-warn { margin: 6px 0; padding: .45rem .65rem; border-radius: var(--r-md); background: var(--creme-2); border-left: 4px solid var(--moutarde); font-size: .9rem; font-weight: 600; }
.ev-card.off { background: var(--creme-2); border-style: dashed; }
.shop-country { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.shop-country .sel-btn { width: 100%; }
