:root {
  --paper: #ffffff;
  --sand: #ece7de;
  --ink: #15191e;
  --ink-soft: #565d65;
  --night: #0f1317;
  --on-night: #f4f2ee;
  --on-night-soft: #a9b0b7;
  --line: #dcd8d0;
  --line-night: rgba(255, 255, 255, 0.18);

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1360px;
  --gutter: clamp(20px, 3.4vw, 48px);
  --section: clamp(56px, 6.4vw, 104px);
  --header: 84px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --slow: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.012em; line-height: 1; }
main:focus { outline: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: -999px; top: 8px; z-index: 100; padding: 10px 16px; background: var(--ink); color: #fff; }
.skip-link:focus { left: 8px; }

/* Éléments communs */
.link {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  font-weight: 500;
}
.link::after { content: "→"; transition: transform 0.25s var(--ease); }
.link:hover::after { transform: translateX(5px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px;
  background: var(--ink); color: #fff; border: 0;
  font-weight: 500; cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: #33393f; }
.btn-light { background: var(--on-night); color: var(--ink); }
.btn-light:hover { background: #fff; }

.kicker { margin-bottom: 20px; font-size: 15px; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-top: 36px; }

.plain-list a { display: inline-block; padding: 5px 0; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 4px) / 0 1px no-repeat; transition: background-size 0.3s var(--ease); }
.plain-list a:hover { background-size: 100% 1px; }

/* En-tête */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: #fff;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.site-header.is-solid, .site-header.is-active {
  background: var(--paper); color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 32px; height: var(--header); }
.brand { font: 400 29px/1 var(--serif); letter-spacing: -0.01em; white-space: nowrap; }

.menu-toggle { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0; background: none; border: 0; font-weight: 500; cursor: pointer; }
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-list { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 38px); }
.nav-trigger {
  position: relative;
  display: flex; align-items: center;
  height: var(--header); padding: 0;
  background: none; border: 0;
  font-size: 15px; font-weight: 500; white-space: nowrap;
  cursor: pointer;
}
.nav-trigger::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 26px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-trigger:hover::after, .is-open > .nav-trigger::after { transform: scaleX(1); }
.nav-search::after { display: none; }
.nav-search-label { display: none; }

.panel {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--paper); color: var(--ink);
  border-top: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(15, 19, 23, 0.28);
}
.is-open > .panel { display: block; animation: panel-in 0.22s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(-6px); } }

.panel-inner { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; padding-block: 48px 56px; }
.panel-title { margin-bottom: 10px; font: 400 40px/1.05 var(--serif); }
.panel-intro p:not(.panel-title) { max-width: 26em; margin-bottom: 14px; color: var(--ink-soft); }
.panel-label { margin-bottom: 12px; font-size: 14px; color: var(--ink-soft); }
.panel-list a { display: inline-block; padding: 6px 0; font-size: 18px; }
.panel-list a:hover { color: var(--ink-soft); }
.panel-list-2 { columns: 2; column-gap: 48px; }
.panel-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }

.search { display: flex; gap: 16px; padding-block: 36px 40px; }
.search input { flex: 1; min-width: 0; height: 52px; padding: 0; background: none; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; font: 400 28px/1 var(--serif); color: var(--ink); -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--ink-soft); opacity: 1; }
.search input:focus { outline: none; border-bottom-width: 2px; }

