/* =========================================================
   Saga — films & séries du Nord
   Thème sombre unique (voulu) : nuit polaire, or, givre, aurore.
   ========================================================= */

:root {
  --bg0: #070b14;
  --bg1: #0c1322;
  --bg2: #121b2e;
  --panel: rgba(16, 24, 40, .72);
  --panel2: rgba(22, 32, 52, .85);
  --line: rgba(232, 176, 75, .16);
  --line2: rgba(143, 211, 255, .14);
  --gold: #e8b04b;
  --gold2: #f5d08a;
  --ember: #e2563f;
  --frost: #8fd3ff;
  --aurora: #5ef2b4;
  --aurora2: #7b6cff;
  --text: #e8edf5;
  --muted: #9aa8bd;
  --dim: #6b7a90;

  --f-title: 'Cinzel', Georgia, 'Noto Sans Runic', 'Segoe UI Historic', sans-serif;
  --f-deco: 'Cinzel Decorative', 'Cinzel', Georgia, 'Noto Sans Runic', 'Segoe UI Historic', sans-serif;
  --f-body: 'Alegreya Sans', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Runic', 'Segoe UI Historic', sans-serif;
  --f-rune: 'Noto Sans Runic', 'Segoe UI Historic', sans-serif;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .35);
  --glow-gold: 0 0 0 1px rgba(232, 176, 75, .45), 0 0 22px -4px rgba(232, 176, 75, .55);
  --gut: 24px;

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg0);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: radial-gradient(120% 80% at 50% -10%, #142039 0%, var(--bg1) 45%, var(--bg0) 100%) fixed var(--bg0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 {
  font-family: var(--f-title);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  margin: 0 0 .4em;
  color: var(--text);
}
h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem);
  font-weight: 900;
  background: linear-gradient(180deg, #fff6e2 0%, var(--gold2) 45%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 24px rgba(232, 176, 75, .12);
}
h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 .8em; }

a { color: var(--gold2); text-decoration: none; }
a:hover { color: #fff1cf; }

img { max-width: 100%; display: block; }
/* Icônes ; .mountains et .ring svg redéfinissent leur taille (sélecteurs plus forts). */
svg { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .5; }

kbd {
  font-family: var(--f-body);
  font-size: .75rem;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--line2);
  border-bottom-width: 2px;
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
}

::selection { background: rgba(232, 176, 75, .35); color: #fff; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 6px rgba(232, 176, 75, .15);
}

* { scrollbar-width: thin; scrollbar-color: rgba(232, 176, 75, .35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(232, 176, 75, .45), rgba(143, 211, 255, .25));
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* ---------- Fond : ciel, aurores, montagnes ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(80% 50% at 70% 0%, rgba(123, 108, 255, .14), transparent 70%),
    radial-gradient(60% 40% at 15% 10%, rgba(94, 242, 180, .08), transparent 70%),
    linear-gradient(180deg, #050812 0%, #0a1222 55%, #0d1628 100%);
}

.stars, .stars::before, .stars::after {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
}
.stars {
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 140px 80px, rgba(255, 255, 255, .8), transparent),
    radial-gradient(1.5px 1.5px at 90px 160px, #fff, transparent),
    radial-gradient(1px 1px at 230px 50px, rgba(220, 235, 255, .9), transparent),
    radial-gradient(1px 1px at 300px 190px, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1.2px 1.2px at 360px 110px, #fff, transparent);
  background-size: 380px 240px;
  opacity: .55;
  animation: twinkle 7s ease-in-out infinite;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 85%);
}
.stars::before {
  content: "";
  background-image:
    radial-gradient(1.6px 1.6px at 60px 120px, #fff8e6, transparent),
    radial-gradient(1px 1px at 180px 20px, #fff, transparent),
    radial-gradient(1.4px 1.4px at 270px 140px, #d9ecff, transparent),
    radial-gradient(1px 1px at 420px 60px, #fff, transparent);
  background-size: 520px 300px;
  animation: twinkle 5s ease-in-out infinite reverse;
}
.stars::after {
  content: "";
  background-image:
    radial-gradient(2px 2px at 110px 70px, rgba(245, 208, 138, .9), transparent),
    radial-gradient(1.8px 1.8px at 480px 210px, rgba(143, 211, 255, .9), transparent);
  background-size: 700px 420px;
  animation: twinkle 9s ease-in-out infinite 1.5s;
}
@keyframes twinkle {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .32;
  mix-blend-mode: screen;
  will-change: transform, opacity;
}
.aurora.a1 {
  width: 70vw; height: 26vh;
  left: -10vw; top: 4vh;
  background: linear-gradient(90deg, transparent, var(--aurora) 35%, rgba(94, 242, 180, .4) 65%, transparent);
  animation: auroraDrift 26s ease-in-out infinite alternate;
}
.aurora.a2 {
  width: 60vw; height: 22vh;
  right: -12vw; top: 10vh;
  background: linear-gradient(90deg, transparent, var(--aurora2) 40%, rgba(143, 211, 255, .5) 70%, transparent);
  opacity: .26;
  animation: auroraDrift 34s ease-in-out infinite alternate-reverse;
}
.aurora.a3 {
  width: 45vw; height: 16vh;
  left: 30vw; top: 0;
  background: linear-gradient(90deg, transparent, rgba(94, 242, 180, .7), rgba(123, 108, 255, .6), transparent);
  opacity: .2;
  animation: auroraDrift 22s ease-in-out infinite alternate 4s;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0) rotate(-6deg) scaleX(1); opacity: .18; }
  40%  { opacity: .36; }
  100% { transform: translate3d(8vw, 3vh, 0) rotate(4deg) scaleX(1.2); opacity: .24; }
}

.mountains {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 38vh;
  z-index: -2;
  pointer-events: none;
  opacity: .95;
}

#sky-fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ---------- Entête ---------- */
header.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  isolation: isolate;
}
/* Flou sur un pseudo-élément : un backdrop-filter sur l’entête piégerait la barre d’onglets fixe en mobile. */
header.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7, 11, 20, .92), rgba(9, 14, 26, .78));
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
header.masthead::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 176, 75, .15) 15%, var(--gold) 50%, rgba(232, 176, 75, .15) 85%, transparent);
  box-shadow: 0 0 12px rgba(232, 176, 75, .35);
  pointer-events: none;
}

.mast-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px var(--gut);
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  flex: none;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-rune);
  font-size: 1.35rem;
  color: var(--gold2);
  background:
    radial-gradient(circle at 50% 50%, #101a2e 0 54%, transparent 56%),
    conic-gradient(from 0deg, var(--gold), #8a5a17, var(--gold2), #8a5a17, var(--gold));
  box-shadow: inset 0 0 0 1px rgba(255, 230, 170, .35), 0 0 18px -4px rgba(232, 176, 75, .6);
  text-shadow: 0 0 10px rgba(232, 176, 75, .8);
  transition: transform .6s var(--ease), box-shadow .3s;
}
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.05); box-shadow: inset 0 0 0 1px rgba(255, 230, 170, .5), 0 0 26px -2px rgba(232, 176, 75, .8); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b {
  font-family: var(--f-deco);
  font-weight: 900;
  font-size: 1.45rem;
  letter-spacing: .06em;
  background: linear-gradient(180deg, #fff3d6, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-text small {
  font-size: .72rem;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}

.search {
  position: relative;
  flex: 1;
  max-width: 520px;
  margin-left: auto;
}
.search-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dim);
  display: flex;
  pointer-events: none;
  transition: color .2s;
}
.search input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 42px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: rgba(10, 16, 30, .7);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
  appearance: none;
}
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(1.6); cursor: pointer; }
.search input:focus {
  outline: none;
  border-color: rgba(232, 176, 75, .6);
  background: rgba(14, 22, 40, .9);
  box-shadow: 0 0 0 4px rgba(232, 176, 75, .12), 0 0 26px -8px rgba(232, 176, 75, .5);
}
.search:focus-within .search-ico { color: var(--gold); }
.search kbd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity .2s;
}
.search input:focus ~ kbd,
.search input:not(:placeholder-shown) ~ kbd { opacity: 0; }

