/* ============================================================
   CPULSE.TV — COMPOSANTS RÉUTILISABLES
   Nav, hero, video card, footer, etc.
   ============================================================ */

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: all var(--duration-base) var(--ease-out);
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--nav-border);
}

.nav.scrolled {
  background: var(--nav-bg);
  border-bottom-color: var(--border-strong);
}

/* Pages à fond sombre permanent (Direct, Programme) : la nav suivait le thème clair
   (bandeau crème sur page encre). Détection sans JS via :has() ; les pages peuvent
   aussi poser data-page="dark" sur <html>. Mêmes valeurs que [data-theme="dark"]. */
:root:has(.channels-overview, .epg-hero),
:root[data-page="dark"] {
  --bg-page: var(--ink);
  --bg-section: var(--ink-soft);
  --bg-elevated: #1A1F2E;
  --bg-input: #1F2937;
  --text-page: var(--paper);
  --text-muted: rgba(250, 247, 240, 0.7);
  --text-soft: rgba(250, 247, 240, 0.6);
  --border-page: #1F2937;
  --border-strong: rgba(250, 247, 240, 0.2);
  --border-input: rgba(250, 247, 240, 0.45);
  --nav-bg: rgba(10, 14, 26, 0.85);
  --nav-border: rgba(250, 247, 240, 0.08);
  --accent: var(--sky);
  --gold-text: var(--gold);
  --coral-text: #FF6B6B;
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-page);
  text-transform: uppercase;
}

.nav-brand:hover {
  color: var(--text-page);
}

.nav-logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--cobalt) 0%, var(--coral) 100%);
  color: var(--snow);
  font-weight: 700;
  font-size: var(--text-base);
  position: relative;
  overflow: hidden;
}

.nav-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: rotate(45deg) translate(-50%, -50%) scale(0.4);
  opacity: 0.95;
}

.nav-logo span {
  position: relative;
  z-index: 1;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-page);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;   /* « À propos » passait sur deux lignes à 1280 px */
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: all var(--duration-base) var(--ease-out);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 24px;
}

.nav-link.active {
  color: var(--accent);
}

.nav-link .icon {
  font-size: 1.1em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--text-page);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.5px;
  background: var(--text-page);
  transform: translateX(-50%);
  transition: all var(--duration-base) var(--ease-out);
}

.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 24px; }

.nav-toggle.open span:nth-child(1) { top: 19px; transform: translateX(-50%) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 19px; transform: translateX(-50%) rotate(-45deg); }

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-page);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
  background: var(--bg-elevated);
  transform: rotate(15deg);
}

.theme-toggle .icon {
  font-size: 18px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: opacity var(--duration-fast) var(--ease-out);
}

[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
:root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: block; }
:root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }

/* Mobile menu overlay */
/* .nav porte un backdrop-filter : il devient le bloc conteneur de ses descendants `fixed`.
   Le menu était donc calé sur la nav (hauteur 0) et ses liens flottaient sans fond sur le
   contenu. Positionné en absolu sous la nav (elle-même fixe), il couvre de nouveau l'écran. */
.nav-mobile {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: calc(100vh - var(--nav-height));
  height: calc(100dvh - var(--nav-height));
  overflow-y: auto;
  background: var(--bg-page);
  color: var(--text-page);
  padding: var(--space-8);
  transform: translateY(-100%);
  opacity: 0;
  transition: all var(--duration-base) var(--ease-out);
  pointer-events: none;
  z-index: 99;
}

.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.nav-mobile a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  border-bottom: 1px solid var(--border-page);
  text-transform: uppercase;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--nav-height) + var(--space-12));
  padding-bottom: var(--space-20);
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, #00031c 0%, #0E1230 45%, #1B1245 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 75% 30%, rgba(123, 97, 255, 0.32), transparent 65%),
    radial-gradient(ellipse 60% 40% at 20% 75%, rgba(214, 40, 57, 0.20), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(245, 197, 24, 0.10), transparent 70%);
}

