/* ------------------------------------------------------------------
   Jacques Verdier — book
   ------------------------------------------------------------------ */

/* Hanken Grotesk (licence libre OFL, voir fonts/OFL-HankenGrotesk.txt),
   en attendant la licence web de PP Mori. Police variable : graisses 100 à 900. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Roman-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Roman-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Italic-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fff;
  --ink: #000;
  --muted: #9a9a9a;
  --placeholder: #f3f3f3;
  --papier: #f3eee4;

  /* Couleurs de la page À propos, prises dans les toiles. */
  --rose: #e9aad2;
  --vert: #3e9a55;
  --jaune: #e9c03e;
  --rouge: #e8445f;
  --bleu: #c3d3ea;
  --olive: #b8ad63;

  --pad: clamp(16px, 3vw, 48px);
  --gallery-pad: clamp(48px, 14vw, 200px);
  --gutter: clamp(12px, 2vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  touch-action: pan-x pan-y;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html.is-locked { overflow: hidden; }

/* Pas de zoom au pincement ni au double-tap. */
body,
.lightbox,
.lightbox__track { touch-action: pan-x pan-y; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.4;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure { margin: 0; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

/* ------------------------------------------------------------------
   En-tête
   ------------------------------------------------------------------ */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: var(--pad);
  padding-bottom: clamp(3.5rem, 9vw, 8rem);
}

.site-name {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: clamp(2.25rem, 4.6vw, 4.5rem);
  line-height: .92;
  letter-spacing: -.03em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: .2em;
  font-size: clamp(.9375rem, 1.15vw, 1.125rem);
  line-height: 1.3;
}

.site-nav a {
  color: var(--ink);
  transition: color .3s ease;
}

.site-nav:has(.is-active) a:not(.is-active):not(:hover) { color: var(--muted); }

/* ------------------------------------------------------------------
   Vues
   ------------------------------------------------------------------ */

.view { animation: view-in .8s var(--ease) both; }

@keyframes view-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Accueil : portrait puis atelier */

.view--home {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(3rem, 9vw, 9rem);
  padding: 0 var(--pad);
}

.home-figure--portrait { grid-column: 1 / -1; }
.home-figure--atelier  { grid-column: 6 / -1; }
.home-figure--regard   { grid-column: 1 / span 6; }

.home-figure__btn {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.home-figure img {
  width: 100%;
  background: var(--placeholder);
}

/* Galeries */

.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(4rem, 10vw, 10rem);
  align-items: start;
  padding: 0 var(--gallery-pad);
}

.work {
  grid-column: var(--start) / span var(--span);
  grid-row: var(--row);
  margin-top: var(--offset, 0);
}

.work__btn {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.work__frame {
  display: block;
  overflow: hidden;
  will-change: transform;
}

.work img {
  width: 100%;
  background: var(--placeholder);
}

/* Encres : côte à côte, même hauteur, bord beige comme une feuille. */

.gallery--cote-a-cote {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(4rem, 10vw, 10rem);
}

.ligne {
  display: flex;
  align-items: flex-start;
  gap: clamp(24px, 4vw, 64px);
}

.ligne > .work,
.ligne__vide {
  flex: var(--ratio) 1 0;
  min-width: 0;
}

.gallery--papier img,
.lightbox--papier .lightbox__slide img {
  border: 4px solid var(--papier);
}

.gallery-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

/* ------------------------------------------------------------------
   Apparition au scroll
   ------------------------------------------------------------------ */

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 56px, 0);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal img {
  transform: scale(1.06);
  transition: transform 2s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.is-visible img { transform: none; }

.home-figure { overflow: hidden; }

/* ------------------------------------------------------------------
   Pied de page
   ------------------------------------------------------------------ */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(6rem, 14vw, 12rem) var(--pad) var(--pad);
  font-size: .875rem;
  color: var(--muted);
}

.to-top { transition: color .3s ease; }
.to-top:hover { color: var(--ink); }

/* ------------------------------------------------------------------
   Visionneuse
   ------------------------------------------------------------------ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  opacity: 0;
  transition: opacity .4s ease;
}

.lightbox.is-open { opacity: 1; }

.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: var(--pad);
  font-size: clamp(.9375rem, 1.15vw, 1.125rem);
}

.lightbox__count { font-variant-numeric: tabular-nums; }

.lightbox__close,
.lightbox__arrow { transition: color .3s ease; }

.lightbox__close:hover,
.lightbox__arrow:hover { color: var(--muted); }

.lightbox__track {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  outline: none;
}

.lightbox__track::-webkit-scrollbar { display: none; }

.lightbox__slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--pad);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.lightbox__slide img {
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__caption {
  margin: 0;
  color: var(--muted);
}

.lightbox__arrows {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}

.lightbox__arrow {
  font-size: 1.25em;
  line-height: 1;
  padding: .25rem 0;
}

.lightbox__arrow:disabled {
  color: var(--muted);
  opacity: .4;
  cursor: default;
}

/* ------------------------------------------------------------------
   À propos — jeu typographique
   ------------------------------------------------------------------ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.c-rose  { --c: var(--rose); }
.c-vert  { --c: var(--vert); }
.c-jaune { --c: var(--jaune); }
.c-rouge { --c: var(--rouge); }
.c-bleu  { --c: var(--bleu); }
.c-olive { --c: var(--olive); }

.f-200  { font-weight: 200; }
.f-200i { font-weight: 200; font-style: italic; }
.f-400  { font-weight: 400; }
.f-400i { font-weight: 400; font-style: italic; }
.f-600  { font-weight: 600; }
.f-900  { font-weight: 900; }
.f-900i { font-weight: 900; font-style: italic; }

/* L'affiche : une composition fixe qui se met à l'échelle de sa largeur
   (toutes les mesures sont en cqw, centièmes de la largeur). */

.affiche {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 100 / 95;
  margin: 0 var(--pad);
}

.affiche > * {
  position: absolute;
  left: calc(var(--x) * 1cqw);
  top: calc(var(--y) * 1cqw);
  margin: 0;
  animation: bloc-in .8s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms + 120ms);
}

@keyframes bloc-in {
  from { opacity: 0; transform: translate3d(0, 1.5cqw, 0); }
  to   { opacity: 1; transform: none; }
}

.forme {
  width: calc(var(--w) * 1cqw);
  height: calc(var(--h) * 1cqw);
  background: var(--c);
}

.mot {
  font-size: calc(var(--fs) * 1cqw);
  line-height: 1;
  letter-spacing: -.025em;
  padding: .02em .14em 0 .06em;
  background: var(--c);
}

.mot span {
  display: block;
  white-space: nowrap;
}

.forme--texte {
  display: flex;
  align-items: flex-end;
  padding: 1.4cqw;
}

.petit {
  max-width: 36cqw;
  margin: 0;
  font-size: 1.3cqw;
  line-height: 1.35;
}

.petit--bas { width: calc(var(--w) * 1cqw); }

/* Le texte */

.texte {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(3.5rem, 8vw, 8rem);
  align-items: start;
  padding: clamp(5rem, 12vw, 11rem) var(--pad) 0;
  font-size: clamp(1rem, 1.1vw, 1.1875rem);
  line-height: 1.55;
}

.texte__p {
  margin: 0;
  hyphens: auto;
  text-wrap: pretty;
}

.lead {
  display: block;
  margin-bottom: .5em;
  font-weight: 200;
  font-size: 2.15em;
  line-height: 1.02;
  letter-spacing: -.025em;
  hyphens: none;
}

.texte__p--1 { grid-column: 1 / span 6; grid-row: 1; }
.citation--1 { grid-column: 8 / -1; grid-row: 1; align-self: end; justify-self: end; }
.citation--2 { grid-column: 1 / span 6; grid-row: 2; align-self: center; }
.texte__p--2 { grid-column: 7 / -1; grid-row: 2; }
.citation--3 { grid-column: 2 / -1; grid-row: 3; justify-self: end; }
.texte__p--3 { grid-column: 3 / span 6; grid-row: 4; }
.texte__signature { grid-column: 10 / -1; grid-row: 4; align-self: end; }

.citation {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.25rem);
  line-height: 1;
  letter-spacing: -.03em;
}

