/**
 * Caràtula del vídeo: la pàgina no arrossega l'iframe de YouTube fins que
 * l'usuari decideix mirar-lo.
 */

.youtube-embed .yt-facade {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  border-radius: var(--radius-lg, 2px);
  background: rgb(var(--brand-primary));
  cursor: pointer;
}

.youtube-embed .yt-facade__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.youtube-embed .yt-facade:hover .yt-facade__poster {
  transform: scale(1.03);
}

.youtube-embed .yt-facade__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(var(--brand-primary) / 0.25);
  transition: background-color 0.3s ease;
}

.youtube-embed .yt-facade:hover .yt-facade__play {
  background: rgb(var(--brand-primary) / 0.1);
}

.youtube-embed .yt-facade__play span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: rgb(var(--brand-accent));
  color: rgb(var(--on-accent, var(--brand-primary)));
  font-size: 2.5rem;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.25);
  transition: transform 0.3s ease;
}

.youtube-embed .yt-facade:hover .yt-facade__play span {
  transform: scale(1.08);
}

.youtube-embed .yt-facade__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.youtube-embed .yt-facade.is-playing {
  cursor: default;
}
