/* ============ Thèmes ============ */
:root,
[data-theme="neon"] {
  --bg: #0b0618;
  --bg-grad: radial-gradient(120% 70% at 10% 0%, #2a0d4d 0%, transparent 60%), radial-gradient(90% 60% at 100% 100%, #062a3d 0%, transparent 60%), #0b0618;
  --surface: #160d2e;
  --surface-2: #21153f;
  --text: #f6f0ff;
  --muted: #a99bc9;
  --accent: #ff2fd6;
  --accent-2: #2ff3ff;
  --accent-3: #ffe14d;
  --on-accent: #12061f;
  --danger: #ff5577;
  --ok: #3dffa8;
  --border: #3a2a66;
  --border-w: 1px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 0 0 1px #ffffff08, 0 10px 30px #0008;
  --shadow-btn: 0 0 18px #ff2fd655;
  --glow: 0 0 12px currentColor;
  --font-display: "Righteous", "Fredoka", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 400;
  color-scheme: dark;
}

[data-theme="pop"] {
  --bg: #fff3e2;
  --bg-grad: radial-gradient(circle at 15% 10%, #ffd8c4 0 120px, transparent 121px), radial-gradient(circle at 92% 30%, #c9f0ff 0 90px, transparent 91px), radial-gradient(circle at 80% 95%, #fff0a8 0 140px, transparent 141px), #fff3e2;
  --surface: #ffffff;
  --surface-2: #fff8ee;
  --text: #1d1a2f;
  --muted: #6b6582;
  --accent: #ff5a36;
  --accent-2: #3b5bfd;
  --accent-3: #ffc928;
  --on-accent: #ffffff;
  --danger: #e8304f;
  --ok: #19b36b;
  --border: #1d1a2f;
  --border-w: 3px;
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 5px 5px 0 #1d1a2f;
  --shadow-btn: 4px 4px 0 #1d1a2f;
  --glow: none;
  --font-display: "Fredoka", system-ui, sans-serif;
  --font-body: "Fredoka", system-ui, sans-serif;
  --display-weight: 700;
  color-scheme: light;
}

[data-theme="minimal"] {
  --bg: #f6f5f2;
  --bg-grad: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f0efeb;
  --text: #16161a;
  --muted: #74747c;
  --accent: #16161a;
  --accent-2: #6d5dfc;
  --accent-3: #c8a24a;
  --on-accent: #ffffff;
  --danger: #c0392b;
  --ok: #2f8f5b;
  --border: #e3e2dd;
  --border-w: 1px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px #0000000a, 0 6px 20px #00000008;
  --shadow-btn: none;
  --glow: none;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --display-weight: 700;
  color-scheme: light;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-2); }
h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); margin: 0 0 .5em; line-height: 1.15; }
[hidden] { display: none !important; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; max-width: 960px; margin: 0 auto;
}
.brand { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.35rem; color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); text-shadow: var(--glow); }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; font-size: 1.15rem;
  border-radius: 50%; background: var(--surface); border: var(--border-w) solid var(--border);
  cursor: pointer; text-decoration: none; box-shadow: var(--shadow-btn);
}
[data-theme="neon"] .icon-btn { box-shadow: none; }
.icon-btn.logged { border-color: var(--accent); border-width: 2px; }
.account-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: var(--border-w) dashed var(--border); font-size: .92rem; }
.account-banner .grow { line-height: 1.35; }
.auth-card { max-width: 440px; margin: 16px auto 0; }
.field + .field { margin-top: 12px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent-2) 22%, transparent); color: var(--text); }
.saved-tag { font-size: .78rem; color: var(--ok); font-weight: 700; white-space: nowrap; }

