/* ─────────────────────────────────────────────────────────────
   Villemont — Base reset + typographic primitives + ornaments
   ───────────────────────────────────────────────────────────── */

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

html, body {
  font-family: var(--serif);
  font-size: var(--fs-note);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  scroll-behavior: smooth;
  /* Garde-fou anti-débordement latéral (un seul élément trop large = scroll
     horizontal sur tout le site). `clip` n'établit pas de conteneur de scroll,
     donc le header `position: sticky` reste fonctionnel (contrairement à hidden). */
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease, opacity .2s ease;
}

/* Liens dans le texte courant (paragraphes, listes, légendes du contenu) :
   bordeaux, soulignés d'un filet ocre. Les liens qui ont une classe
   (boutons, cartes, navigation) gardent leur propre style. */
main :where(p, li, dd, blockquote, figcaption):not(.breadcrumb__item) a:not([class]),
.text-link {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: var(--link-underline-width);
  text-underline-offset: var(--link-underline-offset);
}
main :where(p, li, dd, blockquote, figcaption):not(.breadcrumb__item) a:not([class]):hover,
.text-link:hover {
  color: var(--link-color-hover);
  text-decoration-color: currentColor;
}

button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }

::selection { background: var(--burgundy); color: var(--bone); }

/* ── Typographic primitives ───────────────────────────────── */

.eyebrow {
  font-family: var(--display);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.eyebrow.ochre { color: var(--ochre-deep); }
.eyebrow.ink   { color: var(--ink-soft); }
.eyebrow.bone  { color: var(--ochre-soft); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--burgundy);
  text-wrap: balance;
}
.display em {
  font-style: italic;
  font-weight: 400;
  color: var(--ochre-deep);
}

.lede {
  font-family: var(--serif);
  font-size: var(--fs-lede);
  line-height: 1.45;
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.body-serif {
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.body-note {
  font-family: var(--serif);
  font-size: var(--fs-small);
  line-height: 1.7;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.caps-label {
  font-family: var(--display);
  font-size: var(--fs-label);
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 4.5vw, 64px);
  line-height: 1;
  color: var(--burgundy);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.section-title em { font-style: italic; color: var(--ochre-deep); }

/* Drop cap */
.dropcap::first-letter {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 5em;
  line-height: 0.78;
  float: left;
  padding: 6px 12px 0 0;
  color: var(--burgundy);
}

/* ── Ornaments ────────────────────────────────────────────── */

.fleur-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ochre);
}
.fleur-rule::before,
.fleur-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.fleur-rule span { font-size: var(--fs-ornament); color: var(--ochre); }

.gold-rule {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0, var(--ochre) 20%, var(--ochre) 80%, transparent 100%);
  opacity: 0.55;
}

.double-frame {
  position: relative;
  padding: 32px;
}
.double-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--ochre);
  opacity: 0.6;
}
.double-frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--ochre);
  opacity: 0.3;
}

/* ── Layout helpers ───────────────────────────────────────── */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}
.container-narrow {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 48px;
}

.section { padding: var(--pad-section) 0; }
.section-tight { padding: var(--pad-block) 0; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--gap-large);
  align-items: start;
}
.two-col.flip { grid-template-columns: 1.4fr 1fr; }
.two-col.equal { grid-template-columns: 1fr 1fr; }

/* ── Image frame ──────────────────────────────────────────── */

.img-frame {
  position: relative;
  overflow: hidden;
  background: var(--bone-warm);
}
.img-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(245, 239, 227, 0.15);
  pointer-events: none;
}

.img-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-caption);
  color: var(--ink-soft);
  margin-top: 10px;
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}
.img-caption::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 10px; height: 1px;
  background: var(--ochre);
}

/* ── Reveal on scroll ─────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ── Utility ──────────────────────────────────────────────── */

.text-burgundy { color: var(--burgundy); }
.text-ochre    { color: var(--ochre-deep); }
.text-bone     { color: var(--bone); }
.text-ink-soft { color: var(--ink-soft); }
.bg-burgundy   { background: var(--burgundy); color: var(--bone); }
.bg-bone-warm  { background: var(--bone-warm); }
.bg-paper      { background: var(--paper); }

/* ── Accessibilité : mouvement réduit ─────────────────────────
   Respecte le réglage système (souvent activé sur mobile) : coupe le
   smooth-scroll, les révélations au scroll et neutralise les transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