.hero-bg::after {
  /* Subtle grid texture for premium streaming feel */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 80%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-grid > * { min-width: 0; }

.hero-content {
  color: #FFFFFF;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 16px;
  background: #E63946;
  color: #FFFFFF;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  max-width: 100%;
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.35);
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FFFFFF;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  color: #FFFFFF;
  margin-bottom: var(--space-4);
  letter-spacing: -0.04em;
  line-height: 0.92;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 .title-line-1 {
  display: block;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #E63946;   /* coral StreamVid-style */
  margin-bottom: var(--space-2);
}

.hero h1 .title-line-2 {
  display: block;
  font-size: clamp(4rem, 10vw, 9rem);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 0.9;
  background: linear-gradient(135deg, #9e61ff 0%, #E63946 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 .title-line-3 {
  display: block;
  font-size: clamp(4rem, 10vw, 9rem);
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 0.9;
  color: #FFFFFF;
  font-style: italic;
  font-variation-settings: "opsz" 144;
}

.hero-tagline {
  margin-top: var(--space-6);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #E63946;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-10);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-meta strong {
  color: #F5C518;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* StreamVid-style hero CTA — "Streaming Now" gradient pill */
.btn-hero-streaming {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 18px 36px;
  background: linear-gradient(135deg, #7b61ff 0%, #9e61ff 100%);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
  transition: all var(--duration-base) var(--ease-out);
  box-shadow: 0 12px 32px rgba(123, 97, 255, 0.45);
}
.btn-hero-streaming:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #9e61ff 0%, #7b61ff 100%);
  box-shadow: 0 16px 40px rgba(158, 97, 255, 0.55);
  color: #FFFFFF;
}
.btn-hero-streaming img {
  width: 16px; height: 16px;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.5));
}

/* StreamVid-style outline secondary CTA */
.btn-hero-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 16px 32px;
  background: transparent;
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  text-transform: none;
  transition: all var(--duration-base) var(--ease-out);
}
.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

/* ---- Hero collage : multi-images style StreamVid ---- */
.hero-feature {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  perspective: 1200px;
}

.hero-collage {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-collage .tile {
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  transition: transform var(--duration-slow) var(--ease-out);
  background: var(--navy-item);
}

.hero-collage .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-collage .tile.t1 {
  top: 4%; left: 0;
  width: 48%; height: 60%;
  transform: rotate(-3deg);
  z-index: 2;
}
.hero-collage .tile.t2 {
  top: 0; right: 8%;
  width: 42%; height: 48%;
  transform: rotate(4deg);
  z-index: 3;
}
.hero-collage .tile.t3 {
  bottom: 4%; right: 0;
  width: 52%; height: 52%;
  transform: rotate(-2deg);
  z-index: 1;
}

.hero-collage:hover .tile { transform: rotate(0deg) scale(1.02); }
.hero-collage:hover .tile.t2 { transform: rotate(1deg) scale(1.04); }

.hero-collage .tile-label {
  position: absolute;
  bottom: 8px; left: 8px; right: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #FFFFFF;
  background: rgba(0,3,28,0.7);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

/* Legacy single-image hero kept for other pages (watch, etc.) */
.hero-feature-single {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--ink);
}

.hero-feature-single img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.hero-feature-single:hover img {
  transform: scale(1.05);
}

.hero-feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(0, 3, 28, 0.95) 100%);
}

.hero-play {
  position: absolute;
  bottom: var(--space-6);
  left: var(--space-6);
  right: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--paper);
  z-index: 1;
}

.hero-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--main);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  transition: all var(--duration-base) var(--ease-out);
  flex-shrink: 0;
  box-shadow: 0 12px 32px var(--main-glow);
}

.hero-play-btn:hover {
  transform: scale(1.1);
  background: var(--main-2);
}

.hero-play-btn svg {
  width: 20px;
  height: 20px;
  margin-left: 3px;
}

.hero-play-info h4 {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-1);
}

.hero-play-info p {
  color: rgba(250, 247, 240, 0.7);
  font-size: var(--text-sm);
  margin: 0;
}

/* ============================================================
   SECTIONS GÉNÉRIQUES
   ============================================================ */
.section {
  padding: var(--space-24) 0;
  position: relative;
  background: var(--bg-page);
  color: var(--text-page);
  transition: background-color var(--duration-base) var(--ease-out);
}

.section.dark {
  background: #00031c;
  color: #FFFFFF;
}

.section.dark .section-title h2 {
  color: #FFFFFF;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-10);
  gap: var(--space-8);
}

.section-title {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.section-title .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.25em;
  color: #E63946;
}

.section-title .eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: #E63946;
}

.section-title h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-page);
  text-transform: uppercase;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.1;
}

.section-title .accent {
  font-style: normal;
  color: var(--main-2);
}

.section.dark .section-title .accent {
  color: var(--main-2);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-page);
  text-decoration: none;
  white-space: nowrap;
  text-transform: capitalize;
  position: relative;
  transition: color var(--duration-base) var(--ease-out);
}