.mast-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line2);
  transition: color .2s, border-color .2s, background .2s, box-shadow .25s, transform .2s var(--ease);
}
.icon-btn svg { width: 1.25em; height: 1.25em; }
.icon-btn:hover { color: var(--gold2); border-color: rgba(232, 176, 75, .45); background: rgba(232, 176, 75, .08); transform: translateY(-1px); }
.icon-btn.on {
  color: var(--aurora);
  border-color: rgba(94, 242, 180, .5);
  background: rgba(94, 242, 180, .1);
  box-shadow: 0 0 18px -4px rgba(94, 242, 180, .6);
}
.icon-btn.off { color: var(--dim); opacity: .75; }

/* ---------- Onglets ---------- */
.tabs {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gut);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 13px;
  font-family: var(--f-title);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  transition: color .2s;
}
.tab:hover { color: var(--text); }
.tab-rune {
  font-family: var(--f-rune);
  font-size: 1.05rem;
  color: var(--dim);
  transition: color .2s, text-shadow .2s, transform .3s var(--ease);
}
.tab:hover .tab-rune { color: var(--gold); transform: translateY(-1px); }
.tab::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold2), var(--gold), transparent);
  box-shadow: 0 0 10px rgba(232, 176, 75, .8);
  transform: scaleX(0);
  transition: transform .35s var(--ease);
}
.tab.active { color: var(--gold2); }
.tab.active .tab-rune { color: var(--gold); text-shadow: 0 0 10px rgba(232, 176, 75, .7); }
.tab.active::after { transform: scaleX(1); }
.tab-short { display: none; }

.count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-family: var(--f-body);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: 0;
  color: #fff;
  background: var(--ember);
  box-shadow: 0 0 10px -2px rgba(226, 86, 63, .8);
}
.tab[data-tab="a-voir"] .count {
  color: #04121d;
  background: var(--frost);
  box-shadow: 0 0 10px -2px rgba(143, 211, 255, .8);
}

body.no-key .tabs,
body.no-key .search { display: none; }

/* ---------- Vue & pages ---------- */
.view {
  display: block;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px var(--gut) 80px;
  min-height: 60vh;
  outline: none;
}
.view.enter { animation: viewIn .5s var(--ease) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.page { display: flex; flex-direction: column; gap: 28px; }
.page > * { min-width: 0; }

.page-head { max-width: 860px; }
.page-head-row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
}
.page-head-row > div:first-child { max-width: 820px; }
.page-head h1 { margin-bottom: .25em; }

.eyebrow {
  margin: 0 0 .5em;
  font-family: var(--f-title);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--frost);
  opacity: .9;
}
.lead {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.lead-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 2px;
  padding: 1px 10px;
  border-radius: 999px;
  font-size: .95rem;
  color: var(--gold2);
  background: rgba(232, 176, 75, .09);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.head-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.section { display: flex; flex-direction: column; gap: 16px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.section-head h2::after {
  content: "";
  width: 60px;
  height: 1px;
  margin-left: 6px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: .6;
}
.h-rune {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--f-rune);
  font-size: 1.05rem;
  color: var(--gold);
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(232, 176, 75, .14), transparent 70%);
  text-shadow: 0 0 10px rgba(232, 176, 75, .6);
  flex: none;
}
.section-note {
  font-size: .88rem;
  color: var(--dim);
  font-style: italic;
}

.muted { color: var(--muted); }
em.muted { font-style: italic; }
.hint { font-size: .9rem; color: var(--dim); margin: 0 0 10px; }

.link {
  display: inline;
  padding: 0;
  color: var(--gold2);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(232, 176, 75, .35);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .2s, text-decoration-color .2s;
  background: none;
  border: 0;
  cursor: pointer;
}
.link:hover { color: #fff1cf; text-decoration-color: var(--gold); }

/* ---------- Boutons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  line-height: 1.2;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--line2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  white-space: nowrap;
  transition: transform .2s var(--ease), border-color .2s, background .2s, color .2s, box-shadow .25s;
  -webkit-user-select: none;
  user-select: none;
}
.btn:hover {
  color: #fff;
  border-color: rgba(232, 176, 75, .5);
  background: linear-gradient(180deg, rgba(232, 176, 75, .14), rgba(232, 176, 75, .04));
  transform: translateY(-1px);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn svg { width: 1.2em; height: 1.2em; }

.btn-gold {
  color: #241503;
  border-color: rgba(255, 225, 160, .6);
  background: linear-gradient(180deg, #ffe3a3 0%, var(--gold2) 30%, var(--gold) 70%, #c18a2c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 8px 22px -8px rgba(232, 176, 75, .75);
  text-shadow: 0 1px 0 rgba(255, 240, 200, .4);
  overflow: hidden;
}
.btn-gold::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  transition: left .7s var(--ease);
  pointer-events: none;
}
.btn-gold:hover {
  color: #1a0f02;
  border-color: #ffe9b8;
  background: linear-gradient(180deg, #fff0c8 0%, #f8d98f 30%, #efbb57 70%, #c99232 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 12px 28px -8px rgba(232, 176, 75, .9);
}
.btn-gold:hover::before { left: 120%; }

.btn-lg { min-height: 50px; padding: 12px 26px; font-size: 1.05rem; }

.btn-danger {
  color: #ffb4a6;
  border-color: rgba(226, 86, 63, .45);
  background: linear-gradient(180deg, rgba(226, 86, 63, .16), rgba(226, 86, 63, .05));
}
.btn-danger:hover {
  color: #fff;
  border-color: var(--ember);
  background: linear-gradient(180deg, rgba(226, 86, 63, .4), rgba(226, 86, 63, .18));
  box-shadow: 0 8px 22px -10px rgba(226, 86, 63, .9);
}

/* Boutons de liste (favoris / à voir / vu) */
.btn.act { --lc: var(--gold); }
.btn.act-favorites { --lc: var(--ember); }
.btn.act-watchlist { --lc: var(--frost); }
.btn.act-seen { --lc: var(--aurora); }
.btn.act.on {
  color: var(--lc);
  border-color: color-mix(in srgb, var(--lc) 60%, transparent);
  background: color-mix(in srgb, var(--lc) 14%, transparent);
  box-shadow: 0 0 20px -6px var(--lc);
}
.btn.act.on svg { filter: drop-shadow(0 0 6px var(--lc)); }

.pop { animation: pop .45s var(--ease); }
@keyframes pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); }
  65% { transform: scale(.94); }
  100% { transform: scale(1); }
}