.citation span {
  display: block;
  width: max-content;
  max-width: 100%;
  padding: .02em .14em 0 .06em;
  background: var(--c);
}

.citation span:nth-child(2) { margin-left: 1.2em; }
.citation--3 { font-size: clamp(3rem, 9.5vw, 10rem); }
.citation--3 span:nth-child(2) { margin-left: .6em; }

.texte__signature {
  margin: 0;
  line-height: 1.3;
}

.texte__signature span { display: block; }

/* Le bandeau final */

.bandeau {
  container-type: inline-size;
  margin: clamp(6rem, 13vw, 11rem) var(--pad) 0;
}

.bandeau__labels {
  display: flex;
  justify-content: space-around;
  gap: 1em;
  margin: 0;
  padding: .45em 1em .35em;
  background: var(--vert);
  font-size: clamp(9px, 1.15cqw, 15px);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bandeau__main {
  display: grid;
  grid-template-columns: 37fr 26fr 37fr;
  height: 12cqw;
}

.bandeau__g,
.bandeau__d {
  position: relative;
  overflow: hidden;
}

.bandeau__g { background: var(--vert); }
.bandeau__d { background: var(--rose); }

.bandeau__g::before,
.bandeau__d::before {
  content: "";
  position: absolute;
  inset: 0;
}

.bandeau__g::before { background: var(--rose); clip-path: polygon(0 0, 100% 0, 100% 80%); }
.bandeau__d::before { background: var(--vert); clip-path: polygon(0 100%, 100% 15%, 100% 100%); }

.bandeau__g span,
.bandeau__d span {
  position: absolute;
  bottom: -.2em;
  font-size: 9.6cqw;
  line-height: 1;
  letter-spacing: -.04em;
  white-space: nowrap;
}

.bandeau__g span { left: .05em; font-size: 9cqw; }
.bandeau__d span { right: .08em; }

.bandeau__c {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35cqw;
  padding: 0 .8cqw;
  background: var(--jaune);
}

/* « Tout est compression » : des cercles qui se resserrent. */
.bandeau__c i {
  flex: 0 1 auto;
  min-width: 0;
  height: 9.5cqw;
  border-radius: 999px;
  background: var(--rouge);
}

.bandeau__c i:nth-child(1) { width: 9.5cqw; }
.bandeau__c i:nth-child(2) { width: 6.2cqw; }
.bandeau__c i:nth-child(3) { width: 4cqw; }
.bandeau__c i:nth-child(4) { width: 2.6cqw; }
.bandeau__c i:nth-child(5) { width: 1.7cqw; }
.bandeau__c i:nth-child(6) { width: 1.1cqw; }
.bandeau__c i:nth-child(7) { width: .7cqw; }

/* ------------------------------------------------------------------
   Mobile
   ------------------------------------------------------------------ */

@media (max-width: 720px) {
  .view--home { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .home-figure--atelier { grid-column: 2 / -1; }
  .home-figure--regard  { grid-column: 1 / span 5; }

  .gallery {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    row-gap: 3.5rem;
    padding: 0 var(--pad);
  }

  .work {
    grid-column: var(--m-start) / span var(--m-span);
    grid-row: auto;
    margin-top: 0;
  }

  .gallery--cote-a-cote { gap: 3.5rem; }
  .ligne { flex-direction: column; gap: 3.5rem; }
  .ligne > .work { flex: none; width: 100%; }
  .ligne__vide { display: none; }

  .affiche { margin: 0; }
  .affiche .petit { display: none; }

  .texte { grid-template-columns: minmax(0, 1fr); }
  .texte > * { grid-column: 1; grid-row: auto; }
  .citation--1,
  .citation--3 { justify-self: end; }
  .citation--2 { justify-self: start; }
  .texte__signature { justify-self: end; }
}

/* ------------------------------------------------------------------
   Mouvement réduit
   ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .view,
  .affiche > * { animation: none; }
  .js .reveal,
  .js .reveal img {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .lightbox { transition: none; }
}
