.portfolio-page { background: var(--cream); }
.portfolio-header { color: var(--cream); }
.portfolio-header.is-scrolled { color: var(--ink); }
.portfolio-header.is-scrolled .brand-logo-light { display: none; }
.portfolio-header.is-scrolled .brand-logo-dark { display: block; }
.portfolio-header .nav-cta { color: var(--ink); background: var(--coral); }
/* Ici la pastille est déjà terracotta : le survol passe au rose pâle. */
.portfolio-header .nav-cta:hover,
.portfolio-header .nav-cta:focus-visible { background: var(--blush); color: var(--ink); }
.portfolio-header .site-nav a[aria-current="page"]::after { right: 0; }

.portfolio-hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(390px, .78fr) minmax(510px, 1.22fr);
  align-items: center;
  gap: clamp(45px, 7vw, 110px);
  padding: 120px clamp(22px, 5vw, 76px) 70px;
  color: var(--cream);
  background: var(--ink);
  overflow: hidden;
}
.portfolio-hero-copy { position: relative; z-index: 2; max-width: 670px; }
.portfolio-hero h1 { margin-bottom: 32px; font-size: clamp(54px, 6.5vw, 100px); line-height: .91; }
.portfolio-hero h1 em { color: var(--sun); }
.portfolio-hero-copy > p:not(.eyebrow) { max-width: 540px; color: rgba(255,248,237,.69); font-size: 18px; }
.portfolio-hero .text-link { display: inline-block; margin-top: 25px; border-color: rgba(255,248,237,.7); }
.portfolio-hero-image { position: relative; height: min(690px, 76vh); min-height: 520px; margin: 0; }
.portfolio-hero-image::before { content: ""; position: absolute; z-index: 1; width: 130px; height: 130px; left: -46px; top: 13%; border: 25px solid var(--sun); border-radius: 50%; }
.portfolio-hero-image img { position: relative; z-index: 2; filter: saturate(.88); box-shadow: 0 32px 80px rgba(0,0,0,.25); }
.portfolio-hero-image figcaption { position: absolute; z-index: 3; left: -34px; bottom: 34px; padding: 18px 21px; color: var(--ink); background: var(--sun); font-size: 10px; font-weight: 800; line-height: 1.7; letter-spacing: .14em; text-transform: uppercase; transform: rotate(-3deg); }

.portfolio-browser { padding: clamp(88px, 11vw, 160px) clamp(22px, 5vw, 76px); }
.portfolio-heading { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; margin-bottom: 24px; }
.portfolio-heading h2 { max-width: 720px; margin: 0; font-size: clamp(48px, 6vw, 86px); line-height: .95; }
.portfolio-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.filter-button { min-height: 44px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: transparent; font-size: 11px; font-weight: 750; cursor: pointer; transition: .2s ease; }
.filter-button:hover, .filter-button.is-active { color: var(--cream); border-color: var(--ink); background: var(--ink); }
.filter-status { margin: 0 0 26px; color: rgba(0,0,0,.6); font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }

.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: dense; gap: clamp(12px, 2vw, 28px); }
/* Cartes au format portrait, régulières d'un reportage à l'autre : la grille
   garde le même rythme quelles que soient les photos mises en couverture. */
.project-card { position: relative; grid-column: span 4; aspect-ratio: 4 / 5; padding: 0; border: 0; background: var(--coral); overflow: hidden; cursor: pointer; text-align: left; box-shadow: 0 16px 45px rgba(0,0,0,.1); }
/* Une carte sur cinq occupe deux colonnes : la grille respire sans jamais
   changer de forme au gré des fichiers. */
