/* Hero : la grille est la réponse. Copie et panneau d'épisode à gauche, grille saisons par épisodes à droite. */
.er-hero{padding-block:56px 96px}
.er-in{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"copy grid" "panel grid";grid-template-rows:auto 1fr;column-gap:56px;row-gap:32px;align-items:start}
.er-copy{grid-area:copy;display:flex;flex-direction:column;gap:20px}
.er-id{display:flex;align-items:center;gap:16px}
.er-id img.po{width:56px;aspect-ratio:2/3;border-radius:8px;object-fit:cover;box-shadow:var(--shadow)}
.er-id img.lg{width:150px;height:auto}
.er-id .small{display:block}
.gcard{grid-area:grid;background:var(--surface);border-radius:24px;box-shadow:var(--shadow);padding:24px;display:flex;flex-direction:column;gap:16px}
.g-top{display:flex;justify-content:space-between;align-items:baseline;gap:16px}
.g-top b{font-size:16px}
.grid6{display:flex;gap:4px}
.gcol{display:flex;flex-direction:column;gap:4px;width:60px}
.gcol.glab{width:36px}
.gh,.gf,.gl{height:30px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700}
.gl{color:var(--mute);font-weight:600;justify-content:flex-start}
.gf{color:var(--mute);margin-top:auto}
.glab .gf{justify-content:flex-start}
.cell{height:30px;border:0;border-radius:6px;font:inherit;font-size:14px;font-weight:700;color:var(--ink);cursor:pointer;padding:0;position:relative;transition:transform .2s var(--out),box-shadow .2s var(--ease)}
.cell:hover,.cell.on{transform:scale(1.12);box-shadow:0 0 0 2px var(--ink);z-index:2}
.cell[aria-pressed="true"]{box-shadow:0 0 0 2px var(--ink),0 0 0 4px var(--surface),0 0 0 6px var(--ink)}
.b0{background:#f5d9c4}.b1{background:#d4ecdc}.b2{background:#a6dcbb}.b3{background:#5cc68a}.b4{background:#1d7a43;color:#fff}
.cell.top::after,.cell.low::after{content:"";position:absolute;inset:3px;border-radius:4px;border:2px dashed currentColor;opacity:.7;pointer-events:none}
.legend{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;font-size:14px;color:var(--mute)}
.legend .sw{display:inline-flex;align-items:center;gap:6px}
.legend .sw i{width:18px;height:18px;border-radius:4px;display:inline-block}
.legend .dash{width:18px;height:18px;border-radius:4px;border:2px dashed var(--ink);display:inline-block}
.src{font-size:14px;color:var(--mute);display:flex;flex-wrap:wrap;gap:4px 12px;align-items:center}
/* Panneau de l'épisode survolé ou choisi : vignette, titre, deux notes, CTA */
.epp{grid-area:panel;position:sticky;top:96px;align-self:start;background:var(--surface);border-radius:24px;box-shadow:var(--shadow);padding:16px;display:grid;grid-template-columns:240px minmax(0,1fr);gap:20px;align-items:center}
.epp-img{width:100%;aspect-ratio:16/9;border-radius:12px;object-fit:cover;background:var(--soft)}
.epp-bd{display:flex;flex-direction:column;gap:8px;min-width:0}
.epp-c{font-size:14px;font-weight:700;color:var(--mute)}
.epp-t{font-size:22px;font-weight:700;line-height:1.2;letter-spacing:-.02em}
.epp-sc{display:flex;flex-wrap:wrap;gap:4px 20px;font-size:14px;color:var(--mute)}
.epp-sc b{font-size:20px;color:var(--ink);margin-right:4px}
.epp-sc .icon{font-size:18px;color:var(--green);vertical-align:-3px}
.epp .btn{align-self:flex-start;margin-top:4px}
.epp.swap .epp-img,.epp.swap .epp-t{animation:swap .35s var(--out)}
@keyframes swap{from{opacity:.4;transform:translateY(4px)}}
/* Meilleur et pire épisode, puis top 5 */
.bwrow{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) minmax(0,.9fr);gap:20px;align-items:stretch}
.bw{background:var(--surface);border-radius:24px;box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column}
.bw-img{position:relative;aspect-ratio:16/9;overflow:hidden}
.bw-img img{width:100%;height:100%;object-fit:cover;transition:transform .8s var(--out)}
.bw:hover .bw-img img{transform:scale(1.04)}
.bw-n{position:absolute;left:16px;bottom:16px;background:var(--surface);border-radius:999px;padding:4px 14px;font-weight:700;font-size:20px}
.bw-best .bw-n{background:#1d7a43;color:#fff}
.bw-bd{padding:20px 24px 24px;display:flex;flex-direction:column;gap:8px}
.z .bw h3{font-size:22px;line-height:1.2}
.top5{background:var(--surface);border-radius:24px;box-shadow:var(--shadow);padding:20px;display:flex;flex-direction:column;gap:4px}
.z .top5 h3{font-size:20px;padding:0 8px 8px}
.top5 li{display:grid;grid-template-columns:24px 64px minmax(0,1fr) auto;gap:12px;align-items:center;padding:8px;border-radius:12px;transition:background-color .2s var(--ease)}
.top5 li:hover{background:var(--bg)}
.top5 .rk{font-weight:700;color:var(--mute)}
.top5 img{width:64px;aspect-ratio:16/9;border-radius:6px;object-fit:cover}
.top5 .tt{display:flex;flex-direction:column;min-width:0;font-size:14px}
.top5 .tt b{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top5 .sc{font-weight:700;color:var(--green-ink)}
/* Courbe par saison */
.seas{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.sea{background:var(--surface);border-radius:24px;box-shadow:var(--shadow);padding:20px 24px;display:flex;flex-direction:column;gap:12px;transition:transform .3s var(--out)}
.sea:hover{transform:translateY(-4px)}
.sea-h{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.z .sea h3{font-size:22px}
.sea-avg{font-size:14px;color:var(--mute)}.sea-avg b{font-size:20px;color:var(--ink)}
.spark{position:relative;height:110px}
.spark svg{width:100%;height:100%;overflow:visible}
.spark polyline{fill:none;stroke:var(--green-ink);stroke-width:2;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-dasharray:1200;stroke-dashoffset:0;animation:draw 1.6s var(--out) both}
.spark polygon{fill:var(--green-tint)}
.spark line{stroke:var(--border);stroke-width:1;stroke-dasharray:4 4;vector-effect:non-scaling-stroke}
@keyframes draw{from{stroke-dashoffset:1200}}
.dots i{position:absolute;left:var(--x);top:var(--y);width:6px;height:6px;margin:-3px 0 0 -3px;border-radius:999px;background:var(--green-ink)}
.dots i.bd{width:12px;height:12px;margin:-6px 0 0 -6px;background:var(--surface);box-shadow:inset 0 0 0 3px var(--green-ink)}
.sea-b{display:flex;gap:8px;align-items:flex-start;font-size:14px;color:var(--text)}
.sea-b .icon{font-size:18px;color:var(--green-ink)}
.ax{display:flex;justify-content:space-between;font-size:14px;color:var(--mute);margin-top:-6px}
/* Passage au produit : écran d'épisode reconstruit */
.rate{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:80px;align-items:center}
.p-rate{display:grid;gap:14px;max-width:420px;margin-inline:auto;width:100%}
.p-rate .still{aspect-ratio:16/9;border-radius:14px;overflow:hidden}
.p-rate .still img{width:100%;height:100%;object-fit:cover}
.p-rate .t{font-size:22px;font-weight:700;letter-spacing:-.02em}
.p-rate .cmp2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.p-rate .cmp2 span{background:var(--a-s2);border-radius:12px;padding:10px 12px;display:grid;gap:2px;color:var(--a-mute)}
.p-rate .cmp2 b{font-size:20px;color:var(--a-text)}
.p-rate .you b{color:var(--a-green)}
.rate-ctx{font-size:16px;color:var(--text)}
.rate-ctx b{color:var(--ink)}
/* Séries voisines */
.sim{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px}
.sim a{display:flex;flex-direction:column;gap:10px;color:var(--ink);text-decoration:none;font-weight:700}
.sim .po{aspect-ratio:2/3;border-radius:12px;overflow:hidden;box-shadow:var(--shadow)}
.sim img{width:100%;height:100%;object-fit:cover;transition:transform .8s var(--out)}
.sim a:hover img{transform:scale(1.05)}
.sim a:hover .nm{color:var(--green-ink)}
.sim .nm{transition:color .2s var(--ease)}
.sim .small{font-weight:400}
.tmdb{max-width:800px;margin-inline:auto;background:var(--soft);border-radius:16px;padding:20px 24px;display:flex;gap:16px;align-items:center;font-size:14px;color:var(--text)}
.tmdb .lg{flex:none;width:72px;height:40px;border-radius:8px;background:var(--surface);display:grid;place-items:center;font-weight:700;color:var(--mute)}
@container (max-width:860px){
.er-hero{padding-block:24px 56px}
.er-in{grid-template-columns:minmax(0,1fr);grid-template-areas:"copy" "grid" "panel";row-gap:24px}
.er-id img.lg{width:120px}
.gcard{padding:14px 12px;border-radius:20px}
.gcol{flex:1;width:auto;min-width:0}.gcol.glab{flex:none;width:30px}
.grid6{gap:4px}
.cell:hover,.cell.on{transform:none}
.epp{position:sticky;top:auto;bottom:12px;z-index:5;grid-template-columns:104px minmax(0,1fr);gap:12px;padding:12px;border-radius:20px;box-shadow:0 12px 40px -12px #0000004d}
.epp-t{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.epp-c{display:none}
.epp-sc{gap:2px 12px}.epp-sc b{font-size:16px}.epp-sc .n{display:none}
.epp .btn{padding:8px 16px;font-size:14px;margin-top:2px}
.bwrow{grid-template-columns:1fr;gap:16px}.top5{display:none}
.bw-bd{padding:16px 20px 20px}
.seas{display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:20px;margin-inline:-20px;padding:8px 20px 28px}
.seas::-webkit-scrollbar{height:6px;-webkit-appearance:none}.seas::-webkit-scrollbar-track{background:#e8e3da;border-radius:999px;margin-inline:20px}.seas::-webkit-scrollbar-thumb{background:var(--green-ink);border-radius:999px}
.sea{flex:0 0 80%;scroll-snap-align:start}
.rate{grid-template-columns:1fr;gap:32px}.rate .panel{display:none}.g-top .small{display:none}
.sim{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.sim a:nth-child(n+4){display:none}
.tmdb{flex-direction:column;align-items:flex-start;padding:16px 20px}
}
/* Guide : remplissage et point de départ, deux colonnes de texte */
.guide{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.gd{background:var(--surface);border-radius:24px;box-shadow:var(--shadow);padding:32px;display:flex;flex-direction:column;gap:16px;color:var(--text)}
.z .gd h2{font-size:32px;color:var(--ink)}
.fl{display:flex;flex-direction:column;gap:4px}
.fl li{display:flex;justify-content:space-between;gap:16px;padding:8px 12px;border-radius:10px;background:var(--bg);font-size:14px;transition:background-color .2s var(--ease)}
.fl li:hover{background:var(--soft)}
.fl li span{font-weight:700;color:var(--mute)}
.bw-bd p:last-child{color:var(--text)}
.sea-p{font-size:14px;color:var(--text)}
#all .tbl-w{overflow:auto;max-width:800px;margin-inline:auto;width:100%;max-height:480px;background:var(--surface);box-shadow:var(--shadow);border-radius:16px}
.tbl-w::-webkit-scrollbar{width:6px;height:6px;-webkit-appearance:none}.tbl-w::-webkit-scrollbar-track{background:#e8e3da;border-radius:999px;margin-block:12px}.tbl-w::-webkit-scrollbar-thumb{background:var(--green-ink);border-radius:999px}
.tbl-w table{width:100%;border-collapse:collapse;font-size:14px}
.tbl-w th,.tbl-w td{padding:10px 16px;text-align:left;border-bottom:1px solid var(--border)}
.tbl-w thead th{position:sticky;top:0;background:var(--surface);z-index:1}
.tbl-w tbody tr{transition:background-color .2s var(--ease)}.tbl-w tbody tr:hover{background:var(--bg)}
.tbl-w td:nth-child(n+3){font-weight:700;white-space:nowrap}
@container (max-width:860px){
.guide{grid-template-columns:1fr;gap:16px}.gd{padding:20px;gap:12px}.z .gd h2{font-size:28px}
.z .faq details:nth-child(n+4){display:block}
#all .tbl-w{max-height:420px}.tbl-w th,.tbl-w td{padding:8px 10px}
}