/* ---------- Grille & cartes ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 26px 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(160deg, var(--bg2), #0a1120);
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s, border-color .35s;
  isolation: isolate;
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), filter .4s;
}
/* Reflet */
.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .16) 45%, transparent 60%);
  transform: translateX(-110%);
  transition: transform .9s var(--ease);
  pointer-events: none;
}
.card:hover .poster,
.poster:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(232, 176, 75, .5);
  box-shadow: 0 24px 40px -16px rgba(0, 0, 0, .9), var(--glow-gold);
}
.card:hover .poster img { transform: scale(1.05); }
.card:hover .poster::before { transform: translateX(110%); }

/* Tampon « Vu » */
.card.is-seen .poster img { filter: grayscale(.55) brightness(.6); }
.card.is-seen .poster::after {
  content: "✓ Vu";
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 3;
  padding: 4px 14px;
  font-family: var(--f-title);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--aurora);
  border: 2px solid var(--aurora);
  border-radius: 8px;
  background: rgba(4, 20, 16, .55);
  box-shadow: 0 0 18px -4px rgba(94, 242, 180, .7), inset 0 0 10px rgba(94, 242, 180, .25);
  text-shadow: 0 0 8px rgba(94, 242, 180, .7);
  transform: translate(-50%, -50%) rotate(-12deg);
  pointer-events: none;
}

span.noposter {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(232, 176, 75, .14), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .015) 0 8px, transparent 8px 16px),
    linear-gradient(160deg, #16213a, #0a1120);
}
span.noposter b {
  font-family: var(--f-rune);
  font-size: 3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 22px rgba(232, 176, 75, .6);
  opacity: .85;
}
span.noposter small {
  font-family: var(--f-title);
  font-size: .82rem;
  line-height: 1.3;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.4;
  white-space: nowrap;
  color: var(--text);
  background: rgba(7, 11, 20, .78);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.badge-type {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 4;
  font-family: var(--f-title);
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--frost);
  border-color: rgba(143, 211, 255, .3);
}
.badges {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.badge-vote { color: var(--gold2); border-color: rgba(232, 176, 75, .4); }
.badge-date { color: var(--text); }
.badge-tag {
  color: #04140e;
  background: linear-gradient(180deg, #9cf8d2, var(--aurora));
  border-color: transparent;
  box-shadow: 0 0 12px -2px rgba(94, 242, 180, .7);
}

/* Boutons rapides */
.quick {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qb {
  --lc: var(--gold);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(7, 11, 20, .72);
  border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateX(6px) scale(.9);
  transition: opacity .25s, transform .3s var(--ease), color .2s, background .2s, border-color .2s, box-shadow .2s;
}
.qb svg { width: 1.05em; height: 1.05em; }
.qb-favorites { --lc: var(--ember); }
.qb-watchlist { --lc: var(--frost); }
.qb-seen { --lc: var(--aurora); }
.qb:nth-child(2) { transition-delay: .03s; }
.qb:nth-child(3) { transition-delay: .06s; }
.card:hover .qb,
.card:focus-within .qb,
.qb.on { opacity: 1; transform: none; }
.qb:hover { color: var(--lc); border-color: var(--lc); background: rgba(7, 11, 20, .9); }
.qb.on {
  color: var(--bg0);
  background: var(--lc);
  border-color: transparent;
  box-shadow: 0 0 14px -2px var(--lc);
}
@media (hover: none) {
  .qb { opacity: 1; transform: none; }
}

.card-body { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; min-width: 0; }
.card-title { margin: 0; font-size: .98rem; line-height: 1.25; }
.card-title button {
  text-align: left;
  font: inherit;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s;
}
.card:hover .card-title button { color: var(--gold2); }
.card-sub { margin: 0; font-size: .85rem; color: var(--dim); }
.card-why {
  margin: 4px 0 0;
  padding-left: 8px;
  font-size: .84rem;
  font-style: italic;
  line-height: 1.35;
  color: var(--frost);
  border-left: 2px solid rgba(143, 211, 255, .35);
  opacity: .9;
}

.reveal { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.card.leaving {
  animation: none;
  opacity: 0;
  transform: scale(.92);
  transition: opacity .3s, transform .3s var(--ease);
  pointer-events: none;
}

/* ---------- Rangées défilantes ---------- */
.row-wrap { position: relative; }
.row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 168px;
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding: 0 var(--gut);
  padding: 8px var(--gut) 14px;
  margin: 0 calc(-1 * var(--gut));
  scrollbar-width: none;
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
.row .card .poster { box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .9); }

.row-nav {
  position: absolute;
  top: calc(8px + 125px);
  z-index: 6;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  line-height: 1;
  padding-bottom: 4px;
  color: var(--gold2);
  background: rgba(9, 14, 26, .88);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px -8px #000;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity .25s, background .2s, border-color .2s, transform .2s var(--ease);
}
.row-nav.prev { left: -14px; }
.row-nav.next { right: -14px; }
.row-wrap:hover .row-nav,
.row-nav:focus-visible { opacity: 1; }
.row-nav:hover { background: rgba(232, 176, 75, .18); border-color: var(--gold); transform: translateY(-50%) scale(1.06); }
@media (hover: none) {
  .row-nav { display: none; }
}

.people-row { grid-auto-columns: 128px; }

/* ---------- Héros ---------- */
.hero {
  position: relative;
  min-height: 440px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .03);
  isolation: isolate;
  background: var(--bg2);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 25%;
  transform-origin: 60% 40%;
  animation: kenburns 28s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.16) translate3d(-2%, -1.5%, 0); }
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 11, 20, .96) 0%, rgba(7, 11, 20, .82) 38%, rgba(7, 11, 20, .25) 75%, rgba(7, 11, 20, .5) 100%),
    linear-gradient(0deg, rgba(7, 11, 20, .95) 0%, transparent 45%),
    radial-gradient(60% 80% at 100% 0%, rgba(123, 108, 255, .18), transparent 60%);
}
.hero-content {
  position: relative;
  min-height: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
  padding: 44px 44px 40px;
}
.hero-content > div { max-width: 660px; }
.hero .eyebrow { color: var(--gold2); text-shadow: 0 0 12px rgba(232, 176, 75, .5); }
.hero-title {
  margin: 0 0 .25em;
  font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3.1rem);
  font-weight: 900;
  line-height: 1.08;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .7);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  color: var(--muted);
  font-size: .95rem;
}
.hero-why {
  display: inline-block;
  margin: 2px 0 12px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .92rem;
  font-style: italic;
  color: var(--aurora);
  background: rgba(94, 242, 180, .08);
  border: 1px solid rgba(94, 242, 180, .25);
}
.hero-overview {
  color: #c9d3e2;
  font-size: 1.02rem;
  max-width: 600px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-poster {
  width: 220px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid rgba(232, 176, 75, .4);
  box-shadow: 0 30px 50px -20px #000, var(--glow-gold);
  transform: rotate(2deg);
  transition: transform .5s var(--ease);
}
.hero:hover .hero-poster { transform: rotate(0) translateY(-4px); }

/* ---------- Panneaux ---------- */
.panel {
  position: relative;
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: calc(var(--r-lg) - 6px);
  border: 1px dashed rgba(232, 176, 75, .13);
  pointer-events: none;
}
.panel > * { position: relative; }

/* ---------- Chargement ---------- */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}
.loader p { margin: 0; }
.loader-runes { display: flex; gap: 14px; }
.loader-runes span {
  font-family: var(--f-rune);
  font-size: 1.9rem;
  color: var(--gold);
  opacity: .2;
  animation: runeGlow 1.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 160ms);
}
@keyframes runeGlow {
  0%, 100% { opacity: .2; transform: translateY(0); text-shadow: none; }
  45% { opacity: 1; transform: translateY(-5px); color: var(--gold2); text-shadow: 0 0 14px rgba(232, 176, 75, .9), 0 0 30px rgba(232, 176, 75, .4); }
}