.project-card:nth-child(5n + 1) { grid-column: span 8; aspect-ratio: 8 / 5; }
.project-card img { transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .35s ease; }
.project-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.8)); transition: background .3s ease; }
.project-card:hover img, .project-card:focus-visible img { transform: scale(1.035); filter: saturate(1.06); }
.project-card:hover::after { background: linear-gradient(180deg, transparent 24%, rgba(0,0,0,.88)); }
.project-overlay { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 20px; padding: clamp(22px, 3vw, 38px); color: var(--cream); }
.project-overlay small { grid-column: 1 / -1; font-size: 9px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.project-overlay strong { font-family: var(--serif); font-size: clamp(25px, 3vw, 40px); line-height: 1; font-weight: 400; }
.project-overlay i { font-style: normal; font-size: 10px; font-weight: 750; opacity: .72; transform: translateY(-2px); }
.placeholder-art { position: absolute; inset: 0; overflow: hidden; }
.placeholder-art i { position: absolute; display: block; border-radius: 50%; }
.placeholder-art i:first-child { width: 88%; aspect-ratio: 1; left: -32%; bottom: -24%; background: var(--sun); }
.placeholder-art i:last-child { width: 60%; aspect-ratio: 1; right: -24%; top: 8%; border: 28px solid rgba(255,248,237,.57); }

.portfolio-cta { min-height: 520px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; align-items: center; gap: 20px 60px; padding: clamp(70px, 9vw, 125px) clamp(22px, 8vw, 130px); background: var(--sun); }
.portfolio-cta .eyebrow { grid-column: 1 / -1; align-self: end; }
.portfolio-cta h2 { margin: 0; font-size: clamp(48px, 7vw, 95px); line-height: .92; }
.portfolio-cta h2 em { color: var(--coral); }
.portfolio-cta .circle-button { text-decoration: none; }

.single-report-hero {
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(420px, 1.18fr);
  align-items: center;
  gap: clamp(40px, 6vw, 90px);
  padding: 148px clamp(22px, 5vw, 76px) 80px;
  background: var(--cream);
}
.single-report-copy { max-width: 560px; }
.single-report-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 22px; }
.single-report-meta span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--serif); font-size: 14px; }
.single-report-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.single-report-copy .report-service-button { margin: 26px 20px 0 0; }
.single-report-copy .text-link { display: inline-flex; align-items: center; margin-top: 26px; vertical-align: middle; }
.single-report-cover {
  margin: 0;
  height: min(640px, 72vh);
  overflow: hidden;
  box-shadow: var(--shadow);
}
/* La photo remplit son cadre : en « contain », une photo verticale
   laissait apparaître deux bandes de fond de part et d'autre. */
.single-report-cover img { object-fit: cover; }
.report-service-button { margin-top: 28px; }
/* Galerie en lignes ajustées. Chaque photo reçoit une largeur
   proportionnelle à ses proportions (--r, posé sur la figure par le
   gabarit) : sur une même ligne, une horizontale est donc large et une
   verticale étroite, toutes à la même hauteur. Les lignes remplissent
   exactement la largeur disponible — pas de blanc, pas de recadrage. La
   hauteur visée (--gh) suit l'écran : c'est elle qui règle la taille des
   photos plutôt que de les agrandir indéfiniment. */
.report-gallery {
  --gh: clamp(300px, 27vw, 430px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 26px);
  padding: 0 clamp(18px, 4vw, 66px) clamp(70px, 10vw, 150px);
}
/* Absorbe la place restante de la dernière ligne, pour que ses photos
   gardent leur taille au lieu de s'étirer sur toute la largeur. */
.report-gallery::after { content: ""; flex-grow: 999999; }
/* Chaque photo occupe toute la largeur de sa colonne et garde ses propres
   proportions, posées en ligne par le gabarit : aucun recadrage, et aucun
   blanc entre les colonnes. La hauteur de la ligne suit la photo.
   Fond neutre le temps du chargement, sans clignotement. */