.section-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) var(--ease-out);
}
.section-link:hover::after { transform: scaleX(1); }
.section-link:hover { color: #9e61ff; }

.section.dark .section-link { color: #FFFFFF; }
.section.dark .section-link:hover { color: #9e61ff; }

.section-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--duration-base) var(--ease-out);
}

.section-link:hover svg {
  transform: translateX(2px);
}

/* ============================================================
   VIDEO CARD
   ============================================================ */
.video-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: transparent;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out);
}

.video-card:hover {
  transform: translateY(-4px);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  margin-bottom: var(--space-4);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms var(--ease-out);
}

.video-card:hover .video-thumb img {
  transform: scale(1.06);
}

.video-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 26, 0) 60%, rgba(10, 14, 26, 0.6) 100%);
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.video-card:hover .video-thumb-overlay {
  opacity: 1;
}

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity var(--duration-base) var(--ease-out);
}

.video-card:hover .video-play {
  opacity: 1;
}

.video-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  display: grid;
  place-items: center;
  transform: scale(0.7);
  transition: all var(--duration-base) var(--ease-out);
}

.video-card:hover .video-play-btn {
  transform: scale(1);
}

.video-play-btn svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.video-duration {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(8px);
  color: var(--snow);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.video-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-3);
  background: var(--coral);
  color: var(--snow);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.video-badge.live {
  background: var(--live);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.video-badge.live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--snow);
  animation: pulse 1.5s ease-in-out infinite;
}

.video-badge.exclusive {
  background: var(--gold);
  color: var(--ink);
}

.video-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.video-cat {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
}

.video-title {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-page);
  letter-spacing: -0.01em;
}

.video-card:hover .video-title {
  color: #9e61ff;
}

.video-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.video-info .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   VIDEO CARD — StreamVid-style poster (clean 2:3)
   No badge, no duration overlay on the image.
   Title in sans-serif bold, meta line mono small below.
   ============================================================ */
.video-card.poster .video-thumb {
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  background: var(--navy-item);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
}
.video-card.poster:hover .video-thumb {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(123, 97, 255, 0.3);
}

.video-card.poster .video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms var(--ease-out);
}
.video-card.poster:hover .video-thumb img {
  transform: scale(1.05);
}

/* StreamVid poster cards: no overlay, no play btn on hover, clean */
.video-card.poster .video-play,
.video-card.poster .video-thumb-overlay,
.video-card.poster .video-badge,
.video-card.poster .video-duration,
.video-card.poster .video-play-btn { display: none !important; }

.video-card.poster .video-title {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-page);
  margin: 0 0 4px;
  text-transform: none;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card.poster:hover .video-title { color: #9e61ff; }

.video-card.poster .video-info {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.video-card.poster .video-cat { display: none; }

/* ============================================================
   VIDEO GRIDS
   ============================================================ */
.video-grid {
  display: grid;
  gap: var(--space-8) var(--space-6);
}

.video-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.video-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.video-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.video-grid.asymmetric {
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
}

.video-grid.asymmetric > :first-child {
  grid-row: span 2;
}

/* ============================================================
   CAROUSEL — StreamVid-style horizontal scroll
   Wrapper: .carousel  Track: .carousel-track  Items: video-card
   ============================================================ */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--space-4);
  margin: 0 calc(-1 * var(--container-pad));
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-track { background: transparent; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.carousel-track > * {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - var(--space-6) * 5) / 6);  /* 6 cards visible on lg */
  min-width: 180px;
}

@media (max-width: 1200px) {
  .carousel-track > * { flex: 0 0 calc((100% - var(--space-6) * 4) / 5); }
}
@media (max-width: 900px) {
  .carousel-track > * { flex: 0 0 calc((100% - var(--space-6) * 3) / 4); }
}
@media (max-width: 640px) {
  .carousel-track > * { flex: 0 0 calc((100% - var(--space-6) * 2) / 3); min-width: 160px; }
}
@media (max-width: 480px) {
  .carousel-track > * { flex: 0 0 60%; min-width: 0; }
}

.carousel-nav {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-page);
  border: 1px solid var(--border-page);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 5;
  opacity: 0;
  transition: all var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-md);
}
.carousel:hover .carousel-nav { opacity: 1; }
.carousel-nav:hover { background: var(--main); color: #FFFFFF; border-color: var(--main); transform: translateY(-50%) scale(1.08); }
.carousel-nav.prev { left: 8px; }
.carousel-nav.next { right: 8px; }
.carousel-nav svg { width: 18px; height: 18px; }
.carousel-nav[disabled] { opacity: 0 !important; pointer-events: none; }

/* ============================================================
   CATEGORY PILLS
   ============================================================ */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-4) 0;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 1px solid var(--border-page);
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-page);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cat-pill:hover {
  border-color: var(--text-page);
  background: var(--text-page);
  color: var(--bg-page);
}

