/* ===== Braise & Jardin — style éditorial ===== */

:root {
  --paper: #f6f1e7;
  --paper-deep: #efe7d8;
  --ink: #2b2723;
  --ink-soft: #6b6257;
  --accent: #c05b2e;        /* terracotta */
  --accent-deep: #9a4522;
  --line: #d8cdbb;
  --shadow: 0 18px 40px rgba(43, 39, 35, .18);
  --serif: "Didot", "Bodoni MT", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, .brand { font-family: var(--serif); font-weight: 500; }

/* ===== Barre supérieure ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.brand { font-size: 1.35rem; letter-spacing: .02em; }
.brand em { color: var(--accent); font-style: italic; }
.topnav { display: flex; gap: 22px; flex-wrap: wrap; }
.topnav a {
  color: var(--ink-soft); text-decoration: none; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .14em;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.topnav a:hover { color: var(--accent-deep); border-color: var(--accent-deep); }

/* ===== Héros ===== */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 72px 24px 90px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.kicker {
  color: var(--accent); text-transform: uppercase; letter-spacing: .22em;
  font-size: .78rem; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); line-height: 1.05; margin-bottom: 22px; }
.accent { color: var(--accent); font-style: italic; }
.lede { color: var(--ink-soft); max-width: 46ch; margin-bottom: 30px; }
.btn {
  display: inline-block; background: var(--ink); color: var(--paper);
  text-decoration: none; padding: 13px 28px; border-radius: 999px;
  font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--accent-deep); transform: translateY(-2px); }

.hero-figure { position: relative; }
.hero-figure img {
  border-radius: 6px; box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}
.hero-figure figcaption {
  margin-top: 16px; font-size: .85rem; color: var(--ink-soft);
  font-style: italic; text-align: right;
}

/* ===== Chapitres ===== */
.chapter { max-width: 1200px; margin: 0 auto; padding: 70px 24px 30px; }
.chapter-light { background: transparent; }

.chapter-head {
  display: flex; align-items: baseline; gap: 26px;
  border-top: 1px solid var(--ink);
  padding-top: 26px; margin-bottom: 60px;
}
.chapter-num {
  font-family: var(--serif); font-size: clamp(3rem, 7vw, 5rem);
  color: var(--accent); line-height: 1;
}
.chapter-head h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
.chapter-sub { color: var(--ink-soft); font-style: italic; margin-top: 4px; }

/* ===== Rangée éditoriale (paysage + texte) ===== */
.row {
  display: grid; grid-template-columns: 7fr 5fr; gap: 48px;
  align-items: center; margin-bottom: 90px;
}
.row-flip { grid-template-columns: 5fr 7fr; }
.row-flip .frame { order: 2; }
.row-flip .row-text { order: 1; text-align: right; }
.row-flip .menu-line { justify-content: flex-end; }

.frame { position: relative; }
.frame img {
  border-radius: 4px; box-shadow: var(--shadow);
  cursor: zoom-in; transition: transform .35s ease;
  width: 100%;
}
.frame img:hover { transform: scale(1.015); }
.frame::after {
  content: ""; position: absolute; inset: 12px -12px -12px 12px;
  border: 1px solid var(--line); border-radius: 4px; z-index: -1;
}
.frame.portrait-inline { max-width: 440px; justify-self: center; }
.frame.square { max-width: 520px; justify-self: center; }

.row-text h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 10px; }
.menu-line {
  display: flex; flex-wrap: wrap; gap: 4px;
  color: var(--accent-deep); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px;
}
.row-text p:not(.menu-line) { color: var(--ink-soft); margin-bottom: 14px; }

.tag {
  display: inline-block; border: 1px solid var(--accent);
  color: var(--accent-deep); border-radius: 999px;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 14px; margin-right: 6px;
}

/* ===== Duos / trios portraits ===== */
.duo, .trio {
  display: grid; gap: 40px; margin-bottom: 90px;
  align-items: start;
}
.duo { grid-template-columns: repeat(2, 1fr); max-width: 980px; margin-inline: auto; }
.trio { grid-template-columns: repeat(3, 1fr); }

