/* ==========================================================================
   CinéVerse — design system
   ========================================================================== */

:root {
    /* Palette Océan */
    --bg: #050a14;
    --bg-rgb: 5, 10, 20;
    --bg-2: #070e1b;
    --surface: #0c1526;
    --surface-2: #132038;
    --panel-rgb: 12, 21, 38;
    --panel2-rgb: 19, 32, 56;
    --line-rgb: 150, 200, 255;
    --line: rgba(var(--line-rgb), .08);
    --line-2: rgba(var(--line-rgb), .15);
    --text: #f2f6fc;
    --text-2: #9fb0c8;
    --text-3: #687a96;
    --accent: #38bdf8;
    --accent-rgb: 56, 189, 248;
    --accent-2: #0ea5e9;
    --on-accent: #03111f;
    --warn: #f5a524;
    --bad: #f43f5e;
    --star: #fbbf24;

    --wrap: 1480px;
    --gutter: clamp(16px, 4vw, 56px);
    --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
    --nav-h: 64px;
    --tabbar-h: 0px;
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 16px;

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --display: "Inter Tight", var(--font);
    --ease: cubic-bezier(.22, .8, .24, 1);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
    margin: 0;
    min-height: 100vh;
    display: flex; flex-direction: column;
    background:
        radial-gradient(1200px 520px at 80% -8%, rgba(var(--accent-rgb), .06), transparent 70%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font: 400 15px/1.55 var(--font);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; line-height: 1.15; }
button, input, select { font: inherit; color: inherit; }
ul, dl, dd { margin: 0; padding: 0; list-style: none; }
kbd { font-family: var(--font); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(var(--accent-rgb), .3); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 600; transform: translateY(-160%); transition: transform .2s; }
.skip:focus { transform: none; }

/* --- Boutons & contrôles ------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 20px;
    border: 0; border-radius: 10px;
    font-size: .92rem; font-weight: 600; letter-spacing: -.005em;
    cursor: pointer; white-space: nowrap;
    transition: background .2s, color .2s, box-shadow .2s, transform .2s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px -10px rgba(var(--accent-rgb), .7); }
.btn--primary:hover { background: #7dd3fc; }
.btn--light { background: #f8fafc; color: #0b1220; }
.btn--light:hover { background: #dbe4ef; }
.btn--glass { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.btn--glass:hover { background: rgba(255, 255, 255, .16); }
.btn--sm { height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 9px; }
.btn--sm .icon { width: 16px; height: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: .86rem; font-weight: 600; transition: color .2s; }
.link .icon { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.link:hover { color: var(--accent); }
.link:hover .icon { transform: translateX(3px); }

.chip {
    display: inline-flex; align-items: center; flex: none;
    height: 34px; padding: 0 14px;
    border-radius: 9px;
    background: rgba(255, 255, 255, .03);
    box-shadow: inset 0 0 0 1px var(--line-2);
    color: var(--text-2);
    font-size: .85rem; font-weight: 500; white-space: nowrap;
    transition: background .2s, color .2s, box-shadow .2s;
}
.chip:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); box-shadow: none; font-weight: 600; }
.chip--sm { height: 30px; padding: 0 12px; font-size: .8rem; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.chips::-webkit-scrollbar { display: none; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg__btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 13px; border: 0; border-radius: 8px;
    background: transparent; color: var(--text-3);
    font: 600 .82rem var(--font); white-space: nowrap; cursor: pointer;
    transition: color .15s, background .15s, box-shadow .15s;
}
.seg__btn span { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.seg__btn:hover { color: var(--text); }
.seg__btn.is-on { background: rgba(255, 255, 255, .09); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .06); }

.select { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding-left: 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line-2); }
.select__label { color: var(--text-3); font-size: .8rem; font-weight: 500; }
.select__input {
    appearance: none; -webkit-appearance: none;
    height: 100%; padding: 0 34px 0 6px;
    border: 0; border-radius: 10px; outline: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fb0c8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 15px;
    color: var(--text); font-size: .85rem; font-weight: 600;
    cursor: pointer;
}
.select__input option { background: var(--surface); color: var(--text); }
.select:focus-within { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .5); }

.pill { display: inline-block; padding: 1px 7px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: .76em; font-weight: 700; letter-spacing: .02em; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18); }

.facts-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; color: var(--text-2); font-size: .9rem; font-weight: 500; }
.facts-line li { display: inline-flex; align-items: center; gap: 5px; }
.facts-line li + li::before { content: ""; width: 3px; height: 3px; margin: 0 11px; border-radius: 50%; background: var(--text-3); }
.facts-line__score { color: var(--text); font-weight: 700; }
.facts-line__score .icon { color: var(--star); width: 15px; height: 15px; }

/* --- Navigation ---------------------------------------------------------- */
.nav {
    position: fixed; inset: 0 0 auto; z-index: 50;
    height: var(--nav-h);
    background: rgba(var(--bg-rgb), .78);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    box-shadow: 0 1px 0 var(--line);
    transition: background .3s, box-shadow .3s;
}
.has-overlay-nav .nav:not(.is-scrolled) { background: linear-gradient(to bottom, rgba(var(--bg-rgb), .75), rgba(var(--bg-rgb), 0)); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px -6px rgba(var(--accent-rgb), .8); }
.brand__mark .icon { width: 14px; height: 14px; margin-left: 2px; }
.brand__name { font: 700 1.15rem/1 var(--display); letter-spacing: -.03em; }

.nav__links { display: flex; gap: 2px; }
.nav__link { padding: 7px 12px; border-radius: 8px; color: var(--text-2); font-size: .9rem; font-weight: 500; transition: color .2s, background .2s; }
.nav__link:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav__link.is-active { color: var(--text); background: rgba(255, 255, 255, .08); }

/* --- Barre d'onglets (mobile) ------------------------------------------- */
.tabbar { display: none; }

/* --- Hero (accueil) ------------------------------------------------------ */
.hero { position: relative; height: clamp(540px, 80vh, 820px); overflow: hidden; background: var(--bg); }
.hero__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility .9s; }
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transform: scale(1.05); transition: transform 9s linear; }
.hero__slide.is-active .hero__bg img { transform: scale(1); }
.hero__bg::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(var(--bg-rgb), .95) 0%, rgba(var(--bg-rgb), .7) 34%, rgba(var(--bg-rgb), .1) 68%),
        linear-gradient(0deg, var(--bg) 0%, rgba(var(--bg-rgb), .5) 24%, rgba(var(--bg-rgb), 0) 52%),
        linear-gradient(180deg, rgba(var(--bg-rgb), .55) 0%, transparent 20%);
}
.hero__inner { position: relative; height: 100%; display: flex; align-items: center; padding-top: var(--nav-h); padding-bottom: 130px; }
.hero__copy { max-width: 600px; }
.hero__slide.is-active .hero__copy > * { animation: rise .7s var(--ease) both; }
.hero__slide.is-active .hero__copy > :nth-child(2) { animation-delay: .05s; }
.hero__slide.is-active .hero__copy > :nth-child(3) { animation-delay: .1s; }
.hero__slide.is-active .hero__copy > :nth-child(4) { animation-delay: .15s; }
.hero__slide.is-active .hero__copy > :nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero__title { margin-top: 16px; font-size: clamp(2.2rem, 4.6vw, 3.8rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.hero__logo { display: block; width: auto; height: auto; max-width: min(440px, 100%); max-height: clamp(70px, 10vw, 130px); object-fit: contain; object-position: left bottom; filter: drop-shadow(0 8px 30px rgba(0, 0, 0, .6)); }
.hero__logo--invert { filter: brightness(0) invert(1) drop-shadow(0 8px 30px rgba(0, 0, 0, .6)); }
.hero .facts-line { margin-top: 18px; }
.hero__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 14px 0 26px; max-width: 54ch; color: #cbd5e1; font-size: .98rem; line-height: 1.6; }

.hero__pager { position: absolute; left: 0; right: 0; bottom: 28px; z-index: 3; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.hero__tab {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 12px;
    padding: 9px; border: 0; border-radius: 12px;
    background: rgba(var(--panel-rgb), .45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    text-align: left; cursor: pointer;
    transition: background .25s, box-shadow .25s;
}
.hero__tab:hover { background: rgba(var(--panel2-rgb), .6); }
.hero__tab.is-active { background: rgba(var(--panel2-rgb), .75); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.hero__thumb { width: 34px; flex: none; }
.hero__thumb-img { width: 34px; height: 51px; object-fit: cover; border-radius: 6px; }
.hero__tab-text { min-width: 0; }
.hero__tab-title { display: block; color: var(--text-2); font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .25s; }
.hero__tab.is-active .hero__tab-title { color: var(--text); }
.hero__tab-meta { display: block; margin-top: 2px; color: var(--text-3); font-size: .74rem; }
.hero__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.hero__progress::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hero__tab.is-active .hero__progress::after { animation: progress var(--hero-delay, 8s) linear forwards; }
.hero[data-paused] .hero__tab.is-active .hero__progress::after { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }

/* --- Accueil : activité ---------------------------------------------------- */
.home { padding: 12px 0 56px; }
.home--plain { padding-top: calc(var(--nav-h) + 28px); }
.activity { margin-bottom: 18px; }
.activity__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.activity__title { font-size: 1.25rem; font-weight: 700; }
.activity__sub { margin-top: 3px; color: var(--text-3); font-size: .84rem; }
.activity__sub strong { color: var(--text-2); font-weight: 600; }
.kpis {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    border-radius: var(--r-lg);
    background: rgba(var(--panel-rgb), .6);
    box-shadow: inset 0 0 0 1px var(--line), 0 24px 48px -36px rgba(0, 0, 0, .9);
    overflow: hidden;
}
.kpi { display: flex; flex-direction: column; min-width: 0; padding: 18px 20px; }
.kpi + .kpi { box-shadow: inset 1px 0 0 var(--line); }
.kpi dt { color: var(--text-3); font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi dd { margin-top: 8px; font: 700 1.5rem/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi__sub { margin-top: 5px; color: var(--text-3); font-size: .74rem; }
.kpi__value--good { color: var(--accent); }
.kpi__value--warn { color: var(--warn); }
.kpi__value--bad { color: var(--bad); }
.meter { display: block; height: 4px; margin-top: 12px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.meter--warn span { background: var(--warn); }
.meter--bad span { background: var(--bad); }

/* --- Rangées ------------------------------------------------------------- */
.shelf { padding: 22px 0 6px; }
.shelf__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.shelf__title { font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 700; }
.shelf__sub { margin-top: 3px; color: var(--text-3); font-size: .84rem; }
.shelf__tools { display: flex; align-items: center; gap: 14px; flex: none; }
.shelf__arrows { display: flex; gap: 6px; }
.arrow {
    display: grid; place-items: center;
    width: 32px; height: 32px; border: 0; border-radius: 9px;
    background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line-2);
    color: var(--text-2); cursor: pointer; transition: background .2s, color .2s, opacity .2s;
}
.arrow:hover:not(:disabled) { background: rgba(255, 255, 255, .1); color: var(--text); }
.arrow:disabled { opacity: .3; cursor: default; }
.arrow .icon { width: 16px; height: 16px; }
.shelf__track {
    display: grid; grid-auto-flow: column;
    grid-auto-columns: clamp(136px, 12vw, 190px);
    gap: 16px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
    padding: 8px var(--edge) 14px;
    scrollbar-width: none;
}
.shelf__track::-webkit-scrollbar { display: none; }
.shelf__track > * { scroll-snap-align: start; }

/* --- Cartes -------------------------------------------------------------- */
.card { min-width: 0; }
.card__link { display: block; border-radius: var(--r); }
.card__media {
    position: relative; overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: var(--r);
    background: var(--surface);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); pointer-events: none; transition: box-shadow .3s; }
.card__media .poster { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card__link:hover .card__media, .card__link:focus-visible .card__media { transform: translateY(-4px); box-shadow: 0 22px 40px -20px rgba(0, 0, 0, .95); }
.card__link:hover .card__media::after, .card__link:focus-visible .card__media::after { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .55); }
.card__link:hover .poster { transform: scale(1.04); }
.card__link:focus-visible { outline: none; }

.badge, .card__avail {
    position: absolute; top: 8px; z-index: 2;
    display: inline-flex; align-items: center; gap: 5px;
    height: 22px; padding: 0 7px;
    border-radius: 6px;
    background: rgba(var(--bg-rgb), .72);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
    color: var(--text); font-size: .64rem; font-weight: 700; line-height: 1;
}
.badge { left: 8px; letter-spacing: .07em; text-transform: uppercase; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.badge--soon::before { background: var(--warn); }
.card__avail { right: 8px; font-size: .7rem; font-variant-numeric: tabular-nums; }
.card__avail .icon { width: 11px; height: 11px; color: var(--accent); stroke-width: 2.6; }

.card__body { padding: 10px 2px 0; }
.card__title { font: 600 .88rem/1.3 var(--font); letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.card__link:hover .card__title { color: var(--accent); }
.card__meta { display: flex; align-items: center; margin-top: 3px; color: var(--text-3); font-size: .76rem; white-space: nowrap; overflow: hidden; }
.card__meta > * + *::before { content: "·"; margin: 0 6px; opacity: .7; }
.card__score { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); font-weight: 600; }
.card__score .icon { width: 11px; height: 11px; color: var(--star); }
.card__extra { overflow: hidden; text-overflow: ellipsis; }

.poster--empty {
    display: flex; align-items: flex-end; padding: 14px;
    background: linear-gradient(160deg, var(--surface-2), var(--bg));
    font: 700 1rem/1.15 var(--display); color: var(--text-2);
}

/* Top 10 : grand numéro en bas à gauche de l'affiche */
.card--rank .card__media::before { content: ""; position: absolute; inset: 45% 0 0; z-index: 1; background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent); pointer-events: none; }
.card__rank {
    position: absolute; left: 10px; bottom: 4px; z-index: 2;
    font: 800 clamp(2.6rem, 3.6vw, 3.4rem)/1 var(--display); letter-spacing: -.06em;
    color: #fff; text-shadow: 0 4px 18px rgba(0, 0, 0, .6);
    font-variant-numeric: tabular-nums;
}

/* --- En-tête de page ------------------------------------------------------ */
.page-head { position: relative; padding: calc(var(--nav-h) + 28px) 0 22px; }
.page-head::before { content: ""; position: absolute; inset: 0 0 -80px; z-index: -1; background: radial-gradient(60% 100% at 10% 0%, rgba(var(--accent-rgb), .06), transparent 70%); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--text-3); font-size: .8rem; font-weight: 500; }
.crumbs a { transition: color .2s; }
.crumbs a:hover { color: var(--text); }
.crumbs .icon { width: 12px; height: 12px; opacity: .6; }
.crumbs [aria-current] { color: var(--text-2); }
.page-head__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.page-head__title { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
.page-head__muted { color: var(--text-3); font-weight: 600; }
.page-head__muted::before { content: "/"; margin: 0 .3em 0 .1em; opacity: .6; }
.page-head__sub { margin-top: 6px; color: var(--text-3); font-size: .9rem; font-variant-numeric: tabular-nums; }
.page-head__sub strong { color: var(--text); font-weight: 600; }
.page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.filters { position: relative; margin-top: 22px; }
.filters__arrow {
    position: absolute; top: 0; z-index: 2;
    display: grid; place-items: center;
    width: 34px; height: 34px; border: 0; border-radius: 9px;
    background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2), 0 0 0 6px var(--bg);
    color: var(--text); cursor: pointer;
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s, background .2s;
}
.filters__arrow:hover { background: #1b2b4a; }
.filters__arrow .icon { width: 16px; height: 16px; }
.filters__arrow--prev { left: 0; }
.filters__arrow--next { right: 0; }
.filters.can-prev .filters__arrow--prev, .filters.can-next .filters__arrow--next { opacity: 1; visibility: visible; }
.filters .chips { --fade-l: 0px; --fade-r: 0px; mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%); }
.filters.can-prev .chips { --fade-l: 64px; }
.filters.can-next .chips { --fade-r: 64px; }

.page-body { padding-block: 18px 64px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 42vw), 1fr)); gap: 30px 18px; }
.grid .card { animation: fade .45s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager__pages { display: flex; align-items: center; gap: 4px; }
.pager__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 36px; height: 36px; padding: 0 10px;
    border-radius: 9px;
    color: var(--text-2); font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums;
    transition: background .2s, color .2s;
}
.pager__btn .icon { width: 16px; height: 16px; }
.pager__btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.pager__btn.is-active { background: var(--text); color: var(--bg); }
.pager__btn--nav { box-shadow: inset 0 0 0 1px var(--line-2); padding: 0 14px; }
.pager__btn.is-disabled { opacity: .35; pointer-events: none; }
.pager__gap { color: var(--text-3); padding: 0 4px; }

.crosslink { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin-top: 36px; color: var(--text-3); font-size: .88rem; }

.empty { display: grid; justify-items: center; gap: 6px; padding: 72px 20px; border-radius: var(--r-lg); background: rgba(var(--panel-rgb), .45); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.empty__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 15px; background: rgba(255, 255, 255, .05); color: var(--text-3); }
.empty__icon .icon { width: 24px; height: 24px; }
.empty strong { font-size: 1.05rem; }
.empty p { margin-bottom: 14px; color: var(--text-3); font-size: .9rem; }

/* --- Recherche (page) ------------------------------------------------------ */
.searchbox { position: relative; display: flex; align-items: center; gap: 10px; width: min(720px, 100%); height: 58px; margin-top: 22px; padding: 0 9px 0 18px; border-radius: 14px; background: rgba(var(--panel-rgb), .8); box-shadow: inset 0 0 0 1px var(--line-2), 0 20px 40px -30px rgba(0, 0, 0, .9); transition: box-shadow .2s; }
.searchbox:focus-within { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .55), 0 0 0 4px rgba(var(--accent-rgb), .12); }
.searchbox__icon { width: 20px; height: 20px; color: var(--text-3); }
.searchbox__input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 1.02rem; }
.searchbox__input::placeholder { color: var(--text-3); }
.searchbox__input::-webkit-search-cancel-button { display: none; }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; color: var(--text-3); font-size: .84rem; }
.seg--filter { margin-top: 18px; }

