/* Polices : Cormorant Garamond et Karla, licence SIL Open Font License 1.1 */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Karla";
  src: url("../fonts/karla.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --creme: #f4ede2;
  --sable: #e6d9c5;
  --argile: #b05f43;
  --argile-fonce: #8c4630;
  --ocre: #d49a52;
  --humus: #2b201a;
  --ecorce: #5c4a3e;
  --email: #3d6a72;

  --titre: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --texte: "Karla", "Helvetica Neue", Arial, sans-serif;

  --marge: clamp(1.25rem, 5vw, 5rem);
  --largeur: 78rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--humus);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Grain léger, comme une terre crue */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.17 0 0 0 0 0.12 0 0 0 0 0.1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

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

h1,
h2 {
  margin: 0;
  font-family: var(--titre);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

.surtitre {
  margin-bottom: 1.1rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--argile);
}

/* En-tête */
.entete {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: var(--largeur);
  margin: 0 auto;
  padding: 1.75rem var(--marge) 0;
}

.marque {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  text-decoration: none;
}

.marque-nom {
  font-family: var(--titre);
  font-style: italic;
  font-size: 1.9rem;
  line-height: 1;
}

.marque-metier {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ecorce);
}

.entete nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.9rem;
}

.entete nav a {
  padding: 0.3rem 0;
  font-size: 0.92rem;
  text-decoration: none;
  background: linear-gradient(var(--argile), var(--argile)) left bottom / 0 1px no-repeat;
  transition: background-size 0.3s ease;
}

.entete nav a:hover,
.entete nav a:focus-visible {
  background-size: 100% 1px;
}

/* Accueil */
.accueil {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  max-width: var(--largeur);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--marge) clamp(4rem, 9vw, 8rem);
}

h1 {
  font-size: clamp(3rem, 7.2vw, 6.25rem);
}

h1 em {
  display: block;
  color: var(--argile);
}

.chapeau {
  max-width: 27rem;
  margin-top: 2rem;
  font-family: var(--titre);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.35;
  color: var(--ecorce);
}

.bouton {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  background: var(--humus);
  color: var(--creme);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background-color 0.25s ease;
}

.bouton:hover,
.bouton:focus-visible {
  background: var(--argile-fonce);
}

.accueil-image {
  position: relative;
  justify-self: center;
  width: min(100%, 27rem);
}

.arche {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 999px 999px 0.75rem 0.75rem;
  box-shadow: 0 2rem 3.5rem -1.5rem rgb(43 32 26 / 0.45);
}

.disque {
  position: absolute;
  right: -14%;
  bottom: -9%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ocre);
}

/* La terre */
.terre {
  background: var(--humus);
  color: var(--creme);
  border-radius: clamp(1.5rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 3.5rem) 0 0;
}

.terre-contenu {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  max-width: var(--largeur);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) var(--marge);
}

.terre .surtitre {
  color: var(--ocre);
}

.terre-texte > p:not(.surtitre) {
  max-width: 32rem;
  margin-top: 1.4rem;
  color: rgb(244 237 226 / 0.82);
}

.elements {
  display: grid;
  gap: 1.1rem;
  margin: 2.75rem 0 0;
  padding-top: 2rem;
  border-top: 1px solid rgb(244 237 226 / 0.18);
}

.elements div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  align-items: baseline;
  gap: 1rem;
}

.elements dt {
  font-family: var(--titre);
  font-style: italic;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--ocre);
}

.elements dd {
  margin: 0;
  font-size: 0.98rem;
  color: rgb(244 237 226 / 0.82);
}

.terre-image {
  margin: 0;
}

.terre-image img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border-radius: 0.75rem;
}

/* Titres de section */
.titre-section {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.titre-section p:not(.surtitre) {
  margin-top: 1.4rem;
  color: var(--ecorce);
}

.pieces,
.table,
.marches {
  max-width: var(--largeur);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 8rem) var(--marge);
}

/* Pièces */
.pieces-grille {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.25rem, 3vw, 3rem);
}

/* Largeur proportionnelle au format de chaque photo : hauteurs égales, sans recadrage */
.piece {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.piece:nth-child(1) {
  flex-grow: 1.05;
}

.piece:nth-child(2) {
  flex-grow: 0.7;
}

.piece:nth-child(3) {
  flex-grow: 0.78;
}

.piece-image {
  overflow: hidden;
  border-radius: 0.6rem;
}

.piece-image img {
  width: 100%;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.piece:hover .piece-image img {
  transform: scale(1.04);
}

.piece figcaption {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ecorce);
}

.piece figcaption span {
  display: block;
  font-family: var(--titre);
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--humus);
}

/* À table */
.table {
  padding-top: 0;
}

.mosaique {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.4vw, 1.25rem);
  aspect-ratio: 3 / 1.42;
}

.mosaique img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.6rem;
}

.mosaique .haute {
  grid-row: span 2;
}

.mosaique img:nth-child(2) {
  grid-area: 1 / 2;
}

.mosaique img:nth-child(3) {
  grid-area: 2 / 2;
}

/* Marchés */
.marches {
  padding-top: 0;
}

.etals {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: clamp(0.6rem, 1.4vw, 1.25rem);
}

.etals img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.6rem;
}

.etal-b {
  grid-area: 1 / 2 / 3 / 3;
}

/* Contact */
.contact {
  padding: clamp(4rem, 9vw, 7rem) var(--marge);
  background: var(--argile);
  color: var(--creme);
  text-align: center;
}

.contact p {
  max-width: 30rem;
  margin: 1.4rem auto 0;
  font-family: var(--titre);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.35;
}

.contact .contact-note {
  margin-top: 2.25rem;
  font-family: var(--texte);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* Pied de page */
.pied {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 2rem var(--marge);
  background: var(--humus);
  color: rgb(244 237 226 / 0.7);
  font-size: 0.85rem;
}

.pied .marque-nom {
  color: var(--creme);
}

:focus-visible {
  outline: 2px solid var(--email);
  outline-offset: 4px;
}

/* Écrans étroits */
@media (max-width: 52rem) {
  .accueil,
  .terre-contenu {
    grid-template-columns: minmax(0, 1fr);
  }

  .accueil-image {
    width: min(78%, 22rem);
    margin-top: 1rem;
  }

  .pieces-grille {
    flex-direction: column;
    align-items: stretch;
    max-width: 24rem;
    margin: 0 auto;
    gap: 3rem;
  }

  .mosaique {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    aspect-ratio: auto;
  }

  .mosaique img,
  .mosaique img:nth-child(2),
  .mosaique img:nth-child(3),
  .mosaique .haute {
    grid-area: auto;
    aspect-ratio: 1;
  }

  .etals {
    grid-template-columns: minmax(0, 1fr);
  }

  .etal-b {
    grid-area: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