/* ---------- États (vide / erreur) ---------- */
.state {
  max-width: 560px;
  margin: 10px auto;
  padding: 42px 28px;
  text-align: center;
  border-radius: var(--r-lg);
  border: 1px dashed var(--line);
  background: radial-gradient(circle at 50% 0%, rgba(232, 176, 75, .07), transparent 60%), rgba(12, 19, 34, .5);
}
.state h3 { font-size: 1.25rem; margin-bottom: .4em; color: var(--gold2); }
.state p { color: var(--muted); margin: 0 auto; max-width: 440px; }
.state p svg { color: var(--gold); }
.state-rune {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--f-rune);
  font-size: 2.1rem;
  color: var(--gold);
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(232, 176, 75, .16), transparent 70%);
  text-shadow: 0 0 18px rgba(232, 176, 75, .7);
  animation: floatRune 4s ease-in-out infinite;
}
@keyframes floatRune {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.state-error { border-color: rgba(226, 86, 63, .35); background: radial-gradient(circle at 50% 0%, rgba(226, 86, 63, .1), transparent 60%), rgba(12, 19, 34, .5); }
.state-error .state-rune { color: var(--ember); border-color: rgba(226, 86, 63, .35); background: radial-gradient(circle, rgba(226, 86, 63, .18), transparent 70%); text-shadow: 0 0 18px rgba(226, 86, 63, .7); }
.state-error h3 { color: #ffb4a6; }

/* ---------- Composants de formulaire ---------- */
/* Sélecteur segmenté */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(7, 11, 20, .6);
  border: 1px solid var(--line2);
}
.seg button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--muted);
  transition: color .2s, background .25s, box-shadow .25s;
}
.seg button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.seg button.on {
  color: #241503;
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  box-shadow: 0 4px 14px -6px rgba(232, 176, 75, .9), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.seg button em {
  font-style: normal;
  font-size: .75rem;
  font-weight: 800;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  text-align: center;
  color: var(--frost);
  background: rgba(143, 211, 255, .12);
}
.seg button em:empty { display: none; }
.seg button.on em { color: #3a2508; background: rgba(36, 21, 3, .14); }
.toolbar .seg em { font-variant-numeric: tabular-nums; }

/* Liste déroulante */
.select {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  color: var(--dim);
}
.select > span { white-space: nowrap; font-weight: 500; }
.select select {
  height: 40px;
  padding: 0 38px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23e8b04b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px,
    rgba(7, 11, 20, .6);
  transition: border-color .2s, box-shadow .2s;
}
.select select:hover { border-color: rgba(232, 176, 75, .45); }
.select select:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232, 176, 75, .15); }
.select option { background: var(--bg1); color: var(--text); }

/* Pastilles */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: color .2s, background .2s, border-color .2s, box-shadow .25s, transform .2s var(--ease);
}
.chip:hover { color: var(--text); border-color: rgba(232, 176, 75, .4); transform: translateY(-1px); }
.chip.on {
  color: var(--gold2);
  background: rgba(232, 176, 75, .13);
  border-color: rgba(232, 176, 75, .6);
  box-shadow: 0 0 16px -6px rgba(232, 176, 75, .8);
}
.chip-ico { font-size: 1.05em; line-height: 1; }
.chip-prov .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pc);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .08);
  transition: box-shadow .25s;
}
.chip-prov.on {
  color: var(--text);
  background: color-mix(in srgb, var(--pc) 20%, transparent);
  border-color: color-mix(in srgb, var(--pc) 70%, transparent);
  box-shadow: 0 0 16px -6px var(--pc);
}
.chip-prov.on .dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .25), 0 0 10px var(--pc); }

/* Interrupteur */
.switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.switch-track {
  position: relative;
  flex: none;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f3f6fb, #aab6c8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
  transition: transform .3s var(--ease), background .25s;
}
.switch input:checked + .switch-track {
  background: linear-gradient(90deg, rgba(94, 242, 180, .35), rgba(94, 242, 180, .6));
  border-color: rgba(94, 242, 180, .7);
  box-shadow: 0 0 16px -4px rgba(94, 242, 180, .7);
}
.switch input:checked + .switch-track::after { transform: translateX(20px); background: linear-gradient(180deg, #ffffff, #c9fbe6); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold); outline-offset: 3px; }
.switch-txt { display: flex; flex-direction: column; line-height: 1.3; }
.switch-txt b { font-weight: 700; }
.switch-txt small { color: var(--dim); font-size: .86rem; }

/* Champ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: var(--f-title);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold2);
}
.field input,
.field textarea {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: rgba(7, 11, 20, .65);
  color: var(--text);
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: var(--dim); font-family: var(--f-body); }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232, 176, 75, .14); }

.form-msg { min-height: 1.4em; margin: 6px 0 0; font-size: .93rem; color: var(--muted); }
.form-msg:empty { min-height: 0; margin: 0; }
.form-msg.ok { color: var(--aurora); }
.form-msg.ok::before { content: "ᛉ "; font-family: var(--f-rune); }
.form-msg.err { color: #ff9a87; }
.form-msg.err::before { content: "ᚺ "; font-family: var(--f-rune); }
.form-msg.wait { color: var(--frost); font-style: italic; }
.form-msg.wait::before {
  content: "ᛋ";
  display: inline-block;
  margin-right: 6px;
  font-family: var(--f-rune);
  font-style: normal;
  animation: runeGlow 1.2s ease-in-out infinite;
}

/* Case à cocher */
label.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .93rem;
  color: var(--muted);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
label.check input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border-radius: 6px;
  border: 1px solid rgba(232, 176, 75, .45);
  background: rgba(7, 11, 20, .6);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
label.check input::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #241503;
  border-bottom: 2px solid #241503;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform .2s var(--ease);
}
label.check input:checked {
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  border-color: var(--gold2);
  box-shadow: 0 0 12px -3px rgba(232, 176, 75, .8);
}
label.check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
label.check:hover { color: var(--text); }

/* ---------- Barres d’outils & filtres ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.filters { display: flex; flex-direction: column; gap: 20px; }
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}
.filter-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.filter-block .hint { margin: -4px 0 2px; }
.filter-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.filter-block-head h4 {
  margin: 0;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold2);
}
.mini-actions { display: flex; gap: 16px; font-size: .88rem; }

.results-meta {
  margin: 0;
  font-size: .92rem;
  color: var(--dim);
  font-style: italic;
}
.results-meta:empty { display: none; }

.more {
  display: flex;
  justify-content: center;
  padding: 10px 0 0;
}
.more:empty { display: none; }
.more .btn { min-width: 200px; }

/* ===== PARTIE B ===== */

/* ---------- Personnes ---------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 26px 16px;
}
.person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  text-align: center;
  color: var(--text);
}
.person:hover { color: var(--text); }
.shield {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 112px;
  aspect-ratio: 1;
  margin-bottom: 6px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--gold), #7a5420, var(--gold2), #8a6124, var(--gold), #6b4a1c, var(--gold));
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .9);
  transition: transform .35s var(--ease), box-shadow .35s;
  flex: none;
}
.shield img,
.shield b {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--bg0);
}
.shield img { object-fit: cover; object-position: center 20%; background: var(--bg2); }
.shield b {
  display: grid;
  place-items: center;
  font-family: var(--f-title);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--gold2);
  background: radial-gradient(circle at 50% 35%, #1c2945, #0b1220 75%);
  text-shadow: 0 0 14px rgba(232, 176, 75, .5);
}
.person:hover .shield,
.person:focus-visible .shield { transform: translateY(-3px); box-shadow: var(--glow-gold), 0 16px 26px -12px #000; }
.person:focus-visible { box-shadow: none; outline-offset: 6px; }
.shield-xl {
  width: 220px;
  max-width: none;
  margin: 0;
  padding: 4px;
  box-shadow: var(--glow-gold), 0 30px 50px -20px #000;
}
.shield-xl b { font-size: 4rem; }
.person-name {
  max-width: 100%;
  font-weight: 700;
  font-size: .98rem;
  line-height: 1.25;
  transition: color .2s;
}
.person:hover .person-name { color: var(--gold2); }
.person-sub {
  max-width: 100%;
  font-size: .84rem;
  line-height: 1.3;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.people-row .shield { max-width: 104px; }

/* ---------- Listes de titres ---------- */
.title-list { display: flex; flex-direction: column; gap: 12px; }
.title-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 18px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2);
  transition: border-color .2s, transform .25s var(--ease);
}
.title-row:hover { border-color: var(--line); transform: translateX(3px); }
.tr-poster {
  position: relative;
  width: 64px;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg2);
  box-shadow: 0 8px 16px -8px #000;
}
.tr-poster img { width: 100%; height: 100%; object-fit: cover; }
.tr-poster span.noposter { padding: 4px; }
.tr-poster span.noposter b { font-size: 1.6rem; }
.tr-info { min-width: 0; }
.tr-info h3 { margin: 0 0 .15em; font-size: 1.08rem; }
.tr-info p { margin: 0; font-size: .9rem; color: var(--muted); }
.tr-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* ---------- Recherche ---------- */
.big-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 820px;
  padding: 6px 6px 6px 20px;
  border-radius: 999px;
  background: rgba(7, 11, 20, .7);
  border: 1px solid var(--line2);
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .25s;
}
.big-search:focus-within { border-color: var(--gold); box-shadow: var(--shadow), 0 0 0 4px rgba(232, 176, 75, .14); }
.big-search > svg { color: var(--gold); width: 1.3em; height: 1.3em; }
.big-search input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 1.1rem;
}
.big-search input::placeholder { color: var(--dim); }
.big-search input:focus { outline: none; }
.big-search input::-webkit-search-cancel-button { filter: invert(.7) sepia(1) hue-rotate(5deg); cursor: pointer; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -12px; }
.examples > span { color: var(--muted); font-style: italic; margin-right: 2px; }
#searchZone { display: flex; flex-direction: column; gap: 34px; min-height: 40vh; }
#searchZone > * { min-width: 0; }

