/* Kaback TV — design « Lagon nocturne » aux couleurs Kaback (noir, rouge, blanc) */
:root{
  --bg:#0B0B0C; --surface:#18181B; --surface-2:#202024; --line:#2A2A2E; --line-2:#3A3A40;
  --text:#F5F5F5; --muted:#A8A8AD; --nav:#C8C8CD; --bar:rgba(11,11,12,.94); --tab:#131315; --ph:radial-gradient(120% 90% at 20% 10%,#3A3A40 0%,#1C1C20 55%,#111113 100%); --red:#D90000; --red-text:#FF3B3B; --white:#FFFFFF;
  --radius:20px; --sidebar:248px;
  --f-head:"Sora",system-ui,sans-serif; --f-body:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
  color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--f-body);font-size:16px;line-height:1.55}
img,video{max-width:100%;height:auto;display:block}
[hidden]{display:none!important}
a{color:inherit;text-decoration:none}
a:hover{color:var(--red-text)}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--red-text);outline-offset:2px}
h1,h2,h3{font-family:var(--f-head);font-weight:600;line-height:1.2;margin:0;text-wrap:balance}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:-999px;top:8px;background:var(--red);color:#fff;padding:8px 14px;border-radius:10px;z-index:100}
.skip:focus{left:8px}
.muted{color:var(--muted)} .small{font-size:13px}
.ic{flex:0 0 auto}

/* Boutons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border-radius:12px;font-weight:700;font-size:15px;border:0;cursor:pointer;font-family:inherit}
.btn-red{background:var(--red);color:#fff}.btn-red:hover{background:#B80000;color:#fff}
.btn-white{background:var(--white);color:var(--bg)}.btn-white:hover{background:#E4E4E7;color:var(--bg)}
.btn-ghost{background:transparent;color:var(--text);box-shadow:inset 0 0 0 1px var(--line-2)}.btn-ghost:hover{box-shadow:inset 0 0 0 1px var(--text);color:var(--text)}
.icon-btn{width:44px;height:44px;border-radius:14px;border:0;background:var(--surface);color:var(--text);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}

/* Mise en page */
.app{display:flex;min-height:100vh}
.sidebar{position:sticky;top:0;align-self:flex-start;height:100vh;width:var(--sidebar);flex:0 0 var(--sidebar);padding:26px 18px;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:22px;overflow-y:auto;background:var(--bg)}
.sidebar-top{display:flex;align-items:center;justify-content:space-between;padding:0 8px}
.logo img{width:170px;height:auto}
.side-nav{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
.side-nav a{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:14px;color:var(--nav);font-weight:600;font-size:15px}
.side-nav a:hover{background:var(--surface);color:var(--text)}
.side-nav a.is-active{background:var(--red);color:#fff}
.side-nav .dot{margin-left:auto}
.side-nav-sub{border-top:1px solid var(--line);padding-top:12px}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--red)}
.premium-box{margin-top:auto;border-radius:var(--radius);background:var(--surface);padding:18px;display:flex;flex-direction:column;gap:10px}
.premium-box strong{font-family:var(--f-head);font-weight:600}
.premium-box span{color:var(--muted);font-size:13px;line-height:1.4}
.main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;padding:22px 36px 0}
.content{flex:1 0 auto;display:flex;flex-direction:column;gap:36px;padding-bottom:40px}
.topbar{display:flex;align-items:center;gap:14px;margin-bottom:28px;flex-wrap:wrap}
.search{display:flex;align-items:center;gap:10px;background:var(--surface);border-radius:14px;padding:0 14px;height:46px;color:var(--muted);flex:1 1 280px;max-width:520px}
.search input{flex:1;min-width:0;background:transparent;border:0;color:var(--text);font:inherit;font-size:15px;outline:none}
.search-inline{max-width:420px;margin:12px 0}
.lang{margin-left:auto;color:var(--muted);font-weight:600;font-size:14px}
.m-header,.tabbar,.m-only,.scrim{display:none}

/* Cartes */
.card{background:var(--surface);border-radius:var(--radius);overflow:hidden;transition:box-shadow .2s}
.pad{padding:24px}
.tag{font-size:12px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--red-text)}
.ph{display:block;width:100%;height:100%;background:var(--ph)}