/* --- Erreur ---------------------------------------------------------------- */
.oops { padding: calc(var(--nav-h) + 56px) var(--gutter) 24px; }
.oops__card { max-width: 640px; margin: 0 auto; padding: 44px clamp(20px, 5vw, 48px); border-radius: 20px; background: rgba(var(--panel-rgb), .6); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.oops__code { display: inline-block; padding: 4px 10px; border-radius: 999px; background: rgba(var(--accent-rgb), .1); color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.oops__title { margin-top: 16px; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; text-wrap: balance; }
.oops__text { margin: 10px auto 26px; max-width: 46ch; color: var(--text-2); }
.oops .actions { justify-content: center; }

/* --- Lecteur bande-annonce ---------------------------------------------- */
.player { width: min(1120px, 94vw); max-width: none; padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
.player::backdrop { background: rgba(0, 0, 0, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.player[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.player__frame { position: relative; }
.player__yt { display: block; border: 0; }
.player__video { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r); background: #000; box-shadow: 0 40px 120px rgba(0, 0, 0, .8); }
.player__title { margin-top: 14px; font: 700 1.1rem var(--display); }
.player__close { position: absolute; top: -48px; right: 0; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); cursor: pointer; }
.player__close:hover { background: rgba(255, 255, 255, .22); }

/* --- Pied de page ---------------------------------------------------------- */
.footer { padding: 48px 0 32px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer__text { margin-top: 14px; max-width: 34ch; color: var(--text-3); font-size: .88rem; }
.footer__cols { display: grid; grid-template-columns: repeat(3, auto); gap: 24px 72px; }
.footer__cols div { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer__cols a { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .88rem; transition: color .2s; }
.footer__cols a:hover { color: var(--text); }
.footer__cols kbd { padding: 1px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-3); font-size: .68rem; font-weight: 600; }
.footer__title { margin-bottom: 4px; color: var(--text-3); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-3); font-size: .78rem; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1180px) {
    .hero__tab { justify-content: center; }
    .hero__tab-text { display: none; }
    .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .kpi:nth-child(4) { box-shadow: none; }
    .kpi:nth-child(n+4) { border-top: 1px solid var(--line); }
}

@media (max-width: 1000px) {
    .nav__inner { gap: 16px; }
    .search-trigger__kbd { display: none; }
}

@media (max-width: 760px) {
    :root { --nav-h: 58px; --tabbar-h: calc(62px + env(safe-area-inset-bottom)); }
    body { padding-bottom: var(--tabbar-h); }
    .nav__links { display: none; }
    .search-trigger { flex: 1; width: auto; min-width: 0; margin-left: 4px; }

    .tabbar {
        position: fixed; inset: auto 0 0; z-index: 60;
        display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
        height: var(--tabbar-h); padding: 6px 6px env(safe-area-inset-bottom);
        background: rgba(var(--bg-rgb), .86);
        backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
        box-shadow: 0 -1px 0 var(--line);
    }
    .tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 10px; color: var(--text-3); font-size: .64rem; font-weight: 600; transition: color .2s; }
    .tabbar__item .icon { width: 21px; height: 21px; }
    .tabbar__item.is-active { color: var(--accent); }

    .hero { height: 78vh; min-height: 520px; max-height: 680px; }
    .hero__inner { align-items: flex-end; padding-bottom: 96px; }
    .hero__bg::after { background: linear-gradient(0deg, var(--bg) 4%, rgba(var(--bg-rgb), .75) 45%, rgba(var(--bg-rgb), .25) 100%); }
    .hero__title { font-size: 2.1rem; }
    .hero__logo { max-height: 84px; max-width: 78%; }
    .hero__text { -webkit-line-clamp: 2; font-size: .9rem; margin: 10px 0 20px; }
    .hero .facts-line { font-size: .84rem; }
    .hero .facts-line li:last-child:not(:first-child) { display: none; }
    .hero__pager { bottom: 20px; gap: 6px; }
    .hero__tab { padding: 5px; border-radius: 10px; }
    .hero__thumb, .hero__thumb-img { width: 28px; }
    .hero__thumb-img { height: 42px; }
    .actions .btn { flex: 1; }

    .activity__head { align-items: center; }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi { padding: 14px 16px; }
    .kpi + .kpi { box-shadow: none; }
    .kpi:nth-child(even) { box-shadow: inset 1px 0 0 var(--line); }
    .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
    .kpi:nth-child(4) { border-top: 1px solid var(--line); }
    .kpi dd { font-size: 1.25rem; }

    .shelf__arrows { display: none; }
    .shelf__track { grid-auto-columns: 36vw; gap: 12px; }
    .shelf__sub { display: none; }

    .page-head { padding-top: calc(var(--nav-h) + 18px); }
    .crumbs { display: none; }
    .page-head__actions { width: 100%; }
    .page-head__actions .seg { flex: 1; }
    .page-head__actions .seg__btn { flex: 1; justify-content: center; }
    .select { flex: 1; }
    .select__input { flex: 1; }
    .filters { margin-top: 16px; margin-inline: calc(var(--gutter) * -1); }
    .filters .chips { padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
    .filters__arrow { display: none; }
    .grid { gap: 22px 12px; }

    .pager__btn--nav span { display: none; }
    .pager__btn--nav { padding: 0 10px; }

    .searchbox { height: 52px; }
    .searchbox__btn { display: none; }

    .footer { padding-top: 36px; }
    .footer__cols { grid-template-columns: repeat(2, auto); gap: 24px 48px; }
    .footer__legal { flex-direction: column; }
}

@media (max-width: 420px) {
    .brand__name { display: none; }
}

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

/* ==========================================================================
   Recherche : déclencheur (nav) + modal « palette »
   ========================================================================== */
.search-trigger {
    margin-left: auto;
    display: flex; align-items: center; gap: 10px;
    width: min(320px, 100%); height: 38px;
    padding: 0 7px 0 12px;
    border: 1px solid var(--line); border-radius: 10px;
    background: rgba(255, 255, 255, .05);
    color: var(--text-3); font-size: .88rem;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.search-trigger:hover { background: rgba(255, 255, 255, .08); border-color: var(--line-2); color: var(--text-2); }
.search-trigger:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .35); }
.search-trigger .icon { width: 17px; height: 17px; }
.search-trigger__text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger__kbd {
    flex: none; padding: 2px 7px; border-radius: 6px;
    border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
    font: 600 .7rem/1.4 var(--font); color: var(--text-3);
}

html:has(.spot[open]) { overflow: hidden; }

.spot {
    position: fixed; inset: 0;
    width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0;
    background: transparent; color: var(--text);
    overflow: hidden;
}
.spot[open] { display: flex; justify-content: center; align-items: flex-start; padding: 13vh 16px 16px; }
.spot::backdrop {
    background: rgba(var(--bg-rgb), .42);
    backdrop-filter: blur(7px) saturate(1.15);
    -webkit-backdrop-filter: blur(7px) saturate(1.15);
    animation: spot-fade .24s ease both;
}
.spot.is-closing::backdrop { animation: spot-fade .18s ease reverse both; }

.spot__panel {
    position: relative;
    width: min(680px, 100%);
    max-height: min(580px, 74vh);
    display: flex; flex-direction: column;
    border-radius: 18px;
    background: rgba(var(--panel-rgb), .82);
    backdrop-filter: blur(30px) saturate(1.6);
    -webkit-backdrop-filter: blur(30px) saturate(1.6);
    border: 1px solid rgba(var(--line-rgb), .14);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, .35),
        0 32px 90px -24px rgba(0, 0, 0, .9),
        0 0 80px -30px rgba(var(--accent-rgb), .35),
        inset 0 1px 0 rgba(255, 255, 255, .07);
    overflow: hidden;
    animation: spot-in .32s cubic-bezier(.16, 1, .3, 1) both;
}
.spot.is-closing .spot__panel { animation: spot-out .18s ease both; }
/* liseré lumineux en haut du panneau */
.spot__panel::before {
    content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .7), transparent);
}
@keyframes spot-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spot-in { from { opacity: 0; transform: translateY(-10px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes spot-out { to { opacity: 0; transform: translateY(-6px) scale(.98); } }

.spot__bar { display: flex; align-items: center; gap: 12px; height: 62px; padding: 0 14px 0 20px; border-bottom: 1px solid rgba(var(--line-rgb), .09); flex: none; }
.spot__icon { width: 20px; height: 20px; color: var(--accent); }
.spot__input {
    flex: 1; min-width: 0; height: 100%;
    border: 0; outline: none; background: transparent;
    font-size: 1.08rem; font-weight: 450; letter-spacing: -.01em; color: var(--text);
    caret-color: var(--accent);
}
.spot__input::placeholder { color: var(--text-3); }
.spot__input::-webkit-search-cancel-button { display: none; }
.spot__spinner {
    width: 16px; height: 16px; border-radius: 50%; flex: none;
    border: 2px solid rgba(var(--accent-rgb), .2); border-top-color: var(--accent);
    animation: spin .7s linear infinite; opacity: 0; transition: opacity .15s;
}
.spot.is-loading .spot__spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.spot__clear {
    display: grid; place-items: center; flex: none;
    width: 26px; height: 26px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .08); color: var(--text-2); cursor: pointer;
}
.spot__clear:hover { background: rgba(255, 255, 255, .14); color: var(--text); }
.spot__clear .icon { width: 14px; height: 14px; }
.spot__esc {
    flex: none; padding: 4px 8px; border-radius: 7px;
    border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
    color: var(--text-3); font: 600 .72rem/1.3 var(--font); cursor: pointer;
}
.spot__esc:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .4); }
.spot__esc-text { display: none; }

.spot__body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.spot__group { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 6px; color: var(--text-3); font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.spot__group button { border: 0; background: none; padding: 0; color: var(--text-3); font: inherit; letter-spacing: .04em; text-transform: none; cursor: pointer; }
.spot__group button:hover { color: var(--accent); }
.spot__item {
    position: relative;
    display: flex; align-items: center; gap: 14px;
    padding: 8px 12px; border-radius: 11px;
    color: var(--text); text-decoration: none;
    transition: background .12s;
    animation: spot-item .28s cubic-bezier(.16, 1, .3, 1) both;
}
.spot__item[aria-selected="true"] {
    background: rgba(var(--accent-rgb), .09);
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .22);
}
@keyframes spot-item { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.spot__thumb { width: 38px; height: 57px; flex: none; border-radius: 6px; object-fit: cover; background: var(--surface-2); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .6); }
.spot__glyph { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: rgba(255, 255, 255, .05); color: var(--text-3); }
.spot__glyph svg { width: 16px; height: 16px; }
.spot__text { flex: 1; min-width: 0; }
.spot__title { display: block; font-size: .94rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot__title mark { background: none; color: var(--accent); }
.spot__meta { display: block; margin-top: 2px; font-size: .78rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot__side { display: flex; align-items: center; gap: 10px; flex: none; color: var(--text-2); font-size: .8rem; font-weight: 600; }
.spot__side .spot__star { color: var(--star); }
.spot__enter { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: rgba(var(--accent-rgb), .16); color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.spot__enter svg { width: 14px; height: 14px; }
.spot__item[aria-selected="true"] .spot__enter { opacity: 1; transform: none; }
.spot__item--all .spot__title { color: var(--accent); font-weight: 600; }

.spot__empty { padding: 44px 20px 48px; text-align: center; color: var(--text-3); font-size: .9rem; }
.spot__empty strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 1rem; font-weight: 600; }
.spot__empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); color: var(--text-3); }

.spot__skel { display: flex; align-items: center; gap: 14px; padding: 8px 12px; }
.spot__skel i { display: block; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.1) 50%, rgba(255,255,255,.05) 75%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; }
.spot__skel i:first-child { width: 38px; height: 57px; flex: none; }
.spot__skel span { flex: 1; display: grid; gap: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.spot__foot {
    display: flex; align-items: center; gap: 18px; flex: none;
    padding: 10px 18px;
    border-top: 1px solid rgba(var(--line-rgb), .09);
    background: rgba(0, 0, 0, .18);
    color: var(--text-3); font-size: .74rem;
}
.spot__foot kbd {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-right: 3px; padding: 0 5px;
    border: 1px solid var(--line-2); border-radius: 5px; background: rgba(255, 255, 255, .04);
    font: 600 .68rem var(--font); color: var(--text-2);
}
.spot__brand { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text-2); }
.spot__brand .brand__mark { width: 18px; height: 18px; border-radius: 5px; }
.spot__brand .brand__mark .icon { width: 9px; height: 9px; margin-left: 1px; }