.cat-pill.active {
  background: var(--text-page);
  color: var(--bg-page);
  border-color: var(--text-page);
}

.cat-pill .count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  opacity: 0.7;
}

/* ============================================================
   EDITORIAL BLOCK
   ============================================================ */
.editorial {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-12);
  align-items: center;
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border-page);
  border-bottom: 1px solid var(--border-page);
}

.editorial-image {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
}

.editorial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-content h3 {
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  margin: var(--space-4) 0 var(--space-6);
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.editorial-content .lede {
  margin-bottom: var(--space-8);
}

/* ============================================================
   TICKER / MARQUEE
   ============================================================ */
.ticker {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-3) 0;
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.ticker-track {
  display: flex;
  gap: var(--space-12);
  animation: ticker 40s linear infinite;
  white-space: nowrap;
  will-change: transform;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.ticker-item::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #00031c;
  color: #FFFFFF;
  padding: var(--space-20) 0 var(--space-8);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--main) 0%, var(--main-2) 50%, var(--main) 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: var(--space-10);
  margin-bottom: var(--space-16);
}

.footer-brand-logo {
  font-size: var(--text-2xl) !important;
  margin-bottom: var(--space-4);
}

.footer-brand h4 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  color: #FFFFFF;
  margin-bottom: var(--space-4);
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.65);
  max-width: 36ch;
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.footer-contact {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-2);
}
.footer-contact a {
  color: #9e61ff;
  text-decoration: none;
}
.footer-contact a:hover { color: #FFFFFF; text-decoration: underline; }

.footer-app {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: var(--space-6);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social a {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #FFFFFF;
  transition: all var(--duration-base) var(--ease-out);
}

.footer-social a:hover {
  background: var(--main);
  border-color: var(--main);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--main-glow);
}

.footer-col h5 {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: block;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-sm);
  transition: color var(--duration-fast) var(--ease-out);
  text-decoration: none;
  display: inline-block;
}

.footer-col a:hover {
  color: #9e61ff;
}

.footer-bottom {
  padding-top: var(--space-8);
  border-top: 1px solid rgba(250, 247, 240, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: rgba(250, 247, 240, 0.65);
  flex-wrap: wrap;
}

.footer-bottom a {
  color: rgba(250, 247, 240, 0.7);
}

.footer-bottom a:hover {
  color: var(--gold);
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.search input {
  width: 100%;
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-12);
  border: 1px solid var(--border-input);   /* mist sur crème = 1.2:1, la bordure du champ était invisible */
  border-radius: var(--radius-full);
  background: var(--bg-input);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--text-page);
  transition: all var(--duration-fast) var(--ease-out);
}

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 70, 255, 0.1);
}

