/*
 * Lecteur des podcasts (voir inc/podcast-player.php et js/podcast-player.js)
 * Encadré par un filet gris (css/drapiers.css), Helvetica — dans le style du site.
 */

.podcast {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "body" "controls";
  column-gap: 16px;
  margin: 1.5rem 0 1.75rem;
  padding: 16px;
}
.podcast.has-thumb {
  grid-template-columns: 88px minmax(0, 1fr);
  grid-template-areas: "thumb body" "thumb controls";
}
.podcast__thumb {
  grid-area: thumb;
  width: 88px;
  height: 88px;
  object-fit: cover;
  display: block;
}
.podcast__body { grid-area: body; min-width: 0; }
.podcast__audio, .podcast__controls { grid-area: controls; }
.podcast__body p { margin: 0; }

/* Textes : uniquement des styles déjà présents sur le site
   - titre : comme les intertitres en gras du contenu (« Visites avec l'artiste ») ;
   - détails : texte courant, hérité ;
   - temps : comme les dates des événements. */
.podcast__title { font-family: "HelveticaNeueLTPro-Md", "Helvetica Neue", Helvetica, Arial, sans-serif; }

.podcast__audio { width: 100%; margin-top: 10px; }

/* Contrôles */
.podcast__controls {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.podcast__controls[hidden] { display: none; }

.podcast__play {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #000;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: opacity .2s;
}
.podcast__play:hover { opacity: .75; }
.podcast__play:focus { outline: none; box-shadow: none; }
.podcast__play:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.podcast__play svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.podcast__icon-play { transform: translateX(1px); } /* centrage optique du triangle */
.podcast__icon-pause,
.podcast.is-playing .podcast__icon-play { display: none !important; }
.podcast.is-playing .podcast__icon-pause { display: block !important; }
.podcast.is-loading .podcast__play { opacity: .6; }

/* Barre de position : filet de 2 px, partie écoulée en noir, boule centrée sur le filet */
.podcast__seek {
  --pct: 0%;
  flex: 1 1 auto;
  min-width: 60px;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.podcast__seek:focus { outline: none; }
.podcast__seek::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, #000 var(--pct), #ccc var(--pct));
}
.podcast__seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #000;
}
.podcast__seek::-moz-range-track { height: 2px; background: #ccc; }
.podcast__seek::-moz-range-progress { height: 2px; background: #000; }
.podcast__seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #000;
}
.podcast__seek:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #000; }
.podcast__seek:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #000; }

.podcast__time {
  flex: 0 0 auto;
  font-family: "HelveticaNeueLTStd-Lt", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Téléphone : vignette + infos côte à côte, contrôles sur toute la largeur en dessous */
@media (max-width: 575.98px) {
  .podcast.has-thumb {
    grid-template-columns: 64px minmax(0, 1fr);
    grid-template-areas: "thumb body" "controls controls";
    column-gap: 12px;
  }
  .podcast { padding: 12px; }
  .podcast__thumb { width: 64px; height: 64px; }
  .podcast__seek { height: 32px; } /* zone de toucher plus haute */
}

/* Détails (légende du média) : style des dates du site (Lt, 0,9 rem), plus discret que le titre */
.podcast__details {
  margin-top: 2px !important;
  font-family: "HelveticaNeueLTStd-Lt", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: .9rem;
  line-height: 1.4;
}