.cast-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cast-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 5px 16px 5px 5px;
  border-radius: 999px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  border: 1px solid var(--line2);
  transition: border-color .2s, transform .2s var(--ease), color .2s;
}
.cast-chip:hover { color: var(--gold2); border-color: var(--gold); transform: translateY(-2px); }
.cast-chip img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line);
}
.cast-chip span.noposter {
  position: relative;
  inset: auto;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  gap: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.cast-chip span.noposter b { font-size: 1.05rem; }
.cast-chip > span:not(.noposter) {
  min-width: 0;
  max-width: 240px;
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Casting ---------- */
.cast-banner {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
  isolation: isolate;
}
.cast-banner-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center 25%;
  opacity: .6;
}
.cast-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 11, 20, .95) 0%, rgba(7, 11, 20, .75) 45%, rgba(7, 11, 20, .35) 100%),
    linear-gradient(0deg, rgba(7, 11, 20, .95) 0%, transparent 60%);
  pointer-events: none;
}
.cast-banner-in { display: flex; flex-direction: column; gap: 22px; padding: 22px 32px 32px; }
.cb-main { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 28px; }
.cb-main > div { max-width: 720px; }
.cb-main > div:only-child { grid-column: 1 / -1; }
.cb-poster {
  width: 170px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid rgba(232, 176, 75, .4);
  box-shadow: 0 24px 40px -18px #000, var(--glow-gold);
}
.cb-main .lead { margin-bottom: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(7, 11, 20, .55);
  border: 1px solid var(--line2);
  transition: color .2s, border-color .2s, transform .2s var(--ease);
}
.back:hover { color: var(--gold2); border-color: var(--gold); transform: translateX(-2px); }

.cast-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.cast-tools .hint { margin: 0; }
.filter-input {
  flex: 1;
  max-width: 420px;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(7, 11, 20, .65);
  border: 1px solid var(--line2);
  color: var(--gold);
  transition: border-color .2s, box-shadow .2s;
}
.filter-input:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232, 176, 75, .14); }
.filter-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: var(--text);
}
.filter-input input::placeholder { color: var(--dim); }
.filter-input input:focus { outline: none; }

/* ---------- Personne ---------- */
.person-head { display: flex; flex-direction: column; gap: 20px; }
.person-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 40px; }
.person-info { min-width: 0; max-width: 820px; }
.facts {
  list-style: none;
  margin: 4px 0 18px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.facts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.facts b {
  min-width: 120px;
  font-family: var(--f-title);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold2);
}
.facts span { color: var(--text); }
.bio { color: #cfd7e3; line-height: 1.7; }
.bio p { margin: 0 0 .8em; }
.bio.clamp {
  max-height: 13.5em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.person-info > .link { margin-top: 2px; }
.person-info > .hint { margin-top: 10px; }
.person-tools { margin-top: 6px; }

/* ---------- Sorties ---------- */
.month { display: flex; flex-direction: column; gap: 16px; }
.month-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
}
.month-title::after {
  content: "";
  flex: 1;
  align-self: center;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.month-title em {
  font-family: var(--f-body);
  font-style: normal;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}
.ep-list { display: grid; gap: 10px; }
.ep {
  width: 100%;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 10px 16px 10px 10px;
  border-radius: var(--r);
  text-align: left;
  color: var(--text);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line2);
  transition: border-color .2s, transform .25s var(--ease);
}
.ep:hover { border-color: var(--gold); transform: translateX(3px); }
.ep img,
.ep-noimg {
  width: 96px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--bg2);
}
.ep-noimg {
  display: grid;
  place-items: center;
  font-family: var(--f-rune);
  font-size: 1.5rem;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(232, 176, 75, .5);
  background: linear-gradient(160deg, #16213a, #0a1120);
}
.ep-txt { display: flex; flex-direction: column; min-width: 0; }
.ep-txt b,
.ep-txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-txt b { font-size: 1.02rem; }
.ep-txt small { font-size: .88rem; color: var(--muted); }
.ep time { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; }
.ep time b { color: var(--gold2); font-size: .95rem; }
.ep time small { color: var(--dim); font-size: .82rem; }

.tip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 20px;
}
.tip-rune {
  grid-row: span 2;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--f-rune);
  font-size: 1.9rem;
  color: var(--gold);
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(232, 176, 75, .18), transparent 70%);
  text-shadow: 0 0 16px rgba(232, 176, 75, .7);
}
.tip h3 { margin: 0; color: var(--gold2); }
.tip p { margin: 0; color: var(--muted); }
.tip p svg { color: var(--ember); }
#dailyZone { scroll-margin-top: 140px; }

