/* ==========================================================
   Archive Radio Arménie (override du thème Massively-Nicolian)
   ========================================================== */

/* --- Menu déroulant : longues listes de rubriques --- */
#nav .nav__submenu {
  max-height: 75vh;
  overflow-y: auto;
}
/* Plus de 12 rubriques : 2 colonnes ; plus de 24 : 3 colonnes */
#nav .nav__submenu:has(> li:nth-child(13)) {
  column-count: 2;
  column-gap: 0;
  width: min(38rem, 90vw);
}
#nav .nav__submenu:has(> li:nth-child(25)) {
  column-count: 3;
  width: min(54rem, 92vw);
}
#nav .nav__submenu li {
  break-inside: avoid;
}
#nav ul.links .nav__submenu li a {
  white-space: normal;      /* les longs titres passent à la ligne */
  line-height: 1.35;
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
}

/* --- Mobile : panneau latéral --- */
#navPanel .links .nav__submenu li a {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
}

/* --- Page d'une rubrique : liste groupée par année --- */
.archive-list {
  text-align: left;
}
.archive-list__year {
  font-size: 1.4rem;
  margin: 2rem 0 0.5rem 0;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}
.archive-list__year:first-child {
  margin-top: 0;
}
.archive-list__items {
  list-style: none;
  margin: 0 0 1rem 0;
  padding: 0;
}
.archive-list__item {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  line-height: 1.4;
}
.archive-list__date {
  flex: 0 0 4.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
  white-space: nowrap;
}
.archive-list__link {
  border-bottom: 0;
}
.archive-list__link:hover {
  color: var(--color);
}
@media screen and (max-width: 480px) {
  .archive-list__item {
    flex-direction: column;
    gap: 0.1rem;
  }
  .archive-list__date {
    flex-basis: auto;
  }
}

/* --- En-tête d'une rubrique : description Joomla (affiche + horaires) compacte --- */
#main > .page-header {
  text-align: center;
}
#main > .page-header table,
#main > .page-header td {
  width: auto !important;
  height: auto !important;
  margin: 0 auto;
  border: 0;
  background: none;
  padding: 0.25rem;
}
#main > .page-header img {
  max-width: min(220px, 60vw);
  height: auto;
  border-radius: 8px;
}
#main > .page-header p:empty,
#main > .page-header p:has(> span:empty:only-child) {
  display: none;
}
#main > .page-header p {
  margin-bottom: 0.5rem;
}

/* --- Page « Liens externes » : 3 blocs côte à côte (empilés sur mobile) --- */
.liens-externes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.liens-externes__bloc {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--carte-rayon, 14px);
  background: rgba(0, 0, 0, 0.04);
}
.liens-externes__bloc h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
}
.liens-externes__bloc p {
  text-align: center;
  margin-bottom: 0.75rem;
}
.liens-externes__bloc a {
  border-bottom: 0;
  display: inline-block;
  transition: transform 0.2s ease;
}
.liens-externes__bloc a:hover {
  transform: scale(1.05);
}
.liens-externes__bloc img {
  max-width: 100%;
  height: auto;
}
