/* ============================================================
   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, var(--ink) 0%, var(--royal) 50%, var(--cobalt-deep) 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 70% 40%, rgba(245, 197, 24, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(230, 57, 70, 0.15), transparent);
}

.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; }   /* sans ça la colonne texte mesurait 406 px à 375 px */

.hero-content {
  color: var(--paper);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: rgba(245, 197, 24, 0.1);
  border: 1px solid rgba(245, 197, 24, 0.3);
  border-radius: var(--radius-full);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  max-width: 100%;
}

.hero-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  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: var(--paper);
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 600;
  margin-bottom: var(--space-6);
  letter-spacing: -0.04em;
}

.hero h1 .accent {
  display: inline-block;
  color: var(--gold);
  font-style: italic;
  font-variation-settings: "opsz" 144;
}

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

.hero-meta strong {
  color: var(--gold);
  font-weight: 600;
}

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

.hero-feature {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--ink);
}

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

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

.hero-feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(10, 14, 26, 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(--gold);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: all var(--duration-base) var(--ease-out);
  flex-shrink: 0;
}

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

.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: var(--ink);
  color: var(--paper);
}

.section.dark .section-title h2 {
  color: var(--paper);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-12);
  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;
}

.section-title .eyebrow::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.section.dark .section-title .eyebrow::before {
  background: var(--gold);
}

.section-title h2 {
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text-page);
  text-transform: uppercase;
}

.section-title .accent {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144;
}

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

.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--text-page);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
  color: var(--text-page);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section.dark .section-link {
  border-color: var(--paper);
  color: var(--paper);
}

.section-link:hover {
  background: var(--text-page);
  color: var(--bg-page);
  transform: translateX(4px);
}

.section.dark .section-link:hover {
  background: var(--paper);
  color: var(--ink);
}

.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-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.25;
  color: var(--text-page);
  letter-spacing: -0.015em;
}

.video-card:hover .video-title {
  color: var(--accent);
}

.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 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;
}

/* ============================================================
   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: var(--ink);
  color: var(--paper);
  padding: var(--space-20) 0 var(--space-8);
  position: relative;
  overflow: hidden;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}

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

.footer-brand p {
  color: rgba(250, 247, 240, 0.7);
  max-width: 32ch;
  margin-bottom: var(--space-6);
}

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

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

.footer-social a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  transform: translateY(-2px);
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-col h5 .icon {
  font-size: 1.1em;
}

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

.footer-col a {
  color: rgba(250, 247, 240, 0.7);
  font-size: var(--text-sm);
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-col a { display: inline-flex; align-items: center; gap: 10px; }
.footer-col .footer-ico { display: inline-flex; width: 16px; height: 16px; flex-shrink: 0; opacity: 0.6; transition: opacity var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
.footer-col .footer-ico svg { width: 16px; height: 16px; }
.footer-col a:hover .footer-ico { opacity: 1; }
.footer-col .footer-ch { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; background: var(--c, var(--cobalt)); color: #fff; font-family: var(--font-mono); font-size: 10px; font-weight: 700; line-height: 1; }
.footer-col a[href*="ch=cp2"] .footer-ch { color: var(--ink); }

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

.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; }
}
