/**
 * Page Rapports & bilans — hero du dernier rapport et liste d'archives.
 * Les textes et les images viennent de /api/reports.
 */
.page-reports {
  --reports-ink: #2b2b2b;
  --reports-accent: #c4004a;
  --reports-muted: #3f3f3f;
  --reports-paper: #f7f6f7;
  --reports-card: #f3f1f2;
  --reports-sheet: rgba(217, 200, 240, 0.72);
  background: var(--reports-paper);
  color: var(--reports-ink);
}

.page-reports ::selection {
  background: #c4004a;
  color: #fff;
}

.page-reports-hero-light .ftco-navbar-light .navbar-nav > .nav-item:not(.active) > .nav-link,
.page-reports-hero-light .ftco-navbar-light .navbar-nav > .nav-item.dropdown:not(.active) > .nav-link,
.page-reports-hero-light .ftco-navbar-light.hero-section .navbar-nav > .nav-item:not(.active) > .nav-link,
.page-reports-hero-light .ftco-navbar-light.hero-section .navbar-nav > .nav-item.dropdown:not(.active) > .nav-link,
.page-reports-hero-light .ftco-navbar-light.navbar-scrolled .navbar-nav > .nav-item:not(.active) > .nav-link,
.page-reports-hero-light .ftco-navbar-light.navbar-scrolled .navbar-nav > .nav-item.dropdown:not(.active) > .nav-link {
  color: #333 !important;
}

.reports-featured {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 8rem 1.5rem 4rem;
  box-sizing: border-box;
}

.reports-featured__layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

.reports-cover {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: min(100%, 380px);
  min-height: 440px;
  overflow: visible;
  isolation: isolate;
}

.reports-cover__sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(290px, 72vw);
  height: auto;
  aspect-ratio: 290 / 380;
  background: var(--reports-sheet);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translate(-50%, -50%) rotate(5deg);
  pointer-events: none;
  z-index: 1;
}

.reports-cover__link {
  position: relative;
  z-index: 2;
  display: block;
  width: min(290px, 72vw);
  transform: rotate(-2.5deg);
  box-shadow: 0 14px 34px rgba(43, 43, 43, 0.28);
  background: transparent;
}

.reports-cover__link:has(.reports-cover__fallback) {
  background: #2b2b2b;
}

.reports-cover__link:focus-visible {
  outline: 3px solid var(--reports-accent);
  outline-offset: 4px;
}

.reports-cover__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
}

.reports-cover__fallback {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 290 / 380;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 42%),
    #2b2b2b;
}

.reports-featured__copy {
  flex: 1 1 300px;
  max-width: 460px;
  min-width: min(100%, 280px);
}

.reports-kicker {
  margin: 0;
  color: #ff0a54;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.reports-featured__title {
  margin: 0.65rem 0 0;
  color: var(--reports-ink);
  font-family: "Oswald", Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 2.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  text-wrap: balance;
}

.reports-featured__title.reports-featured__title--solo {
  display: block;
  width: fit-content;
  max-width: min(18ch, 100%);
  margin: 0 auto;
  text-align: center;
}

.reports-featured:has(#reports-featured-layout[hidden]) {
  padding-bottom: 1.5rem;
}

.reports-meta {
  margin: 0.9rem 0 0;
  color: var(--reports-muted);
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
}

.reports-summary {
  margin: 1.1rem 0 0;
  max-width: 42ch;
  color: #2f2f2f;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
}

.reports-actions {
  margin-top: 1.75rem;
}

.reports-actions .btn.btn-primary {
  color: #fff !important;
  border-radius: 4px;
}

.reports-archive {
  background: #fff;
  padding: 4.5rem 1.5rem 5rem;
}

