/* Vizionay — feuille de styles */
:root {
  --bg: #0c0d12;
  --surface: #14161d;
  --surface-2: #1c1f29;
  --surface-3: #262a37;
  --line: #2a2e3b;
  --text: #eef0f5;
  --muted: #979db0;
  --accent: #ff5c38;
  --accent-2: #ffb020;
  --vu: #2fbf71;
  --en_cours: #3aa0ff;
  --wishlist: #ffb020;
  --pas_vu: #9aa1b5;
  --danger: #ff5a6a;
  --radius: 12px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scrollbar-color: var(--surface-3) var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); letter-spacing: -0.02em; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
svg.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Barre du haut ---------- */
#topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: rgba(12, 13, 18, 0.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 9px; font: 700 20px/1 var(--display); letter-spacing: -0.03em; }
.logo svg { width: 30px; height: 30px; }
.logo b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.on { color: var(--text); background: var(--surface-2); }
.search { flex: 1; max-width: 460px; margin-left: auto; position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid transparent; outline: none;
}
.search input:focus { border-color: var(--accent); background: var(--surface); }
.search input::placeholder { color: var(--muted); }
.userbox { display: flex; align-items: center; gap: 6px; }
.chip {
  display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.chip:hover { border-color: var(--surface-3); background: var(--surface-3); }
.chip-info { display: grid; gap: 4px; min-width: 92px; }
.chip-info span { font-size: 12px; font-weight: 700; line-height: 1; display: flex; justify-content: space-between; gap: 10px; }
.chip-info span i { font-style: normal; color: var(--accent-2); }
.xp { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.xp > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s ease; }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.iconbtn:hover { background: var(--surface-2); color: var(--text); }

.avatar {
  --c: var(--accent);
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; line-height: 1;
  background: var(--c); color: #0c0d12; text-transform: uppercase;
}
.avatar.lg { width: 96px; height: 96px; font-size: 44px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--c); }
.avatar.md { width: 40px; height: 40px; font-size: 18px; }

