:root {
  color-scheme: light;
  --bg: #f4f5f8; --s1: #ffffff; --s2: #eceef3; --line: #dfe2ea;
  --tx: #161923; --mu: #667085; --ac: #e11d34; --ac-soft: #e11d3414; --ac-tx: #c4162b;
  --shadow: 0 10px 24px #1a233a22;
  --ts: 50%; --tl1: 78%; --tl2: 64%;
  --hh: 4rem; --r: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1117; --s1: #171a23; --s2: #1f2330; --line: #2b3040;
  --tx: #eef0f6; --mu: #98a0b3; --ac: #ff3d4f; --ac-soft: #ff3d4f26; --ac-tx: #ff8791;
  --shadow: 0 10px 24px #0008;
  --ts: 42%; --tl1: 26%; --tl2: 13%;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0; background: var(--bg); color: var(--tx); font: 15px/1.5 var(--font);
  overflow-x: hidden; overflow-x: clip; max-width: 100%; width: 100%; position: relative;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.ic { width: 1.1em; height: 1.1em; vertical-align: -.15em; flex-shrink: 0; }
.hidden, [hidden], svg[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }

/* En-tete fixe principal */
.hdr { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); width: 100%; max-width: 100%; box-sizing: border-box; }
.hdr .in { height: var(--hh); display: grid; grid-template-columns: auto 1fr minmax(0, 24rem) auto; align-items: center; gap: 1.25rem; padding-inline: clamp(.75rem, 3vw, 2rem); max-width: 105rem; margin: 0 auto; width: 100%; box-sizing: border-box; min-width: 0; }
.logo { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; max-height: calc(var(--hh) - .75rem); line-height: 1; min-width: 0; }
.logo-img { height: 2.25rem; max-height: calc(var(--hh) - .75rem); width: auto; max-width: 10rem; object-fit: contain; display: block; flex-shrink: 0; }
.nav { display: flex; gap: .25rem; min-width: 0; }
.nav a { padding: .45rem .9rem; border-radius: 999px; color: var(--mu); font-weight: 500; font-size: .95rem; transition: background .15s, color .15s; white-space: nowrap; }
.nav a:hover { color: var(--tx); background: var(--s2); }
.nav a[aria-current="page"] { color: #fff; background: var(--ac); font-weight: 600; }
.search { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; background: var(--s1); border: 1px solid var(--line); border-radius: 999px; padding: 0 .9rem; height: 2.5rem; transition: border-color .15s, box-shadow .15s; min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
.search:focus-within { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
.search input { background: none; border: 0; color: var(--tx); font: inherit; min-width: 0; outline: 0; width: 100%; text-overflow: ellipsis; }
.search kbd { font: 12px var(--font); color: var(--mu); border: 1px solid var(--line); border-radius: 5px; padding: 0 .4rem; flex-shrink: 0; }
.acts { display: flex; gap: .5rem; flex-shrink: 0; }
.icon-btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--s1); border: 1px solid var(--line); display: grid; place-items: center; transition: background .15s; color: var(--tx); flex-shrink: 0; }
.icon-btn:hover { background: var(--s2); }
#theme .sun { display: none; } :root[data-theme="dark"] #theme .moon { display: none; } :root[data-theme="dark"] #theme .sun { display: inline; }

/* Barre de filtres collante anti-debordement */
.filters { position: sticky; top: var(--hh); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); width: 100%; max-width: 100%; box-sizing: border-box; }
.filters .in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .75rem clamp(1rem, 3vw, 2rem); max-width: 105rem; margin: 0 auto; width: 100%; box-sizing: border-box; min-width: 0; }
.seg { display: inline-grid; grid-auto-flow: column; background: var(--s1); border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex-shrink: 0; min-width: 0; max-width: 100%; box-sizing: border-box; }
.seg a, .seg button { padding: .35rem 1rem; border-radius: 999px; color: var(--mu); font-weight: 600; font-size: .875rem; text-align: center; display: inline-flex; align-items: center; justify-content: center; transition: background .15s, color .15s; white-space: nowrap; }
.seg a[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--ac); color: #fff; }
.chips { display: flex; flex-wrap: nowrap; gap: .5rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; align-items: center; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; color: var(--mu); background: var(--s1); font-size: .875rem; display: inline-flex; align-items: center; transition: color .15s, border-color .15s, background .15s; flex-shrink: 0; white-space: nowrap; }
.chip:hover { color: var(--tx); border-color: var(--mu); }
.chip[aria-pressed="true"] { color: var(--tx); border-color: var(--ac); background: var(--ac-soft); font-weight: 600; }
.chips .sep { width: 1px; height: 1.25rem; background: var(--line); flex-shrink: 0; margin: 0 .15rem; }
.count { color: var(--mu); font-size: .875rem; white-space: nowrap; flex-shrink: 0; }