@media (max-width: 560px) {
    .search-trigger { padding: 0 10px; }
    .spot[open] { padding: 0; align-items: stretch; }
    .spot__panel { width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0; animation-name: spot-in-mobile; }
    .spot__panel::before { display: none; }
    .spot__bar { height: 60px; padding: 0 12px 0 16px; }
    .spot__esc { border: 0; background: none; color: var(--accent); font-size: .9rem; font-weight: 600; padding: 4px; }
    .spot__esc-key { display: none; }
    .spot__esc-text { display: inline; }
    .spot__foot { display: none; }
    .spot::backdrop { backdrop-filter: blur(4px); }
}
@keyframes spot-in-mobile { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Fiche film / série : en-tête compact + versions
   ========================================================================== */
.tp { position: relative; padding-bottom: 64px; }

/* --- En-tête -------------------------------------------------------------- */
.tp-top { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--nav-h) + 30px) 0 34px; }
.tp-top__bg { position: absolute; inset: 0; z-index: -1; }
.tp-top__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; opacity: .55; }
.tp-top__bg::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(var(--bg-rgb), .97) 0%, rgba(var(--bg-rgb), .78) 42%, rgba(var(--bg-rgb), .4) 100%),
        linear-gradient(0deg, var(--bg) 0%, rgba(var(--bg-rgb), .2) 60%, rgba(var(--bg-rgb), .55) 100%);
}
.tp-top__inner { display: flex; align-items: flex-end; gap: clamp(18px, 2.4vw, 30px); }
.tp-top__poster { flex: none; width: clamp(92px, 8.5vw, 128px); }
.tp-top__img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .1); }
.tp-top__img.poster--empty { display: grid; place-items: center; padding: 8px; background: linear-gradient(135deg, var(--c1), var(--c2)); font-size: .75rem; font-weight: 700; text-align: center; }
.tp-top__text { min-width: 0; padding-bottom: 2px; }

