/* Animated Dark Background for Guinée TV 1 */
/* Dark animated gradient background with blue, pink, purple, black */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: #061C3F;
}

/* Animated gradient blobs */
.site-bg::before,
.site-bg::after,
.site-bg .blob {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: blobFloat 20s ease-in-out infinite;
}

.site-bg::before {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -200px;
  background: radial-gradient(circle, #0066FF 0%, #003399 70%, transparent 100%);
  animation-delay: 0s;
}

.site-bg::after {
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -150px;
  background: radial-gradient(circle, #8A2BE2 0%, #4B0082 70%, transparent 100%);
  animation-delay: -7s;
}

.site-bg .blob-1 {
  width: 400px;
  height: 400px;
  top: 30%;
  left: 50%;
  background: radial-gradient(circle, #FF007F 0%, #CC0066 70%, transparent 100%);
  animation-delay: -14s;
  animation-duration: 25s;
}

.site-bg .blob-2 {
  width: 450px;
  height: 450px;
  bottom: 20%;
  left: 10%;
  background: radial-gradient(circle, #0066FF 0%, #8A2BE2 50%, #FF007F 100%);
  animation-delay: -20s;
  animation-duration: 30s;
}

.site-bg .blob-3 {
  width: 350px;
  height: 350px;
  top: 10%;
  right: 15%;
  background: radial-gradient(circle, #061C3F 0%, #000000 100%);
  animation-delay: -5s;
  animation-duration: 18s;
  opacity: 0.6;
}

/* Movie background image layer with transparency */
.site-bg .movie-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  animation: movieFade 24s ease-in-out infinite;
  z-index: 1;
}

.site-bg .movie-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 28, 63, 0.9) 0%, rgba(0, 0, 0, 0.8) 100%);
  z-index: -1;
}

@keyframes blobFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -40px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 30px) scale(0.95);
  }
  75% {
    transform: translate(40px, 20px) scale(1.02);
  }
}

@keyframes movieFade {
  0%, 100% {
    opacity: 0.06;
    transform: scale(1);
  }
  50% {
    opacity: 0.1;
    transform: scale(1.02);
  }
}

/* Subtle grid overlay for texture */
.site-bg .grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 102, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 60s linear infinite;
  pointer-events: none;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* Vignette overlay */
.site-bg .vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
}

/* Page container adjustments for dark bg */
html.dark, body.dark {
  color-scheme: dark;
}

.page-container.dark,
.max-w-\[1440px\].dark,
.max-w-\[1600px\].dark,
.page-container,
.max-w-\[1440px\],
.max-w-\[1600px\],
.max-w-\[1440px\].mx-auto,
.max-w-\[1600px\].mx-auto {
  background: transparent !important;
  box-shadow: none !important;
}

/* Glass cards adapt to dark bg */
.glass-card, .glass-panel, [class*="glass-"] {
  background: rgba(255, 255, 255, 0.05) !important;
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.glass-card:hover, .glass-panel:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(0, 102, 255, 0.3) !important;
}