/* Ouverture */
.hero { position: relative; min-height: 460px; height: 100svh; max-height: 980px; background: var(--night); color: #fff; overflow: hidden; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.62) brightness(0.62); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 16, 22, 0.42) 0, rgba(10, 16, 22, 0) 26%, rgba(10, 16, 22, 0) 58%, rgba(10, 16, 22, 0.55) 100%); }
.hero-wave { position: absolute; z-index: 1; left: 0; top: 50.3%; width: 100%; translate: 0 -50%; filter: grayscale(1) invert(1) brightness(7); mix-blend-mode: screen; opacity: 0.68; }
.hero-content { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; padding-bottom: clamp(28px, 3.4vw, 48px); margin-inline: auto; }
.hero-name { grid-column: 1 / -1; margin-bottom: 8px; font-size: 18px; font-weight: 500; }
.hero h1 { font-size: clamp(68px, 12.2vw, 188px); line-height: 0.92; letter-spacing: -0.022em; }
.hero-credit { padding-bottom: 12px; font-size: 14px; }

/* Introduction */
.intro { padding-block: var(--section); }
.intro-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px; align-items: end; }
.statement { grid-column: 1 / span 8; font: 400 clamp(36px, 4.1vw, 62px)/1.1 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.intro-bio { grid-column: 10 / -1; color: var(--ink-soft); font-size: 16px; }
.intro-bio .link { margin-top: 10px; color: var(--ink); }

/* Créations */
.creations { padding-block: var(--section); }
.creations-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px; padding-top: 28px; background: linear-gradient(var(--ink), var(--ink)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.creations-head { grid-column: 1 / span 3; position: sticky; top: calc(var(--header) + 28px); align-self: start; }
.creations-head h2 { margin-bottom: 28px; font-size: clamp(44px, 4.4vw, 68px); }
.creations-head .link { margin-top: 18px; }
.works { grid-column: 4 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 36px 28px; }
.work-lead { grid-column: 1 / -1; }
.work a { display: block; }
.work-frame { display: block; overflow: hidden; background: var(--sand); }
.work img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; transition: transform 0.7s var(--ease); }
.work-lead img { aspect-ratio: 3 / 1; }
.work a:hover img { transform: scale(1.025); }
.work-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-top: 14px; }
.work-title { font: 400 30px/1.1 var(--serif); }
.work-lead .work-title { font-size: 44px; }
.work-meta { font-size: 14px; color: var(--ink-soft); text-align: right; }

/* Livre */
.book { padding-block: var(--section); background: var(--sand); }
.book-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px; align-items: center; }
.book-cover { grid-column: 2 / span 4; }
.book-cover img { width: 100%; box-shadow: 0 30px 50px -22px rgba(40, 28, 22, 0.5); transition: transform 0.6s var(--ease); }
.book-cover:hover img { transform: translateY(-6px); }
.book-text { grid-column: 7 / span 6; }
.book h2 { font-size: clamp(52px, 6.4vw, 100px); line-height: 0.98; }
.book-sub { margin: 22px 0 18px; font: 400 clamp(23px, 2.1vw, 30px)/1.2 var(--serif); }
.book-text > p:not(.kicker):not(.book-sub) { max-width: 30em; color: #4c4a45; }
.rule-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; margin-top: 28px; }
.rule-list li { border-top: 1px solid #c9c2b5; }
.rule-list a { display: flex; align-items: center; justify-content: space-between; min-height: 54px; font-weight: 500; }
.rule-list a::after { content: "→"; transition: transform 0.25s var(--ease); }
.rule-list a:hover::after { transform: translateX(5px); }

/* Musée */
.museum {
  display: grid;
  grid-template-columns: minmax(var(--gutter), 1fr) minmax(0, calc(var(--wrap) / 2)) minmax(0, calc(var(--wrap) / 2)) minmax(var(--gutter), 1fr);
  background: var(--night); color: var(--on-night);
}
.museum-text {
  grid-column: 2;
  padding-block: var(--section);
  padding-right: clamp(32px, 6vw, 96px);
  align-self: center;
}
.museum h2 { font-size: clamp(52px, 6.4vw, 100px); line-height: 0.98; }
.museum-intro { margin-top: 24px; max-width: 30em; font-size: 19px; color: #dedcd7; }
.rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line-night); }
.rooms h3 { margin-bottom: 12px; font-size: 14px; font-weight: 400; color: var(--on-night-soft); }
.museum-image { grid-column: 3 / -1; position: relative; display: block; min-height: 100%; overflow: hidden; }
.museum-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.museum-image:hover img { transform: scale(1.02); }
.museum-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 72px 28px 24px; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72)); font-size: 14px; }

/* Derniers ajouts */
.latest { padding-block: var(--section); }
.latest-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 24px; }
.latest h2 { font-size: clamp(44px, 4.4vw, 68px); }
.entries { border-bottom: 1px solid var(--line); }
.entries li { border-top: 1px solid var(--line); }
.entries a { display: grid; grid-template-columns: 1fr 200px 28px; align-items: baseline; gap: 24px; padding: 14px 0; transition: padding 0.3s var(--ease); }
.entries a::after { content: "→"; text-align: right; }
.entries a:hover { padding-left: 12px; }
.entry-title { font: 400 clamp(25px, 2.3vw, 33px)/1.15 var(--serif); text-wrap: balance; }
.entry-type { font-size: 14px; color: var(--ink-soft); }