.app { max-width: 960px; margin: 0 auto; padding: 4px 16px 40px; }
.screen.anim { animation: pop-in .35s ease both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ Composants ============ */
.card {
  background: var(--surface); border: var(--border-w) solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
}
.card + .card, .stack > * + * { margin-top: 14px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.label { display: block; font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  border: var(--border-w) solid var(--border); background: var(--surface-2);
  font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, box-shadow .15s ease, opacity .15s;
  box-shadow: var(--shadow-btn);
}
[data-theme="neon"] .btn { box-shadow: none; }
.btn:active { transform: translateY(2px) scale(.98); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--border); }
[data-theme="neon"] .btn.primary { border-color: var(--accent); box-shadow: var(--shadow-btn); }
[data-theme="minimal"] .btn.primary { border-color: var(--accent); }
.btn.secondary { background: var(--accent-2); color: #fff; }
[data-theme="neon"] .btn.secondary { color: var(--on-accent); border-color: var(--accent-2); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { color: var(--danger); background: transparent; box-shadow: none; }
.btn.full { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.input {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: var(--radius-sm);
  border: var(--border-w) solid var(--border); background: var(--surface-2); outline: none;
}
textarea.input { padding: 12px 16px; min-height: 80px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-weight: 700; text-align: center; font-size: 1.3rem; }

/* Segmented / chips */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; border-radius: var(--radius-sm); background: var(--surface-2); border: var(--border-w) solid var(--border); }
.seg button { border: 0; background: transparent; border-radius: calc(var(--radius-sm) - 4px); min-height: 42px; padding: 4px 6px; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.seg-desc { margin: 6px 2px 0; font-size: .85rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px;
  border-radius: 999px; border: var(--border-w) solid var(--border); background: var(--surface-2);
  cursor: pointer; font-weight: 600;
}
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
[data-theme="pop"] .chip.on { border-color: var(--border); }
.chip .count { font-size: .78rem; opacity: .75; font-weight: 500; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; }
.switch input { appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--surface-2); border: var(--border-w) solid var(--border); position: relative; cursor: pointer; flex: none; transition: background .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .2s, background .2s; }
[data-theme="pop"] .switch input::after { top: 2px; left: 2px; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(20px); background: var(--on-accent); }
.switch input:disabled { opacity: .4; }

.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); height: 30px; }
.range-row output { min-width: 56px; text-align: right; font-weight: 700; }

/* ============ Accueil ============ */
.hero { text-align: center; padding: 18px 0 8px; }
.hero h1 { font-size: clamp(2.3rem, 9vw, 3.6rem); margin-bottom: .2em; }
.hero h1 em { font-style: normal; color: var(--accent); text-shadow: var(--glow); }
.hero p { margin: 0 auto; max-width: 30ch; color: var(--muted); }
.home-grid { display: grid; gap: 14px; margin-top: 18px; }
@media (min-width: 760px) { .home-grid { grid-template-columns: 1.2fr 1fr; align-items: start; } }

.avatar-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.avatar-picker button {
  aspect-ratio: 1; font-size: 1.5rem; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--surface-2); border: var(--border-w) solid transparent;
}
.avatar-picker button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, var(--surface-2)); }
.color-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.color-picker button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; outline: var(--border-w) solid var(--border); }
.color-picker button.on { border-color: var(--surface); outline: 3px solid var(--text); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ============ Avatars ============ */
.avatar {
  --c: var(--accent);
  width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.45rem; background: color-mix(in srgb, var(--c) 28%, var(--surface-2));
  border: 2px solid var(--c); position: relative;
}
.avatar.lg { width: 96px; height: 96px; font-size: 3.2rem; border-width: 4px; }
.avatar { overflow: hidden; }
.avatar img, .icon-btn img, .photo-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.icon-btn { position: relative; overflow: hidden; }
.avatar-picker button { position: relative; overflow: hidden; }
.avatar.xl { width: 136px; height: 136px; font-size: 4.6rem; border-width: 5px; }

/* Aperçu de profil */
.profile-preview { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 4px; }
.pp-avatar { position: relative; }
.pp-avatar .avatar { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 22%, transparent), 0 12px 30px color-mix(in srgb, var(--c) 35%, transparent); animation: pp-pop .35s cubic-bezier(.2, 1.5, .4, 1); }
[data-theme="pop"] .pp-avatar .avatar { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 30%, transparent), 5px 5px 0 var(--border); }
@keyframes pp-pop { from { transform: scale(.85); } }
.pp-edit {
  position: absolute; right: 2px; bottom: 2px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.1rem; cursor: pointer;
  background: var(--surface); border: 2px solid var(--c); box-shadow: var(--shadow-btn);
}
.pp-crop { right: auto; left: 2px; }