.next-ep {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1px solid rgba(143, 211, 255, .25);
  background: rgba(143, 211, 255, .06);
}
.next-ep > svg { width: 1.6em; height: 1.6em; color: var(--frost); }
.next-ep > div { min-width: 0; }
.next-ep > div > b { display: block; color: var(--frost); }
.next-ep > div > small { display: block; font-size: .9rem; color: var(--muted); }

/* ---------- Modale & fiche ---------- */
body.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 4vh 20px;
  opacity: 0;
  transition: opacity .26s var(--ease);
}
.modal.open { opacity: 1; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  cursor: default;
  background: radial-gradient(circle at 50% 30%, rgba(12, 19, 34, .72), rgba(3, 6, 12, .9));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #0f1828, #0a111e 40%);
  border: 1px solid var(--line);
  box-shadow: 0 40px 90px -30px #000, 0 0 0 1px rgba(255, 255, 255, .03);
  transform: translateY(18px) scale(.98);
  transition: transform .3s var(--ease);
}
.modal.open .modal-panel { transform: none; }
.modal-close {
  position: sticky;
  top: 14px;
  z-index: 5;
  float: right;
  margin: 14px 14px -58px 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
  background: rgba(7, 11, 20, .72);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: color .2s, border-color .2s, transform .3s var(--ease);
}
.modal-close:hover { color: var(--gold2); border-color: var(--gold); transform: rotate(90deg); }
.modal-close svg { width: 1.3em; height: 1.3em; }
#modalBody > .loader { padding: 100px 20px; }
#modalTitle { scroll-margin-top: 80px; }

.d-hero {
  position: relative;
  height: 320px;
  background-size: cover;
  background-position: center 20%;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.d-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(0deg, #0f1828 0%, rgba(15, 24, 40, .7) 35%, transparent 75%),
    linear-gradient(180deg, rgba(7, 11, 20, .5), transparent 30%);
}
.d-hero.noimg {
  height: 150px;
  background:
    radial-gradient(60% 120% at 20% 0%, rgba(94, 242, 180, .16), transparent 70%),
    radial-gradient(50% 120% at 80% 0%, rgba(123, 108, 255, .2), transparent 70%),
    var(--bg2);
}
.d-main {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 14px 28px;
  margin-top: -130px;
  padding: 0 30px;
}
.d-hero.noimg + .d-main { margin-top: -60px; }
.d-poster {
  grid-row: 1 / span 2;
  align-self: start;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid rgba(232, 176, 75, .4);
  box-shadow: 0 26px 44px -18px #000, var(--glow-gold);
  background: var(--bg2);
}
.d-noposter {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(232, 176, 75, .16), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .015) 0 8px, transparent 8px 16px),
    linear-gradient(160deg, #16213a, #0a1120);
}
.d-noposter > b {
  font-family: var(--f-rune);
  font-size: 4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 0 24px rgba(232, 176, 75, .6);
}
.d-head { align-self: end; min-width: 0; padding-top: 40px; }
.d-title {
  margin: 0 0 .2em;
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.3rem);
  font-weight: 900;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .8);
}
.d-tagline { margin: 0 0 .5em; font-style: italic; color: var(--muted); }
.d-score { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.d-score > span { font-size: .92rem; color: var(--muted); }
.ring { position: relative; width: 56px; height: 56px; flex: none; }
.ring svg { display: block; width: 100%; height: 100%; vertical-align: 0; }
.ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--rc, var(--gold));
}
.d-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.d-banner {
  margin: 20px 30px 0;
  padding: 12px 18px;
  border-radius: var(--r);
  border: 1px solid rgba(94, 242, 180, .3);
  background: rgba(94, 242, 180, .07);
  color: #cdf7e6;
  font-style: italic;
}
.d-trailer-slot { padding: 0 30px; }
.d-trailer-slot:not(:empty) { margin-top: 22px; }
.trailer {
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 24px 50px -24px #000;
}
.trailer iframe { display: block; width: 100%; height: 100%; border: 0; }
.d-body {
  --gut: 30px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 26px;
  padding: 0 var(--gut) 30px;
}
.d-body:only-child { padding-top: 70px; }
section.d-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.d-h {
  margin: 0;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold2);
}
.d-h-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.d-overview { margin: 0; max-width: 75ch; font-size: 1.05rem; line-height: 1.68; color: #d6dde8; }
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px 22px;
  margin: 0;
  padding: 16px 20px;
  border-radius: var(--r);
  border: 1px solid var(--line2);
  background: rgba(7, 11, 20, .4);
}
.facts-grid > div { min-width: 0; }
.facts-grid dt {
  font-family: var(--f-title);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dim);
}
.facts-grid dd { margin: 2px 0 0; color: var(--text); }
.prov-group { margin-bottom: 12px; }
.prov-group h4 { margin: 0 0 8px; font-family: var(--f-body); font-size: .88rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.prov-list { display: flex; flex-wrap: wrap; gap: 8px; }
.prov {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line2);
}
.prov img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.prov.mine {
  border-color: rgba(94, 242, 180, .5);
  background: rgba(94, 242, 180, .08);
  box-shadow: 0 0 16px -6px rgba(94, 242, 180, .6);
}
.prov em {
  font-style: normal;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--aurora);
}
.prov-credit { margin: 4px 0 0; font-size: .82rem; color: var(--dim); }
.prov-credit a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.d-foot {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: right;
}

/* ---------- Accueil sans clé ---------- */
.welcome {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 10px 0 30px;
}
.welcome-card {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 42px;
}
.welcome-card.wide { max-width: 920px; }
.welcome-card h1 { margin: 0; }
.welcome-card .lead { margin: 0; }
.welcome-card > .btn-lg { align-self: flex-start; margin-top: 6px; }
.welcome-runes {
  font-family: var(--f-rune);
  font-size: 1.6rem;
  letter-spacing: .5em;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(232, 176, 75, .7);
  animation: floatRune 4s ease-in-out infinite;
}
.ob-h {
  margin: 10px 0 0;
  font-size: 1.05rem;
  letter-spacing: .08em;
  color: var(--gold2);
}
.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.steps li {
  display: block;
  position: relative;
  min-height: 32px;
  padding: 4px 0 0 48px;
  counter-increment: step;
  line-height: 1.5;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--f-title);
  font-weight: 900;
  font-size: .95rem;
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold2), var(--gold));
  box-shadow: 0 0 14px -2px rgba(232, 176, 75, .7);
}
.steps a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(245, 208, 138, .4); }
.key-form { display: grid; gap: 14px; margin-top: 6px; }
.key-form .form-msg { margin: 0; }
.key-form > .btn { justify-self: start; }

/* ---------- Réglages ---------- */
.settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.set-panel { display: flex; flex-direction: column; gap: 14px; }
.set-panel.wide { grid-column: 1 / -1; }
.set-panel h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 1.2rem; }
.set-panel .hint { margin: 0; }
.set-panel > .btn { align-self: flex-start; }
.set-panel code {
  padding: 2px 8px;
  border-radius: 6px;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: .9em;
  color: var(--gold2);
  background: rgba(7, 11, 20, .6);
  border: 1px solid var(--line2);
}
.set-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.set-actions label.btn { cursor: pointer; }
.field input[type="range"] {
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  accent-color: var(--gold);
  cursor: pointer;
}

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 9px 18px 9px 9px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(12, 19, 34, .95);
  border: 1px solid var(--line);
  box-shadow: 0 18px 34px -14px #000, 0 0 22px -8px rgba(232, 176, 75, .5);
  animation: toastIn .4s var(--ease);
  transition: opacity .35s, transform .35s var(--ease);
}
.toast.out { opacity: 0; transform: translateY(10px) scale(.96); }
.toast-rune {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  font-family: var(--f-rune);
  color: var(--gold);
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(232, 176, 75, .18), transparent 70%);
  text-shadow: 0 0 10px rgba(232, 176, 75, .7);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(.94); }
}