.tp-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; color: var(--text-3); font-size: .8rem; font-weight: 500; }
.tp-crumbs a { transition: color .2s; }
.tp-crumbs a:hover { color: var(--text); }
.tp-crumbs .icon { width: 12px; height: 12px; opacity: .7; }

.tp-top__title { margin: 0; font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; }
.tp-top__logo {
    display: block; width: auto; height: auto;
    max-width: min(420px, 100%); max-height: clamp(54px, 6.5vw, 88px);
    object-fit: contain; object-position: left bottom;
    filter: drop-shadow(0 6px 24px rgba(0, 0, 0, .6));
}
.tp-top__logo--invert { filter: brightness(0) invert(1) drop-shadow(0 6px 24px rgba(0, 0, 0, .6)); }

.tp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin: 14px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: .92rem; font-weight: 500; }
.tp-meta li { display: inline-flex; align-items: center; }
.tp-meta li + li::before { content: ""; width: 4px; height: 4px; margin: 0 11px; border-radius: 50%; background: var(--text-3); opacity: .7; }
.tp-meta__score { gap: 5px; color: var(--text); }
.tp-meta__score .icon { width: 16px; height: 16px; color: var(--star); }
.tp-meta__score strong { font-weight: 700; }
.tp-meta__genres { color: var(--text-3); }
.tp-pill { display: inline-block; padding: 1px 7px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-size: .74rem; font-weight: 700; line-height: 1.5; }

