/* ==========================================================================
   Nouvelles page (template-news.php).
   Loaded only for that page template (see functions.php), after main.css.
   Articles come from the "actualite" CPT; hero/CTA from ACF.
   ========================================================================== */

/* ---- Hero --------------------------------------------------------------- */
.nw-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(440px, 58vh, 660px);
  display: flex;
  align-items: flex-end;
  /* dark gradient over the networking photo */
  background:
    linear-gradient(
      76deg,
      rgba(17, 17, 17, 0.95) 0%,
      rgba(17, 17, 17, 0.78) 46%,
      rgba(17, 17, 17, 0.28) 100%
    ),
    #111 url('../assets/partners.jpg') center 30% / cover no-repeat;
}

.nw-hero .nw-hero-inner {
  position: relative;
  width: 100%;
  max-width: 900px;
  padding: clamp(44px, 5.5vw, 92px) clamp(20px, 4vw, 30px) clamp(30px, 3.6vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
}

.nw-hero .nw-hero-eyebrow {
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: #c3ff74;
}

.nw-hero .nw-hero-title {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(30px, 5.4vw, 76px);
  line-height: 0.92;
  letter-spacing: -2.6px;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  color: #fff;
}

.nw-hero .nw-hero-rule {
  height: 8px;
  background: #c3ff74;
  max-width: 180px;
}

.nw-hero .nw-hero-lead {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 150%;
  color: #dcdcdc;
  max-width: 560px;
}

/* ---- Articles ----------------------------------------------------------- */
.nw-list {
  padding: clamp(24px, 3vw, 40px) clamp(20px, 4vw, 30px) clamp(40px, 5vw, 72px);
  background: #161616;
}

/* ---- Category filter ---------------------------------------------------- */
.nw-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(20px, 2.6vw, 34px);
}

.nw-filter {
  --fc: #c3ff74;
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid #575757;
  color: #c9c9c9;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nw-filter:hover {
  border-color: var(--fc);
  color: var(--fc);
}

.nw-filter.is-on {
  background: var(--fc);
  border-color: var(--fc);
  color: #111;
}

/* Mobile filter: a single-select dropdown (shown ≤760px, chips hidden) */
.nw-select {
  display: none;
  margin-bottom: clamp(20px, 2.6vw, 34px);
}

.nw-select-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-bottom: 8px;
}

.nw-select-input {
  width: 100%;
  min-height: 48px;
  background: #111;
  border: 1px solid #575757;
  border-left: 8px solid #c3ff74;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 16px;
}

@media (max-width: 760px) {
  .nw-filters {
    display: none;
  }

  .nw-select {
    display: block;
  }
}

/* ---- Article grid + cards ----------------------------------------------- */
.nw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 26px);
}

.nw-card {
  --ac: #c3ff74;
  display: flex;
  flex-direction: column;
  background: #161616;
  border: 1px solid #575757;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.22, 0.7, 0.2, 1),
    border-color 0.35s ease;
}

.nw-card:hover {
  transform: translateY(-6px);
  border-color: var(--ac);
}

.nw-card[hidden] {
  display: none !important;
}

.nw-card .nw-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #111;
  overflow: hidden;
}

.nw-card .nw-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nw-card .nw-badge {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--ac);
  color: #111;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  padding: 8px 14px;
}

.nw-card .nw-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2vw, 26px);
  flex: 1;
}

.nw-card .nw-date {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #8a8a8a;
}

.nw-card .nw-card-title {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(18px, 1.9vw, 23px);
  line-height: 1.08;
  letter-spacing: -0.6px;
  color: #fff;
}

.nw-card .nw-card-excerpt {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 150%;
  color: #8a8a8a;
  flex: 1;
}

.nw-card .nw-go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--ac);
}

.nw-card .nw-go svg {
  flex: none;
}

/* ---- Pagination --------------------------------------------------------- */
.nw-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: clamp(28px, 3.4vw, 48px);
}

.nw-page {
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #575757;
  color: #c9c9c9;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nw-page--current {
  background: #c3ff74;
  color: #111;
  border-color: #c3ff74;
}

.nw-page--prev,
.nw-page--next {
  padding: 0 18px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* The "…" standing for the pages left out (mtl_pagination_items()): plain
   text, no box, no hover. */
.nw-page--gap {
  min-width: 24px;
  border-color: transparent;
  pointer-events: none;
}

.nw-page:not(.nw-page--current):hover {
  background: #c3ff74;
  color: #111;
  border-color: #c3ff74;
}

/* ---- CTA ---------------------------------------------------------------- */
.nw-cta-section {
  padding: 0 clamp(20px, 4vw, 30px) clamp(48px, 6vw, 90px);
  background: #111;
}

.nw-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  background: #c3ff74;
  padding: clamp(28px, 3.5vw, 44px) clamp(24px, 3vw, 40px);
}

.nw-cta .nw-cta-text {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.6px;
  text-transform: uppercase;
  color: #111;
  max-width: 760px;
}

.nw-cta .nw-send {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111;
  color: #c3ff74;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  padding: 16px 28px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.nw-cta .nw-send:hover {
  background: #0082fe;
  color: #fff;
}

.nw-cta .nw-send svg {
  flex: none;
}

/* ---- Scroll reveal ------------------------------------------------------ */
.nw-reveal.js-armed {
  opacity: 0;
  transform: translateY(28px);
}

.nw-reveal.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s cubic-bezier(0.22, 0.7, 0.2, 1),
    transform 0.8s cubic-bezier(0.22, 0.7, 0.2, 1);
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1000px) {
  .nw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .nw-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nw-cta .nw-send {
    width: 100%;
    justify-content: center;
  }
}
