/**
 * Page Médias (tpl-medias.php) - loaded only on this template (library/medias.php)
 */

/* Lightweight YouTube player
   ========================================================================== */
.yt-facade {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000; }

.yt-facade--portrait {
  aspect-ratio: 9 / 16; }

.yt-facade__link,
.yt-facade__iframe {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0; }

.yt-facade__link:focus-visible {
  outline: 3px solid #eb9e2f;
  outline-offset: -3px; }

.yt-facade__thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-in-out; }

.yt-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4.5rem;
  height: 4.5rem;
  margin: -2.25rem 0 0 -2.25rem;
  border-radius: 50%;
  background: rgba(203, 83, 59, 0.92);
  box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease-in-out, transform 0.3s ease-in-out; }
  .yt-facade__play::after {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -0.75rem 0 0 -0.4375rem;
    border-style: solid;
    border-width: 0.75rem 0 0.75rem 1.25rem;
    border-color: transparent transparent transparent #fff;
    content: ''; }

/* Shorts covers carry their title in the middle : play button in the bottom left corner */
.yt-facade--portrait .yt-facade__play {
  top: auto;
  bottom: 0.625rem;
  left: 0.625rem;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0; }
  .yt-facade--portrait .yt-facade__play::after {
    margin: -0.625rem 0 0 -0.3125rem;
    border-width: 0.625rem 0 0.625rem 1rem; }

.yt-facade__link:hover .yt-facade__thumb,
.yt-facade__link:focus-visible .yt-facade__thumb {
  transform: scale(1.03); }

.yt-facade__link:hover .yt-facade__play,
.yt-facade__link:focus-visible .yt-facade__play {
  background: #383838;
  transform: scale(1.08); }

.yt-facade__duration {
  position: absolute;
  right: 0.625rem;
  bottom: 0.625rem;
  padding: 0.25rem 0.375rem 0.125rem;
  border-radius: 0.1875rem;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2; }

@media (prefers-reduced-motion: reduce) {
  .yt-facade__thumb,
  .yt-facade__play {
    transition: none; }
  .yt-facade__link:hover .yt-facade__thumb,
  .yt-facade__link:focus-visible .yt-facade__thumb,
  .yt-facade__link:hover .yt-facade__play,
  .yt-facade__link:focus-visible .yt-facade__play {
    transform: none; } }

/* Layout
   ========================================================================== */
.medias-section {
  margin-top: 4rem; }

.medias-title {
  margin: 0 0 1.875rem;
  color: #c64438;
  line-height: 1.4;
  text-transform: uppercase; }
  .medias-title::before {
    content: '// ';
    content: '// ' / ''; }

/* Intro */
.medias-intro h1 {
  margin-bottom: 2rem;
  line-height: 1.15; }
  @media screen and (max-width: 49.99875em) {
    .medias-intro h1 {
      font-size: 1.625rem; } }

.medias-intro__text {
  max-width: 50rem; }
  .medias-intro__text p {
    line-height: 1.6; }
  .medias-intro__text a {
    text-decoration: underline;
    text-underline-offset: 0.1875rem; }

.medias-intro__lead {
  font-size: 1.125rem; }

/* Emission */
.medias-emission__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.875rem; }
  @media print, screen and (min-width: 64em) {
    .medias-emission__grid {
      grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
      align-items: start;
      gap: 2.5rem; } }

.medias-emission__player {
  margin: 0; }

.medias-emission__caption {
  margin-top: 0.9375rem;
  font-size: 0.875rem;
  line-height: 1.5; }
  .medias-emission__caption strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem; }

/* Chapters */
.medias-chapters {
  padding: 1.5rem 1.5rem 0.75rem;
  background: #f5f5f5; }

.medias-chapters__title {
  margin-bottom: 0.75rem;
  font-size: 1rem; }

.medias-chapters__list {
  margin: 0;
  padding: 0;
  list-style: none; }
  .medias-chapters__list li {
    margin: 0;
    padding: 0;
    border-top: 1px solid #e0e0de; }
    .medias-chapters__list li:first-child {
      border-top: 0; }

.medias-chapters__link {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  color: #383838;
  font-size: 0.875rem;
  line-height: 1.4; }
  .medias-chapters__link time {
    flex: 0 0 auto;
    min-width: 3.2em;
    color: #cb533b;
    font-weight: 700;
    font-variant-numeric: tabular-nums; }
  .medias-chapters__link:hover, .medias-chapters__link:focus-visible {
    color: #cb533b; }

/* Shorts : horizontal scroll on mobile, 3 columns from medium */
.medias-shorts__list {
  display: flex;
  gap: 1rem;
  margin: 0 -0.625rem;
  padding: 0 0.625rem 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 0.625rem;
  -webkit-overflow-scrolling: touch; }
  @media print, screen and (min-width: 50em) {
    .medias-shorts__list {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1.875rem;
      max-width: 62.5rem;
      margin: 0 auto;
      padding: 0;
      overflow: visible; } }

.medias-short {
  flex: 0 0 72%;
  max-width: 18.75rem;
  scroll-snap-align: start; }
  @media print, screen and (min-width: 50em) {
    .medias-short {
      max-width: none; } }

.medias-short__title {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  line-height: 1.4; }

/* YouTube channel */
.medias-channel {
  margin-bottom: 1rem; }

.medias-channel__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 2.5rem 1.25rem;
  border-top: 3px solid #cb533b;
  background: #f5f5f5;
  text-align: center; }
  .medias-channel__box p {
    max-width: 36rem;
    margin: 0; }

.medias-channel__icon {
  color: #cb533b;
  font-size: 2.5rem;
  line-height: 1; }