/* Pied de page */
.site-footer { padding-bottom: 18px; background: var(--night); color: var(--on-night); overflow: hidden; }
.footer-wave { width: 100%; height: clamp(44px, 5.4vw, 96px); object-fit: fill; filter: grayscale(1) invert(1) brightness(7); mix-blend-mode: screen; opacity: 0.5; transform-origin: 50% 100%; }
.footer-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 32px 48px; padding-block: clamp(24px, 3vw, 44px); }
.footer-lead { max-width: 15em; font: 400 clamp(26px, 2.5vw, 44px)/1.12 var(--serif); text-wrap: balance; }
.footer-intro .link { margin-top: 6px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; }
.footer-label { margin-bottom: 8px; font-size: 14px; color: var(--on-night-soft); }
.footer-mark { overflow: hidden; padding-bottom: 0.04em; }
.footer-brand {
  display: block;
  font: 400 calc((min(100vw, var(--wrap) + 2 * var(--gutter)) - 2 * var(--gutter)) / 4.9)/1.02 var(--serif);
  letter-spacing: -0.022em; white-space: nowrap;
}
.footer-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line-night); font-size: 14px; color: var(--on-night-soft); }
.lang { display: flex; gap: 18px; }
.lang [aria-current] { color: var(--on-night); }
.lang a { display: inline-block; padding-block: 8px; transition: color 0.3s; }
.lang a:hover { color: var(--on-night); }
.to-top { justify-self: end; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--on-night); }
.to-top::after { content: "↑"; transition: transform 0.4s var(--ease); }
.to-top:hover::after { transform: translateY(-4px); }

/* La loupe garde son alignement sur la grille avec une cible de 44 px */
@media (min-width: 1101px) {
  .nav-search { justify-content: center; min-width: 44px; margin-inline: -12.5px; }
}

