/* =============================================================
   RigarduMás Core — En Direct CSS
   Reprend le design du bloc EN DIRECT existant,
   unifié avec le design system catalogue
   ============================================================= */

.rgd-live {
  --card:    rgba(0,0,0,.55);
  --stroke:  rgba(255,255,255,.10);
  --text:    #f8f8f8;
  --muted:   rgba(255,255,255,.68);
  --accent:  #FF3B6B;
  --yellow:  #FFD166;
  --radius:  18px;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
}

/* Top */
.rgd-live__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 4px 0 14px;
}

.rgd-live__eyebrow {
  font-family: 'Syne', sans-serif;
  font-weight: 900;
  letter-spacing: .06em;
  font-size: 26px;
  font-style: italic;
}

/* Tabs */
.rgd-live__tabs {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 10px;
}

.rgd-live__tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.7);
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 10px 2px;
  cursor: pointer;
  position: relative;
  font-size: 14px;
}

.rgd-live__tab.is-active { color: #fff; }
.rgd-live__tab.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -11px;
  height: 3px;
  background: var(--accent);
  border-radius: 999px;
}
.rgd-live__tab:disabled { opacity: .35; cursor: default; }

.rgd-live__meta { font-size: 12px; color: var(--muted); }
.rgd-live__note { opacity: .6; }

/* Filtres pills */
.rgd-live__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 16px;
}

.rgd-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: .15s ease;
}

.rgd-pill.is-active {
  border-color: rgba(255,59,107,.55);
  box-shadow: 0 0 0 2px rgba(255,59,107,.18) inset;
  color: var(--accent);
}

/* Loading */
.rgd-live__loading {
  grid-column: 1 / -1;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Grid */
.rgd-live__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1100px) { .rgd-live__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .rgd-live__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .rgd-live__grid { grid-template-columns: 1fr; } }

/* Card */
.rgd-card {
  text-decoration: none;
  color: inherit;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  min-height: 260px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.rgd-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0,0,0,.4);
  border-color: rgba(255,255,255,.14);
}

.rgd-card__media {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: rgba(255,255,255,.04);
}

.rgd-card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center 35%;
  display: block;
  background: #0A0A0F;
}
@media (max-width: 768px) { .rgd-card__img { height: 190px; } }
@media (max-width: 520px)  { .rgd-card__img { height: 180px; } }

/* Logo */
.rgd-card__logo {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 4px 12px rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.rgd-card__logo img { width: 80%; height: 80%; object-fit: contain; }

/* Body */
.rgd-card__body {
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.rgd-card__title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rgd-card__sub {
  font-size: 12px;
  color: rgba(255,255,255,.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rgd-card__bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.rgd-card__bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #FF7A3B);
  border-radius: 999px;
  transition: width .6s ease;
}

.rgd-card__meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

/* =============================================================
   En Direct — Mobile list mode type Canal+
   ============================================================= */
@media (max-width: 768px) {

  .rgd-live__grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .rgd-card {
    min-height: 0;
    height: 96px;
    flex-direction: row;
    border-radius: 14px;
    overflow: hidden;
  }

  .rgd-card__media {
    width: 138px;
    min-width: 138px;
    height: 100%;
    flex-shrink: 0;
  }

  .rgd-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .rgd-card__logo {
    left: 8px;
    top: 8px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .rgd-card__body {
    min-width: 0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 6px;
    overflow: hidden;
  }

  .rgd-card__title {
    font-size: 13px;
    line-height: 1.22;
    margin: 0;
    min-height: 32px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .rgd-card__sub {
    display: none;
  }

  .rgd-card__bar {
    height: 3px;
    margin-top: auto;
  }

  .rgd-card__meta {
    font-size: 10px;
    gap: 8px;
    align-items: center;
  }

  .rgd-card__meta span {
    min-width: 0;
    white-space: nowrap;
  }

  .rgd-card,
  .rgd-card * {
    -webkit-tap-highlight-color: transparent;
  }

  .rgd-card {
    touch-action: pan-y;
  }
}

/* iPhone étroit */
@media (max-width: 520px) {

  .rgd-live__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .rgd-live__tabs {
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .rgd-live__tabs::-webkit-scrollbar {
    display: none;
  }

  .rgd-live__filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .rgd-live__filters::-webkit-scrollbar {
    display: none;
  }

  .rgd-pill {
    flex: 0 0 auto;
    padding: 9px 12px;
    font-size: 11px;
  }

  .rgd-card {
    height: 96px;
  }

  .rgd-card__media {
    width: 126px;
    min-width: 126px;
  }

  .rgd-card__body {
    padding: 9px 10px;
    gap: 5px;
  }

  .rgd-card__title {
    font-size: 12px;
    line-height: 1.2;
    min-height: 30px;
  }

  .rgd-card__meta {
    font-size: 9px;
  }
}

/* Anti faux touch iOS */
.rgd-card {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: pointer;
}

.rgd-card__media,
.rgd-card__body {
  pointer-events: none;
}

.rgd-card__tooltip,
.rgd-card__tooltip * {
  pointer-events: auto;
}

/* ── Lien "Programme TV" (remplace le bouton disabled) ── */
.rgd-live__tab--link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.rgd-live__tab--link:hover {
  color: #fff;
}