/* Recadrage photo */
.crop-sheet { width: min(420px, calc(100% - 24px)); padding: 18px; }
.crop-stage {
  position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius-sm);
  background: #000; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; top: 0; left: 0; max-width: none; transform-origin: 0 0; pointer-events: none; }
.crop-mask { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgb(0 0 0 / 55%); outline: 2px solid rgb(255 255 255 / 85%); outline-offset: -2px; pointer-events: none; }
.crop-zoom { margin: 14px 0 4px; }
.crop-actions { margin-top: 12px; gap: 8px; }
.crop-actions .btn { white-space: nowrap; padding: 0 16px; }
.pp-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.6rem; margin-top: 12px; line-height: 1.15; word-break: break-word; }
.pp-name.empty { color: var(--muted); }
.pp-sub { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.avatar.xs { width: 26px; height: 26px; font-size: .9rem; border-width: 1.5px; }
.avatar.off { filter: grayscale(1); opacity: .5; }

/* ============ Lobby ============ */
.lobby-grid { display: grid; gap: 14px; }
@media (min-width: 860px) { .lobby-grid { grid-template-columns: 1fr 1.15fr; align-items: start; } }
.room-code-card { display: flex; gap: 16px; align-items: center; }
.room-code { font-family: var(--font-display); font-size: 2.6rem; letter-spacing: .18em; color: var(--accent); text-shadow: var(--glow); line-height: 1; }
.qr { width: 108px; height: 108px; border-radius: 12px; background: #fff; padding: 6px; flex: none; }
.qr img { width: 100%; height: 100%; display: block; }
.player-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.player-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.player-item .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); white-space: nowrap; }
.badge.ready { background: var(--ok); color: #062014; border-color: transparent; }
.badge.host { background: var(--accent-3); color: #2a2100; border-color: transparent; }
.kick { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 6px; }
.pack-chip-desc { font-size: .8rem; color: var(--muted); margin: 8px 2px 0; }
.session-q { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .92rem; }
.settings-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.sticky-cta { position: sticky; bottom: 12px; z-index: 5; margin-top: 16px; }
.sticky-cta .btn:disabled { opacity: 1; background: var(--surface-2); color: var(--muted); border-color: var(--border); box-shadow: var(--shadow); }
.sticky-cta .btn.danger, .sticky-cta .waiting { background: var(--surface); border-radius: 999px; }

/* ============ Question ============ */
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.progress-dots { font-weight: 700; color: var(--muted); font-size: .9rem; }
.timer { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: var(--border-w) solid var(--border); }
.timer > i { position: absolute; inset: 0; transform-origin: left; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.timer.low > i { background: var(--danger); }
.timer-num { font-family: var(--font-display); font-size: 1.6rem; min-width: 2.2ch; text-align: right; }
.question {
  font-family: var(--font-display); font-weight: var(--display-weight);
  font-size: clamp(1.45rem, 5.4vw, 2.3rem); line-height: 1.2; margin: 18px 0 18px; text-align: center;
  text-wrap: balance;
}
.question.small { font-size: 1.1rem; margin: 6px 0 14px; color: var(--muted); }
.vote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vote-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px;
  border-radius: var(--radius); border: var(--border-w) solid var(--border); background: var(--surface);
  cursor: pointer; font-weight: 700; font-size: 1.05rem; min-height: 120px; justify-content: center;
  box-shadow: var(--shadow); transition: transform .1s, background .15s, border-color .15s;
  word-break: break-word; text-align: center;
}
.vote-card:active { transform: scale(.97); }
.vote-card.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
[data-theme="pop"] .vote-card.on { border-color: var(--border); }
[data-theme="neon"] .vote-card.on { box-shadow: 0 0 24px #ff2fd688; }
.vote-card .me { font-size: .72rem; font-weight: 600; opacity: .7; }
.vote-card:disabled { cursor: default; opacity: .45; }
.voted-strip { display: flex; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.voted-strip .faces { display: flex; flex-wrap: wrap; gap: 4px; }

/* ============ Révélation ============ */
.elected { text-align: center; padding: 22px 16px; }
.elected .crown { font-size: 2.6rem; display: block; animation: bounce 1s ease infinite alternate; }
.elected .avatar.lg { margin: 4px auto 10px; }
.anim .elected .avatar.lg { animation: zoom .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.anim .result-bar > i { animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { width: 0; } }
.elected .title { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.9rem; }
.elected .kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--accent); }
@keyframes bounce { to { transform: translateY(-6px); } }
@keyframes zoom { from { transform: scale(.2); opacity: 0; } }
.results { display: grid; gap: 10px; }
.result-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; }
.result-bar { position: relative; height: 40px; border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; border: var(--border-w) solid var(--border); }
.result-bar > i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--c, var(--accent)) 70%, transparent); }
.result-bar > span { position: relative; z-index: 1; display: flex; align-items: center; height: 100%; padding: 0 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-count { font-weight: 800; min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.result-count small { display: block; font-weight: 500; color: var(--muted); font-size: .75rem; }
.voters { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: .82rem; color: var(--muted); margin-top: -4px; }
.roulette { text-align: center; }
.roulette .slot { font-size: 2.4rem; display: inline-block; }
.anim .roulette .slot { animation: spin 1.1s ease-out both; }
@keyframes spin { from { transform: rotate(-720deg) scale(.3); } }
.penalty { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent-3) 20%, var(--surface-2)); }
.penalty + .penalty { margin-top: 8px; }

