/* ============================================================
   Troubleshoot Videos — page-only styles
   ============================================================ */

.tv-videos-page {
  background: var(--voir-white, #ffffff);
  color: var(--voir-black, #050505);
}

/* ---------- Hero (vos-hero pattern, image bg) ---------- */

.tv-videos-page > .vos-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  height: 100svh;
  padding-top: calc(var(--header-h, 4.5rem) + 1.25rem);
  padding-bottom: clamp(2.5rem, 7vh, 5rem);
  overflow: hidden;
  background-color: #1a1714;
  color: #ffffff;
  box-sizing: border-box;
}

.tv-videos-page > .vos-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.22) 45%,
    rgba(0, 0, 0, 0.08) 72%,
    transparent 100%
  );
}

.tv-videos-page > .vos-hero img.vos-hero__bg {
  border-radius: 0;
  object-position: center center;
}

.tv-videos-page .vos-hero__title {
  max-width: 14ch;
}

.tv-videos-page .vos-hero__body {
  max-width: 32rem;
  margin-bottom: 0;
}

/* ---------- Filters ---------- */

.tv-videos-guides {
  padding-block: 0 clamp(3.5rem, 7vw, 5.5rem);
}

.tv-videos-filters {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin-bottom: clamp(3rem, 6vw, 4rem);
}

.tv-videos-filters__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: min(100%, 260px);
  width: 280px;
}

.tv-videos-filters__label {
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
}

/* Custom filter dropdown (header-style open animation) */
.tv-filter-dd {
  position: relative;
  width: 100%;
}

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

.tv-filter-dd__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.35rem;
  padding: 0.95rem 1.25rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  color: #111111;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.tv-filter-dd__trigger:hover {
  border-color: rgba(0, 0, 0, 0.22);
}

.tv-filter-dd.is-open .tv-filter-dd__trigger,
.tv-filter-dd__trigger:focus-visible {
  outline: none;
  border-color: var(--voir-orange, #ff6a00);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.12);
}

.tv-filter-dd__value {
  flex: 1;
  min-width: 0;
}

.tv-filter-dd__caret {
  flex-shrink: 0;
  display: block;
  opacity: 0.7;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.tv-filter-dd.is-open .tv-filter-dd__caret {
  transform: rotate(180deg);
  opacity: 1;
}

.tv-filter-dd__menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transform-origin: top center;
  transition:
    opacity 240ms ease,
    transform 240ms ease,
    visibility 240ms;
}

.tv-filter-dd.is-open .tv-filter-dd__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.tv-filter-dd__option {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-family: var(--font-sans, "Manrope", sans-serif);
  font-size: 0.9rem;
  color: #111111;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tv-filter-dd__option:hover,
.tv-filter-dd__option:focus-visible {
  outline: none;
  background: rgba(0, 0, 0, 0.04);
}

.tv-filter-dd__option.is-selected {
  background: rgba(255, 106, 0, 0.1);
  color: var(--voir-black, #050505);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .tv-filter-dd__menu,
  .tv-filter-dd__caret,
  .tv-filter-dd__trigger,
  .tv-filter-dd__option {
    transition: none;
  }

  .tv-filter-dd.is-open .tv-filter-dd__menu {
    transform: none;
  }
}

.tv-videos-guides__header {
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

.tv-videos-guides__header .section-title {
  margin-top: 0.35rem;
}

/* ---------- Carousel ---------- */

.tv-videos-carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.5rem, 1.2vw, 1rem);
  padding-inline: max(0.5rem, 1vw);
}

.tv-videos-carousel__viewport {
  overflow: hidden;
  width: 100%;
  touch-action: pan-y;
  cursor: grab;
}

.tv-videos-carousel__viewport.is-dragging {
  cursor: grabbing;
}

.tv-videos-carousel__track {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.1rem, 2vw, 1.75rem);
  width: max-content;
  will-change: transform;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.tv-videos-carousel__track.is-instant {
  transition: none;
}

.tv-videos-carousel__nav {
  flex-shrink: 0;
  align-self: start;
  margin-top: calc(clamp(170px, 12.5vw, 200px) / 2 - 1.375rem);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #ffffff;
  color: var(--voir-black, #050505);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  z-index: 3;
}

.tv-videos-carousel__nav:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.45);
}

.tv-videos-carousel__nav:focus-visible {
  outline: 2px solid var(--voir-orange, #ff6a00);
  outline-offset: 3px;
}

.tv-videos-carousel__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.tv-videos-carousel__nav svg {
  display: block;
}

.tv-videos-carousel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  margin-top: clamp(1.75rem, 3.5vw, 2.5rem);
  padding-inline: 1rem;
}

.tv-videos-carousel__dot {
  width: 1.65rem;
  height: 3px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease;
}

.tv-videos-carousel__dot.is-active {
  background: var(--voir-black, #050505);
  width: 2.15rem;
}

.tv-videos-carousel__dot:focus-visible {
  outline: 2px solid var(--voir-orange, #ff6a00);
  outline-offset: 3px;
}

.tv-videos-carousel .conv-card[hidden] {
  display: none !important;
}

/* ---------- YouTube section ---------- */

.tv-videos-youtube {
  padding-block: clamp(2.5rem, 5vw, 3.5rem) clamp(4rem, 8vw, 6rem);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.tv-videos-youtube__header {
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

.tv-videos-youtube__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
}

.tv-videos-yt-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tv-videos-yt-card__embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #111111;
}

.tv-videos-yt-card__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.tv-videos-yt-card__title {
  margin: 0;
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: clamp(0.98rem, 1.15vw, 1.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--voir-black, #050505);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .tv-videos-youtube__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .tv-videos-filters {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .tv-videos-filters__field {
    width: 100%;
    min-width: 0;
  }

  .tv-videos-carousel {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .tv-videos-carousel__nav {
    display: none;
  }

  .tv-videos-carousel__viewport {
    padding-inline: max(1.25rem, 4vw);
  }

  .tv-videos-youtube__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tv-videos-carousel__track {
    transition: none;
    will-change: auto;
  }
}