/* Text colors for dark bg */
.text-on-background { color: #F1F5F9 !important; }
.text-on-surface-variant { color: #94A3B8 !important; }
.text-deep-navy { color: #F1F5F9 !important; }
.text-primary { color: #60A5FA !important; }
.text-electric-blue { color: #60A5FA !important; }
.text-hot-pink { color: #F472B6 !important; }
.text-deep-violet { color: #C084FC !important; }

/* Inputs for dark bg */
input, textarea, select {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #F1F5F9 !important;
}
input:focus, textarea:focus, select:focus {
  border-color: #0066FF !important;
  box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2) !important;
}
input::placeholder, textarea::placeholder { color: #64748B !important; }

/* Sidebar video overlay */
#sidebar-live-overlay {
  background: rgba(0, 0, 0, 0.5) !important;
}

/* ===== TOP NAVBAR - THIN & TRANSPARENT WITH WHITE/VIOLET GRADIENT ===== */
header.sticky, header.fixed {
  height: 56px !important;
  min-height: 56px !important;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.12) 0%, 
    rgba(255, 255, 255, 0.08) 30%, 
    rgba(138, 43, 226, 0.2) 60%, 
    rgba(138, 43, 226, 0.15) 100%
  ) !important;
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(138, 43, 226, 0.15) inset,
    0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
  transition: all 0.3s ease !important;
  position: relative !important;
}

header.sticky::before, header.fixed::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 30%,
    rgba(138, 43, 226, 0.08) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: -1;
}

header.sticky.scrolled, header.fixed.scrolled {
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0.2) 0%, 
    rgba(255, 255, 255, 0.15) 30%, 
    rgba(138, 43, 226, 0.3) 60%, 
    rgba(138, 43, 226, 0.25) 100%
  ) !important;
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(138, 43, 226, 0.25) inset,
    0 0 0 1px rgba(255, 255, 255, 0.15) inset !important;
}

/* Nav links - readable on transparent bg */
header nav a {
  color: #FFFFFF !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

header nav a:hover {
  color: #C084FC !important;
  background: rgba(138, 43, 226, 0.25) !important;
  text-shadow: 0 0 8px rgba(138, 43, 226, 0.6) !important;
}

header nav a.active,
header nav a[aria-current="page"],
header nav a.border-b-2.border-primary {
  color: #C084FC !important;
  background: rgba(138, 43, 226, 0.3) !important;
  text-shadow: 0 0 10px rgba(138, 43, 226, 0.7) !important;
}

header nav a::after {
  display: none !important;
}

/* Search & account icons */
header .material-symbols-outlined {
  color: #FFFFFF !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.2s ease !important;
}

header .material-symbols-outlined:hover {
  color: #C084FC !important;
  text-shadow: 0 0 8px rgba(138, 43, 226, 0.6) !important;
}

/* Reduce sidebar top position to match new header height */
aside[class*="sticky"] {
  top: 56px !important;
  height: calc(100vh - 56px) !important;
}

/* ===== HERO SECTION - PREVENT WHITE BG BLEED ===== */
#hero-section,
section[class*="hero"],
.hero-section {
  background: transparent !important;
  position: relative !important;
  z-index: 10 !important;
}

#hero-section::before,
section[class*="hero"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 28, 63, 0) 0%, rgba(6, 28, 63, 0.3) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Ensure hero carousel images are visible */
#hero-carousel,
.hero-carousel {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
}

#hero-carousel img,
.hero-carousel img {
  opacity: 0.6 !important;
}

/* Main container - transparent to show animated bg */
.max-w-\[1440px\],
.max-w-\[1600px\],
.page-container {
  background: transparent !important;
  box-shadow: none !important;
}

/* Content sections - glass effect */
section:not(#hero-section):not([class*="hero"]) {
  position: relative;
  z-index: 10;
}

/* Footer */
footer.bg-deep-navy {
  background: #031024 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ticker bar */
.ticker-wrap, [class*="ticker"] {
  background: rgba(6, 28, 63, 0.9) !important;
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Hero section adjustments */
#hero-section, section[class*="hero"] {
  background: transparent !important;
}

/* Card hover effects */
.group:hover .group-hover\:scale-105,
.group:hover .group-hover\:scale-110 {
  transform: scale(1.03);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .site-bg::before,
  .site-bg::after,
  .site-bg .blob,
  .site-bg .movie-bg,
  .site-bg .grid-overlay {
    animation: none !important;
  }
}

/* ===== SIDEBAR DARK THEME FIXES ===== */
aside[class*="sticky"] {
  background: rgba(6, 28, 63, 0.95) !important;
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Sidebar text readability */
aside[class*="sticky"] .text-on-surface-variant,
aside[class*="sticky"] .font-label-caps {
  color: #E2E8F0 !important;
}

aside[class*="sticky"] a {
  color: #E2E8F0 !important;
}

aside[class*="sticky"] a:hover {
  color: #60A5FA !important;
}

aside[class*="sticky"] .text-primary {
  color: #60A5FA !important;
}

/* Sidebar logo */
aside[class*="sticky"] img[alt*="Guin"] {
  filter: drop-shadow(0 0 12px rgba(138, 43, 226, 0.5)) brightness(1.1) !important;
}

/* Sidebar active state */
aside[class*="sticky"] a.border-r-4.border-primary {
  background: rgba(0, 102, 255, 0.15) !important;
  border-right-color: #60A5FA !important;
}

/* ===== RESPONSIVE SIDEBAR ===== */
@media (max-width: 1279px) {
  aside[class*="sticky"] {
    width: 72px !important;
    padding: 1rem 0.5rem !important;
  }
  aside[class*="sticky"] .flex-col.items-start.gap-2,
  aside[class*="sticky"] .mt-auto {
    display: none !important;
  }
  aside[class*="sticky"] nav a {
    justify-content: center !important;
    padding: 0.75rem 0.5rem !important;
  }
  aside[class*="sticky"] nav a span:not(.material-symbols-outlined) {
    display: none !important;
  }
  aside[class*="sticky"] button {
    display: none !important;
  }
  aside[class*="sticky"] video {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  aside[class*="sticky"] {
    display: none !important;
  }
}

/* ===== SMOOTH ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Card hover animations */
.glass-card, .glass-panel, [class*="glass-"], article, section {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.glass-card:hover, .glass-panel:hover, [class*="glass-"]:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
}

/* Button hover effects */
button, a[class*="bg-"], a[class*="border-"] {
  transition: all 0.2s ease !important;
}

button:hover, a[class*="bg-"]:hover, a[class*="border-"]:hover {
  transform: translateY(-2px) !important;
}

/* Image hover zoom */
img[class*="object-cover"] {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.group:hover img[class*="object-cover"] {
  transform: scale(1.05) !important;
}

/* Nav link animations */
aside[class*="sticky"] nav a {
  transition: all 0.25s ease !important;
}

aside[class*="sticky"] nav a:hover {
  transform: translateX(8px) !important;
}

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* ===== NAVIGATION ACTIVE STATES ===== */
header a[href="index.html"],
header a[href="programmes.html"],
header a[href="actualite.html"],
header a[href="contact.html"] {
  position: relative;
}

header a[href="index.html"]::after,
header a[href="programmes.html"]::after,
header a[href="actualite.html"]::after,
header a[href="contact.html"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #0066FF;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

header a[href="index.html"]:hover::after,
header a[href="programmes.html"]:hover::after,
header a[href="actualite.html"]:hover::after,
header a[href="contact.html"]:hover::after {
  width: 100%;
}

header a[href="index.html"].active::after,
header a[href="programmes.html"].active::after,
header a[href="actualite.html"].active::after,
header a[href="contact.html"].active::after {
  width: 100%;
}

/* ===== HOME LINK IN SIDEBAR FOR OTHER PAGES ===== */
.sidebar-home-link {
  display: flex !important;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem !important;
  color: #94A3B8 !important;
  border-radius: 0.75rem !important;
  transition: all 0.25s ease !important;
  margin-bottom: 0.5rem !important;
}

.sidebar-home-link:hover {
  background: rgba(0, 102, 255, 0.15) !important;
  color: #60A5FA !important;
  transform: translateX(8px) !important;
}

.sidebar-home-link .material-symbols-outlined {
  font-size: 1.25rem !important;
}

@media (max-width: 1279px) {
  .sidebar-home-link span:not(.material-symbols-outlined) {
    display: none !important;
  }
  .sidebar-home-link {
    justify-content: center !important;
    padding: 0.75rem 0.5rem !important;
  }
}

/* ============================================================
   RESPONSIVE MOBILE - MENU HAMBURGER & LAYOUT
   ============================================================ */

/* ---- Hamburger button (hidden on desktop, visible on mobile) ---- */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 70;
}
.hamburger-btn:hover {
  background: rgba(138, 43, 226, 0.25);
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger-btn.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* ---- Mobile drawer (off-canvas menu) ---- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 80vw;
  max-width: 320px;
  height: 100vh;
  height: 100dvh;
  background: rgba(6, 28, 63, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 65;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 72px 0 32px;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding: 0 8px;
  gap: 2px;
}
.mobile-menu nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: #E2E8F0 !important;
  font-size: 16px;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.mobile-menu nav a:hover,
.mobile-menu nav a.active {
  background: rgba(0, 102, 255, 0.18);
  color: #60A5FA !important;
  border-left-color: #60A5FA;
}
.mobile-menu nav a .material-symbols-outlined {
  font-size: 22px;
}
.mobile-menu .mm-section-title {
  padding: 18px 24px 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.7);
}
.mobile-menu .mm-cta {
  margin: 16px 20px 0;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(90deg, #0066FF, #8A2BE2);
  color: #fff;
  font-weight: 700;
  text-align: center;
  font-size: 14px;
}

/* ---- Overlay backdrop when menu open ---- */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 64;
}
.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ---- Show hamburger only below md (768px) ---- */
@media (min-width: 768px) {
  .hamburger-btn,
  .mobile-menu,
  .mobile-menu-overlay {
    display: none !important;
  }
}

/* ---- Top navbar: align items properly on mobile ---- */
@media (max-width: 767px) {
  header .flex.justify-between {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  header .flex.items-center.gap-8 {
    gap: 0.5rem !important;
  }
  header .text-headline-md {
    font-size: 18px !important;
  }
  header .material-symbols-outlined.text-3xl {
    font-size: 26px !important;
  }
}

/* ---- Container & body lock when menu open ---- */
body.menu-open {
  overflow: hidden;
}

/* ============================================================
   GENERAL RESPONSIVE FIXES
   ============================================================ */

/* ---- Padding utility for mobile main content ---- */
@media (max-width: 767px) {
  main {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  main.pt-24 {
    padding-top: 80px !important;
  }
}

/* ---- Hero sections shrink on mobile ---- */
@media (max-width: 767px) {
  section.h-\[400px\],
  section[class*="h-[400px]"] {
    height: 260px !important;
  }
  section.h-\[500px\],
  section[class*="h-[500px]"] {
    height: 320px !important;
  }
  section.h-\[550px\],
  section[class*="h-[550px]"] {
    height: 340px !important;
  }
  section.h-\[600px\],
  section[class*="h-[600px]"] {
    height: 360px !important;
  }
  section .p-8,
  section .md\:p-8,
  section .p-6,
  section .md\:p-12 {
    padding: 1rem !important;
  }
}

/* ---- Hero text scale down on mobile ---- */
@media (max-width: 767px) {
  .text-display-lg,
  .font-display-lg {
    font-size: 24px !important;
    line-height: 30px !important;
  }
  .text-headline-lg,
  .font-headline-lg {
    font-size: 20px !important;
    line-height: 26px !important;
  }
  .text-headline-md,
  .font-headline-md {
    font-size: 17px !important;
    line-height: 22px !important;
  }
  .text-body-lg,
  .font-body-lg {
    font-size: 14px !important;
    line-height: 20px !important;
  }
  .text-body-md,
  .font-body-md {
    font-size: 13px !important;
    line-height: 19px !important;
  }
}

/* ---- Day picker horizontal scroll on mobile ---- */
@media (max-width: 767px) {
  .custom-scrollbar,
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }
  /* Day picker buttons: more compact */
  .flex.border-b .flex-1 {
    min-width: 52px !important;
    padding: 10px 4px !important;
  }
  .flex.border-b .flex-1 .text-xl {
    font-size: 15px !important;
  }
}

/* ---- TV guide program items: stack vertically on mobile ---- */
@media (max-width: 767px) {
  .divide-y > .flex.items-center {
    flex-wrap: wrap !important;
    padding: 14px 12px !important;
    gap: 8px !important;
  }
  .divide-y > .flex.items-center .w-24 {
    width: auto !important;
    text-align: left !important;
  }
  .divide-y > .flex.items-center .flex-grow {
    width: 100% !important;
    order: 3;
  }
  .divide-y > .flex.items-center .flex-grow .flex.md\:flex-row {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .divide-y > .flex.items-center .w-32 {
    width: 100% !important;
    height: 90px !important;
  }
}

/* ---- Movie carousel cards: smaller on mobile ---- */
@media (max-width: 767px) {
  .flex.overflow-x-auto .flex-shrink-0 {
    width: 150px !important;
  }
}

/* ---- Ticker bar: smaller text on mobile ---- */
@media (max-width: 767px) {
  .news-ticker-text,
  .ticker-move {
    font-size: 10px !important;
    letter-spacing: 0.05em !important;
  }
  .sticky.bottom-0 .bg-hot-pink {
    padding: 0 10px !important;
    font-size: 9px !important;
  }
}

/* ---- Footer responsive: stack columns ---- */
@media (max-width: 767px) {
  footer .flex.md\:flex-row {
    flex-direction: column !important;
    text-align: center !important;
    gap: 24px !important;
    padding: 32px 16px !important;
  }
  footer .flex.flex-wrap {
    justify-content: center !important;
    gap: 16px !important;
  }
  footer img {
    margin: 0 auto !important;
  }
  footer .max-w-xs {
    max-width: 100% !important;
  }
}

/* ---- Grid layouts collapse to single column on mobile ---- */
@media (max-width: 767px) {
  .grid.grid-cols-1.md\:grid-cols-2,
  .grid.grid-cols-1.sm\:grid-cols-2,
  .grid.grid-cols-1.lg\:grid-cols-3,
  .grid.grid-cols-1.lg\:grid-cols-4,
  .grid.grid-cols-1.xl\:grid-cols-12 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .lg\:col-span-3,
  .lg\:col-span-7,
  .lg\:col-span-8,
  .lg\:col-span-9,
  .lg\:col-span-5,
  .xl\:col-span-8,
  .xl\:col-span-4 {
    grid-column: span 1 / span 1 !important;
  }
}

/* ---- TV guide 12-col grid: stack on mobile ---- */
@media (max-width: 1023px) {
  .grid.lg\:grid-cols-12 {
    grid-template-columns: 1fr !important;
  }
  .lg\:col-span-3,
  .lg\:col-span-9 {
    grid-column: span 1 / span 1 !important;
  }
}

/* ---- Buttons: full width & touch-friendly on mobile ---- */
@media (max-width: 767px) {
  button,
  a[class*="bg-"][class*="rounded-full"],
  a[class*="bg-"][class*="rounded-xl"] {
    font-size: 13px !important;
  }
  .glass-panel.flex.items-center.justify-between {
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: center !important;
  }
  .glass-panel.flex.items-center.justify-between .flex.items-center.gap-6 {
    gap: 12px !important;
  }
}

/* ---- Tabs (Aujourd'hui/Demain/Semaine) wrap on mobile ---- */
@media (max-width: 767px) {
  .flex.gap-2.p-1.bg-surface-container {
    width: 100% !important;
    justify-content: space-between !important;
  }
  .flex.gap-2.p-1.bg-surface-container button {
    flex: 1 !important;
    padding: 8px 4px !important;
    font-size: 12px !important;
  }
}

/* ---- Search dropdown full width on mobile ---- */
@media (max-width: 767px) {
  #search-dropdown,
  .absolute.right-0.top-full {
    width: calc(100vw - 32px) !important;
    right: -16px !important;
  }
}

/* ---- Prevent horizontal overflow globally ---- */
@media (max-width: 767px) {
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .max-w-\[1440px\],
  .max-w-\[1600px\],
  .page-container {
    max-width: 100% !important;
    width: 100% !important;
  }
  .shadow-2xl {
    box-shadow: none !important;
  }
}

/* ---- Hero section: ensure usable height on mobile ---- */
@media (max-width: 767px) {
  #hero-section,
  section[class*="aspect-[21/9]"] {
    aspect-ratio: auto !important;
    min-height: 240px !important;
    height: 50vh !important;
    max-height: 320px !important;
  }
}

/* ---- Hide the broken empty second nav button on contact ---- */
@media (max-width: 767px) {
  header .material-symbols-outlined + button:empty,
  header button:empty {
    display: none !important;
  }
}