/* ================================================================
   archive-presse.css
   ================================================================ */

/* ── Layout principal ───────────────────────────────────────── */
.archive-presse {
  margin: 3rem auto;
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  justify-content: center;
}

.archive-presse__titre {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.archive-presse__sous-titre {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

/* ── SLIDER ─────────────────────────────────────────────────── */
.archive-presse__recents {
  margin-bottom: 0;
}

/* Cache le slider entier sur mobile */
.archive-presse__recents--desktop-only {
  display: block; /* visible par défaut */
}

.presse-slider {
  position: relative;
}

.presse-slider__track-wrapper {
  overflow: hidden;
}

.presse-slider__track {
  display: flex;
  flex-wrap: nowrap;        /* empêche les pages de passer à la ligne */
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.presse-slider__page {
  /* flex-basis est appliqué par le JS selon getVisible() */
  /* NE PAS mettre flex ici : le JS l'écrase avec style.flex */
  flex-shrink: 0;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 0.75rem;
}

.presse-slider__page:first-child { padding-left: 0; }
.presse-slider__page:last-child  { padding-right: 0; }

/* Boutons prev/next */
.presse-slider__btn {
  position: absolute;
  padding: 0;
  top: 40%;
  transform: translateY(-50%);
  z-index: 10;
  background: unset !important;
  border: none;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
}

.presse-slider__btn:hover {
  background-color: unset;
}

.presse-slider__btn svg {
  width: 30px;
  height: 30px;
  color: black;
}

.presse-slider__btn:hover svg {
  color: #1f69c2;
}

.presse-slider__btn--prev {
  left: -52px;
}
.presse-slider__btn--next {
  right: -52px;
}

/* Dots */
.presse-slider__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1.5rem;
}

.presse-slider__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ccc !important;
  box-shadow: none !important;
  border: none;
  cursor: pointer;
  padding: 0;
  transition:
    background 0.2s,
    transform 0.2s;
}

.presse-slider__dot.is-active {
  background: #111 !important;
  transform: scale(1.2);
}

/* ── FILTRES ─────────────────────────────────────────────────── */
.archive-presse__tous-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.presse-filtres {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.presse-filtre {
  background: none;
  cursor: pointer;
  color: #1e1e1e;
  border: solid 2px #1e1e1e;
}

.presse-filtre.is-active {
  color: #fff;
  background-color: #1e1e1e;
}

.presse-filtre.is-active:hover {
  color: #fff;
  background-color: #1f69c2;
  border: solid 2px #1f69c2;
}

.presse-filtre:hover {
  background-color: unset;
  color: #1f69c2;
}

/* ── GRILLE principale ─────────────────────────────────────────*/
.presse-grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  transition: opacity 0.2s;
}

.presse-grille.is-loading {
  opacity: 0.4;
  pointer-events: none;
}

.presse-vide {
  grid-column: 1 / -1;
  color: #888;
  padding: 3rem 0;
}

/* ── CARTE PRESSE ────────────────────────────────────────────── */
.card-presse.card-presse--avec-image {
  display: flex;
  justify-content: center;
}

.card-presse__lien {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.8rem;
}

.card-presse__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #eee;
}

.card-presse__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card-presse__lien:hover .card-presse__image {
  transform: scale(1.03);
}

.card-presse__titre {
  font-size: 0.95rem;
  font-weight: 400;
  margin: 0;
  line-height: 1.45;
  color: #111;
}

.card-presse__lien:hover .card-presse__titre {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Badge type d'article */
.card-presse__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: fit-content;
  height: fit-content;
  border-radius: 2rem;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  pointer-events: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.card-presse__badge--video {
  background: rgba(0, 0, 0, 0.65);
}
.card-presse__badge--article,
.card-presse__badge--book {
  background: rgba(0, 0, 0, 0.55);
}

/* ── Bouton « Afficher plus » ────────────────────────────────── */
.presse-plus-wrapper {
  margin-top: 2.5rem;
  text-align: center;
}

.presse-btn-plus {
  display: inline-block;
  padding: 0.85rem 3rem;
  background: #111;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.presse-btn-plus:hover {
  background: #333;
}
.presse-btn-plus:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ── Carte projet (shortcode accueil) ────────────────────────── */
/* Les cartes projet dans le slider partagent la structure .presse-slider */
.home-project-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.home-project-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee;
}

.home-project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.home-project-card:hover .home-project-card__image img {
  transform: scale(1.03);
}

.home-project-card__placeholder {
  width: 100%;
  height: 100%;
  background: #ddd;
}

.home-project-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #888;
  margin-top: 0.4rem;
}

.home-project-card__title {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
}

/* ================================================================
   RESPONSIVE
   ≤ 1024px  tablette paysage
   ≤  768px  tablette portrait
   ≤  600px  mobile  → slider masqué, 1 colonne
   ≤  400px  petits mobiles
   ================================================================ */

/* ── Tablette paysage ≤ 1024px ─────────────────────────────── */
@media (max-width: 1024px) {
  .archive-presse {
    width: 85%;
  }



  .presse-slider__btn--prev {
    left: -40px;
  }
  .presse-slider__btn--next {
    right: -40px;
  }

  .presse-grille {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* ── Tablette portrait ≤ 768px ──────────────────────────────── */
@media (max-width: 768px) {
  .archive-presse {
    width: 90%;
    gap: 3rem;
    margin: 2rem auto;
  }

  .archive-presse__titre {
    font-size: 4rem;
  }
  .archive-presse__sous-titre {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .presse-slider__btn--prev {
    left: 0;
  }
  .presse-slider__btn--next {
    right: 0;
  }
  .presse-slider__track-wrapper {
    padding: 0 2.5rem;
  }

  .presse-filtre {
    font-size: 0.85rem;
  }
  .presse-grille {
    gap: 1.5rem;
  }
}

/* ── Mobile ≤ 600px ─────────────────────────────────────────── */
@media (max-width: 600px) {
  /* ↓ SLIDER MASQUÉ SUR MOBILE */
  .archive-presse__recents--desktop-only {
    display: none;
  }

  .archive-presse {
    width: 92%;
    gap: 2.5rem;
  }

  .archive-presse__titre {
    font-size: 3rem;
  }
  .archive-presse__sous-titre {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }

  /* Grille : 1 colonne */
  .presse-grille {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .card-presse.card-presse--avec-image {
    justify-content: flex-start;
  }
  .card-presse__lien {
    width: 100%;
  }

  /* Filtres en scroll horizontal */
  .archive-presse__tous-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .presse-filtres {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .presse-filtre {
    white-space: nowrap;
  }

  /* Bouton pleine largeur */
  .presse-btn-plus {
    width: 100%;
    padding: 1rem;
  }

  /* Slider accueil (shortcode) : 1 colonne sur mobile aussi */


  .presse-slider__btn {
    display: none;
  }
  .presse-slider__track-wrapper {
    padding: 0;
  }
}

/* ── Petits mobiles ≤ 400px ─────────────────────────────────── */
@media (max-width: 400px) {
  .archive-presse {
    width: 95%;
  }
  .archive-presse__titre {
    font-size: 2.5rem;
  }
  .archive-presse__sous-titre {
    font-size: 1.25rem;
  }
}