/* Mise en page globale responsive sans scrolle horizontal */
.wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; max-width: 105rem; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; align-items: start; width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
@media (min-width: 64rem) { .wrap { grid-template-columns: minmax(0, 1fr) 19rem; } }
main { display: grid; gap: 2.25rem; align-content: start; min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
main > section { min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-bottom: .9rem; min-width: 0; max-width: 100%; }
.sec-h h2 { font-size: 1.25rem; letter-spacing: -.01em; color: var(--tx); min-width: 0; word-break: break-word; overflow-wrap: anywhere; }
.sec-h a { color: var(--mu); font-size: .875rem; white-space: nowrap; }
.sec-h a:hover { color: var(--ac); }

/* Section a la une (Featured) */
.feats { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(8rem, 1fr)); grid-template-areas: "big a" "big b"; gap: 1rem; min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
.feat { position: relative; border-radius: var(--r); overflow: hidden; display: grid; align-content: end; padding: 1.25rem; background: linear-gradient(135deg, hsl(var(--h, 340) 45% 30%), hsl(calc(var(--h, 340) + 40) 50% 14%)); min-height: 8rem; text-decoration: none; color: #fff; min-width: 0; max-width: 100%; box-sizing: border-box; }
.feat:nth-child(1) { grid-area: big; min-height: 18rem; }
.feat:nth-child(2) { grid-area: a; }
.feat:nth-child(3) { grid-area: b; }
.feat img.bg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.65; transition: transform .3s ease; }
.feat:hover img.bg-img { transform: scale(1.04); }
.feat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, #000b, transparent 65%); pointer-events: none; }
.feat > * { position: relative; z-index: 1; }
.feat h3 { font-size: 1.1rem; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.6); word-break: break-word; overflow-wrap: anywhere; }
.feat:nth-child(1) h3 { font-size: 1.6rem; letter-spacing: -.01em; }
.feat p { color: #ffffffd0; font-size: .875rem; margin-top: .3rem; text-shadow: 0 1px 3px rgba(0,0,0,0.6); word-break: break-word; }
.feat:hover { outline: 2px solid var(--ac); }

/* Rail de defilement horizontal (Continue Watching) */
.rail { display: flex; flex-wrap: nowrap; gap: 1rem; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; padding-bottom: .75rem; scrollbar-width: thin; scrollbar-color: var(--line) transparent; -webkit-overflow-scrolling: touch; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.rail > * { flex: 0 0 clamp(14rem, 72vw, 17rem); max-width: 85vw; min-width: 0; scroll-snap-align: start; }

/* Grille de videos adaptative */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1.25rem 1rem; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.card { position: relative; display: grid; align-content: start; gap: .5rem; min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; display: block; width: 100%; max-width: 100%; background: linear-gradient(135deg, hsl(var(--h, 0) var(--ts) var(--tl1)), hsl(calc(var(--h, 0) + 40) var(--ts) var(--tl2))); transition: transform .2s, box-shadow .2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .35s ease, transform .35s ease; }
.thumb.mosaique_portrait_active > img { filter: blur(14px) brightness(0.72); transform: scale(1.2); }
.superposition_splash_sprite { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; background-repeat: no-repeat; background-position: 0% 0%; pointer-events: none; opacity: 0; transition: opacity .2s; }
.superposition_splash_sprite:not(.hidden) { opacity: 1; display: block !important; }
.superposition_splash_sprite.mode_portrait { inset: auto; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; box-shadow: 0 0 25px rgba(0, 0, 0, 0.7); border-radius: 4px; }
.card:hover .thumb { transform: translateY(-3px); box-shadow: var(--shadow); }
.dur { position: absolute; right: .5rem; bottom: .5rem; background: #000b; color: #fff; padding: .05rem .45rem; border-radius: 6px; font: 600 .75rem ui-monospace, Menlo, monospace; z-index: 2; }
.play { display: none !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
.prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #0008; z-index: 3; }
.prog i { display: block; height: 100%; background: var(--ac); }
.fav { position: absolute; top: .5rem; right: .5rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: #000a; color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .15s; z-index: 4; border: 0; cursor: pointer; }
.card:hover .fav, .fav:focus-visible, .fav[aria-pressed="true"] { opacity: 1; }
.fav[aria-pressed="true"] { color: var(--ac); }
.fav[aria-pressed="true"] path { fill: currentColor; }
.card h3 { font-size: .95rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; color: var(--tx); margin: 0; word-break: break-word; overflow-wrap: anywhere; }
.card h3 a:hover { color: var(--ac); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--mu); font-size: .8rem; max-width: 100%; }
.meta > a { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta > a:hover { color: var(--tx); }
.tag { padding: .05rem .5rem; border-radius: 6px; background: var(--s2); font-size: .75rem; color: var(--mu); white-space: nowrap; }
.tag.src { background: var(--ac-soft); color: var(--ac-tx); font-weight: 600; }
.empty { padding: 3rem 0; text-align: center; color: var(--mu); }

/* Pagination sans debordement */
.pagination-wrapper { margin-top: 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; width: 100%; max-width: 100%; box-sizing: border-box; }
.pagination-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem; background: var(--s1); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .6rem; box-shadow: var(--shadow); max-width: 100%; box-sizing: border-box; }
.pagination-container a, .pagination-container span.btn-p, .pagination-container button.btn-p { min-width: 2.2rem; height: 2.2rem; display: inline-flex; align-items: center; justify-content: center; padding: 0 .6rem; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--tx); text-decoration: none; transition: background .15s, color .15s; background: none; border: none; cursor: pointer; }
.pagination-container a:hover, .pagination-container button.btn-p:hover { background: var(--s2); color: var(--ac); }
.pagination-container .page-actuelle { background: var(--ac) !important; color: #fff !important; }
.form-saut-page-rapide { display: inline-flex; align-items: center; gap: .25rem; margin: 0 .2rem; }
.champ-saut-page-rapide { width: 5.4rem; min-width: 5.4rem; height: 2.2rem; padding: 0 .4rem; border-radius: 999px; border: 1.5px solid var(--ac); background: var(--bg); color: var(--tx); font: 600 .85rem var(--font); text-align: center; outline: 0; box-sizing: border-box; -moz-appearance: textfield; }
.champ-saut-page-rapide::-webkit-outer-spin-button, .champ-saut-page-rapide::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.champ-saut-page-rapide:focus { box-shadow: 0 0 0 2px var(--ac-soft); }
.bouton-saut-page-rapide { height: 2.2rem; padding: 0 .65rem; border-radius: 999px; background: var(--ac); color: #fff; font-size: .8rem; font-weight: 700; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: opacity .15s; }
.bouton-saut-page-rapide:hover { opacity: 0.9; }
.pagination-info { font-size: .85rem; color: var(--mu); text-align: center; max-width: 100%; word-break: break-word; }

/* Page de recherche (/search) */
.search-filter-box { margin-bottom: 2rem; }
.search-form-row { margin-bottom: 1rem; }
.search-field-label { display: block; font-size: .85rem; font-weight: 600; color: var(--tx); margin-bottom: .4rem; }
.search-input-wrap { display: flex; align-items: center; gap: .6rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 0 .9rem; height: 2.75rem; transition: border-color .15s, box-shadow .15s; width: 100%; box-sizing: border-box; }
.search-input-wrap:focus-within { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
.search-input-text { background: none; border: 0; color: var(--tx); font: inherit; min-width: 0; width: 100%; outline: 0; }
.search-filters-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.search-select { width: 100%; height: 2.5rem; background: var(--bg); color: var(--tx); border: 1px solid var(--line); border-radius: var(--r); padding: 0 .75rem; font: inherit; font-size: .875rem; font-weight: 500; outline: 0; cursor: pointer; }
.search-select:focus { border-color: var(--ac); box-shadow: 0 0 0 3px var(--ac-soft); }
.search-actions-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.btn-primary-red { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; background: var(--ac); color: #fff; font-weight: 700; font-size: .9rem; padding: .6rem 1.4rem; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer; transition: opacity .15s, transform .15s; }
.btn-primary-red:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-secondary-clear { display: inline-flex; align-items: center; justify-content: center; background: var(--s2); color: var(--tx); font-weight: 600; font-size: .875rem; padding: .6rem 1.2rem; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); transition: background .15s; }
.btn-secondary-clear:hover { background: var(--line); }
.model-match-card { margin-bottom: 2rem; border: 1.5px solid var(--ac-soft); background: color-mix(in srgb, var(--s1) 94%, var(--ac) 6%); }
.model-match-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap; }
.model-match-profile { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.model-match-avatar-wrap { position: relative; width: 4.5rem; height: 4.5rem; border-radius: 50%; overflow: hidden; border: 2px solid var(--ac); flex-shrink: 0; }
.model-match-avatar { width: 100%; height: 100%; object-fit: cover; }
.badge-role { position: absolute; bottom: 0; right: 0; left: 0; background: var(--ac); color: #fff; font-size: .65rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.badge-tag { display: inline-block; padding: .15rem .6rem; border-radius: 999px; background: var(--ac-soft); color: var(--ac-tx); font-size: .75rem; font-weight: 700; text-transform: uppercase; margin-bottom: .25rem; }
.model-match-name { font-size: 1.35rem; font-weight: 800; color: var(--tx); margin: 0; }
.model-match-meta { color: var(--mu); font-size: .85rem; margin: .15rem 0 0; }
.topic-match-card { margin-bottom: 2rem; border: 1px solid var(--line); }
.topic-match-title { font-size: 1.25rem; font-weight: 800; color: var(--tx); margin: .35rem 0; }
.topic-link { color: var(--ac); }
.topic-link:hover { text-decoration: underline; }
.topic-match-desc { color: var(--mu); font-size: .9rem; margin: .4rem 0 1rem; line-height: 1.5; }
.sort-form { display: inline-flex; align-items: center; gap: .4rem; }
.sort-label { font-size: .85rem; font-weight: 600; color: var(--mu); }
.sort-select { height: 2.2rem; background: var(--s1); color: var(--tx); border: 1px solid var(--line); border-radius: 8px; padding: 0 .6rem; font-size: .85rem; font-weight: 600; outline: 0; cursor: pointer; }
.empty-search-card { text-align: center; padding: 3rem 1.5rem; }
.empty-search-icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--ac-soft); color: var(--ac); display: grid; place-items: center; margin: 0 auto 1rem; }
.empty-search-card h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: .5rem; color: var(--tx); }
.empty-search-card p { color: var(--mu); font-size: .95rem; max-width: 32rem; margin: 0 auto 1.25rem; }
.empty-search-tips { list-style: none; padding: 0; margin: 0 auto 1.5rem; color: var(--mu); font-size: .85rem; display: grid; gap: .35rem; max-width: 28rem; text-align: left; }
.quick-tags-wrap { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-top: 1rem; }
.quick-tags-label { font-size: .85rem; font-weight: 700; color: var(--tx); }

/* Suggestions laterales */
.side { display: grid; gap: 1.5rem; align-content: start; align-self: start; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
@media (min-width: 64rem) {
  .side { position: -webkit-sticky; position: sticky; top: calc(var(--hh) + 4.2rem); align-self: start; max-height: calc(100vh - var(--hh) - 4.8rem); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; z-index: 15; }
  .side::-webkit-scrollbar { width: 4px; }
  .side::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
}
.box { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; overflow: hidden; }
.box h2 { font-size: 1rem; margin-bottom: .8rem; color: var(--tx); font-weight: 700; word-break: break-word; }
.models li a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .4rem; border-radius: 8px; text-decoration: none; color: var(--tx); transition: background .15s; min-width: 0; max-width: 100%; }
.models li a:hover { background: var(--s2); }
.models li a span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.av { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: hsl(var(--h, 0) 45% 32%); color: #fff; overflow: hidden; font-size: .9rem; flex-shrink: 0; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.models small { color: var(--mu); font-size: .8rem; white-space: nowrap; flex-shrink: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; max-width: 100%; }

/* Pied de page et barre d'onglets mobile */
footer { border-top: 1px solid var(--line); padding: 2rem clamp(1rem, 3vw, 2rem); color: var(--mu); font-size: .875rem; display: grid; grid-template-columns: 1fr auto; gap: 1rem; max-width: 105rem; margin: 0 auto; align-items: center; width: 100%; max-width: 100%; box-sizing: border-box; overflow: hidden; }
footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; max-width: 100%; }
footer a:hover { color: var(--tx); }
#top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 3rem; height: 3rem; border-radius: 50%; background: var(--ac); display: none; place-items: center; box-shadow: 0 6px 18px #0009; z-index: 40; border: none; cursor: pointer; transition: transform .15s; }
#top:hover { transform: scale(1.06); }
#top.on { display: grid; }
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--s1); border-top: 1px solid var(--line); width: 100%; max-width: 100%; box-sizing: border-box; }
.tabbar a { padding: .65rem 2px; text-align: center; font-size: .7rem; color: var(--mu); display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; min-width: 0; overflow: hidden; }
.tabbar a[aria-current="page"] { color: var(--ac); font-weight: 700; }
.tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(.65rem, 2.4vw, .75rem); }

/* Page video */
.wrap.wrap-watch { display: block; max-width: 105rem; margin: 0 auto; padding: 1.25rem clamp(1rem, 3vw, 2rem) 4rem; width: 100%; box-sizing: border-box; }
.back { display: inline-flex; align-items: center; gap: .4rem; color: var(--mu); margin-bottom: 1rem; font-weight: 500; font-size: .9rem; text-decoration: none; transition: color .15s; }
.back:hover { color: var(--ac); }
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 23rem; grid-template-areas: "player side" "info side" "rel side"; gap: 1.5rem 2rem; align-items: start; width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
.watch[data-theater] { grid-template-areas: "player player" "info side" "rel side"; }
.player-area { grid-area: player; display: grid; gap: .75rem; min-width: 0; max-width: 100%; }
.info { grid-area: info; display: grid; gap: 1.1rem; min-width: 0; max-width: 100%; }
.side-watch { grid-area: side; position: sticky; top: calc(var(--hh) + 1rem); display: grid; gap: .9rem; min-width: 0; max-width: 100%; }
.rel { grid-area: rel; min-width: 0; max-width: 100%; }
.topic-box { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; width: 100%; box-sizing: border-box; }
.topic-box strong { color: var(--ac); font-size: .85rem; text-transform: uppercase; display: block; margin-bottom: .25rem; }
.topic-box p { color: var(--tx); margin: 0; font-size: .9rem; line-height: 1.5; word-break: break-word; }
.player { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 100%; background: #000; border-radius: var(--r); overflow: hidden; display: grid; place-items: center; box-shadow: var(--shadow); box-sizing: border-box; }
.player iframe, .player video { width: 100%; height: 100%; border: 0; display: block; position: absolute; inset: 0; }
.watch[data-theater] .player { max-width: calc(78vh * 16 / 9); margin-inline: auto; }
.player::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, #2a2f3d, #000 70%); }
.bigplay { position: relative; width: 5rem; height: 5rem; border-radius: 50%; background: var(--ac); display: grid; place-items: center; box-shadow: 0 0 0 10px #ffffff1f; transition: transform .2s; border: none; cursor: pointer; z-index: 10; color: #fff; }
.bigplay:hover { transform: scale(1.06); }
.bigplay .ic { width: 2.2rem; height: 2.2rem; margin-left: .2rem; }
.pbar { position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem 1rem; display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; color: #fff; font: 600 .8rem ui-monospace, Menlo, monospace; background: linear-gradient(to top, #000c, transparent); z-index: 10; }
.track { height: 4px; border-radius: 4px; background: #ffffff40; }
.track i { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--ac); }
.player.playing .bigplay, .player.playing .pbar, .player.playing::before { display: none; }
.pnav { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; max-width: 100%; }
.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: 999px; background: var(--s1); border: 1px solid var(--line); font-weight: 600; font-size: .875rem; color: var(--tx); text-decoration: none; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.pill:hover { border-color: var(--mu); }
.pill[aria-pressed="true"] { border-color: var(--ac); background: var(--ac-soft); color: var(--ac-tx); }
.pill.ac { background: var(--ac); border-color: var(--ac); color: #fff; }
.pill.ac:hover { opacity: 0.92; }
.spacer { margin-left: auto; }
.switch { display: inline-flex; align-items: center; gap: .55rem; color: var(--mu); font-size: .875rem; cursor: pointer; border: none; background: none; }
.switch i { width: 2.2rem; height: 1.3rem; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; display: inline-block; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1rem; height: 1rem; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch[aria-checked="true"] i { background: var(--ac); }
.switch[aria-checked="true"] i::after { transform: translateX(.9rem); }
.info h1 { font-size: clamp(1.25rem, 2.4vw, 1.75rem); letter-spacing: -.01em; line-height: 1.25; color: var(--tx); word-break: break-word; overflow-wrap: anywhere; }
.stats { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; color: var(--mu); font-size: .9rem; max-width: 100%; }
.stats b { color: var(--tx); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; max-width: 100%; }
.model { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .9rem; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; width: 100%; box-sizing: border-box; min-width: 0; }
.model-av { width: 3.25rem; height: 3.25rem; border-radius: 50%; display: grid; place-items: center; font: 700 1.2rem var(--font); color: #fff; background: hsl(var(--h, 0) 45% 32%); overflow: hidden; flex-shrink: 0; }
.model-av img { width: 100%; height: 100%; object-fit: cover; }
.model strong { font-size: 1.05rem; display: block; color: var(--tx); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model small { color: var(--mu); }
.tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.tag:hover { outline: 1px solid var(--mu); }
.side-watch h2 { font-size: 1.05rem; color: var(--tx); margin: 0; }
.side-watch .lbl { color: var(--ac-tx); font-weight: 600; font-size: .85rem; }
.mini { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: .75rem; align-items: start; text-decoration: none; color: var(--tx); transition: background .15s; min-width: 0; max-width: 100%; }
.mini .mt { display: grid; gap: .15rem; min-width: 0; }
.mini b { font-size: .9rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; word-break: break-word; }
.mini small { color: var(--mu); font-size: .8rem; }
.mini:hover b { color: var(--ac); }
.mini.next { padding: .6rem; border: 1px solid var(--ac); border-radius: var(--r); background: var(--ac-soft); }
#toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 200%); background: var(--tx); color: var(--bg); padding: .6rem 1.2rem; border-radius: 999px; font-weight: 600; transition: transform .25s; z-index: 50; box-shadow: var(--shadow); pointer-events: none; max-width: calc(100vw - 2rem); text-align: center; }
#toast.on { transform: translate(-50%, 0); }

/* Adaptabilite mobile & tablettes : zero scrolle / offset horizontal */
@media (max-width: 72rem) {
  .watch, .watch[data-theater] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "player" "info" "side" "rel"; }
  .side-watch { position: static; }
  .mini { grid-template-columns: 11rem minmax(0, 1fr); }
  .theater-btn { display: none; }
}
@media (max-width: 64rem) {
  .hdr .in { grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; }
  .nav { display: none; }
  .count { display: none; }
  .filters .in { grid-template-columns: auto minmax(0, 1fr); }
}
@media (max-width: 48rem) {
  body { padding-bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px)); }
  .tabbar { display: grid; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .acts .hide-m { display: none; }
  .hdr .in { grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem; padding-inline: .75rem; }
  .logo-img { height: 1.85rem; max-height: 1.85rem; max-width: 7.5rem; }
  .search { height: 2.2rem; padding: 0 .6rem; gap: .35rem; min-width: 0; }
  .search kbd { display: none; }
  .search input { font-size: .85rem; }
  .icon-btn { width: 2.2rem; height: 2.2rem; }
  .filters .in { display: flex; flex-direction: column; align-items: stretch; gap: .5rem; padding: .5rem .75rem; }
  .filters .in .seg { align-self: flex-start; max-width: 100%; }
  .chips { width: 100%; max-width: 100%; min-width: 0; }
  .feats { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: none; gap: .75rem; }
  .feat:nth-child(n) { grid-area: auto; min-height: 9.5rem; padding: 1rem; width: 100%; }
  .rail { gap: .75rem; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * { flex: 0 0 clamp(12.5rem, 75vw, 16rem); max-width: 80vw; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 1rem .75rem; }
  #top { bottom: 4.5rem; }
  footer { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: 1.5rem .75rem; }
  .wrap { padding: .75rem .75rem 3.5rem; gap: 1.5rem; }
  .wrap.wrap-watch { padding: .75rem .75rem 3.5rem; }
  .player { border-radius: var(--r); width: 100%; margin-inline: 0; }
  .model { grid-template-columns: auto minmax(0, 1fr); }
  .model .pill { grid-column: 1 / -1; justify-content: center; }
  .fav { opacity: .9; }
  .pagination-container a, .pagination-container span.btn-p, .pagination-container button.btn-p { min-width: 2rem; height: 2rem; padding: 0 .45rem; font-size: .8rem; }
  .champ-saut-page-rapide { width: 4.1rem; height: 2rem; font-size: .8rem; }
  .bouton-saut-page-rapide { height: 2rem; padding: 0 .5rem; font-size: .75rem; }
  .search-filters-grid { grid-template-columns: 1fr; }
  .model-match-inner { flex-direction: column; align-items: stretch; }
  .model-match-actions .btn-primary-red { width: 100%; }
}
@media (max-width: 27rem) {
  .hdr .in { gap: .35rem; padding-inline: .5rem; }
  .logo-img { height: 1.65rem; max-width: 5.5rem; }
  .search input { font-size: .8rem; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .wrap { padding: .5rem .5rem 3.5rem; }
  .filters .in { padding: .5rem .5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
