/* ATS WEB TV - Styles dedies v1.0 - mai 2026 */
#ats-webtv { background:#0a0f0d; min-height:100vh; color:#fff; }

/* HERO */
.webtv-hero { background:#000; width:100%; }
.webtv-player-wrap { position:relative; max-width:1200px; margin:0 auto; }
.webtv-main-video { display:block; width:100%; aspect-ratio:16/9; height:auto; background:#000; object-fit:contain; }
.webtv-player-overlay {
  position:absolute; bottom:0; left:0; right:0;
  padding:14px 18px 12px;
  background:linear-gradient(transparent,rgba(0,25,12,0.93));
  pointer-events:none;
}
.webtv-live-badge {
  display:inline-block; background:#D10019; color:#fff;
  font-size:11px; font-weight:700; letter-spacing:1.5px;
  padding:3px 10px; border-radius:3px; text-transform:uppercase; margin-bottom:6px;
}
.webtv-main-title {
  font-size:clamp(13px,2.2vw,20px); font-weight:700;
  margin:0 0 4px; line-height:1.35; color:#fff;
  text-shadow:0 1px 5px rgba(0,0,0,.8);
}
.webtv-main-meta { font-size:12px; color:#a0ccb8; }
.webtv-cat {
  background:#003919; color:#7fffb0;
  font-size:11px; font-weight:600;
  padding:2px 8px; border-radius:3px; letter-spacing:.5px;
}

/* GRID SECTION */
.webtv-grid-section { padding:20px 12px 48px; max-width:1200px; margin:0 auto; }
.webtv-grid-header { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:18px; }
.webtv-section-title {
  font-size:17px; font-weight:700; color:#fff; margin:0;
  display:flex; align-items:center; gap:8px;
}
.webtv-dot {
  display:inline-block; width:10px; height:10px;
  background:#D10019; border-radius:50%;
  animation:webtv-blink 1.2s ease-in-out infinite;
}
@keyframes webtv-blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* FILTERS */
.webtv-filters { display:flex; flex-wrap:wrap; gap:6px; }
.webtv-filter-btn {
  background:#1a2e25; color:#a0ccb8; border:1px solid #2a4a38;
  padding:5px 13px; border-radius:20px; font-size:12px; cursor:pointer;
  transition:all .2s; font-weight:500;
}
.webtv-filter-btn:hover,.webtv-filter-btn.active {
  background:#003919; color:#7fffb0; border-color:#003919;
}

/* GRID */
.webtv-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
  gap:16px;
}
@media(max-width:600px){ .webtv-grid{ grid-template-columns:repeat(2,1fr); gap:10px; } }

/* CARD */
.webtv-card {
  background:#111a14; border-radius:8px; overflow:hidden;
  cursor:pointer; transition:transform .2s,box-shadow .2s;
  border:2px solid transparent;
}
.webtv-card:hover { transform:translateY(-3px); box-shadow:0 8px 24px rgba(0,57,25,.5); }
.webtv-card--active { border-color:#D10019; box-shadow:0 0 0 2px #D10019; }
.webtv-card:focus { outline:2px solid #7fffb0; outline-offset:2px; }

/* THUMB */
.webtv-thumb { position:relative; aspect-ratio:16/9; background:#0d1710; overflow:hidden; }
.webtv-thumb-video {
  width:100%; height:100%; object-fit:cover; display:block;
  pointer-events:none; opacity:.85;
}
.webtv-thumb-overlay {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,0.15); transition:background .2s;
}
.webtv-card:hover .webtv-thumb-overlay { background:rgba(0,0,0,0.05); }
.webtv-play-icon { width:44px; height:44px; drop-shadow:0 2px 8px rgba(0,0,0,.6); }
.webtv-card-cat {
  position:absolute; top:6px; left:6px;
  background:#003919; color:#7fffb0;
  font-size:10px; font-weight:700; padding:2px 7px; border-radius:3px;
  text-transform:uppercase; letter-spacing:.5px;
}

/* CARD INFO */
.webtv-card-info { padding:10px 12px 12px; }
.webtv-card-title {
  font-size:13px; font-weight:600; color:#e8f5ee;
  margin:0 0 5px; line-height:1.4;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.webtv-card-date { font-size:11px; color:#5a8870; }

/* ===== ÉCRAN TV ===== */
.webtv-tv-room {
  display:flex; justify-content:center; align-items:center;
  padding:30px 16px 0;
  background:radial-gradient(ellipse at 50% 30%, #1a2e20 0%, #0a0f0d 70%);
}
.webtv-tv-body {
  width:100%; max-width:960px;
  display:flex; flex-direction:column; align-items:center;
}
.webtv-tv-bezel {
  width:100%;
  background:linear-gradient(160deg, #222 0%, #111 60%, #1a1a1a 100%);
  border-radius:16px 16px 8px 8px;
  padding:18px 18px 14px;
  box-shadow:0 0 0 3px #333, 0 0 0 6px #111, 0 20px 60px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.07);
  position:relative;
}
.webtv-tv-bezel::before {
  content:''; position:absolute; top:8px; left:50%; transform:translateX(-50%);
  width:8px; height:8px; border-radius:50%;
  background:radial-gradient(circle, #D10019 30%, #800010 100%);
  box-shadow:0 0 6px #D10019;
}
.webtv-tv-screen {
  position:relative; border-radius:6px; overflow:hidden;
  box-shadow:inset 0 0 30px rgba(0,0,0,.6), 0 0 20px rgba(0,200,80,.08);
  background:#000;
}
.webtv-screen-scanlines {
  position:absolute; inset:0; z-index:10; pointer-events:none;
  background:repeating-linear-gradient(to bottom, transparent 0px, transparent 2px, rgba(0,0,0,.12) 2px, rgba(0,0,0,.12) 4px);
  border-radius:6px;
}
.webtv-tv-screen .webtv-main-video {
  display:block; width:100%; aspect-ratio:16/9; height:auto; background:#000; object-fit:contain; border-radius:4px;
}
.webtv-tv-stand { display:flex; flex-direction:column; align-items:center; }
.webtv-tv-neck {
  width:80px; height:28px;
  background:linear-gradient(to bottom, #1a1a1a, #2a2a2a);
  clip-path:polygon(20% 0%, 80% 0%, 95% 100%, 5% 100%);
}
.webtv-tv-base {
  width:200px; height:14px;
  background:linear-gradient(to bottom, #222, #111);
  border-radius:0 0 50px 50px;
  box-shadow:0 4px 12px rgba(0,0,0,.5);
  margin-bottom:20px;
}
@media(max-width:600px){
  .webtv-tv-bezel { padding:10px 10px 8px; border-radius:10px; }
  .webtv-tv-neck { width:50px; height:18px; }
  .webtv-tv-base { width:130px; height:10px; }
}

/* THUMB IMAGE (couverture) */
.webtv-thumb-img {
  width:100%; height:100%;
  object-fit:cover; display:block;
  transition:transform .3s ease;
}
.webtv-card:hover .webtv-thumb-img { transform:scale(1.06); }

/* FIX: thumbnails portrait 9:16 → hauteur fixe + cover centré */
.webtv-thumb {
  aspect-ratio: unset !important;
  height: 180px;
  overflow: hidden;
  background: #0d1710;
}
.webtv-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform .3s ease;
}
.webtv-card:hover .webtv-thumb-img { transform: scale(1.06); }
@media(max-width:600px){
  .webtv-thumb { height: 140px; }
}

/* ===== CRÉDITS PANEL ===== */
.webtv-tv-room-wrap {
  max-width:1200px; margin:0 auto;
  display:flex; align-items:flex-start; gap:20px;
  padding:30px 16px 0;
  background:radial-gradient(ellipse at 50% 30%, #1a2e20 0%, #0a0f0d 70%);
}
/* Le TV prend toute la place disponible */
.webtv-tv-room-wrap .webtv-tv-room {
  flex:1 1 auto; min-width:0;
  padding:0; background:none;
}
.webtv-credits-panel {
  width:220px; flex-shrink:0;
  padding-top:18px;
}
.webtv-credits-inner {
  background:#111a14; border-radius:12px;
  border:1px solid #1e3526;
  padding:16px 14px;
  display:flex; flex-direction:column; gap:14px;
}
.webtv-credits-label {
  font-size:11px; font-weight:700; letter-spacing:1px;
  text-transform:uppercase; color:#4a7a5a;
}
.webtv-credits-account {
  display:flex; align-items:flex-start; gap:10px;
  color:#7fffb0;
}
.webtv-credits-account svg { flex-shrink:0; margin-top:2px; opacity:.85; }
.webtv-credits-account > div { display:flex; flex-direction:column; gap:2px; }
.webtv-credits-net { font-size:10px; color:#4a7a5a; font-weight:600; text-transform:uppercase; letter-spacing:.5px; }
.webtv-credits-handle {
  font-size:13px; font-weight:700; color:#7fffb0;
  text-decoration:none;
  transition:color .2s;
}
.webtv-credits-handle:hover { color:#fff; text-decoration:underline; }
.webtv-credits-desc { font-size:11px; color:#4a7a5a; line-height:1.4; }
.webtv-credits-note {
  font-size:10px; color:#2d5040; line-height:1.5;
  border-top:1px solid #1e3526; padding-top:10px;
}

@media(max-width:900px){
  .webtv-tv-room-wrap { flex-direction:column; gap:0; padding:0; }
  .webtv-credits-panel { width:100%; padding:12px 16px 0; }
  .webtv-credits-inner { flex-direction:row; flex-wrap:wrap; gap:12px; border-radius:0; border-left:0; border-right:0; }
}

/* FIX: fond blanc sur la droite */
#ats-webtv,
.webtv-tv-room-wrap,
.webtv-credits-panel,
.webtv-hero {
  background: #0a0f0d !important;
}
/* S'assurer que le body/page n'a pas de fond blanc derrière */
body.page-template-page-webtv {
  background: #0a0f0d !important;
}

/* FIX: conteneurs WordPress blancs sur la page WebTV */
.page-template-page-webtv .site-main,
.page-template-page-webtv .entry-content,
.page-template-page-webtv .page-content,
.page-template-page-webtv article,
.page-template-page-webtv .hentry,
.page-template-page-webtv #content,
.page-template-page-webtv #primary,
.page-template-page-webtv .site-content {
  background: #0a0f0d !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* FIX FINAL: .main-content et .main-wrapper blancs */
.page-template-page-webtv .main-content,
.page-template-page-webtv .main-wrapper {
  background: #0a0f0d !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* FIX CRÉDITS — handles visibles + liens cliquables */
.webtv-credits-account {
  display: flex !important;
  align-items: flex-start !important;
  gap: 10px !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid #1e3526 !important;
}
.webtv-credits-account:last-of-type { border-bottom: none !important; }
.webtv-credits-account > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}
.webtv-credits-net {
  font-size: 10px !important;
  color: #4a7a5a !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .8px !important;
}
.webtv-credits-handle {
  display: inline-block !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #7fffb0 !important;
  text-decoration: none !important;
  letter-spacing: .2px !important;
  line-height: 1.3 !important;
  padding: 2px 0 !important;
  border-bottom: 1px solid rgba(127,255,176,.3) !important;
  transition: color .2s, border-color .2s !important;
}
.webtv-credits-handle:hover {
  color: #fff !important;
  border-color: #fff !important;
}
.webtv-credits-handle::before {
  content: '' !important;
}
.webtv-credits-desc {
  font-size: 11px !important;
  color: #5a8a6a !important;
  line-height: 1.4 !important;
  margin-top: 1px !important;
}

/* PAGINATION */
.webtv-pagination {
  display:flex; flex-wrap:wrap; gap:8px; justify-content:center;
  padding:24px 0 48px;
}
.webtv-page-btn {
  padding:8px 16px; border-radius:6px;
  background:#111a14; color:#7fffb0;
  border:1px solid #1e3526; font-size:13px; font-weight:600;
  text-decoration:none; transition:all .2s;
}
.webtv-page-btn:hover, .webtv-page-btn.active {
  background:#003919; border-color:#005a28; color:#fff;
}

/* THUMB PLACEHOLDER */
.webtv-thumb-placeholder {
  width:100%; height:100%; background:#0d1710;
  display:flex; align-items:center; justify-content:center;
}

/* STATS CRÉDITS */
.webtv-credits-stats {
  font-size:12px; color:#4a7a5a; font-weight:600;
  border-top:1px solid #1e3526; padding-top:10px;
}

/* ── Bannière WebTV ── */
.webtv-banner-wrap {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #0a0f0d;
  text-align: center;
  padding: 0;
  line-height: 0;
  overflow: hidden;
}
.webtv-banner-link {
  display: block;
  width: 100%;
}
.webtv-banner-img {
  width: 100%;
  height: 200px;
  display: block;
  object-fit: cover;
  object-position: center center;
}
@media (max-width: 900px) {
  .webtv-banner-img { height: 140px; }
}
@media (max-width: 600px) {
  .webtv-banner-img { height: 90px; }
}

/* === ATS Web TV — Tags === */
.webtv-tags-bar{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:10px 16px;
  background:rgba(0,0,0,0.25);
  border-radius:8px;
  margin:0 0 18px;
  max-height:80px;
  overflow-y:auto;
}
.webtv-tag-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 10px;
  background:rgba(127,255,176,0.08);
  border:1px solid rgba(127,255,176,0.2);
  color:#7fffb0;
  font-size:12px;
  font-weight:500;
  text-decoration:none;
  border-radius:14px;
  transition:all 0.15s ease;
  white-space:nowrap;
}
.webtv-tag-chip:hover{
  background:rgba(127,255,176,0.18);
  border-color:rgba(127,255,176,0.5);
  transform:translateY(-1px);
}
.webtv-tag-chip.active{
  background:#7fffb0;
  color:#0a0f0d;
  border-color:#7fffb0;
  font-weight:700;
}
.webtv-tag-chip--clear{
  background:rgba(220,30,30,0.15);
  border-color:rgba(220,30,30,0.4);
  color:#ff6b6b;
}
.webtv-tag-chip--clear:hover{
  background:rgba(220,30,30,0.3);
  color:#fff;
}
.webtv-tag-chip span{
  font-size:10px;
  opacity:0.65;
  font-weight:400;
}
/* Chips dans les cartes (plus petits) */
.webtv-card-tags{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-top:6px;
}
.webtv-card-tags .webtv-tag-chip{
  padding:2px 7px;
  font-size:10px;
  background:rgba(127,255,176,0.06);
  border-radius:10px;
}
