/* ── Articles hub page ── */

.articles-page {
  --articles-padding-inline: clamp(2rem, 4vw, 4rem);
  --swiper-btn-size: 42px;
  --swiper-icon-size: 16px;

  --text: #000000;
  --text-secondary: #333333;
  --text-muted: #777777;

  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 3.5rem var(--articles-padding-inline) 5rem;

  overflow: hidden;
  background: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .articles-page {
    --text: #ffffff;
    --text-secondary: #e5e5e5;
    --text-muted: #aaaaaa;

    background: #0d0d0d;
  }
}

/* ── Sections ── */

.articles-section {
  margin-bottom: 5.5rem;
}

.articles-section:last-child {
  margin-bottom: 0;
}

.articles-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;

  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.articles-section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.articles-section-title {
  margin: 0;

  font-size: clamp(2.2rem, 3.5vw, 3.6rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--text);
}

.articles-section-subtitle {
  margin: 0;

  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.articles-section-link {
  flex-shrink: 0;

  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;

  transition: color 0.15s;
}

.articles-section-link:hover {
  color: var(--text);
}

/* ── Swiper ── */

.articles-swiper-wrap {
  position: relative;
}

.articles-swiper {
  overflow: visible;
}

.articles-swiper .swiper-wrapper {
  align-items: stretch;
}

.articles-swiper .articles-slide {
  height: auto;
  display: flex;
}

.articles-swiper .articles-slide .post-card-grid {
  width: 100%;
}

/* ── Swiper buttons ── */

.articles-swiper-btn {
  position: absolute;
  top: 50%;
  z-index: 5;

  width: var(--swiper-btn-size);
  height: var(--swiper-btn-size);
  padding: 0;

  display: grid;
  place-items: center;

  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text);

  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  line-height: 0;

  transform: translateY(-50%);
  transition:
    opacity 0.15s,
    transform 0.15s,
    border-color 0.15s;
}

.articles-swiper-btn:hover {
  border-color: var(--text-secondary);
  transform: translateY(-50%) scale(1.06);
}

.articles-swiper-icon {
  width: var(--swiper-icon-size);
  height: var(--swiper-icon-size);

  display: block;
  pointer-events: none;

  background-color: var(--text);

  mask-image: url("/img/right-thin-chevron.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;

  -webkit-mask-image: url("/img/right-thin-chevron.svg");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.articles-swiper-prev {
  left: calc(var(--swiper-btn-size) / -2);
}

.articles-swiper-next {
  right: calc(var(--swiper-btn-size) / -2);
}

.articles-swiper-prev .articles-swiper-icon {
  transform: rotate(180deg);
}

.articles-swiper-btn.swiper-button-disabled {
  opacity: 0;
  pointer-events: none;
}

.post-card-grid-image {
  position: relative;
}

.post-card-grid-image .review-lock-icon {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 50px;
  height: 50px;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
}

/* ── Mobile ── */

@media (max-width: 767px) {
  .articles-page {
    --articles-padding-inline: 1rem;

    padding-top: 2rem;
    padding-bottom: 4rem;
  }

  .articles-section {
    margin-bottom: 4rem;
  }

  .articles-section-header {
    align-items: center;
  }

  .articles-section-title {
    font-size: 2rem;
  }

  .articles-swiper-btn {
    display: none;
  }
}
/* ── Pas d'animation de scale sur l'image pour les appareils tactiles ──
   (hover: none) = mobile + iPad/tablettes : le survol n'a pas de sens et
   peut "coller" après un tap. Desktop (souris) garde l'animation.
   articles.css étant chargé après blog.css, cet override prime. */
@media (hover: none) {
  .post-card-grid:hover .post-card-grid-image img,
  .post-card-grid:hover .post-card-grid-cover,
  .post-card-grid .post-card-grid-image img,
  .post-card-grid .post-card-grid-cover {
    transform: none;
  }
}