/* Onglet « Émissions » du menu principal (voir emissions.js) */

/* Noms d'émission cliquables dans la grille */
.show-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.35);
  text-underline-offset: 3px;
}
.show-link:hover { text-decoration-color: white; }

/* Recherche + filtre */
.emi-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.emi-tools input,
.emi-tools select {
  flex: 1 1 200px;
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.12);
  color: white;
  font-size: 0.92rem;
  font-family: inherit;
}
.emi-tools select option { color: #111; }
.emi-tools input::placeholder { color: rgba(255,255,255,0.55); }
.emi-tools input:focus,
.emi-tools select:focus {
  outline: none;
  border-color: white;
  background: rgba(255,255,255,0.18);
}

/* Fiches : cartes larges, qui occupent toute la largeur de l'écran */
.emi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  text-align: left;
}
.emi-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  scroll-margin-top: 20px;
}
.emi-card.is-flash { animation: emiFlash 2.6s ease; }
@keyframes emiFlash {
  0%, 65% {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.22);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(255,255,255,0);
    background: rgba(255,255,255,0.08);
  }
}
.emi-cover {
  position: relative;
  width: 120px;
  height: 120px;
  flex: none;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.emi-initials {
  font-weight: 800;
  font-size: 2.2rem;
  color: rgba(11,18,32,0.75);
}
.emi-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.emi-head { display: flex; gap: 18px; align-items: center; }
.emi-headtext { min-width: 0; flex: 1; }
.emi-body { width: 100%; }
.emi-dur-inline { color: rgba(255,255,255,0.65); font-size: 0.85em; font-weight: 400; }
.emi-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  color: white;
  overflow-wrap: anywhere;
}
.emi-cat {
  font-size: 0.88rem;
  font-style: italic;
  color: rgba(255,255,255,0.6);
  margin: 4px 0 10px;
}
.emi-dur {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  color: white;
  font-style: normal;
  font-weight: 600;
  font-size: 0.82rem;
}
.emi-desc {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.88);
  margin-bottom: 10px;
  white-space: pre-line;
}
.emi-desc-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 3px;
}
.emi-sched {
  list-style: none;
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
}
.emi-sched strong { font-weight: 700; color: white; }
.emi-note { color: rgba(255,255,255,0.6); }
.emi-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #7dd3fc;
  text-decoration: none;
}
.emi-link:hover { text-decoration: underline; }
.emi-empty {
  padding: 20px 4px;
  color: rgba(255,255,255,0.7);
  font-style: italic;
}

@media (min-width: 900px) {
  .emi-grid {
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 20px;
  }
  .emi-card { padding: 22px; gap: 16px; }
  .emi-head { gap: 22px; }
  .emi-cover { width: 150px; height: 150px; }
  .emi-initials { font-size: 3rem; }
  .emi-title { font-size: 1.4rem; }
  .emi-cat { font-size: 0.95rem; }
  .emi-desc { font-size: 1.05rem; }
  .emi-sched { font-size: 1rem; }
}
@media (min-width: 1300px) {
  .emi-grid { grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); }
  .emi-cover { width: 170px; height: 170px; }
  .emi-title { font-size: 1.55rem; }
  .emi-desc { font-size: 1.12rem; }
  .emi-sched { font-size: 1.08rem; }
}
@media (max-width: 480px) {
  .emi-card { padding: 14px; gap: 14px; }
  .emi-cover { width: 104px; height: 104px; }
  .emi-initials { font-size: 1.8rem; }
  .emi-title { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .emi-card.is-flash { animation: none; box-shadow: 0 0 0 3px rgba(255,255,255,0.9); }
}

/* Pages Programmes et Émissions : sur grand écran, la page s'élargit comme la
   page Partenaires, pour occuper toute la largeur. */
@media (min-width: 900px) {
  .card:has(#tab-emissions.is-active),
  .card:has(#tab-programmes.is-active) {
    max-width: none;
    padding-left: 40px;
    padding-right: 40px;
  }
  body:has(#tab-emissions.is-active) .side-deco,
  body:has(#tab-programmes.is-active) .side-deco { display: none; }
  #tab-programmes .day-tabs { justify-content: center; }
}
@media (min-width: 1500px) {
  #tab-programmes .programmes-list {
    column-count: 2;
    column-gap: 64px;
    max-height: none;
    overflow: visible;
  }
  #tab-programmes .programmes-row { break-inside: avoid; }
}
@media (min-width: 2300px) {
  #tab-programmes .programmes-list { column-count: 3; }
}

/* Liens saisis dans l'administration et liens dans les descriptions */
.emi-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.emi-ext {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.emi-ext:hover { background: rgba(255,255,255,0.2); }
.emi-inline-link { color: #7dd3fc; text-decoration: underline; overflow-wrap: anywhere; }

/* Lecteur « En ce moment » : cliquable quand une émission est à l'antenne */
.now-playing-more { display: none; }
.now-playing.is-link { cursor: pointer; transition: background 0.15s ease; }
.now-playing.is-link:hover { background: rgba(255,255,255,0.2); }
.now-playing.is-link .now-playing-text {
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.5);
  text-underline-offset: 5px;
}
.now-playing.is-link .now-playing-more {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #7dd3fc;
}

/* Description longue : repliée à 10 lignes, suite sur demande */
.emi-desc.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  line-clamp: 10;
  overflow: hidden;
}
.emi-more {
  background: none;
  border: none;
  padding: 0;
  margin: -4px 0 10px;
  font: inherit;
  font-weight: 600;
  color: #7dd3fc;
  cursor: pointer;
}
.emi-more:hover { text-decoration: underline; }
.emi-more[hidden] { display: none; }

/* Pochette non carrée : image entière, sans rognage */
.emi-cover.is-contain { background: #fff !important; }
.emi-cover.is-contain img { object-fit: contain; padding: 8px; box-sizing: border-box; }
.emi-cover.is-contain .emi-initials { display: none; }
