/* ─────────────────────────────────────────────────────────────
   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; }

/* ── Valeurs par défaut des éléments ─────────────────────────
   Le site a été construit sur Astra, qui fixait ces valeurs ; le CSS des
   sections compte dessus. Mêmes sélecteurs d'élément (faible priorité) : toute
   classe du site les remplace, comme avant. Valeurs : theme.json (custom). */
p { margin-bottom: var(--paragraph-gap); }

ul, ol { margin: 0 0 var(--list-gap) var(--list-indent); }

h1, h2, h3, h4, h5, h6 { font-family: var(--display); font-weight: var(--heading-weight); }

h1 { line-height: var(--heading-line-1); }

h2 { line-height: var(--heading-line-2); }

h3 { line-height: var(--heading-line-3); }

h4 { line-height: var(--heading-line-4); }

h5 { line-height: var(--heading-line-5); }

h6 { line-height: var(--heading-line-6); }

input, select, textarea { font: inherit; font-weight: 400; }

input:is([type="text"], [type="email"], [type="url"], [type="password"], [type="search"], [type="number"], [type="tel"]) {
  width: 100%;
  height: var(--field-height);
  line-height: var(--field-line);
}

label, legend { font-weight: var(--label-weight); line-height: var(--label-line); }

.wp-block-button .wp-block-button__link { line-height: 1; }

/* Colonnes empilées sur petit téléphone : un écart entre elles. */
@media (max-width: 544px) {

  .wp-block-columns .wp-block-column:not(:last-child) { margin-bottom: var(--stacked-column-gap); }
}

/* Espacement entre blocs (theme.json, styles.spacing.blockGap) : pas entre
   l'en-tête, le contenu et le pied de page. */
.wp-site-blocks > * { margin-block-start: 0; }

::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(var(--bone-rgb), 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;
  }
}