/* Direct + À la minute */
.hero-row,.direct-layout{display:flex;flex-wrap:wrap;gap:24px}
.live-card{flex:3 1 560px;min-width:0}
.player{position:relative;aspect-ratio:16/9;background:radial-gradient(90% 90% at 25% 15%,#3A3A40 0%,#1A1A1D 55%,#0F0F11 100%)}
.player video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000;z-index:2}
.waves{position:absolute;inset:0;width:100%;height:100%;opacity:.35}
.waves path{fill:none;stroke:var(--red);stroke-width:2}
.pill-live{display:inline-flex;align-items:center;gap:8px;background:var(--red);color:#fff;font-weight:800;font-size:13px;letter-spacing:1px;padding:7px 13px;border-radius:999px}
.player .pill-live{position:absolute;top:18px;left:18px;z-index:3}
.pulse{width:9px;height:9px;border-radius:50%;background:#fff;animation:pulse 1.4s infinite}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255,255,255,.7)}100%{box-shadow:0 0 0 8px rgba(255,255,255,0)}}
.play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:84px;height:84px;border-radius:50%;border:0;background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:3}
.play:hover{background:#B80000;color:#fff}
.unmute{position:absolute;right:16px;top:16px;z-index:4;display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:10px 16px;border:0;border-radius:999px;background:var(--red);color:#fff;font:inherit;font-weight:800;font-size:14px;cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.35)}
.unmute:hover{background:#B80000}
.player-msg{position:absolute;left:0;right:0;bottom:16px;text-align:center;color:var(--muted);font-size:14px;margin:0;padding:0 16px;z-index:3}
.live-meta{display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;padding:18px 22px}
.live-title{font-size:24px;margin-top:4px}
.next{display:flex;flex-direction:column;color:var(--muted);font-size:14px;text-align:right}
.next strong{color:var(--text)}
.minute{flex:1 1 300px;min-width:0;padding:20px;display:flex;flex-direction:column}
.minute h2{font-size:20px;display:flex;align-items:center;gap:10px;margin-bottom:8px}
.minute ul{list-style:none;margin:0;padding:0}
.minute li a{display:flex;gap:14px;padding:12px 0;border-top:1px solid var(--line);font-size:15px;line-height:1.4}
.minute time{font-weight:700;color:var(--red-text);font-variant-numeric:tabular-nums;font-size:14px;flex:0 0 auto}
.more{margin-top:auto;padding-top:10px;color:var(--red-text);font-weight:700;font-size:14px}

/* Blocs */
.block{display:flex;flex-direction:column;gap:16px}
.block-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.block-head h2{font-size:22px}
.block-head a{color:var(--red-text);font-weight:700;font-size:14px}
.grid-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:20px}
.post-card .thumb{display:block;aspect-ratio:16/10;overflow:hidden}
.post-card .thumb img{width:100%;height:100%;object-fit:cover}
.pc-body{padding:14px 16px 18px;display:flex;flex-direction:column;gap:6px}
.pc-body h3{font-family:var(--f-body);font-weight:700;font-size:16px;line-height:1.35}
.card:hover{box-shadow:0 0 0 1px var(--red),0 8px 30px rgba(217,0,0,.18)}
.grid-posters{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px}
.poster{position:relative;aspect-ratio:3/4;display:block}
.poster img,.poster .ph{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.poster-txt{position:absolute;left:0;right:0;bottom:0;padding:70px 14px 14px;background:linear-gradient(rgba(0,0,0,0),rgba(0,0,0,.55) 40%,rgba(0,0,0,.92));display:flex;flex-direction:column;gap:2px;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.8)}
.poster-txt strong{font-family:var(--f-head);font-weight:600;color:#fff}
.poster-txt small{color:#D4D4D8}
.ad{border:1px dashed var(--line-2);border-radius:16px;min-height:96px;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:14px;text-align:center;padding:12px}
.ad-side{min-height:250px}

/* Pages */
.page-head{display:flex;flex-direction:column;gap:10px}
.page-head h1{font-size:34px}
.lead{font-size:18px;max-width:62ch;margin:0}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.chips a{padding:8px 14px;border-radius:999px;background:var(--surface);font-weight:700;font-size:14px;color:var(--nav)}
.chips a.is-active{background:var(--red);color:#fff}
.pagination .nav-links{display:flex;gap:8px;flex-wrap:wrap}
.pagination .page-numbers{padding:8px 14px;border-radius:10px;background:var(--surface)}
.pagination .current{background:var(--red)}
.empty{padding:28px}

/* Article */
.article-layout{display:flex;flex-wrap:wrap;gap:32px;align-items:flex-start}
.article{flex:999 1 560px;min-width:0;max-width:820px}
.article-side{flex:1 1 300px;min-width:0;display:flex;flex-direction:column;gap:20px;position:sticky;top:20px}
.article-head{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}
.article-head h1{font-size:38px;letter-spacing:-.5px}
.article-img{margin:0 0 24px;border-radius:var(--radius);overflow:hidden}
.prose{font-size:18px;line-height:1.7;max-width:68ch}
.prose p{margin:0 0 1.1em}
.prose a{color:var(--red-text);text-decoration:underline}
.prose h2{font-size:24px;margin:1.4em 0 .5em}
.share{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}
.share span{color:var(--muted);font-weight:600;margin-right:4px}
.share a,.share button{background:var(--surface);color:var(--text);border:0;border-radius:10px;padding:9px 14px;font:inherit;font-weight:700;font-size:14px;cursor:pointer;min-height:40px}

/* Direct / grille */
.grille{flex:1 1 320px;min-width:0;padding:20px;display:flex;flex-direction:column}
.grille h2{font-size:20px;margin-bottom:10px}
.grille ul{list-style:none;margin:0;padding:0}
.grille li{display:flex;align-items:center;gap:14px;padding:12px 10px;border-top:1px solid var(--line)}
.grille time{font-weight:700;color:var(--muted);font-variant-numeric:tabular-nums;width:50px}
.grille li span{flex:1;font-weight:600}
.grille li.is-now{background:var(--surface-2);border-radius:12px;box-shadow:inset 0 0 0 1px var(--red)}
.grille li.is-now time{color:var(--red-text)}
.grille em{font-style:normal;font-size:11px;font-weight:800;color:var(--red-text);letter-spacing:.5px;text-transform:uppercase}
.grille-full{max-width:760px}

/* Offres et abonnement */
.offers{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.offer{padding:22px;display:flex;flex-direction:column;gap:8px}
.offer h2{font-size:19px}
.offer p{margin:0;color:var(--muted)}
.plans{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;max-width:900px}
.plan{padding:28px;display:flex;flex-direction:column;gap:14px;position:relative}
.plan h2{font-size:24px}
.plan .price{font-family:var(--f-head);font-size:30px;font-weight:700;margin:0}
.plan .price small{font-size:15px;color:var(--muted);font-weight:500}
.plan-premium{box-shadow:inset 0 0 0 2px var(--red)}
.badge{position:absolute;top:18px;right:18px;background:var(--red);color:#fff;font-size:12px;font-weight:800;padding:5px 10px;border-radius:999px}
.checks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.checks li{padding-left:26px;position:relative}
.checks li::before{content:"";position:absolute;left:0;top:7px;width:14px;height:8px;border-left:2.5px solid var(--red-text);border-bottom:2.5px solid var(--red-text);transform:rotate(-45deg)}
.checks li.no{color:var(--muted)}
.checks li.no::before{border:0;height:2px;top:12px;background:var(--muted);transform:none}
.pay{margin:0}

/* Formulaires */
.form-card{max-width:760px;display:flex;flex-direction:column;gap:10px}
.form-card h2{font-size:22px}
.k-form p{margin:0 0 14px}
.k-form label{display:block;font-weight:600;font-size:14px;margin-bottom:6px}
.k-form input[type=text],.k-form textarea,.k-form input[type=file]{width:100%;background:var(--bg);border:1px solid var(--line-2);border-radius:12px;color:var(--text);font:inherit;padding:12px 14px}
.row2{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:0 16px}
.hp{position:absolute;left:-9999px}
.notice{padding:12px 16px;border-radius:12px;font-weight:600}
.notice.ok{background:#12301C;color:#B8F0C8}
.notice.err{background:#3A1010;color:#FFC4C4}
.contact-layout{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.contact-layout .form-card{flex:2 1 420px}
.contact-info{flex:1 1 260px}
.contact-info dl{margin:12px 0 0}
.contact-info dt{color:var(--muted);font-size:13px;margin-top:10px}
.contact-info dd{margin:0;font-weight:600}

/* Émission */
.emission-hero{display:flex;flex-wrap:wrap;gap:28px;padding:24px}
.emission-img{flex:0 1 300px;aspect-ratio:3/4;border-radius:16px;overflow:hidden}
.emission-img img{width:100%;height:100%;object-fit:cover}
.emission-txt{flex:1 1 320px;display:flex;flex-direction:column;gap:12px;align-items:flex-start}
.emission-txt h1{font-size:36px}
.when{color:var(--red-text);font-weight:700;margin:0}

/* 404 */
.notfound{padding:48px 32px;display:flex;flex-direction:column;align-items:flex-start;gap:14px;max-width:720px}
.notfound h1{font-size:34px}

/* Pied de page */
.site-footer{border-top:1px solid var(--line);padding:28px 0 32px;display:flex;flex-wrap:wrap;gap:24px 40px;align-items:flex-start;justify-content:space-between;font-size:14px;color:var(--muted)}
.f-brand{display:flex;flex-direction:column;gap:8px}
.f-brand img{width:150px}
.f-social{display:flex;flex-wrap:wrap;gap:12px}
.f-social a{color:var(--text);font-weight:600}
.f-links ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px 18px}
.f-credits{display:flex;flex-direction:column;gap:6px;text-align:right}
.f-credits a{color:var(--red-text);font-weight:700}

/* Mobile */
@media (max-width: 900px){
  .main{padding:0 16px}
  .content{gap:28px;padding-bottom:110px}
  .m-header{display:flex;position:sticky;top:0;z-index:30;align-items:center;justify-content:space-between;padding:12px 16px;padding-top:calc(12px + env(safe-area-inset-top,0px));background:var(--bar);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
  .m-logo img{width:150px}
  .m-actions{display:flex;gap:6px}
  .topbar{display:none}
  .sidebar{position:fixed;left:0;top:0;bottom:0;height:100%;z-index:60;transform:translateX(-100%);transition:transform .25s ease,visibility .25s;visibility:hidden;width:min(86vw,320px);box-shadow:none}
  .sidebar.is-open{transform:none;visibility:visible;box-shadow:20px 0 40px rgba(0,0,0,.5)}
  .m-only{display:inline-flex}
  .scrim:not([hidden]){display:block;position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:50}
  .hero-row,.direct-layout{gap:16px;margin-top:16px}
  .live-card,.minute,.grille{flex-basis:100%}
  .live-meta{padding:14px 16px}
  .live-title{font-size:20px}
  .play{width:64px;height:64px}
  .page-head{margin-top:16px}
  .page-head h1{font-size:28px}
  .article-head h1{font-size:28px}
  .prose{font-size:17px}
  .grid-cards{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px}
  .grid-posters{grid-template-columns:repeat(2,minmax(0,1fr))}
  .f-credits{text-align:left}
  .site-footer{padding-bottom:24px}
  .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:40;justify-content:space-around;align-items:flex-start;background:var(--tab);border-top:1px solid var(--line);padding:8px 4px calc(8px + env(safe-area-inset-bottom,0px))}
  .tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:56px;min-height:48px;font-size:11px;font-weight:600;color:var(--muted)}
  .tabbar a.is-active{color:var(--red-text)}
  .tabbar .tab-live{margin-top:-30px;width:66px;height:66px;min-height:66px;border-radius:50%;background:var(--red);border:5px solid var(--bg);color:#fff;font-weight:800;letter-spacing:1px;font-size:10px}
  .tabbar .tab-live:hover{color:#fff}
}
@media (max-width: 420px){
  .grid-cards{grid-template-columns:1fr}
}
@media (prefers-reduced-motion: reduce){
  .pulse{animation:none}
  .sidebar{transition:none}
}

/* Mode jour / nuit */
.theme-toggle .ic-sun{display:none}
.logo-on-light{display:none}
html[data-theme="light"]{
  --bg:#F4F4F5; --surface:#FFFFFF; --surface-2:#F4F4F5; --line:#E4E4E7; --line-2:#D4D4D8;
  --text:#111113; --muted:#5F5F67; --nav:#3F3F46; --red-text:#C40000; --white:#111113;
  --bar:rgba(244,244,245,.94); --tab:#FFFFFF;
  --ph:radial-gradient(120% 90% at 20% 10%,#FFFFFF 0%,#E4E4E7 60%,#D4D4D8 100%);
  color-scheme:light;
}
html[data-theme="light"] .theme-toggle .ic-sun{display:block}
html[data-theme="light"] .theme-toggle .ic-moon{display:none}
html[data-theme="light"] .logo-on-dark{display:none}
html[data-theme="light"] .logo-on-light{display:block}
html[data-theme="light"] .card{box-shadow:0 0 0 1px var(--line),0 1px 3px rgba(0,0,0,.05)}
html[data-theme="light"] .card:hover{box-shadow:0 0 0 1px var(--red),0 8px 30px rgba(217,0,0,.12)}
html[data-theme="light"] .plan-premium{box-shadow:inset 0 0 0 2px var(--red)}
html[data-theme="light"] .btn-white{color:#fff}
html[data-theme="light"] .btn-white:hover{background:#2A2A2E;color:#fff}
html[data-theme="light"] .icon-btn{box-shadow:inset 0 0 0 1px var(--line)}
html[data-theme="light"] .notice.ok{background:#DCF5E3;color:#14532D}
html[data-theme="light"] .notice.err{background:#FDE2E2;color:#7F1D1D}
@media (max-width: 900px){
  html[data-theme="light"] .sidebar.is-open{box-shadow:20px 0 40px rgba(0,0,0,.15)}
}
