#article-page .parallax-item:nth-child(1) {
  min-height: 700px;
}

#article-page .parallax-item:nth-child(2) {
  min-height: 500px;
  margin-bottom: 5vh;
}

#article-page #article-list-page {
  align-items: stretch;
  justify-content: flex-start;
}

#article-page .filter-btn:hover,
#article-page .filter-btn.active {
  border-color: var(--btn-color) !important;
}

#article-show-page .article-cover-placeholder {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.48), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(255, 209, 102, 0.42), transparent 24%),
    linear-gradient(135deg, rgba(126, 184, 230, 0.95), rgba(255, 128, 140, 0.82) 55%, rgba(255, 211, 128, 0.92));
}

#article-page #articlesGrid .article-item {
  display: flex;
  min-width: 0;
}

#article-page #articlesGrid .article-item > a {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

#article-page #articlesGrid .article-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#article-page #articlesGrid .article-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

#article-page #articlesGrid .article-card__image,
#article-page #articlesGrid .article-card__placeholder {
  width: 100%;
  height: 100%;
}

#article-page #articlesGrid .article-card__image {
  object-fit: cover;
}

#article-page #articlesGrid .article-card__meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

#article-page #articlesGrid .article-card__tag {
  flex-shrink: 0;
}

@media (max-width: 576px) {
  /* toolbar responsive handled above */
}

/* Article Page Styles */

#article-show-page .article-reading-shell {
  padding-top: clamp(6rem, 9vw, 7.5rem);
}

#article-show-page .article-cover-block {
  margin-bottom: 1.75rem;
}

#article-show-page .article-cover-media {
  position: relative;
  overflow: hidden;
}

#article-show-page .article-cover-image,
#article-show-page .article-cover-placeholder {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 6;
}

#article-show-page .article-cover-image {
  object-fit: cover;
}

#article-show-page .article-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

#article-show-page .article-meta-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

#article-show-page .article-meta-sep {
  opacity: 0.55;
}

@media (max-width: 767px) {
  #article-show-page .article-cover-media {
    border-radius: 14px;
  }

  #article-show-page .article-header {
    display: flex;
    flex-direction: column;
  }

  #article-show-page .article-title {
    order: 1;
  }

  #article-show-page .article-meta {
    order: 2;
  }

  #article-show-page .article-meta-row--top,
  #article-show-page .article-meta-row--bottom {
    width: 100%;
  }

  #article-show-page .article-meta-row--bottom {
    gap: 0.55rem;
  }

  #article-show-page .article-meta-row--bottom {
    order: 1;
  }

  #article-show-page .article-meta-row--top {
    order: 2;
  }

}

.icon-article svg {
  width: 16px;
  height: 16px;
}

.article-content img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 15px;
	margin: 20px auto;
	filter: drop-shadow(0 5px 15px #00000038);
}

.article-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 15px;
}

.is-liked .icon-like svg {
  color: #dc3545 !important;
  fill: #dc3545 !important;
}

/* Sommaire de l'article : barre flottante en bas d'écran (même principe que les filtres mobiles),
   qui se pose à la fin de l'article. Le panneau se déplie au-dessus du bouton. */
#article-show-page {
  --article-scroll-offset: calc(110px + var(--xds-top-banner-total-height, 0px));
}

#article-show-page .article-content :is(h2, h3, h4)[id] {
  scroll-margin-top: var(--article-scroll-offset);
}

#article-show-page .article-toc {
  position: sticky;
  bottom: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding-bottom: 0.75rem;
  pointer-events: none;
}

#article-show-page .article-toc__panel {
  width: min(100%, 40rem);
  margin-bottom: 0;
  padding: 0.75rem;
  border-radius: var(--border-radius-20);
  pointer-events: auto;
}

#article-show-page .article-toc .filters-content {
  transform: translateY(20px);
}

#article-show-page .article-toc.is-open .filters-content {
  max-height: min(60vh, 32rem);
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.6s cubic-bezier(0.77, 0, 0.2, 1) 0s, opacity 0.5s ease 0.15s, transform 0.5s ease 0.1s;
}

#article-show-page .article-toc__heading {
  margin: 0.25rem 0.5rem 0.5rem;
}

#article-show-page .article-toc__list {
  max-height: calc(min(60vh, 32rem) - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

#article-show-page .article-toc__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
}

#article-show-page .article-toc__label {
  flex-shrink: 0;
}

#article-show-page .article-toc__current {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0.8;
  font-weight: 400;
}

#article-show-page .article-toc__current:not(:empty)::before {
  content: "· ";
}

#article-show-page .article-toc__item a {
  display: block;
  padding: 0.4rem 0.75rem;
  border-left: 2px solid transparent;
  border-radius: 0 var(--border-radius-10) var(--border-radius-10) 0;
  color: inherit;
  opacity: 0.75;
  text-decoration: none;
  line-height: 1.35;
  transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

#article-show-page .article-toc__item--l1 a { padding-left: 1.6rem; font-size: 0.92rem; }
#article-show-page .article-toc__item--l2 a { padding-left: 2.4rem; font-size: 0.88rem; }

#article-show-page .article-toc__item a:hover,
#article-show-page .article-toc__item a:focus-visible {
  opacity: 1;
  background-color: rgb(127 127 127 / 12%);
}

#article-show-page .article-toc__item a.is-active {
  opacity: 1;
  font-weight: 600;
  border-left-color: currentColor;
  background-color: rgb(127 127 127 / 14%);
}

@media (prefers-reduced-motion: reduce) {
  #article-show-page .article-toc .filters-content,
  #article-show-page .article-toc__item a { transition: none; }
}