/* ---------- Boutons et champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 10px; font-weight: 650; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line); transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #ff7150; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: rgba(255, 90, 106, 0.12); border-color: var(--danger); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; outline: none;
  background: var(--surface-2); border: 1px solid var(--line);
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; min-height: 84px; }
.input:focus { border-color: var(--accent); }
select.input { appearance: none; padding-right: 34px; cursor: pointer; height: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23979db0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
select.input option { background: var(--surface-2); }
.hint { font-size: 12.5px; color: var(--muted); }
.error-msg { color: var(--danger); font-size: 13.5px; min-height: 1.2em; }

/* ---------- Mise en page ---------- */
#view { padding: 26px clamp(16px, 4vw, 40px) 90px; max-width: 1500px; margin: 0 auto; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar .spacer { flex: 1; }
.pills { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.pills button { padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.pills button:hover { color: var(--text); }
.pills button.on { background: var(--surface-3); color: var(--text); }
.pills button .n { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); font-variant-numeric: tabular-nums; }
.pills button.on .n { color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }

/* ---------- Accueil visiteur ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: clamp(28px, 5vw, 56px);
  margin-bottom: 28px; border: 1px solid var(--line);
  background:
    radial-gradient(900px 380px at 100% 0%, rgba(255, 92, 56, 0.26), transparent 60%),
    radial-gradient(700px 320px at 0% 100%, rgba(255, 176, 32, 0.12), transparent 60%),
    var(--surface);
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.05; max-width: 15em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { margin-top: 14px; max-width: 46em; color: var(--muted); font-size: 16.5px; }
.hero .cta { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .counts { margin-top: 30px; display: flex; gap: clamp(18px, 4vw, 44px); flex-wrap: wrap; }
.hero .counts div b { display: block; font: 700 26px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.hero .counts div span { color: var(--muted); font-size: 13px; }

/* ---------- Rangée « Reprendre » ---------- */
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.row-head h2 { font-size: 19px; }
.row-head a { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.row-head a:hover { color: var(--text); }
.row-sub { color: var(--muted); font-size: 13.5px; margin: -6px 0 12px; }
/* Sections repliables (Reprendre, Au cinéma, À voir absolument) */
.fold { margin-bottom: 8px; }
.fold.closed { margin-bottom: 4px; }
.fold.closed .row-head { margin-bottom: 14px; }
.fold-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px 4px 2px; border-radius: 8px; }
.fold-btn:hover { background: var(--surface-2); }
.fold-btn svg.i { width: 18px; height: 18px; color: var(--muted); transition: transform 0.2s; }
.fold.closed .fold-btn svg.i { transform: rotate(-90deg); }
.fold.closed .fold-btn h2 { color: var(--muted); }
.linklike { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.linklike:hover { color: var(--text); }
.strip-empty { padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--surface-3); color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.list-head { margin-top: 6px; }
.list-head .note { margin: 0; }
.status.new-eps { --c: #ff5fa2; color: #14161d; }
.new-eps-note { color: #ff8fc1; font-size: 13.5px; font-weight: 600; }
.danger-note { color: var(--danger); font-size: 13.5px; }
.sheet-loading { position: absolute; top: 0; left: 0; height: 3px; width: 40%; background: var(--accent); animation: load 1s ease-in-out infinite alternate; }
@keyframes load { from { left: 0; } to { left: 60%; } }
.sentinel { height: 1px; }
.mustsee-empty { padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--surface-3); color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 16px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 26px; scroll-snap-type: x proximity; }
.strip > * { scroll-snap-align: start; }

/* ---------- Grille et cartes ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
.grid > .empty { grid-column: 1 / -1; }
.card { min-width: 0; }
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover .poster, .card:focus-within .poster { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--surface-3), 0 14px 30px rgba(0, 0, 0, 0.5); }
.poster-btn { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.poster-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster-btn img.broken { display: none; }
.poster-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; text-align: center;
  font: 700 15px/1.25 var(--display); color: var(--muted);
  background: linear-gradient(160deg, var(--surface-3), var(--surface));
  overflow: hidden;
}
.tag, .score, .status {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; line-height: 1; padding: 5px 7px; border-radius: 7px;
  background: rgba(12, 13, 18, 0.82); backdrop-filter: blur(6px); pointer-events: none;
}
.tag { top: 8px; left: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.tag-film { color: #ffb8a6; } .tag-serie { color: #a9d4ff; } .tag-anime { color: #ffd0e6; }
.score { top: 8px; right: 8px; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.status { left: 8px; bottom: 8px; color: #0c0d12; background: var(--c); backdrop-filter: none; transition: opacity 0.15s; }
.st-vu { --c: var(--vu); } .st-en_cours { --c: var(--en_cours); } .st-wishlist { --c: var(--wishlist); } .st-pas_vu { --c: var(--pas_vu); }
.status svg.i { width: 12px; height: 12px; stroke-width: 3; }
.quick {
  position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 26px 8px 8px; background: linear-gradient(transparent, rgba(8, 9, 12, 0.94) 45%);
  opacity: 0; transform: translateY(8px); transition: opacity 0.15s, transform 0.15s; pointer-events: none;
}
.quick .q { height: 34px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); color: #fff; }
.quick .q:hover { background: rgba(255, 255, 255, 0.24); }
.quick .q.on { background: var(--c); color: #0c0d12; }
@media (hover: hover) {
  .card:hover .quick, .card:focus-within .quick { opacity: 1; transform: none; pointer-events: auto; }
  .card:hover .status, .card:focus-within .status { opacity: 0; }
}
.card-body { padding: 9px 2px 0; }
.card-body h3 { font-size: 14px; font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.prog { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.prog .bar { flex: 1; }
.prog .lbl { font-size: 12px; font-weight: 700; color: var(--en_cours); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { height: 5px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 5px; background: var(--en_cours); transition: width 0.3s; }
.plus1 { height: 26px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 700; background: rgba(58, 160, 255, 0.16); color: var(--en_cours); white-space: nowrap; }
.plus1:hover { background: var(--en_cours); color: #0c0d12; }
.skeleton .poster { animation: pulse 1.4s ease-in-out infinite; }
.skeleton .line { height: 12px; margin-top: 10px; border-radius: 6px; background: var(--surface-2); width: 80%; }
@keyframes pulse { 50% { opacity: 0.5; } }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--text); font-size: 21px; margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }
.note { font-size: 13px; color: var(--muted); min-height: 20px; margin: -8px 0 10px; display: flex; align-items: center; gap: 8px; }
.spin { width: 13px; height: 13px; border: 2px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#sentinel { height: 1px; }

/* ---------- Fiche d'un titre ---------- */
dialog#modal {
  width: min(900px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line);
  border-radius: 18px; background: var(--surface); color: var(--text); overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
dialog#modal::backdrop { background: rgba(5, 6, 9, 0.78); backdrop-filter: blur(4px); }
.m-close { position: absolute; top: 12px; right: 12px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(12, 13, 18, 0.72); }
.m-close:hover { background: var(--surface-3); }
.m-banner { height: 190px; background: var(--surface-2) center 25% / cover no-repeat; position: relative; }
.m-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 20%, var(--surface)); }
.m-body { display: grid; grid-template-columns: 200px 1fr; gap: 26px; padding: 26px; position: relative; }
.m-banner + .m-body { margin-top: -90px; }
.m-poster { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); align-self: start; }
.m-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-poster img.broken { display: none; }
.m-info { min-width: 0; padding-top: 4px; }
.m-info h2 { font-size: clamp(22px, 3vw, 30px); line-height: 1.12; padding-right: 30px; }
.m-orig { color: var(--muted); font-size: 14px; margin-top: 3px; }
.m-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; color: var(--muted); font-size: 13.5px; }
.m-meta b { color: var(--accent-2); font-weight: 700; }
.genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.genres span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.block { margin-top: 20px; }
.block > h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; margin-bottom: 9px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.block > h3 em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--accent-2); font-size: 13px; }
.statuses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.statuses button {
  height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 650; font-size: 13.5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.statuses button:hover { color: var(--text); border-color: var(--c); }
.statuses button.on { background: var(--c); border-color: var(--c); color: #0c0d12; }
.scores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; max-width: 420px; }
.sc { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.sc span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.sc b { font: 700 20px/1.2 var(--display); color: var(--accent-2); font-variant-numeric: tabular-nums; }
.sc small { font-size: 12px; color: var(--muted); }
.sc.vzc { border-color: rgba(255, 92, 56, 0.45); }
.sc.vzc b { color: var(--accent); }
.vz { color: var(--accent); font-weight: 700; }
.cine { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: 14px; }
.cine input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; cursor: pointer; }
.cine small { color: var(--muted); font-weight: 500; margin-left: 6px; }
/* Ma note : grande valeur + 10 boutons numérotés */
.myrate .rate-box { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.rate-value { display: flex; align-items: baseline; gap: 2px; min-width: 64px; justify-content: center; }
.rate-value b { font: 700 34px/1 var(--display); color: var(--accent-2); font-variant-numeric: tabular-nums; }
.rate-value span { color: var(--muted); font-weight: 600; }
.rate-grid { flex: 1; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.rate-grid button { height: 42px; border-radius: 9px; font-weight: 700; font-size: 15px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-variant-numeric: tabular-nums; }
.rate-grid button:hover { border-color: var(--accent-2); }
.rate-grid button.below { background: rgba(255, 176, 32, 0.18); border-color: rgba(255, 176, 32, 0.35); color: #ffd27a; }
.rate-grid button.on { background: var(--accent-2); border-color: var(--accent-2); color: #14161d; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.mynote { color: var(--accent-2); font-weight: 700; }
@media (max-width: 520px) {
  .myrate .rate-box { flex-direction: column; align-items: stretch; }
  .rate-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.linkbtn { color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; margin-top: 8px; }
.linkbtn:hover { color: var(--danger); }
.stars { display: inline-flex; flex-direction: row-reverse; align-items: center; }
.stars button { padding: 2px 1px; color: var(--surface-3); }
.stars button svg { width: 25px; height: 25px; fill: currentColor; stroke: none; display: block; }
.stars button.on { color: var(--accent-2); }
.stars:hover button { color: var(--surface-3); }
.stars button:hover, .stars button:hover ~ button { color: #ffd27a; }
.rating-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rating-row output { font: 700 18px/1 var(--display); font-variant-numeric: tabular-nums; min-width: 3.2em; }
.progress-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 12px; }
.progress-ctl { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.progress-ctl label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.progress-ctl select.input { width: auto; min-width: 120px; background-color: var(--surface); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.stepper button { width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); }
.stepper button:hover { background: var(--surface-3); color: var(--text); }
.stepper input { width: 58px; height: 38px; text-align: center; border: 0; background: none; outline: none; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.progress-ctl .of { color: var(--muted); font-variant-numeric: tabular-nums; }
.progress-total { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress-total .bar { flex: 1; height: 7px; }
.overview { color: #cfd3de; white-space: pre-line; max-width: 68ch; }

/* ---------- Profil ---------- */
.profile-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 20px; }
.profile-head .who { flex: 1; min-width: 220px; }
.profile-head h1 { font-size: 30px; line-height: 1.1; }
.profile-head .handle { color: var(--muted); }
.profile-head .bio { margin-top: 8px; max-width: 60ch; }
.levelcard { min-width: 260px; flex: 0 1 340px; }
.levelcard .lv { display: flex; align-items: baseline; gap: 10px; }
.levelcard .lv b { font: 700 40px/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.levelcard .lv span { font-weight: 700; font-size: 17px; }
.levelcard .xp { height: 9px; margin: 10px 0 6px; }
.levelcard small { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.tile { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.tile b { display: block; font: 700 26px/1.15 var(--display); font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 13px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.section { margin-bottom: 30px; min-width: 0; }
.section > h2 { font-size: 19px; margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px; }
.section > h2 small { font: 600 13px var(--font); color: var(--muted); letter-spacing: 0; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.badge { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.badge .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--surface-2); flex: none; }
.badge .txt { min-width: 0; flex: 1; }
.badge b { display: block; font-size: 13.5px; line-height: 1.25; }
.badge small { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }
.badge .bar { margin-top: 6px; height: 4px; }
.badge .bar > i { background: var(--muted); }
.badge.locked .ico { filter: grayscale(1); opacity: 0.45; }
.badge.locked b { color: var(--muted); }
.badge.unlocked { border-color: rgba(255, 176, 32, 0.45); background: linear-gradient(135deg, rgba(255, 176, 32, 0.10), var(--surface) 60%); }
.genre-bars { display: grid; gap: 10px; }
.genre-bars div { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13.5px; }
.genre-bars .bar { grid-column: 1 / -1; }
.genre-bars .bar > i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.rules { display: grid; gap: 8px; font-size: 13.5px; }
.rules div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.rules b { color: var(--accent-2); white-space: nowrap; }

/* ---------- Classement ---------- */
.board { display: grid; gap: 8px; max-width: 860px; }
.board .rowp { display: grid; grid-template-columns: 44px 40px 1fr auto auto; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.board .rowp:hover { border-color: var(--surface-3); }
.board .rowp.me { border-color: var(--accent); }
.board .rk { font: 700 18px/1 var(--display); color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.board .rowp:nth-child(1) .rk { color: #ffd166; } .board .rowp:nth-child(2) .rk { color: #cfd6e4; } .board .rowp:nth-child(3) .rk { color: #e09a62; }
.board .nm { min-width: 0; }
.board .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .nm small { color: var(--muted); font-size: 12.5px; }
.board .lv { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.board .pts { font: 700 17px/1 var(--display); font-variant-numeric: tabular-nums; min-width: 86px; text-align: right; }
.board .pts small { font: 600 12px var(--font); color: var(--muted); }

/* ---------- Connexion et paramètres ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; max-width: 1040px; margin: clamp(0px, 4vh, 50px) auto 0; }
.auth-pitch h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.06; }
.auth-pitch h1 em { font-style: normal; color: var(--accent); }
.auth-pitch ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.auth-pitch li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.auth-pitch li b { color: var(--text); display: block; }
.auth-pitch li > span { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.panel h2 { font-size: 18px; margin-bottom: 4px; }
.panel > p.muted { margin-bottom: 16px; font-size: 13.5px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); margin-bottom: 20px; }
.tabs button { height: 38px; border-radius: 9px; font-weight: 650; color: var(--muted); }
.tabs button.on { background: var(--surface-3); color: var(--text); }
.form { display: grid; gap: 14px; }
.pwwrap { position: relative; }
.pwwrap .input { padding-right: 46px; }
.pwwrap button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; }
.pwwrap button:hover { color: var(--text); background: var(--surface-3); }
.meter { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; background: var(--danger); transition: width 0.2s, background 0.2s; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.devlogin { margin-top: 18px; padding: 14px; border-radius: 12px; border: 1px dashed var(--accent-2); background: rgba(255, 176, 32, 0.06); }
.devlogin-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-2); margin-bottom: 10px; }
.devlogin-list { display: flex; flex-wrap: wrap; gap: 8px; }
.devlogin .chip { font-weight: 600; font-size: 14px; }
.gbtn { width: 100%; display: flex; justify-content: center; min-height: 44px; }
.gbtn .btn { width: 100%; }
.settings { display: grid; gap: 20px; max-width: 760px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches label { cursor: pointer; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: var(--c, var(--surface-2)); border: 2px solid transparent; }
.swatches input:checked + span { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.swatches input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; transition: background 0.2s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked { background: var(--vu); }
.switch input:checked::after { transform: translateX(18px); }
.rowline { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Notifications ---------- */
#toasts {
  position: fixed; inset: auto 18px 18px auto; z-index: 200; display: grid; gap: 8px; justify-items: end; pointer-events: none;
  margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible;
}
[hidden] { display: none !important; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  background: var(--surface-3); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toast-in 0.25s ease; max-width: min(380px, calc(100vw - 36px));
}
.toast.points { background: var(--accent); border-color: var(--accent); color: #fff; }
.toast.level { background: linear-gradient(90deg, var(--accent), var(--accent-2)); border: 0; color: #14161d; }
.toast.badge { border-color: var(--accent-2); }
.toast.error { border-color: var(--danger); color: #ffc2c8; }
.toast.out { opacity: 0; transform: translateY(8px); transition: 0.3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Amis et recommandations ---------- */
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px;
  background: var(--accent); color: #0c0d12; font-size: 11px; font-weight: 800; line-height: 1; vertical-align: 1px; }
.tab-ico { position: relative; display: inline-grid; }
.dot-badge { position: absolute; top: -6px; right: -12px; margin: 0; }
.search.wide { max-width: none; margin: 0 0 6px; display: block; }
.people { display: grid; gap: 8px; margin-top: 10px; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.person-id { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.person-id b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-id small { color: var(--muted); font-size: 12.5px; }
.person-actions { flex-shrink: 0; }
.btn-pair { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.friend-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.friend-picks button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 13.5px; }
.friend-picks button .avatar { width: 26px; height: 26px; font-size: 13px; }
.friend-picks button.on { border-color: var(--accent); color: var(--text); background: var(--surface-3); }
.reco-block textarea { width: 100%; resize: vertical; }
.reco-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.reco-actions .linkbtn { margin-top: 0; }
.recos { display: grid; gap: 12px; margin-top: 14px; }
.reco { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.reco.unseen { border-color: var(--accent); }
.reco-card .card .quick { display: none; }
.reco-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.reco-who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.reco-who a { display: inline-flex; align-items: center; gap: 6px; }
.reco-who .avatar { width: 24px; height: 24px; font-size: 12px; }
.reco-title { font: 700 18px/1.2 var(--display); text-align: left; }
.reco-title:hover { color: var(--accent); }
.reco blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; font-style: italic; overflow-wrap: anywhere; }
.page-head + .pills { margin-bottom: 16px; }

/* ---------- Listes partagées ---------- */
.lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.list-tile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.list-tile:hover { border-color: var(--accent); }
.list-emoji { font-size: 30px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-2); flex-shrink: 0; }
.list-emoji-h { margin-right: 10px; }
.list-txt { flex: 1; min-width: 0; }
.list-txt b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-txt small { color: var(--muted); font-size: 12.5px; }
.faces { display: flex; flex-shrink: 0; }
.faces .avatar { width: 28px; height: 28px; font-size: 13px; margin-left: -8px; box-shadow: 0 0 0 2px var(--surface); }
.faces .avatar.more { --c: var(--surface-3); font-size: 11px; }
.list-form { display: grid; gap: 12px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-pick button { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; background: var(--surface-2); border: 1px solid var(--line); }
.emoji-pick button.on { border-color: var(--accent); background: var(--surface-3); }
.list-picks { display: grid; gap: 6px; }
.list-picks button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: left; }
.list-picks button b { flex: 1; font-weight: 600; }
.list-picks button.on { border-color: var(--accent); }
.list-picks button.on svg { color: var(--accent); }
.item-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.item-actions .linkbtn { margin-top: 0; }
.list-item.done { opacity: 0.7; }
.linkbtn.danger { color: var(--danger); }

/* ---------- Mobile ---------- */
#tabbar { display: none; }
@media (max-width: 860px) {
  #topbar { gap: 10px; }
  #topbar .nav, .chip-info, .logo span { display: none; }
  .chip { padding: 4px; }
  #tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(12, 13, 18, 0.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  #tabbar a { display: grid; justify-items: center; gap: 3px; padding: 9px 4px 8px; font-size: 11px; font-weight: 600; color: var(--muted); }
  #tabbar a.on { color: var(--accent); }
  #tabbar svg.i { width: 21px; height: 21px; }
  #toasts { inset: auto 12px 76px auto; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
  .strip { grid-auto-columns: 118px; gap: 10px; }
  .m-body { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .m-poster { width: 130px; }
  .statuses { grid-template-columns: 1fr 1fr; }
  .cols, .auth { grid-template-columns: 1fr; }
  .auth-pitch ul { display: none; }
  .board .rowp { grid-template-columns: 28px 40px 1fr auto; }
  .board .lv { display: none; }
  .levelcard { flex-basis: 100%; }
  .reco { grid-template-columns: 92px 1fr; gap: 12px; }
  .person { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
