/* Clair-obscur : du noir, une seule source de lumière, et rien de plus. */
:root {
  --noir: #0a0908;
  --lumiere: rgba(226, 190, 138, 0.17);
  --clair: #efe9df;
  --gris: #99917f;
  --trait: rgba(239, 233, 223, 0.14);
  --dore: #d8b57f;
  --texte: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --titres: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--noir); scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--clair);
  font: 400 1rem/1.7 var(--texte);
}
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.cadre {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 68rem;
  min-height: 100vh;
  margin-inline: auto;
  padding: 0 clamp(16px, 5vw, 3.5rem);
}
.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: clamp(1.25rem, 3vw, 2rem);
}
.navigation { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.lien-discret {
  color: var(--gris);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.3s ease;
}
.lien-discret:hover, .lien-discret:focus-visible { color: var(--clair); }
.contenu { flex: 1; }

.tableau {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  /* Un peu moins que la hauteur de l'écran : le haut de la galerie dépasse
     et invite à descendre. */
  min-height: calc(88svh - 6rem);
  padding-bottom: 4rem;
}
.tableau-texte { max-width: 48rem; }
.phrase {
  margin: 0;
  font-family: var(--titres);
  font-size: clamp(2.75rem, 8vw, 5.75rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.phrase-page { font-size: clamp(2.75rem, 7vw, 4.5rem); }
.surtitre { margin-top: 1.75rem; color: var(--gris); }
.signature {
  color: var(--clair);
  font-family: "Mrs Saint Delafield", "Brush Script MT", cursive;
  font-size: clamp(3rem, 6vw, 4rem);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.82;
  transform: rotate(-5deg);
  transition: opacity 0.3s ease;
}
.signature:hover, .signature:focus-visible { opacity: 1; }
.signature-tableau { position: absolute; right: 0; bottom: 1.5rem; }

.page-titre { padding-block: clamp(3rem, 10vw, 7rem) clamp(1rem, 3vw, 2rem); }
.galerie { padding-block: clamp(3rem, 8vw, 6rem); scroll-margin-top: 1rem; }
.rubrique {
  margin: 0 0 1.25rem;
  color: var(--gris);
  font-size: 0.875rem;
  font-weight: 400;
}
/* La mosaïque : autant de colonnes que la largeur le permet (trois sur un grand écran,
   une sur un téléphone). minmax() fixe la largeur minimale d'une carte. */
.oeuvres {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.oeuvre {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--trait);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.8s var(--velours, ease);
}
.oeuvre:hover, .oeuvre:focus-visible { border-color: var(--dore); }
.oeuvre-nom {
  font-family: var(--titres);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 300;
  line-height: 1.1;
  transition: color 0.3s ease;
}
.oeuvre-titre { display: flex; flex-direction: column; gap: 0.35rem; }
/* Le type, en petites capitales espacées, comme le cartel d'une œuvre au musée. */
.oeuvre-type {
  color: var(--gris);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rubrique-precision { opacity: 0.7; }
/* L'atelier suit la galerie : on réduit l'espace entre les deux pour qu'on les lise comme un tout. */
.galerie + .galerie { padding-top: clamp(1rem, 3vw, 2rem); }
/* L'atelier : des traits en pointillés, comme une esquisse pas encore achevée. */
.oeuvres-atelier .oeuvre { border-style: dashed; }
/* La description prend la place libre : l'action reste alignée en bas de chaque carte. */
.oeuvre-description { flex: 1; color: var(--gris); }
.oeuvre-credits { font-size: 0.8125rem; }
.oeuvre-action { color: var(--gris); white-space: nowrap; transition: color 0.3s ease; }
.oeuvre:hover .oeuvre-nom, .oeuvre:focus-visible .oeuvre-nom,
.oeuvre:hover .oeuvre-action, .oeuvre:focus-visible .oeuvre-action { color: var(--dore); }

.texte { max-width: 38rem; color: var(--gris); }
.texte-grand { margin-top: 1.5rem; color: var(--clair); font-size: clamp(1.05rem, 2.5vw, 1.2rem); }
.savoirs { margin: 0; border-bottom: 1px solid var(--trait); }
.savoirs div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding-block: 0.75rem;
  border-top: 1px solid var(--trait);
}
.savoirs dt { color: var(--gris); }
.savoirs dd { margin: 0; }
.deux-colonnes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem clamp(2rem, 6vw, 4.5rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.sous-titre { margin: 0 0 0.75rem; font-family: var(--titres); font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 300; line-height: 1.15; }
.suite { margin-top: 1.25rem; }
.lien { color: var(--clair); text-underline-offset: 0.3em; text-decoration-thickness: 1px; transition: color 0.3s ease; }
.lien:hover, .lien:focus-visible { color: var(--dore); }

.pied {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 2.5rem 1.75rem;
}
.legal { color: var(--gris); font-size: 0.75rem; }
.torrefie { margin: 0 0 0.35rem; color: var(--dore); font-size: 0.8125rem; }
:focus-visible { outline: 1px solid var(--dore); outline-offset: 4px; }

@media (max-width: 44rem) {
  .savoirs div { grid-template-columns: minmax(0, 1fr); }
  .savoirs dt { font-size: 0.875rem; }
  .deux-colonnes { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Le velours : lent, doux, jamais brusque ---------- */
html {
  --velours: cubic-bezier(0.22, 1, 0.36, 1);
}
/* La lumière respire, dans son propre calque pour rester fluide. */
body::before {
  content: "";
  position: fixed;
  inset: -10vh -10vw;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 90% at 22% 0%, var(--lumiere), transparent 100%);
  animation: respire 16s ease-in-out infinite alternate;
}
.phrase { animation: emerge 2.4s var(--velours) 0.15s both; }
.surtitre { animation: emerge 2.4s var(--velours) 0.75s both; }
.entete { animation: apparait 2.4s ease 1s both; }
.signature { animation: signe 2.6s cubic-bezier(0.45, 0.05, 0.25, 1) 1.4s both; }
.lien-discret,
.signature,
.lien { transition-duration: 0.7s; }
.oeuvre-nom,
.oeuvre-action { transition: color 0.8s var(--velours), transform 0.8s var(--velours); }
.oeuvre:hover .oeuvre-nom,
.oeuvre:focus-visible .oeuvre-nom { transform: translateX(0.5rem); }
.oeuvre:hover .oeuvre-action,
.oeuvre:focus-visible .oeuvre-action { transform: translateX(0.35rem); }

/* En descendant, chaque élément sort doucement de l'ombre. Sans cette prise en charge, tout reste simplement affiché. */
@supports (animation-timeline: view()) {
  .rubrique,
  .oeuvre,
  .savoirs div,
  .deux-colonnes > div {
    animation: sort-de-l-ombre linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 90%;
  }
}

@keyframes respire {
  from { opacity: 0.72; transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { opacity: 1; transform: translate3d(1.5%, 1%, 0) scale(1.06); }
}
@keyframes emerge {
  from { opacity: 0; filter: blur(10px); transform: translateY(14px); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes apparait { from { opacity: 0; } to { opacity: 1; } }
@keyframes signe {
  from { clip-path: inset(-30% 105% -30% -5%); }
  to { clip-path: inset(-30% -5% -30% -5%); }
}
@keyframes sort-de-l-ombre {
  from { opacity: 0; filter: blur(5px); transform: translateY(18px); }
  to { opacity: 1; filter: blur(0); transform: none; }
}

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