.reports-archive__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.reports-archive__heading {
  margin: 0;
  color: var(--reports-ink);
  font-family: "Oswald", Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.reports-archive__kicker {
  margin: 0 0 0.5rem;
  text-align: center;
}

.reports-publications {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

/* Un seul rapport : carte étroite centrée (référence maquette). */
.reports-publications--solo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reports-publications--solo > li {
  width: min(100%, 500px);
  max-width: 500px;
}

.reports-publications--solo .reports-publication {
  width: 100%;
  box-sizing: border-box;
}

.reports-publications--solo .reports-publication__media {
  padding: 0.75rem 0 0.75rem 0.95rem;
}

.reports-publications--solo .reports-publication__thumb {
  max-width: 84px;
  max-height: 124px;
}

.reports-publications--solo .reports-publication__fallback {
  width: 84px;
  height: 110px;
}

.reports-publications--solo .reports-publication__body {
  padding: 0.75rem 0.95rem 0.75rem 0.65rem;
}

.reports-publication {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  background: var(--reports-card);
  color: var(--reports-ink);
}

.reports-publication__media {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: center;
  padding: 0.85rem 0 0.85rem 0.85rem;
}

.reports-publication__thumb {
  display: block;
  width: auto;
  max-width: 76px;
  height: auto;
  max-height: 112px;
  object-fit: contain;
  object-position: center top;
  box-shadow: 0 6px 16px rgba(43, 43, 43, 0.16);
}

.reports-publication__fallback {
  width: 76px;
  height: 100px;
  background: #2b2b2b;
  box-shadow: 0 6px 16px rgba(43, 43, 43, 0.16);
}

.reports-publication__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.85rem 1rem 0.85rem 0.75rem;
}

.reports-publication__title {
  margin: 0;
  color: var(--reports-ink);
  font-family: "Work Sans", Arial, sans-serif;
  font-size: clamp(0.9375rem, 1.15vw, 1.0625rem);
  font-weight: 600;
  line-height: 1.28;
}

.reports-publications--solo .reports-publication__title {
  font-size: clamp(1rem, 1.35vw, 1.1875rem);
}

.reports-publication__meta {
  margin: 0;
  color: var(--reports-muted);
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}

.reports-publication__summary {
  margin: 0;
  color: #444;
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
}

.reports-publications:not(.reports-publications--solo) .reports-publication__summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.reports-publication__download {
  align-self: flex-start;
  margin-top: 0.15rem;
  color: var(--reports-accent);
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.reports-publication__download:hover,
.reports-publication__download:focus {
  color: #9d003a;
  text-decoration: none;
}

.reports-publication__download:focus-visible {
  outline: 3px solid var(--reports-accent);
  outline-offset: 3px;
}

.reports-archive__pagination {
  margin-top: 2.5rem;
}

.reports-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reports-pagination li a,
.reports-pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #e4e2e3;
  background: #fff;
  color: var(--reports-ink);
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.reports-pagination li.active span {
  border-color: var(--reports-accent);
  background: var(--reports-accent);
  color: #fff;
}

.reports-pagination li a:hover,
.reports-pagination li a:focus {
  border-color: var(--reports-accent);
  color: var(--reports-accent);
  text-decoration: none;
}

.reports-pagination li a.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.reports-status {
  box-sizing: border-box;
  width: min(36rem, 100%);
  margin: 1.5rem auto 0;
  padding-inline: 1rem;
  color: var(--reports-muted);
  font-family: "Work Sans", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-align: center;
  white-space: normal !important;
  overflow-wrap: break-word;
}

.reports-status--error {
  color: #8d1238;
}

@media (max-width: 991.98px) {
  .reports-featured {
    min-height: calc(100vh - 100px);
    padding: 2.5rem 1.25rem 3rem;
  }
}

@media (max-width: 760px) {
  .reports-cover {
    min-height: 0;
  }

  .reports-actions .btn.btn-primary {
    display: block;
    width: 100%;
  }

  .reports-archive {
    padding: 3rem 1.25rem 3.5rem;
  }

  .reports-status {
    font-size: 0.95rem;
  }

  .reports-publications {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 991.98px) {
  .reports-publications {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .reports-publication__download,
  .reports-cover__link {
    transition: none;
  }
}