.tp-body { padding-top: 4px; }

/* --- Versions --------------------------------------------------------------- */
.versions {
    --vcols: 96px minmax(0, 2.4fr) 108px minmax(0, 1.25fr) minmax(0, 1fr) 124px 82px 36px;
    margin: 0;
}
.versions__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.versions__head { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
.versions__count { padding: 1px 8px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--text-2); font: 600 .78rem/1.5 var(--font); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.versions__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.versions__bar > *, .versions__tools > * { min-width: 0; max-width: 100%; }

/* contrôle segmenté (saisons, définitions) */
.vseg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; }
.vseg::-webkit-scrollbar { display: none; }
.vseg__btn {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 12px; border: 0; border-radius: 7px;
    background: transparent; color: var(--text-3);
    font: 600 .8rem var(--font); white-space: nowrap; cursor: pointer;
    transition: color .15s, background .15s, box-shadow .15s;
}
.vseg__btn span { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.vseg__btn:hover { color: var(--text); }
.vseg__btn.is-on { background: rgba(255, 255, 255, .08); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.vseg__btn.is-on span { color: var(--text-2); }

/* épisodes (séries) */
.epnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eppill { display: inline-flex; align-items: center; height: 36px; padding: 0 3px; border-radius: 10px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); font: 600 .82rem/1 var(--font); font-variant-numeric: tabular-nums; }
.eppill button { width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--text-2); font-size: 1.15rem; cursor: pointer; }
.eppill button:not(:disabled):hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.eppill [data-current] { min-width: 4.8rem; text-align: center; letter-spacing: .03em; }
.epack { height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font: 600 .8rem var(--font); cursor: pointer; transition: color .15s, background .15s; }
.epack:hover { color: var(--text); }
.epack.is-on { background: rgba(var(--accent-rgb), .1); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .4); color: var(--accent); }
.epack:disabled, .eppill button:disabled { opacity: .3; cursor: default; }