/* ============ Fin de partie ============ */
.awards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.award { text-align: center; padding: 16px 10px; }
.awards .card + .card { margin-top: 0; }
.award .emoji { font-size: 2.4rem; display: block; }
.award .avatar { margin: 8px auto; }
.award h3 { margin: 4px 0 2px; font-size: 1.2rem; }
.award .who { font-weight: 800; font-size: 1.1rem; }
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ranking li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); }
.ranking .pos { width: 28px; text-align: center; font-weight: 800; color: var(--muted); }

/* ============ Divers ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 140%);
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600;
  max-width: calc(100% - 32px); transition: transform .3s ease; z-index: 50; text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.conn { position: fixed; top: 0; left: 0; right: 0; background: var(--danger); color: #fff; text-align: center; padding: 6px; font-size: .85rem; font-weight: 600; z-index: 60; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; width: 100%; height: 100%; }
.waiting { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 14px; }
.dots::after { content: "…"; animation: dots 1.2s steps(4) infinite; display: inline-block; width: 1em; text-align: left; overflow: hidden; vertical-align: bottom; }
@keyframes dots { from { width: 0; } to { width: 1.2em; } }

.sheet {
  border: var(--border-w) solid var(--border); border-radius: var(--radius); padding: 20px; width: min(520px, calc(100% - 32px));
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.confirm-sheet { width: min(420px, calc(100% - 32px)); }
.confirm-message { margin: 0 0 18px; white-space: pre-line; font-size: 1.02rem; }
.btn.danger-solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.sheet::backdrop { background: #0009; backdrop-filter: blur(3px); }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.theme-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border-radius: 14px; cursor: pointer; text-align: center; }
.theme-card span { font-size: 1.6rem; }
.theme-card small { opacity: .75; font-size: .75rem; }
.theme-neon { background: #120a26; color: #fff; border: 1px solid #ff2fd6; box-shadow: 0 0 14px #ff2fd655; font-family: "Righteous", sans-serif; }
.theme-pop { background: #ffd23f; color: #1d1a2f; border: 3px solid #1d1a2f; box-shadow: 3px 3px 0 #1d1a2f; font-family: "Fredoka", sans-serif; }
.theme-minimal { background: #fff; color: #16161a; border: 1px solid #ddd; font-family: "Fraunces", serif; }

/* ============ Bibliothèque ============ */
.lib-toolbar { display: grid; gap: 10px; }
@media (min-width: 700px) { .lib-toolbar { grid-template-columns: 1fr auto; } }
.lib-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lib-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.lib-item.disabled .lib-text { opacity: .5; }
.lib-item.disabled .lib-text > div:first-child { text-decoration: line-through; }
.lib-text { flex: 1; min-width: 0; }
.lib-meta { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.lib-actions { display: flex; gap: 4px; align-items: center; }
.lib-actions .switch { padding: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .chip { flex: none; white-space: nowrap; }
.empty { text-align: center; padding: 28px 10px; color: var(--muted); }

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