/* ---------- Effets : éclats, flash, jet de runes ---------- */
.spark {
  position: fixed;
  z-index: 120;
  margin: -.6em 0 0 -.35em;
  font-family: var(--f-rune);
  font-size: 1.15rem;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 8px currentColor;
  will-change: transform, opacity;
}
.spark-ring {
  position: fixed;
  z-index: 119;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 2px solid;
  pointer-events: none;
  box-shadow: 0 0 16px currentColor, inset 0 0 10px currentColor;
}
.flash {
  position: fixed;
  inset: 0;
  z-index: 110;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(245, 208, 138, .3), transparent 70%),
    radial-gradient(80% 60% at 30% 0%, rgba(94, 242, 180, .18), transparent 70%),
    radial-gradient(70% 60% at 80% 0%, rgba(123, 108, 255, .16), transparent 70%);
  mix-blend-mode: screen;
}
.cast {
  position: fixed;
  inset: 0;
  z-index: 105;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 28px;
  padding: 20px;
  background: radial-gradient(circle at 50% 45%, rgba(12, 19, 34, .86), rgba(3, 6, 12, .95));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.cast.on { opacity: 1; pointer-events: auto; }
.cast.off { opacity: 0; }
.cast-stones { display: flex; gap: 24px; }
.stone {
  width: 92px;
  height: 108px;
  display: grid;
  place-items: center;
  border-radius: 46% 46% 40% 40% / 52% 52% 38% 38%;
  background: radial-gradient(circle at 35% 28%, #4c566b, #283043 55%, #141924);
  box-shadow:
    inset -6px -10px 18px rgba(0, 0, 0, .55),
    inset 4px 6px 10px rgba(255, 255, 255, .08),
    0 18px 28px -12px #000;
  opacity: 0;
  animation:
    stoneIn .6s var(--ease) calc(var(--i, 0) * .14s) forwards,
    wobble 1.1s ease-in-out calc(.6s + var(--i, 0) * .14s) infinite;
}
.stone b {
  font-family: var(--f-rune);
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1;
  color: rgba(200, 212, 232, .35);
  transition: color .3s, text-shadow .3s;
}
.stone.lit { animation: none; opacity: 1; transform: scale(1.06); transition: transform .3s var(--ease); }
.stone.lit b { color: var(--aurora); text-shadow: 0 0 12px var(--aurora), 0 0 30px rgba(94, 242, 180, .6); }
.stone.lit:nth-child(2) b { color: var(--gold2); text-shadow: 0 0 12px var(--gold), 0 0 30px rgba(232, 176, 75, .6); }
.cast-text {
  margin: 0;
  max-width: 34ch;
  text-align: center;
  font-family: var(--f-title);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--gold2);
  text-shadow: 0 0 18px rgba(232, 176, 75, .5);
}
@keyframes stoneIn {
  from { opacity: 0; transform: translateY(-60px) scale(.6) rotate(-12deg); }
  to { opacity: 1; transform: none; }
}
@keyframes wobble {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

/* ---------- Pied de page ---------- */
.foot {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px var(--gut) 44px;
  text-align: center;
  font-size: .86rem;
  color: var(--dim);
}
.foot p { margin: 0 0 .4em; }
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.foot a:hover { color: var(--gold2); }
.foot .knot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 12px;
  font-family: var(--f-rune);
  font-size: 1.1rem;
  letter-spacing: .5em;
  color: var(--gold);
  opacity: .7;
  text-shadow: 0 0 10px rgba(232, 176, 75, .5);
}
.knot::before,
.knot::after {
  content: "";
  flex: 0 1 140px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), var(--gold));
}
.knot::after { transform: scaleX(-1); }

/* ===== MOBILE (≤ 760px) ===== */
@media (max-width: 760px) {
  :root { --gut: 16px; }

  /* Entête : recherche sur sa propre ligne */
  .mast-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px var(--gut); }
  .brand-text small { display: none; }
  .mast-tools { margin-left: auto; }
  .search { order: 3; flex: 1 0 100%; max-width: none; margin-left: 0; }

  /* Onglets : barre fixe en bas (l’entête n’a ni filtre ni transform propre : elle ne la piège pas) */
  .tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    max-width: none;
    margin: 0;
    gap: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    overflow: visible;
    background: linear-gradient(180deg, rgba(9, 14, 26, .9), rgba(7, 11, 20, .97));
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px -10px rgba(0, 0, 0, .8);
    -webkit-backdrop-filter: blur(14px) saturate(1.3);
    backdrop-filter: blur(14px) saturate(1.3);
  }
  .tab {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    padding: 7px 2px 6px;
    font-size: .6rem;
    letter-spacing: .05em;
  }
  .tab-rune { font-size: 1.25rem; line-height: 1.2; }
  .tab-long { display: none; }
  .tab-short { display: inline; }
  .tab::after { top: 0; bottom: auto; left: 22%; right: 22%; }
  .tab .count {
    position: absolute;
    top: 2px;
    left: calc(50% + 6px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: .64rem;
  }

  .view { padding: 22px var(--gut) 110px; }
  .page { gap: 22px; }
  .foot { padding: 0 var(--gut) calc(84px + env(safe-area-inset-bottom)); }

  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 12px; }
  .row { grid-auto-columns: 120px; gap: 12px; }
  .people-row { grid-auto-columns: 100px; }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 20px 10px; }
  .person-name { font-size: .9rem; }
  .person-sub { font-size: .78rem; }

  /* Héros */
  .hero { min-height: 0; }
  .hero-poster { display: none; }
  .hero-content { grid-template-columns: minmax(0, 1fr); padding: 160px 18px 22px; }

  /* Listes, recherche, casting, personne */
  .title-row { grid-template-columns: 56px minmax(0, 1fr); }
  .tr-poster { width: 56px; }
  .tr-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .big-search { padding-left: 14px; }
  .big-search input { height: 42px; font-size: 1rem; }
  .big-search .btn { padding-left: 14px; padding-right: 14px; }
  .examples { margin-top: -6px; }
  .cast-chip > span:not(.noposter) { max-width: 180px; }
  .cast-banner-in { padding: 14px 16px 20px; gap: 16px; }
  .cb-main { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; }
  .cb-poster { width: 96px; }
  .filter-input { min-width: 0; max-width: none; flex-basis: 100%; }
  .person-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .shield-xl { width: 150px; justify-self: center; }
  .shield-xl b { font-size: 3rem; }
  .facts b { min-width: 96px; }

  /* Sorties */
  .ep { grid-template-columns: 72px minmax(0, 1fr); gap: 6px 12px; padding: 8px 12px 8px 8px; }
  .ep img, .ep-noimg { width: 72px; grid-row: span 2; }
  .ep time { grid-column: 2; flex-direction: row; align-items: baseline; gap: 8px; text-align: left; }
  .tip { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .tip-rune { grid-row: auto; }

  /* Modale plein écran */
  .modal { padding: 0; place-items: stretch; }
  .modal-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    border: 0;
    transform: translateY(24px);
  }
  .modal-close { top: calc(10px + env(safe-area-inset-top)); margin: 10px 10px -54px 0; }
  .d-hero { height: 220px; border-radius: 0; }
  .d-hero.noimg { height: 110px; }
  .d-main { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto; gap: 14px 16px; margin-top: -80px; padding: 0 16px; }
  .d-hero.noimg + .d-main { margin-top: -40px; }
  .d-poster { grid-row: 1; }
  .d-noposter > b { font-size: 2.6rem; }
  .d-head { padding-top: 30px; }
  .d-actions { grid-column: 1 / -1; }
  .d-actions .btn { flex: 1 1 auto; }
  .d-banner { margin: 16px 16px 0; }
  .d-trailer-slot { padding: 0 16px; }
  .d-body { --gut: 16px; margin-top: 20px; gap: 24px; }
  .d-body:only-child { padding-top: 64px; }
  .facts-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 14px; }
  .d-foot { text-align: left; }

  /* Accueil sans clé & réglages */
  .welcome { min-height: 0; padding: 0; }
  .welcome-card { padding: 28px 20px; }
  .welcome-runes { font-size: 1.3rem; }
  .welcome-card > .btn-lg { align-self: stretch; }
  .settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .set-panel { padding: 20px 18px; }

  /* Superpositions */
  .toasts { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .cast-stones { gap: 14px; }
  .stone { width: 70px; height: 84px; }
  .stone b { font-size: 2rem; }
  .cast-text { font-size: 1rem; }
}