/* tableau */
.vtable { border-radius: 14px; background: rgba(var(--panel-rgb), .55); box-shadow: inset 0 0 0 1px var(--line), 0 24px 48px -36px rgba(0, 0, 0, .9); overflow: hidden; }
.vtable[hidden] { display: none; }
.vtable + .vtable { margin-top: 16px; }
.vtable.is-empty .vhead { display: none; }
.vtable.is-empty::after { content: "Aucune version ne correspond à ces filtres."; display: block; padding: 40px 20px; text-align: center; color: var(--text-3); font-size: .9rem; }
.vseason { padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.vhead, .vrow, .vnfo { display: grid; grid-template-columns: var(--vcols); column-gap: 20px; align-items: center; padding-inline: 20px 16px; }
.vhead {
    height: 38px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .015);
    color: var(--text-3); font-size: .67rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
}
.vhead__r { text-align: right; }

.vgroup { --tier: #6ee7b7; }
.vgroup[hidden] { display: none; }
.vgroup--pure { --tier: #a5b4fc; }
.vgroup--hc { --tier: #fdba74; }
.vgroup--opti { --tier: #6ee7b7; }
.vgroup__head { display: flex; align-items: baseline; gap: 12px; padding: 16px 16px 6px 20px; }
.vgroup + .vgroup .vgroup__head { margin-top: 4px; border-top: 1px solid var(--line); padding-top: 18px; }
.vgroup__name { position: relative; padding-left: 14px; color: var(--text); font-size: .7rem; font-weight: 700; letter-spacing: .13em; }
.vgroup__name::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; border-radius: 2px; background: var(--tier); transform: translateY(-50%); }
.vgroup__hint { color: var(--text-3); font-size: .78rem; }
.vgroup__count { margin-left: auto; color: var(--text-3); font-size: .74rem; font-variant-numeric: tabular-nums; }

.vitem { border-top: 1px solid rgba(255, 255, 255, .04); transition: background .15s; }
.vgroup__head + .vitem { border-top: 0; }
.vitem[hidden] { display: none; }
.vitem:hover { background: rgba(255, 255, 255, .02); }
.vrow { min-height: 58px; padding-block: 12px 4px; }

.vc { min-width: 0; color: var(--text-2); font-size: .82rem; }
.vc--q { display: flex; flex-direction: column; gap: 4px; }
.vq { color: var(--text); font: 700 .92rem/1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.vq--uhd { color: var(--accent); }
.vq__sub { color: var(--text-3); font-size: .67rem; font-weight: 500; }
.vc--rel { display: flex; flex-direction: column; gap: 3px; }
.vrel__src { color: var(--text); font-size: .87rem; font-weight: 600; }
.vrel__name { color: var(--text-3); font: 400 .71rem/1.35 ui-monospace, "Cascadia Mono", SFMono-Regular, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vspec { display: contents; }
.vc--lang { display: flex; flex-direction: column; gap: 3px; color: var(--text); font-size: .8rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vlang { color: var(--text); font-size: .82rem; font-weight: 700; letter-spacing: .01em; }
.vlang--vost, .vlang--vo { color: #fcd34d; }
.vlang__sub { color: var(--text-3); font-size: .7rem; font-weight: 500; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
.vdepth { color: var(--text-3); font-size: .74rem; font-weight: 500; }
.vdepth::before { content: "·"; margin: 0 5px; color: var(--text-3); opacity: .6; }
.vcodec { white-space: nowrap; }
.vdepth--solo::before { display: none; }
.vseg__more { font-style: normal; }
.vdepth--10, .vdepth--12 { color: var(--text-2); font-weight: 600; }
.vc--video { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.vtag { padding: 2px 6px; border-radius: 5px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-size: .67rem; font-weight: 600; letter-spacing: .02em; line-height: 1.35; }
.vcodec { margin-left: 2px; color: var(--text-3); font-size: .74rem; font-weight: 500; }
.vc--audio { font-size: .8rem; }
.vc--team { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc--team i { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--team); }
.vc--size { color: var(--text); font: 600 .92rem/1 var(--font); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.vc--size small { color: var(--text-3); font-size: .74rem; font-weight: 500; }
.vnone { color: var(--text-3); opacity: .6; }
.vc--act { display: flex; justify-content: flex-end; }
.vdl { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); transition: background .15s, color .15s, box-shadow .15s; }
.vdl svg { width: 17px; height: 17px; }
.vdl:hover { background: var(--accent); color: var(--on-accent); box-shadow: none; }

/* NFO */
.vnfo { padding-bottom: 10px; }
.vnfo__line { grid-column: 2 / -1; display: flex; align-items: center; gap: 2px; min-width: 0; }
.vnfo__toggle {
    display: inline-flex; align-items: center; gap: 6px;
    height: 26px; margin-left: -6px; padding: 0 8px 0 4px; border: 0; border-radius: 6px;
    background: transparent; color: var(--text-3); font: 500 .76rem var(--font); cursor: pointer;
    transition: color .15s, background .15s;
}
.vnfo__toggle:hover { color: var(--accent); background: rgba(var(--accent-rgb), .07); }
.vnfo__toggle svg { width: 14px; height: 14px; }
.vnfo__chev { display: grid; transition: transform .2s var(--ease); }
.vnfo__toggle[aria-expanded="true"] { color: var(--accent); }
.vnfo__toggle[aria-expanded="true"] .vnfo__chev { transform: rotate(90deg); }
.vnfo__dl { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--text-3); transition: color .15s, background .15s; }
.vnfo__dl svg { width: 14px; height: 14px; }
.vnfo__dl:hover { color: var(--accent); background: rgba(var(--accent-rgb), .07); }
.vnfo__panel { grid-column: 1 / -1; margin-top: 8px; border-radius: 10px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; animation: vnfo-in .2s var(--ease); }
.vnfo__panel[hidden] { display: none; }
@keyframes vnfo-in { from { opacity: 0; transform: translateY(-4px); } }
.vnfo__bar { display: flex; align-items: center; gap: 12px; padding: 7px 8px 7px 14px; border-bottom: 1px solid var(--line); }
.vnfo__file { flex: 1; min-width: 0; color: var(--text-3); font: 500 .72rem ui-monospace, Consolas, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vnfo__copy { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .06); color: var(--text-2); font: 600 .74rem var(--font); cursor: pointer; transition: background .15s, color .15s; }
.vnfo__copy:hover { background: rgba(255, 255, 255, .1); color: var(--text); }
.vnfo__pre {
    margin: 0; max-height: 460px; overflow: auto; padding: 14px 16px;
    color: #cbd5e1; font: 12px/1.45 "Cascadia Mono", Consolas, "DejaVu Sans Mono", ui-monospace, monospace;
    white-space: pre; tab-size: 4;
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.vnfo__pre:focus { outline: none; }

.vempty { display: grid; justify-items: center; gap: 6px; padding: 56px 20px; border-radius: 14px; background: rgba(var(--panel-rgb), .55); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.vempty__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 16px; background: rgba(255, 255, 255, .05); color: var(--text-3); }
.vempty__icon svg { width: 24px; height: 24px; }
.vempty strong { font-size: 1.05rem; }
.vempty p { margin: 0; color: var(--text-3); font-size: .9rem; }

/* --- Synopsis + infos ------------------------------------------------------ */
.tp-about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.tp-about h2 { margin: 0 0 10px; font-size: 1.05rem; font-weight: 700; }
.tp-about__story p { margin: 0; max-width: 70ch; color: var(--text-2); font-size: .96rem; line-height: 1.7; }
.tp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 8px; margin: 0; }
.tp-facts > div { padding: 12px 14px; border-radius: 12px; background: rgba(var(--panel-rgb), .6); box-shadow: inset 0 0 0 1px var(--line); }
.tp-facts dt { color: var(--text-3); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.tp-facts dd { margin: 5px 0 0; font-size: .9rem; font-weight: 600; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1180px) {
    .versions { --vcols: 84px minmax(0, 2fr) 100px minmax(0, 1.3fr) 112px 78px 36px; }
    .vc--audio, .vhead span:nth-child(5) { display: none; }
}
@media (max-width: 1000px) {
    .tp-about { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .vhead { display: none; }
    .vrow {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "q rel size" "spec spec spec" "team team act";
        row-gap: 8px; column-gap: 12px; padding: 14px 14px 4px;
    }
    .vc--q { grid-area: q; flex-direction: row; align-items: baseline; gap: 6px; }
    .vq__sub { display: none; }
    .vc--rel { grid-area: rel; }
    .vrel__name { display: none; }
    .vspec { grid-area: spec; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
    .vc--lang { flex-direction: row; align-items: baseline; gap: 6px; }
    .vc--audio { display: block; }
    .vc--team { grid-area: team; }
    .vc--size { grid-area: size; }
    .vc--act { grid-area: act; }
    .vdl { width: 34px; height: 34px; }
    .vnfo { grid-template-columns: minmax(0, 1fr); padding: 0 14px 10px; }
    .vnfo__line { grid-column: 1; }
    .vnfo__toggle { margin-left: -4px; }
    .vgroup__head { padding: 14px 14px 4px; }
    .vgroup__hint { display: none; }
}
@media (max-width: 760px) {
    .tp-top { padding: calc(var(--nav-h) + 14px) 0 22px; }
    .tp-top__inner { align-items: center; gap: 16px; }
    .tp-top__poster { width: 78px; }
    .tp-crumbs { display: none; }
    .tp-top__title { font-size: 1.55rem; }
    .tp-top__logo { max-height: 54px; }
    .tp-meta { gap: 4px 12px; margin-top: 10px; font-size: .84rem; }
    .tp-meta li + li::before { display: none; }
    .tp-meta .tp-meta__genres { display: none; }

    .versions__bar { flex-direction: column; align-items: stretch; gap: 12px; }
    .versions__tools { flex-direction: column; align-items: stretch; }
    .vseg { display: flex; }
    .vseg:not(.vseg--seasons) .vseg__btn { flex: 1; justify-content: center; padding: 0 8px; }
    .vseg--lang .vseg__btn span, .vseg__more { display: none; }
    .epnav { justify-content: space-between; }
    .epnav .vseg { width: 100%; }
    .vtable { border-radius: 12px; }
    .vnfo__pre { max-height: 360px; font-size: 10.5px; padding: 12px; }
    .tp-about { margin-top: 36px; padding-top: 24px; gap: 24px; }
}

/* ==========================================================================
   Accueil « tableau de bord » — un seul écran, sans défilement vertical
   ========================================================================== */
body.is-app { height: 100vh; height: 100dvh; overflow: hidden; }
body.is-app main { height: calc(100vh - var(--tabbar-h)); height: calc(100dvh - var(--tabbar-h)); padding-top: var(--nav-h); display: flex; flex-direction: column; }

.dash {
    --g: clamp(12px, 1.6vw, 22px); /* gouttière commune boxes / cartes */
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    gap: clamp(10px, 2.4vh, 28px);
    padding: clamp(10px, 2.6vh, 32px) 0 clamp(10px, 2.2vh, 26px);
}
.dash__top { display: flex; flex-direction: column; gap: clamp(8px, 1.8vh, 20px); flex: none; }
.dash__welcome { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -.03em; }
.dash__welcome span { color: var(--accent); }

/* Boxes */
.boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--g); }
.box {
    display: flex; flex-direction: column; min-width: 0;
    border: 1px solid var(--line-2);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(var(--panel2-rgb), .75), rgba(var(--panel-rgb), .75));
    box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .03);
    overflow: hidden;
}
.box__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: clamp(10px, 1.6vh, 16px) clamp(14px, 1.6vw, 22px);
    border-bottom: 1px solid var(--line);
}
.box__title { font: 700 .74rem/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.box__link { font-size: .82rem; font-weight: 500; color: var(--accent); opacity: .9; }
.box__link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

.stats {
    --c: calc((100% - 2 * var(--g)) / 3); /* largeur d'une carte */
    display: grid; flex: 1;
    grid-template-columns: calc(var(--c) + var(--g) / 2) minmax(0, 1fr) calc(var(--c) + var(--g) / 2);
}
.stat {
    display: flex; flex-direction: column; justify-content: center; min-width: 0;
    padding: clamp(10px, 2.2vh, 24px) clamp(14px, 1.6vw, 22px);
}
.stat:not(:nth-child(3n)) { border-right: 1px solid var(--line); }
.stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
.stat__value { font: 700 clamp(1.2rem, 1.9vw, 1.65rem)/1.1 var(--display); letter-spacing: -.02em; white-space: nowrap; }
.stat__value--good { color: var(--accent); }
.stat__value--warn { color: var(--warn); }
.stat__value--bad { color: var(--bad); }
.stat__label { margin-top: 6px; color: var(--text-2); font-size: .84rem; line-height: 1.35; }
.stat__sub { margin-top: 3px; color: var(--text-3); font-size: .75rem; }
.stat__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.stat__row .stat__label { margin-top: 0; }
.stats .meter { height: 5px; margin-top: 14px; border-radius: 5px; }
.stats .meter span { box-shadow: 0 0 12px rgba(var(--accent-rgb), .6); }
.stats .meter--warn span { box-shadow: 0 0 12px rgba(245, 165, 36, .5); }
.stats .meter--bad span { box-shadow: none; }

.box--empty { background: linear-gradient(180deg, rgba(var(--panel2-rgb), .45), rgba(var(--panel-rgb), .45)); }
.box--empty .box__title { color: var(--text-3); }
.box__placeholder {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    margin: clamp(10px, 1.6vh, 16px);
    border: 1px dashed var(--line-2); border-radius: 12px;
    color: var(--text-3); font-size: .85rem; text-align: center; padding: 16px;
    background-image: radial-gradient(rgba(var(--line-rgb), .07) 1px, transparent 1px);
    background-size: 16px 16px;
}
.box__placeholder-icon {
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 12px;
    border: 1px solid var(--line-2); background: var(--surface);
}
.boxes__dots { display: none; }

/* Rangée à onglets */
.rail-section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: none; }
.rail-head__left { display: flex; align-items: center; gap: 18px; min-width: 0; }
.rail-head__title { font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 800; flex: none; }
.rail-head__more { flex: none; color: var(--accent); font-size: .86rem; font-weight: 600; }
.rail-head__more:hover { text-decoration: underline; text-underline-offset: 3px; }
.rail-head__hint { flex: none; margin-top: clamp(6px, 1vh, 12px); color: var(--text-3); font-size: .82rem; }

.tabs {
    display: flex; gap: 2px; min-width: 0;
    padding: 4px;
    border: 1px solid var(--line-2); border-radius: 12px;
    background: rgba(var(--panel-rgb), .7);
    overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    flex: none;
    padding: 7px 14px; border: 0; border-radius: 9px;
    background: transparent; color: var(--text-2);
    font-size: .85rem; font-weight: 500; white-space: nowrap;
    cursor: pointer; transition: color .2s, background .2s, box-shadow .2s;
}
.tab:hover { color: var(--text); }
.tab.is-active {
    color: var(--text);
    background: rgba(var(--accent-rgb), .1);
    box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .65), 0 0 18px -6px rgba(var(--accent-rgb), .6);
}

/* 6 cartes fixes, sur la même grille que les boxes (box 1 = colonnes 1-3, box 2 = colonnes 4-6) */
.rail-wrap { flex: 1; min-height: 0; margin-top: clamp(8px, 1.4vh, 14px); }
.rail {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: var(--g);
    padding-top: 6px; /* place pour l'effet de survol */
}
.rail.is-entering { animation: fade .45s var(--ease) both; }
.rail .card { min-width: 0; min-height: 0; height: 100%; }
.rail .card__link { height: 100%; display: flex; flex-direction: column; }
/* Affiche au format 2:3 tant que la hauteur le permet, sinon elle se réduit (recadrée) */
.rail .card__media { flex: 0 1 auto; min-height: 0; aspect-ratio: 2 / 3; }
.rail .card__body { flex: none; padding-top: 8px; }

/* Écrans peu hauts : on compacte */
@media (max-height: 760px) and (min-width: 761px) {
    .dash__welcome { display: none; }
    .stat__label { margin-top: 3px; font-size: .78rem; }
    .stat__sub { display: none; }
    .stats .meter { margin-top: 8px; }
}

/* Mobile */
@media (max-width: 760px) {
    .dash { --g: 10px; gap: 10px; padding: 10px 0 12px; }
    .dash__top { gap: 8px; }
    .dash__welcome { font-size: 1.2rem; }

    .boxes {
        display: flex; gap: 10px;
        margin-inline: calc(var(--gutter) * -1);
        padding-inline: var(--gutter);
        overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
        scrollbar-width: none;
    }
    .boxes::-webkit-scrollbar { display: none; }
    .box { flex: 0 0 100%; scroll-snap-align: start; border-radius: 14px; }
    .box__head { padding: 9px 14px; }
    .stat { padding: 9px 12px; }
    .stat__value { font-size: 1.08rem; }
    .stat__label { margin-top: 3px; font-size: .72rem; }
    .stat__sub { font-size: .66rem; }
    .stats .meter { margin-top: 8px; height: 4px; }
    .box__placeholder { margin: 10px; font-size: .8rem; }
    .boxes__dots { display: flex; justify-content: center; gap: 6px; }
    .boxes__dots span { width: 6px; height: 6px; border-radius: 6px; background: var(--line-2); transition: width .25s, background .25s; }
    .boxes__dots span.is-active { width: 18px; background: var(--accent); }

    .rail-head { flex-wrap: wrap; row-gap: 8px; }
    .rail-head__left { display: contents; }
    .rail-head__title { order: 1; }
    .rail-head__more { order: 2; }
    .tabs { order: 3; width: 100%; }
    .tab { flex: 1 0 auto; padding: 7px 12px; font-size: .8rem; }
    .rail-head__hint { display: none; }
    .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
    .rail .card__body { padding-top: 5px; }
    .rail .card__title { font-size: .76rem; }
    .rail .card__meta { display: none; }
    .rail .badge, .rail .card__avail { top: 5px; height: 18px; padding: 0 5px; font-size: .56rem; }
    .rail .badge { left: 5px; }
    .rail .card__avail { right: 5px; }
    .rail .badge ~ .card__avail { display: none; }
}

@media (max-width: 760px) and (max-height: 700px) {
    .dash__welcome { display: none; }
    .stat__sub { display: none; }
}
