/* Polices hébergées sur le site même : aucune requête vers un service externe. */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("/fonts/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --fond: #f6f1ea;
  --surface: #eee6da;
  --encre: #221d18;
  --doux: #6f655b;
  --trait: #ddd2c4;
  --accent: #9a6b4f;

  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --marge: clamp(16px, 5vw, 64px);
  --largeur: 1240px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 380;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 0;
}

/* Lien d'évitement pour la navigation au clavier */
.evitement {
  position: absolute;
  left: var(--marge);
  top: -100px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--encre);
  color: var(--fond);
  text-decoration: none;
}
.evitement:focus {
  top: 12px;
}

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

.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--marge);
  background: rgb(246 241 234 / 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.entete.defile {
  border-bottom-color: var(--trait);
}

.marque {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.navigation {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
}
.navigation a {
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--doux);
  transition: color 0.2s ease;
}
.navigation a:hover {
  color: var(--encre);
}

/* ---------- Accueil ---------- */

.accueil {
  display: grid;
  gap: 48px;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) var(--marge) 0;
}

.surtitre {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.surtitre::before {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

.accueil h1 {
  margin: 0.12em 0 0.22em;
  font-size: clamp(64px, 13vw, 156px);
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.chapeau {
  max-width: 32ch;
  margin: 0 0 36px;
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--doux);
}

.bouton {
  display: inline-flex;
  align-items: center;
  padding: 15px 28px;
  border: 1px solid var(--encre);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.bouton:hover {
  background: var(--encre);
  color: var(--fond);
}

.accueil-photo {
  position: relative;
  margin: 0 18px 18px 0;
}
/* Cadre décalé, façon tirage photo */
.accueil-photo::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--trait);
  pointer-events: none;
}
.accueil-photo img,
.accueil-photo .photo-attente {
  position: relative;
  width: 100%;
}

@media (min-width: 900px) {
  .accueil {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(48px, 7vw, 112px);
    min-height: calc(100svh - 64px);
    padding-bottom: 48px;
  }
  .accueil h1 {
    font-size: clamp(64px, 8.5vw, 120px);
  }
  /* La photo principale tient toujours dans l'écran */
  .accueil-photo {
    justify-self: end;
    width: min(100% - 18px, 78svh * 3 / 4);
  }
}

/* ---------- Photos en attente (seront remplacées par les vraies) ---------- */

.photo-attente {
  display: grid;
  place-items: center;
  aspect-ratio: var(--ratio, 4 / 5);
  background:
    radial-gradient(120% 90% at 30% 20%, rgb(255 255 255 / 0.35), transparent 60%),
    var(--teinte, #ddd0bf);
  color: rgb(34 29 24 / 0.45);
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
}

/* ---------- Sections ---------- */

.portrait,
.galerie {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: clamp(80px, 11vw, 150px) var(--marge) 0;
}

.section-titre {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 20px;
  margin-bottom: clamp(36px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--trait);
}
.numero {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--accent);
}
.section-titre h2 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
}
.section-intro {
  grid-column: 2;
  margin: 12px 0 0;
  color: var(--doux);
}

/* ---------- Portrait ---------- */

.portrait-grille {
  display: grid;
  gap: 48px;
}
@media (min-width: 900px) {
  .portrait-grille {
    grid-template-columns: 7fr 5fr;
    gap: clamp(56px, 8vw, 120px);
    align-items: start;
  }
}

.portrait-texte p {
  max-width: 56ch;
  margin: 0 0 1.2em;
  font-size: clamp(18px, 1.6vw, 20px);
}
.lettrine::first-letter {
  float: left;
  margin: 0.04em 0.1em 0 0;
  font-family: var(--serif);
  font-size: 4.4em;
  line-height: 0.8;
  color: var(--accent);
}

.fiche {
  padding: clamp(24px, 3vw, 36px);
  background: var(--surface);
}
.fiche-titre {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.fiche dl {
  margin: 0;
}
.fiche dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--trait);
}
.fiche dl > div:last-child {
  border-bottom: 0;
}
.fiche dt {
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--doux);
}
.fiche dt {
  flex-shrink: 0;
}
.fiche dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.3;
  text-align: right;
}
.fiche .a-preciser {
  font-style: italic;
  color: var(--doux);
}

/* ---------- Galerie ---------- */

/* Grille régulière, lue de gauche à droite : toutes les vignettes au format 3:4 */
.mosaique {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px 12px;
}
.mosaique figure {
  margin: 0;
}
.mosaique .photo-attente {
  --ratio: 3 / 4;
}
@media (min-width: 560px) {
  .mosaique {
    gap: 28px 20px;
  }
}
@media (min-width: 960px) {
  .mosaique {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px 24px;
  }
}

.vignette {
  display: block;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}
.vignette img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.vignette:hover img {
  transform: scale(1.03);
}

.mosaique figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--doux);
}

/* ---------- Mot de la fin ---------- */

.envoi {
  padding: clamp(110px, 15vw, 190px) var(--marge);
  text-align: center;
}
.envoi p {
  max-width: 24ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.22;
}
.envoi em {
  color: var(--doux);
}

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

.pied {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 0 var(--marge) 40px;
}
.pied-ligne {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 28px;
  border-top: 1px solid var(--trait);
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--doux);
}

/* ---------- Visionneuse (photo agrandie) ---------- */

.visionneuse {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(22 19 16 / 0.95);
  color: #f6f1ea;
}
.visionneuse[open] {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
}
.visionneuse::backdrop {
  background: transparent;
}
.visionneuse figure {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 0;
  min-width: 0;
}
.visionneuse img {
  max-height: 84dvh;
  width: auto;
  object-fit: contain;
}
.visionneuse figcaption {
  font-size: 14px;
  color: rgb(246 241 234 / 0.7);
  text-align: center;
}
.visionneuse button {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: 300 44px/1 var(--sans);
  cursor: pointer;
  padding: 12px;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
.visionneuse button:hover {
  opacity: 1;
}
.visionneuse-fermer {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 40px !important;
}
@media (min-width: 900px) {
  .visionneuse[open] {
    grid-template-columns: 96px 1fr 96px;
  }
}

/* ---------- Apparition douce au défilement ---------- */

.js .apparition {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.js .apparition.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .apparition {
    transform: none;
    transition: opacity 0.4s ease;
  }
  .vignette img {
    transition: none;
  }
}
