/* ===== Grille des programmes TV [pxn_tv] - proposition v2 (charte player / widget TV, page claire) ===== */

/* Fond de page des pages programme TV (classe posee sur <html> via le filtre Bimber bimber_html_class) */
html.pxn-tv-page body{background:#f7f8fa}

/* Navigation entre chaînes (pages chaîne) et sélecteur de chaînes (grille complète) */
/* Une seule ligne sur tous les ecrans : slider swipe sans ascenseur (doigt / pave tactile natifs, glisser souris en JS) */
.channel_grid,.channel_selector{display:flex;flex-wrap:nowrap;gap:8px;margin:0 0 18px;padding:6px 4px 10px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scroll-padding:4px;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none;cursor:grab;user-select:none;-webkit-mask-image:linear-gradient(to right,#000 92%,transparent);mask-image:linear-gradient(to right,#000 92%,transparent)}
.channel_grid > div,.channel_selector > div{flex:0 0 auto;scroll-snap-align:start}
.channel_grid::-webkit-scrollbar,.channel_selector::-webkit-scrollbar{display:none}
.channel_grid.is-dragging,.channel_selector.is-dragging{cursor:grabbing;scroll-snap-type:none}
.channel_grid img,.channel_selector img{-webkit-user-drag:none}
.channel_grid div,.channel_selector div{display:block!important;margin:0!important;padding:0;background:none!important;border-radius:10px}
.channel_grid div img,.channel_selector div img,#channel_grid a img,#channel_selector a img,#channel_grid > div > img:not(a img){display:block;width:40px!important;height:40px!important;max-width:none;margin:0!important;padding:5px!important;object-fit:contain;background:#fff;border:1px solid #e3e5e8;border-radius:10px!important;box-shadow:0 2px 6px rgba(0,0,0,.06)!important;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.channel_grid a:hover img,.channel_selector a:hover img{transform:translateY(-2px);border-color:#c9ced6;box-shadow:0 6px 14px rgba(0,0,0,.12)!important}
/* Chaîne courante (sans lien) et chaîne sélectionnée */
#channel_grid > div > img:not(a img),.channel_selected img{border-color:#e50914!important;box-shadow:0 0 0 2px #e50914,0 6px 14px rgba(229,9,20,.25)!important}

/* Filtres Tous / séries / films */
.grille_selector{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:6px 0 4px}
.grille_selector a{display:inline-block;padding:8px 16px;border:1px solid #e3e5e8;border-radius:999px;background:#f5f6f8;color:#333;font-size:14px;font-weight:bold;line-height:1;cursor:pointer;user-select:none;transition:background-color .2s,color .2s,border-color .2s,box-shadow .2s,transform .15s}
.grille_selector a:hover{border-color:#c9ced6;background:#eef0f3}
.grille_selector a:active{transform:scale(.96)}
.grille_selector a.on{background:#e50914;border-color:#e50914;color:#fff;box-shadow:0 4px 14px rgba(229,9,20,.35)}

/* Grille : chaque programme devient une carte */
table.grille{width:100%;border-collapse:separate;border-spacing:0 12px;margin:0;border:0;background:none}
table.grille tbody{border:0}
table.grille tr{animation:pxn-tvg-in .35s ease both}
table.grille td{padding:14px 12px;border:0!important;background:#fff;vertical-align:top;border-top:1px solid #eceef1!important;border-bottom:1px solid #eceef1!important;transition:background-color .2s ease}
table.grille td:first-child{width:44px;padding-left:14px;border-left:1px solid #eceef1!important;border-radius:12px 0 0 12px}
table.grille td:last-child{border-right:1px solid #eceef1!important;border-radius:0 12px 12px 0}
table.grille tr:hover td{background:#fafbfc}
table.grille tr{box-shadow:0 2px 10px rgba(0,0,0,.04)}

/* Logo de chaîne */
table.grille td:first-child img{display:block;width:40px;height:40px;padding:4px!important;object-fit:contain;background:#fff;border:1px solid #e3e5e8;border-radius:10px!important;box-shadow:none!important;transition:transform .2s ease}
table.grille tr:hover td:first-child img{transform:scale(1.06)}

/* Affiche (ou emplacement dégradé si pas de fiche) */
table.grille td:nth-child(2){width:100px;padding-left:0}
table.grille td.affiche img{display:block;width:100px;height:150px;object-fit:cover;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:transform .3s ease,box-shadow .3s ease}
table.grille tr:hover td.affiche img{transform:translateY(-2px);box-shadow:0 8px 18px rgba(0,0,0,.2)}
table.grille td:nth-child(2):not(.affiche):before{content:"";display:block;width:100px;height:150px;border-radius:8px;background:linear-gradient(135deg,#eef1f5,#dde2ea)}

/* Barre de progression (programme en cours) */
.prog-container{display:none;width:100px!important;height:6px!important;margin:8px 0 0!important;border-radius:3px!important;background:#e3e5e8!important}
.prog-bar{background:#e50914!important}

/* Colonne infos */
table.grille td.content{width:220px;text-align:left}
table.grille .heure{display:inline-block;margin:0 0 8px;padding:4px 9px;border-radius:4px;background:#4a5d80;color:#fff;font-size:13px;font-weight:bold;letter-spacing:.05em;font-variant-numeric:tabular-nums;line-height:1.2}
table.grille .heure + br{display:none}
table.grille a.titre,table.grille td.content > b{display:block;margin:0 0 8px;color:#111;font-size:17px;font-weight:bold;line-height:1.25;text-decoration:none;transition:color .2s}
table.grille a.titre{color:#111}
table.grille a.titre:hover{color:#e50914}
table.grille a.titre + br,table.grille td.content > b + br{display:none}
/* Note : meme rendu que le widget (5 etoiles off en fond, on par-dessus selon s0..s5) */
table.grille .pxn-tv-stars{display:inline-block;position:relative;width:70px;height:14px;vertical-align:middle;background:url(https://pix-geeks.com/wp-content/themes/pixgeeks18/images/rating_off.png) repeat-x 0 0/14px 14px}
table.grille .pxn-tv-stars:before{content:"";position:absolute;top:0;left:0;bottom:0;width:calc(var(--pxn-stars,0) * 14px);background:url(https://pix-geeks.com/wp-content/themes/pixgeeks18/images/rating_on.png) repeat-x 0 0/14px 14px}
table.grille .pxn-tv-stars.s1{--pxn-stars:1}table.grille .pxn-tv-stars.s2{--pxn-stars:2}table.grille .pxn-tv-stars.s3{--pxn-stars:3}table.grille .pxn-tv-stars.s4{--pxn-stars:4}table.grille .pxn-tv-stars.s5{--pxn-stars:5}
table.grille .pxn-tv-stars{margin:0 0 8px}
table.grille .category,table.grille .duration{display:inline-block;margin:0 6px 6px 0;padding:3px 8px;border-radius:999px;background:#f1f2f4;color:#555;font-size:12px;font-weight:bold;line-height:1.3}
table.grille .duration{background:#fff;border:1px solid #e3e5e8}
table.grille .category + br{display:none}
table.grille .type_handler{display:block;color:#8a8f98;font-size:13px;line-height:1.35}

/* Synopsis */
table.grille td.synopsis{color:#555;font-size:14px;line-height:1.55}
table.grille td.synopsis .inside_description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}
table.grille td.synopsis br{display:none}

/* Programme terminé, filtres */
.fini,.grille_hidden{display:none}

/* Mobile : synopsis masqué (comme aujourd'hui), cartes compactes */
@media (max-width:780px){
	table.grille td.synopsis{display:none}
	table.grille td{padding:10px 8px}
	table.grille td.affiche img,table.grille td:nth-child(2):not(.affiche):before{width:72px;height:108px}
	table.grille td:nth-child(2){width:72px}
	table.grille td.content{width:auto}
	table.grille a.titre,table.grille td.content > b{font-size:15px}
	table.grille td:first-child{width:32px;padding-left:8px}
	table.grille td:first-child img{width:32px;height:32px}
	table.grille td.content{min-width:0;width:auto!important;padding-right:10px;border-right:1px solid #eceef1!important;border-radius:0 12px 12px 0}
	.prog-container{width:72px!important}
}

@keyframes pxn-tvg-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){table.grille tr{animation:none}table.grille *{transition:none!important}}