/* ===== MOUVEMENT RÉDUIT ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  .aurora,
  .hero-bg,
  .stars, .stars::before, .stars::after,
  .welcome-runes { animation: none !important; }
  .loader-runes span { animation: none !important; opacity: .7; }
  .stone { opacity: 1; }
}

/* Sous-catégories (Découvrir) */
.theme-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; }
.theme-group:first-child { margin-top: 0; }
.theme-label { flex: 0 0 auto; min-width: 9.5em; font-family: var(--font-title, inherit); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold2, #e8b04b); opacity: .85; }
.theme-group .chips { flex: 1 1 260px; }
.chip-sm { padding: 4px 11px; font-size: .82rem; }
@media (max-width: 560px) { .theme-label { min-width: 0; width: 100%; } }

/* ===== MOBILE : confort tactile et filtres compacts ===== */
@media (max-width: 760px) {
  .tab { font-size: .68rem; }
  .qb { width: 40px; height: 40px; }
  .chip { min-height: 38px; }
  .section-head .link { display: inline-block; padding: 10px 0; }
  .filters.panel { padding: 16px; gap: 14px; }
  .filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .filter-row .seg { grid-column: 1 / -1; justify-self: stretch; }
  .filter-row .select { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; font-size: .78rem; }
  .filter-row .select select { width: 100%; min-width: 0; height: 42px; }
  .filter-block { gap: 8px; padding-top: 14px; }
  .filter-block .hint { display: none; }
  .filter-block .chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px; padding: 2px 16px 6px;
    -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent);
  }
  .filter-block .chips::-webkit-scrollbar { display: none; }
  .filter-block .chip { flex: 0 0 auto; scroll-snap-align: start; }
  .filters.panel, .filters.panel *:not(.chip):not(svg *) { min-width: 0; }
  .filter-block .chips { max-width: calc(100% + 32px); }
  .theme-group { flex-direction: column; align-items: stretch; gap: 6px; }
  .theme-group .chips { flex: none; }
  .page-head-row .head-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .page-head-row .head-actions .btn { justify-content: center; min-height: 44px; }
  input, select, textarea { font-size: 16px; }
}

/* ---------- Onglet « Musique » (js/radio.js) ---------- */
.radio { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; font-family: var(--f-body); }
.radio svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.radio-tab { order: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); color: var(--gold2); font: 600 .95rem var(--f-body); cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.radio-tab:hover { border-color: var(--gold); }
.radio-eq { display: none; align-items: flex-end; gap: 2px; width: 14px; height: 14px; }
.radio-eq i { width: 3px; height: 40%; background: var(--gold); border-radius: 1px; animation: radioEq 1s ease-in-out infinite; }
.radio-eq i:nth-child(2) { animation-delay: -.35s; }
.radio-eq i:nth-child(3) { animation-delay: -.7s; }
.radio.playing .radio-eq { display: inline-flex; }
.radio.playing .radio-tab > svg { display: none; }
@keyframes radioEq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
.radio-panel { order: 1; width: min(300px, calc(100vw - 32px)); padding: 14px 16px 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(12, 18, 32, .96); color: var(--text); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.radio-panel[hidden] { display: none; }
.radio-head { display: flex; align-items: center; justify-content: space-between; }
.radio-kicker { font: 600 .75rem var(--f-title); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.radio-x { display: grid; place-items: center; width: 36px; height: 36px; margin-right: -8px; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; opacity: .75; }
.radio-x:hover { opacity: 1; background: rgba(255, 255, 255, .06); }
.radio-now { display: flex; flex-direction: column; margin: 4px 0 10px; min-width: 0; }
.radio-title { font: 600 1.1rem var(--f-title); color: var(--gold2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-by { font-size: .85rem; opacity: .7; }
.radio-ctrl { display: flex; justify-content: center; align-items: center; gap: 14px; }
.radio-b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); cursor: pointer; }
.radio-b:hover { border-color: var(--gold); color: var(--gold2); }
.radio-pp { width: 52px; height: 52px; background: var(--gold); color: #1a1206; border-color: var(--gold); }
.radio-pp:hover { background: var(--gold2); color: #1a1206; }
.radio-vol { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; font-size: .85rem; opacity: .85; }
.radio-vol input { flex: 1; accent-color: var(--gold); }
.radio-list { list-style: none; margin: 6px 0; padding: 0; border-top: 1px solid var(--line); }
.radio-list button { width: 100%; min-height: 36px; padding: 6px 4px; border: 0; background: none; color: var(--text); font: .92rem var(--f-body); text-align: left; cursor: pointer; opacity: .75; }
.radio-list button:hover { opacity: 1; color: var(--gold2); }
.radio-list button.cur { opacity: 1; color: var(--gold2); font-weight: 600; }
.radio-list button.cur::before { content: '♪ '; }
.radio-find { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .9rem; }
.radio-find svg { width: 15px; height: 15px; }
.radio-credit { margin: 8px 0 0; font-size: .75rem; opacity: .6; line-height: 1.35; }
body.modal-open .radio:not(.open) { opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  .radio { right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .radio-tab { min-height: 40px; padding: 0 12px 0 10px; }
}
@media (prefers-reduced-motion: reduce) { .radio-eq i { animation: none; height: 70%; } }
/* Ambiances + aléatoire (v11) */
.radio-ctrl { gap: 10px; }
.radio-shuf { width: 36px; height: 36px; opacity: .6; }
.radio-shuf svg { width: 16px; height: 16px; }
.radio-shuf.on { opacity: 1; color: var(--gold2); border-color: var(--gold); }
.radio-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.radio-cats button { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); font: .78rem var(--f-body); cursor: pointer; opacity: .8; }
.radio-cats button:hover { opacity: 1; border-color: var(--gold); }
.radio-cats button.on { opacity: 1; background: var(--gold); color: #1a1208; border-color: var(--gold); }
.radio-list { max-height: min(240px, 34vh); overflow-y: auto; overscroll-behavior: contain; }