.search-icon {
  position: absolute;
  left: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-12); }
  .video-grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .video-grid.asymmetric { grid-template-columns: repeat(2, 1fr); }
  .video-grid.asymmetric > :first-child { grid-row: span 1; grid-column: span 2; }
  .editorial { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: 1 / -1; max-width: 60ch; }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .nav-menu { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-actions .btn { display: none; }

  /* 41 cartes plein écran = page interminable : 2 colonnes compactes (cols-4 / cols-3), 1 colonne pour cols-2 */
  .video-grid.cols-4,
  .video-grid.cols-3 { grid-template-columns: repeat(2, 1fr); gap: var(--space-6) var(--space-3); }
  .video-grid.cols-2 { grid-template-columns: 1fr; }
  .video-grid.cols-4 .video-thumb,
  .video-grid.cols-3 .video-thumb { border-radius: var(--radius-md); margin-bottom: var(--space-3); }
  .video-grid.cols-4 .video-cat,
  .video-grid.cols-3 .video-cat { font-size: 11px; letter-spacing: 0.1em; }
  .video-grid.cols-4 .video-title,
  .video-grid.cols-3 .video-title { font-size: var(--text-base); }
  .video-grid.cols-4 .video-info,
  .video-grid.cols-3 .video-info { font-size: var(--text-xs); flex-wrap: wrap; }

  .video-grid.asymmetric {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .video-grid.asymmetric > :first-child {
    grid-column: span 1;
  }

  .section { padding: var(--space-16) 0; }
  .section-header { flex-direction: column; align-items: flex-start; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .hero-feature { aspect-ratio: 16/9; }

  /* Hero : 980 px de haut à 375 px et boutons à x = 405 → hauteur au contenu, boutons pleine largeur */
  .hero { min-height: auto; padding-top: calc(var(--nav-height) + var(--space-8)); padding-bottom: var(--space-12); }
  .hero-grid { gap: var(--space-8); }
  .hero h1 { font-size: clamp(2.75rem, 13vw, 3.5rem); margin-bottom: var(--space-4); }
  .hero .lede { font-size: var(--text-base); }
  .hero-eyebrow { font-size: 11px; letter-spacing: 0.12em; margin-bottom: var(--space-6); }
  .hero-actions { margin-top: var(--space-6); }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero-meta { gap: var(--space-3) var(--space-5); font-size: var(--text-xs); }
}

/* ============================================================
   CORRECTIFS v2 — contexte d'empilement du hero, nav compacte
   ============================================================ */
.hero { isolation: isolate; }
.mag-hero { isolation: isolate; }
/* À 1280 px : marque 157 + menu 804 + actions 295 + gouttières 96 = 1352 px → « En direct » finissait à x = 1369 */
@media (max-width: 1360px) {
  .nav-inner { gap: var(--space-4); }
  .nav-link { padding: var(--space-2) var(--space-3); }
  .nav-link .icon { display: none; }
  .nav-actions .btn-icon[aria-label="Admin"] { display: none; }   /* l'accès rédaction est déjà dans le footer */
}
@media (max-width: 1240px) {
  .nav-link { font-size: 12px; }
}
@media (max-width: 1000px) {
  .nav-menu { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-actions .btn-primary { display: none; }
}

/* ============================================================
   STREAMVID-STYLE COMPONENTS (refonte 09/2026)
   ============================================================ */

/* ---- Filter chips : pill row avec un actif ---- */
.filter-chips {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.filter-chip:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
}
.filter-chip.active {
  background: var(--main);
  border-color: var(--main);
  color: #FFFFFF;
  box-shadow: 0 4px 16px var(--main-glow);
}
.filter-chip[data-color="coral"].active { background: #E63946; border-color: #E63946; box-shadow: 0 4px 16px rgba(230,57,70,0.4); }
.filter-chip[data-color="gold"].active { background: #F5C518; border-color: #F5C518; color: #000; box-shadow: 0 4px 16px rgba(245,197,24,0.4); }

/* ---- Promo banner : full-width avec overlay ---- */
.promo-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--navy-deep);
  isolation: isolate;
}
.promo-banner-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
}
.promo-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,3,28,0.85) 0%, rgba(0,3,28,0.4) 50%, rgba(0,3,28,0.85) 100%);
}
.promo-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-12) var(--space-16);
  gap: var(--space-10);
  flex-wrap: wrap;
}
.promo-banner-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: #FFFFFF;
}
.promo-banner-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.7);
}
.promo-banner-title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
}
.promo-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 28px;
  background: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  text-transform: capitalize;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
}
.promo-banner-cta:hover {
  background: #FFFFFF;
  color: var(--navy-deep);
}

/* ---- Article cards horizontal : image gauche + texte droite ---- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}
@media (max-width: 900px) { .articles-grid { grid-template-columns: 1fr; } }

.article-card-h {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-5);
  background: transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #FFFFFF;
  text-decoration: none;
  transition: transform var(--duration-base) var(--ease-out);
}
.article-card-h:hover { transform: translateY(-2px); }
.article-card-h-img {
  width: 160px;
  height: 120px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--navy-item);
}
.article-card-h-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
.article-card-h:hover .article-card-h-img img { transform: scale(1.06); }

.article-card-h-body { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.article-card-h-title {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-h-excerpt {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-h-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: auto;
}

/* ---- Top contributeurs : cercles d'avatar ---- */
.contrib-row {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  padding-bottom: var(--space-4);
  margin: 0 calc(-1 * var(--container-pad));
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.contrib-row::-webkit-scrollbar { height: 6px; }
.contrib-row::-webkit-scrollbar-track { background: transparent; }
.contrib-row::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.contrib-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  flex: 0 0 auto;
  width: 120px;
  text-decoration: none;
  color: var(--text-page);
  transition: transform var(--duration-base) var(--ease-out);
}
.contrib-item:hover { transform: translateY(-4px); }

.contrib-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy-item);
  border: 3px solid transparent;
  transition: all var(--duration-base) var(--ease-out);
}
.contrib-avatar img { width: 100%; height: 100%; object-fit: cover; }
.contrib-item:hover ..contrib-avatar { border-color: var(--main); box-shadow: 0 8px 24px var(--main-glow); }

.contrib-name {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-page);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.contrib-role {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-align: center;
}