.report-gallery figure { --r: 1.5; flex: var(--r) 1 calc(var(--r) * var(--gh)); margin: 0; overflow: hidden; background: var(--blush); }
.report-gallery figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.report-gallery img { transition: transform .5s ease; }
.report-gallery figure:hover img { transform: scale(1.018); }
.report-gallery video, .report-gallery iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; background: var(--ink); }
.report-gallery .report-video { flex: 1 1 100%; margin: 0; }
.report-gallery .report-video .wp-video { width: 100% !important; }
.empty-gallery { grid-column: 1 / -1; min-height: 580px; display: grid; place-items: center; padding: 40px; text-align: center; background: var(--sun); overflow: hidden; position: relative; }
.empty-gallery::before, .empty-gallery::after { content: ""; position: absolute; border-radius: 50%; }
.empty-gallery::before { width: 72%; aspect-ratio: 1; left: -25%; bottom: -40%; background: var(--sun); }
.empty-gallery::after { width: 44%; aspect-ratio: 1; right: -18%; top: -10%; border: 30px solid rgba(255,248,237,.5); }
.empty-gallery div { position: relative; z-index: 2; max-width: 520px; }
.empty-gallery strong { display: block; font-family: var(--serif); font-size: clamp(37px, 5vw, 62px); font-weight: 400; line-height: 1; }
.empty-gallery span { display: block; margin-top: 16px; font-size: 12px; }
.report-footer { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 60px clamp(22px, 7vw, 110px); color: var(--cream); background: var(--ink); }
.report-footer p { margin: 0; font-family: var(--serif); font-size: clamp(31px, 4vw, 56px); }

@media (max-width: 1020px) {
  .portfolio-hero { grid-template-columns: .8fr 1fr; }
  .portfolio-heading { grid-template-columns: 1fr; }
  .portfolio-filters { justify-content: flex-start; }
  .single-report-hero { grid-template-columns: 1fr; padding-top: 130px; }
  .single-report-cover { height: 460px; }
}

@media (max-width: 760px) {
  .portfolio-header { color: var(--cream); background: rgba(0,0,0,.9); }
  .portfolio-header.is-scrolled { color: var(--ink); background: rgba(255,248,237,.93); }
  .portfolio-header .site-nav { color: var(--ink); }
  .portfolio-hero { min-height: auto; grid-template-columns: 1fr; padding: 112px 18px 54px; }
  .single-report-hero { padding: 112px 18px 50px; }
  .single-report-copy .report-service-button { width: 100%; justify-content: center; margin-right: 0; }
  .single-report-cover { height: 340px; }
  .portfolio-hero h1 { font-size: clamp(52px, 16vw, 72px); }
  .portfolio-hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .portfolio-hero-image { height: 520px; min-height: 0; margin: 20px 0 0 24px; }
  .portfolio-hero-image::before { width: 90px; height: 90px; left: -32px; border-width: 18px; }
  .portfolio-hero-image figcaption { left: -25px; bottom: 25px; }
  .portfolio-browser { padding: 78px 18px; }
  .portfolio-heading h2 { font-size: 52px; }
  .portfolio-filters { flex-wrap: nowrap; max-width: calc(100vw - 36px); overflow-x: auto; padding-bottom: 6px; }
  .filter-button { flex: 0 0 auto; }
  .project-grid { grid-template-columns: 1fr; gap: 14px; }
  .project-card, .project-card:nth-child(5n + 1) { grid-column: auto; aspect-ratio: 4 / 5; min-height: 0; }
  .project-overlay { grid-template-columns: 1fr; }
  .project-overlay i { display: none; }
  .portfolio-cta { min-height: 520px; grid-template-columns: 1fr; gap: 32px; padding: 70px 20px; }
  .portfolio-cta h2 { font-size: 53px; }
  .portfolio-cta .circle-button { justify-self: end; }
  .report-service-button { width: 100%; justify-content: center; margin-top: 22px; }
  .report-gallery { --gh: 0px; padding: 0 12px 70px; }
  .report-gallery figure { flex: 1 1 100%; }
  .empty-gallery { min-height: 560px; }
  .report-footer { align-items: flex-start; flex-direction: column; padding: 50px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-card img { transition: none; }
}