.card img {
  border-radius: 4px; box-shadow: var(--shadow);
  cursor: zoom-in; transition: transform .35s ease;
}
.card img:hover { transform: translateY(-6px); }
.card figcaption { padding: 18px 6px 0; }
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card .menu-line { margin-bottom: 10px; }
.card figcaption p:not(.menu-line) { color: var(--ink-soft); font-size: .95rem; }

/* légère respiration décalée pour un rythme éditorial */
.duo .card:nth-child(2), .trio .card:nth-child(2) { margin-top: 48px; }
.trio .card:nth-child(3) { margin-top: 96px; }

/* ===== Médaillons (images détourées sur damier) ===== */
.medallions {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 48px; margin-bottom: 90px; max-width: 900px; margin-inline: auto;
}
.medallion { text-align: center; }
.medallion img {
  width: min(320px, 70vw); aspect-ratio: 1;
  object-fit: cover; margin: 0 auto;
  border-radius: 50%;
  /* masque le damier de transparence incrusté dans le JPEG */
  clip-path: circle(37.5% at 50% 50%);
  transform: scale(1.34);
  transition: transform .35s ease;
  cursor: zoom-in;
}
.medallion:hover img { transform: scale(1.38) rotate(3deg); }
.medallion figcaption { margin-top: 8px; }
.medallion h3 { font-size: 1.2rem; margin-bottom: 6px; }
.medallion p { color: var(--ink-soft); font-size: .92rem; max-width: 34ch; margin: 0 auto; }

/* ===== Bandeau panoramique ===== */
.panorama { position: relative; margin: 40px 0 0; overflow: hidden; }
.panorama img { width: 100%; object-fit: cover; min-height: 240px; }
.panorama-caption {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end;
  padding: 0 8vw;
  background: linear-gradient(90deg, transparent 30%, rgba(20, 16, 12, .55) 75%);
}
.panorama-caption p {
  color: #f6f1e7; font-family: var(--serif); font-style: italic;
  font-size: clamp(1.2rem, 2.8vw, 2rem); max-width: 22ch; text-align: right;
}

/* ===== Pied de page ===== */
.footer { border-top: 1px solid var(--ink); margin-top: 60px; background: var(--paper-deep); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 48px 24px; text-align: center; }
.footer .brand { display: block; margin-bottom: 10px; }
.footer p { color: var(--ink-soft); font-size: .95rem; }
.credits { font-size: .78rem !important; margin-top: 14px; opacity: .8; }

/* ===== Visionneuse ===== */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 16, 12, .92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4vh 4vw; gap: 16px;
}
.lightbox img {
  max-width: 92vw; max-height: 80vh; object-fit: contain;
  border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.lightbox-caption { color: #e8dfd0; font-style: italic; text-align: center; }
.lightbox-close {
  position: absolute; top: 18px; right: 26px;
  background: none; border: none; color: #e8dfd0;
  font-size: 2.4rem; cursor: pointer; line-height: 1;
}

/* ===== Apparition au défilement ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Adaptatif ===== */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; gap: 40px; }
  .row, .row-flip { grid-template-columns: 1fr; gap: 24px; margin-bottom: 64px; }
  .row-flip .frame { order: 1; }
  .row-flip .row-text { order: 2; text-align: left; }
  .row-flip .menu-line { justify-content: flex-start; }
  .trio { grid-template-columns: 1fr 1fr; }
  .trio .card:nth-child(3) { margin-top: 0; grid-column: span 2; max-width: 60%; margin-inline: auto; }
}
@media (max-width: 620px) {
  .duo, .trio, .medallions { grid-template-columns: 1fr; }
  .duo .card:nth-child(2), .trio .card:nth-child(2), .trio .card:nth-child(3) { margin-top: 0; }
  .trio .card:nth-child(3) { grid-column: auto; max-width: none; }
  .chapter-head { gap: 16px; }
}
