/* Web TV — Le Journal du Phoenix
   Charte reprise du site principal : fond #0a0a0a, header #1a1a1a, primaire #d71920 */

:root {
  --bg: #0a0a0a;
  --bg-raised: #141414;
  --header: #1a1a1a;
  --primary: #d71920;
  --primary-dark: #b3141a;
  --text: #ffffff;
  --muted: #b8b8b8;
  --faint: #8a8a8a;
  --line: #333333;
  --max: 1180px;
  --nav-h: 4.5rem;
  --font: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: Poppins, Montserrat, "Avenir Next", "Segoe UI", sans-serif;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--primary);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--nav-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand:hover {
  color: inherit;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #e6e6e6;
  border-radius: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-kicker {
  font-family: var(--display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.nav-toggle {
  margin-left: auto;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.15rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 1.05rem;
  background: var(--primary);
  color: #fff;
  line-height: 1;
}

.btn:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
}

.btn-ghost:hover {
  background: #fff;
  color: var(--bg);
}

.header-cta {
  margin-left: 0.5rem;
  white-space: nowrap;
}

.nav-backdrop {
  display: none;
}

/* Hero */

.hero {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 0.85rem;
}

.eyebrow::before {
  content: "";
  width: 3px;
  height: 0.85rem;
  background: var(--primary);
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 38rem;
  margin: 0 0 1.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

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

.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
  width: 100%;
  padding: 0;
}

.play::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08) 55%);
}

.play-icon {
  position: relative;
  width: 4.1rem;
  height: 4.1rem;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.play-icon::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 16px;
  border-color: transparent transparent transparent var(--primary);
}

.play:hover .play-icon,
.play:focus-visible .play-icon {
  transform: scale(1.05);
}

.play:focus-visible {
  box-shadow: none;
}

.play:focus-visible .play-icon {
  box-shadow: var(--focus);
}

.hero-media-label {
  margin: 0.75rem 0 0;
}

.hero-media-label strong {
  display: block;
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.3;
}

.hero-media-label span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: var(--faint);
}

/* Sections */

.section {
  padding: 3.25rem 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.section h2 {
  font-family: var(--display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.section h2::before {
  content: "";
  width: 3px;
  height: 1rem;
  background: var(--primary);
}

.section-note {
  color: var(--faint);
  font-size: 0.85rem;
  margin: 0;
}

/* Featured */

.featured {
  display: grid;
  gap: 1.25rem;
}

.feature-main h3,
.video-card h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0.75rem 0 0.4rem;
}

.tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-family: var(--display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
}

.meta {
  color: var(--faint);
  font-size: 0.82rem;
  margin: 0 0 0.55rem;
}

.excerpt {
  color: var(--muted);
  margin: 0 0 1rem;
}

.side-list {
  display: grid;
  gap: 1rem;
}

.side-item {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.side-item h3 {
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.3;
  margin: 0.35rem 0 0.25rem;
}

.side-item .play-icon {
  width: 2.6rem;
  height: 2.6rem;
}

.side-item .play-icon::after {
  border-width: 6px 0 6px 10px;
  margin-left: 3px;
}

/* Latest */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.filter-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.filter-btn[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
}

.video-grid {
  display: grid;
  gap: 1.35rem;
  grid-template-columns: 1fr;
}

.video-card h3 {
  font-size: 1.05rem;
}

.video-card .play-icon {
  width: 3.1rem;
  height: 3.1rem;
}

.duration {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 1;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
}

.demo-flag {
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  z-index: 1;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid var(--line);
  color: #ddd;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.18rem 0.4rem;
}

.empty-state {
  color: var(--muted);
  padding: 1.5rem 0;
}

.section-cta {
  margin-top: 1.75rem;
}

/* Programs */

.program-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.program {
  background: var(--bg);
  padding: 1.15rem 1.1rem;
}

.program h3 {
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

.program p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* About */

.about {
  display: grid;
  gap: 1.25rem;
}

.about p {
  color: var(--muted);
  margin: 0 0 1rem;
  max-width: 42rem;
}

/* Social */

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.social-empty {
  color: var(--faint);
  margin: 0;
}

/* Footer */

.site-footer {
  background: var(--header);
  padding: 2.5rem 0 1.4rem;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  margin-bottom: 0.85rem;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  background: #e6e6e6;
  border-radius: 4px;
}

.site-footer h2 {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}

.site-footer p,
.site-footer li {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.35rem;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
  padding-top: 1.1rem;
  color: var(--faint);
  font-size: 0.82rem;
}

.legal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.legal a {
  color: var(--faint);
  text-decoration: none;
}

.legal a:hover {
  color: #fff;
}

/* Modal */

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.modal-dialog {
  position: relative;
  width: min(960px, 100%);
  background: #000;
  border: 1px solid var(--line);
}

.modal-close {
  position: absolute;
  top: -2.6rem;
  right: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 0.85rem;
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.35rem 0.2rem;
}

.player {
  aspect-ratio: 16 / 9;
  background: #000;
}

.player iframe,
.player video {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-error {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
}

body.modal-open {
  overflow: hidden;
}

/* 404 */

.page-error {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1rem;
}

.page-error h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.75rem;
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Layout breakpoints */

@media (min-width: 720px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
  }

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

  .program-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .nav-toggle,
  .nav-backdrop {
    display: none;
  }

  .site-nav {
    margin-left: auto;
  }

  .featured {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: start;
  }

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

  .program-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 959px) {
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 41;
    height: 100vh;
    width: min(20rem, 86vw);
    background: var(--header);
    border-left: 1px solid var(--line);
    padding: 5rem 1.25rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
  }

  .site-nav.is-open {
    transform: none;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
  }

  .header-cta {
    margin: 0.75rem 0 0;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    border: 0;
    padding: 0;
    z-index: 39;
  }

  .nav-backdrop[hidden] {
    display: none;
  }

  .site-header {
    z-index: 40;
  }
}