/* Tablette et mobile */
@media (max-width: 1100px) {
  :root { --header: 68px; }

  .menu-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 4px var(--gutter) 28px;
    background: var(--paper); color: var(--ink);
    border-top: 1px solid var(--line);
  }
  .main-nav.is-open { display: block; }
  .nav-list { display: block; }
  .nav-item { border-bottom: 1px solid var(--line); }
  .nav-trigger { width: 100%; height: 64px; font: 400 29px/1 var(--serif); }
  .nav-trigger::after { display: none; }
  .nav-search { gap: 12px; }
  .nav-search-label { display: inline; }

  .panel { position: static; border: 0; box-shadow: none; }
  .panel .wrap { padding-inline: 0; }
  .panel-inner { display: block; padding-block: 0 20px; }
  .panel-title { display: none; }
  .panel-intro p { display: none; }
  .panel-intro { margin-bottom: 6px; }
  .panel-list-2 { columns: 1; }
  .panel-groups { grid-template-columns: 1fr; gap: 20px; }
  .search { padding-block: 0 20px; flex-direction: column; }
  .search input { flex: none; font-size: 23px; }

  .intro-grid, .creations-grid { display: block; }
  .intro-bio { margin-top: 24px; max-width: 36em; }
  .creations-head { position: static; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 28px; margin-bottom: 24px; }
  .creations-head h2 { width: 100%; margin-bottom: 4px; }
  .creations-head .plain-list { display: flex; flex-wrap: wrap; gap: 0 24px; }
  .creations-head .link { margin-top: 0; }
  .book-grid { grid-template-columns: 5fr 7fr; gap: 36px; }
  .book-cover { grid-column: 1; }
  .book-text { grid-column: 2; }
  .museum { display: flex; flex-direction: column; }
  .museum-image { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
  .museum-text { align-self: stretch; padding-inline: var(--gutter); }
  .entries a { grid-template-columns: 1fr 130px 24px; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-credit { padding: 8px 0 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .search input { font-size: clamp(17px, 5.6vw, 23px); }
  .hero-content { grid-template-columns: 1fr; }
  .hero-credit { padding: 12px 0 0; }
  .hero-wave { width: 170%; max-width: none; left: -35%; }
  .book-grid { display: block; }
  .book-cover { display: block; max-width: 220px; margin-bottom: 28px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > :last-child { grid-column: 1 / -1; }
  .footer-bottom { grid-template-columns: 1fr auto; }
  .footer-bottom > p:first-child { display: none; }
  .museum-image { aspect-ratio: 4 / 3; }
  .works { grid-template-columns: 1fr; gap: 28px; }
  .work-lead img { aspect-ratio: 2 / 1; }
  .work-lead .work-title { font-size: 36px; }
  .work-caption { flex-direction: column; gap: 2px; }
  .work-meta { text-align: left; }
  .rule-list { grid-template-columns: 1fr; }
  .rooms { grid-template-columns: 1fr 1fr; gap: 20px; }
  .latest-head { flex-direction: column; gap: 4px; }
  .entries a { grid-template-columns: 1fr 24px; gap: 4px 12px; padding: 18px 0; }
  .entry-type { grid-row: 2; }
  .entries a::after { grid-column: 2; grid-row: 1; }
}

/* Grands écrans de bureau */
@media (min-width: 1800px) {
  :root { --wrap: 1680px; --header: 96px; }
  body { font-size: 19px; }
  .hero { max-height: 1180px; }
  .hero h1 { font-size: 13vw; }
  .nav-trigger, .plain-list a, .link { font-size: 17px; }
  .work-meta, .entry-type, .hero-credit, .footer-bottom, .footer-label { font-size: 16px; }
  .statement { font-size: 76px; }
  .book h2, .museum h2 { font-size: 124px; }
  .latest h2, .creations-head h2 { font-size: 84px; }
  .work-title { font-size: 38px; }
  .work-lead .work-title { font-size: 56px; }
  .entry-title { font-size: 40px; }
  .panel-list a { font-size: 20px; }
  .brand { font-size: 34px; }
  .kicker { font-size: 17px; }
  .hero-name { font-size: 21px; }
  .intro-bio { font-size: 18px; }
  .museum-intro { font-size: 22px; }
  .book-sub { font-size: 34px; }
  .panel-title { font-size: 48px; }
  .museum-caption, .rooms h3, .panel-label { font-size: 16px; }
}

@media (min-width: 2400px) {
  :root { --wrap: 2040px; }
  body { font-size: 21px; }
  .hero { max-height: 1400px; }
  .statement { font-size: 92px; }
  .book h2, .museum h2 { font-size: 150px; }
  .brand { font-size: 40px; }
  .nav-trigger, .plain-list a, .link { font-size: 20px; }
  .kicker { font-size: 20px; }
  .hero-name { font-size: 24px; }
  .intro-bio { font-size: 21px; }
  .museum-intro { font-size: 25px; }
  .book-sub { font-size: 38px; }
  .latest h2, .creations-head h2 { font-size: 100px; }
  .work-title { font-size: 44px; }
  .work-lead .work-title { font-size: 64px; }
  .entry-title { font-size: 46px; }
  .panel-title { font-size: 56px; }
  .panel-list a { font-size: 22px; }
  .work-meta, .entry-type, .hero-credit, .footer-bottom, .footer-label, .museum-caption, .rooms h3, .panel-label { font-size: 18px; }
}

/* Téléphone à l'horizontale */
@media (max-height: 480px) and (orientation: landscape) {
  .hero h1 { font-size: 15vh; }
  .hero-name { margin-bottom: 2px; font-size: 15px; }
}

html:not(.js) .main-nav, html:not(.js) .menu-toggle { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Sites amis */
.footer-friends { display: grid; grid-template-columns: 4fr 8fr; gap: 8px 48px; padding-bottom: clamp(24px, 3vw, 44px); }
.footer-friends .plain-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
@media (max-width: 1100px) {
  .footer-friends { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .footer-friends .plain-list { grid-template-columns: 1fr 1fr; }
}

/* Sélecteur de langue de l'en-tête */
.nav-lang, .header-lang { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.header-lang { display: none; }
.nav-lang a, .header-lang a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 2px; opacity: 0.62; transition: opacity 0.3s; }
.nav-lang a:hover, .header-lang a:hover, .nav-lang a:focus-visible, .header-lang a:focus-visible { opacity: 1; }
.nav-lang [aria-current], .header-lang [aria-current] { opacity: 1; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.lang-sep { opacity: 0.4; }
.lang-short { display: none; }
@media (max-width: 1100px) {
  .nav-lang { display: none; }
  .header-lang { display: flex; margin-left: auto; margin-right: -12px; }
}
@media (max-width: 640px) {
  .header-lang { gap: 4px; margin-right: -18px; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
}
