/* ============================================================
   LARUGA — Page Mariage
   Identité à part : ivoire, lin, terre cuite. Douce et intime.
   ============================================================ */

:root {
  --ivoire: #f6efe5;
  --lin: #efe4d4;
  --sable: #dcc8ad;
  --terre: #9c5a3c;
  --terre-fonce: #7d4329;
  --rose: #c9958a;
  --encre: #3a2c26;
  --encre-doux: #6b5a50;
  --trait: rgba(58, 44, 38, 0.14);

  --f-titre: 'Cormorant Garamond', 'Garamond', 'Times New Roman', serif;
  --f-texte: 'Lora', Georgia, 'Times New Roman', serif;

  --gouttiere: clamp(16px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivoire);
  color: var(--encre);
  font-family: var(--f-texte);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  /* grain de papier très léger */
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(201, 149, 138, 0.10), transparent 55%),
    radial-gradient(ellipse at 100% 40%, rgba(220, 200, 173, 0.25), transparent 50%);
  background-attachment: fixed;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--rose); color: #fff; }
[hidden] { display: none !important; }

/* ─── En-tête ─────────────────────────────────────────────── */
.m-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--gouttiere);
  color: var(--encre);
}
body.has-cover .m-header { color: #fff; }
.m-brand {
  font-family: var(--f-texte);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-decoration: none;
  opacity: 0.85;
}
.m-nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.m-nav a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  opacity: 0.85;
  border-bottom: 1px solid transparent;
  transition: opacity .2s, border-color .2s;
}
.m-brand:hover, .m-nav a:hover { opacity: 1; border-color: currentColor; }

/* ─── Ouverture ───────────────────────────────────────────── */
.m-hero {
  position: relative;
  min-height: 86vh;
  min-height: 86svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--gouttiere) 80px;
  overflow: hidden;
}
.m-hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 6s ease-out, opacity 1.2s ease;
  opacity: 0;
}
.m-hero.has-photo .m-hero-media { opacity: 1; transform: scale(1); }
.m-hero.has-photo .m-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 52%, rgba(40, 26, 20, 0.38), transparent 75%),
    linear-gradient(180deg, rgba(40, 26, 20, 0.42) 0%, rgba(40, 26, 20, 0.30) 45%, rgba(40, 26, 20, 0.66) 100%);
}
.m-hero-inner { position: relative; max-width: 820px; }
.m-hero.has-photo .m-hero-inner { color: #fff; text-shadow: 0 1px 18px rgba(30, 18, 12, 0.35); }

.m-kicker {
  margin: 0 0 1.4rem;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--terre);
}
.m-hero.has-photo .m-kicker { color: #f3e2d6; }
.m-title {
  margin: 0;
  font-family: var(--f-titre);
  font-weight: 300;
  font-size: clamp(48px, 9.5vw, 118px);
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.m-ornament {
  display: block;
  width: 72px;
  height: 1px;
  margin: 2rem auto;
  background: currentColor;
  opacity: 0.45;
  position: relative;
}
.m-ornament::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  background: var(--ivoire);
  transform: translate(-50%, -50%) rotate(45deg);
}
.m-hero.has-photo .m-ornament::after { background: transparent; }
.m-quote {
  margin: 0 auto 2.4rem;
  max-width: 34ch;
  font-family: var(--f-titre);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.35;
}

.m-btn {
  display: inline-block;
  padding: 0.95rem 2.1rem;
  border-radius: 999px;
  background: var(--terre);
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-shadow: none;
  box-shadow: 0 10px 30px -12px rgba(124, 67, 41, 0.6);
  transition: background .25s, transform .25s;
}
.m-btn:hover { background: var(--terre-fonce); transform: translateY(-1px); }

/* ─── Titres & texte ──────────────────────────────────────── */
.m-h2 {
  margin: 0 0 1.6rem;
  font-family: var(--f-titre);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.05;
  color: var(--encre);
}
.m-h3 {
  margin: 0 0 1rem;
  font-family: var(--f-titre);
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.1;
}
.m-center { text-align: center; }
.m-center-text { text-align: center; }
.m-prose p { margin: 0 0 1.1em; color: var(--encre-doux); }
.m-prose p:last-child { margin-bottom: 0; }

main > section { padding-inline: var(--gouttiere); }

/* ─── Approche ────────────────────────────────────────────── */
.m-lead {
  max-width: 760px;
  margin: 0 auto;
  padding-top: clamp(72px, 10vw, 130px);
  padding-bottom: clamp(56px, 8vw, 100px);
  text-align: center;
}
.m-lead .m-prose p {
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.85;
  color: var(--encre);
}

/* ─── Galerie ─────────────────────────────────────────────── */
.m-gallery-section {
  padding-top: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(64px, 9vw, 120px);
  max-width: 1320px;
  margin: 0 auto;
}
.m-gallery {
  column-count: 3;
  column-gap: clamp(10px, 1.4vw, 18px);
}
.m-gallery-item {
  display: block;
  width: 100%;
  margin: 0 0 clamp(10px, 1.4vw, 18px);
  padding: 0;
  border: 0;
  background: var(--lin);
  break-inside: avoid;
  cursor: zoom-in;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.m-gallery-item img {
  width: 100%;
  height: auto;
  transition: transform .8s ease, filter .6s ease;
}
.m-gallery-item:hover img { transform: scale(1.03); filter: saturate(1.06); }
.m-gallery-item:focus-visible { outline: 2px solid var(--terre); outline-offset: 3px; }

/* ─── Sections ────────────────────────────────────────────── */
.m-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(32px, 4vw, 56px);
  max-width: 1180px;
  margin: 0 auto;
  padding-top: clamp(24px, 4vw, 40px);
  padding-bottom: clamp(72px, 10vw, 130px);
}
.m-section { border-top: 1px solid var(--trait); padding-top: 1.6rem; }
.m-num {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--f-titre);
  font-style: italic;
  font-size: 20px;
  color: var(--terre);
}
.m-section .m-prose p { font-size: 16px; }

/* ─── Formule ─────────────────────────────────────────────── */
.m-formula-wrap { padding-bottom: clamp(72px, 10vw, 130px); }
.m-formula {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 64px) clamp(22px, 6vw, 72px);
  background: var(--lin);
  border-radius: 4px;
  position: relative;
}
.m-formula::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(156, 90, 60, 0.22);
  border-radius: 2px;
  pointer-events: none;
}
.m-formula-list { list-style: none; margin: 0 0 2.4rem; padding: 0; }
.m-formula-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 2rem;
  border-bottom: 1px solid var(--trait);
  color: var(--encre);
}
.m-formula-list li:last-child { border-bottom: 0; }
.m-formula-list li::before {
  content: '';
  position: absolute;
  left: 0.35rem;
  top: 1.55rem;
  width: 6px;
  height: 6px;
  border: 1px solid var(--terre);
  transform: rotate(45deg);
}
.m-price { text-align: center; }
.m-price-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--encre-doux);
  margin-bottom: 0.3rem;
}
.m-price-value {
  font-family: var(--f-titre);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 64px);
  line-height: 1.1;
  color: var(--terre);
}

/* ─── En résumé & contact ─────────────────────────────────── */
.m-closing {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: clamp(72px, 10vw, 120px);
}
.m-closing .m-prose { max-width: 680px; margin: 0 auto 3rem; }
.m-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 2rem;
}
.m-contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1.4rem 1rem;
  border: 1px solid var(--trait);
  border-radius: 4px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.35);
  transition: background .25s, border-color .25s, transform .25s;
  min-width: 0;
}
.m-contact-item:hover { background: #fff; border-color: var(--sable); transform: translateY(-2px); }
.m-contact-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terre);
}
.m-contact-value {
  font-family: var(--f-titre);
  font-size: 22px;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.25;
}
.m-link { color: var(--encre-doux); font-size: 15px; text-underline-offset: 4px; }
.m-link:hover { color: var(--terre); }

/* ─── Pied de page ────────────────────────────────────────── */
.m-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 28px var(--gouttiere);
  border-top: 1px solid var(--trait);
  font-size: 13px;
  color: var(--encre-doux);
}
.m-footer a { text-underline-offset: 3px; }
.m-footer a:hover { color: var(--terre); }

/* ─── Bouton flottant (mobile) ────────────────────────────── */
.m-float {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 20;
  transform: translate(-50%, 140%);
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--terre);
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(60, 30, 18, 0.55);
  transition: transform .35s ease;
  display: none;
}
.m-float.is-visible { transform: translate(-50%, 0); }

/* ─── Visionneuse ─────────────────────────────────────────── */
.m-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 21, 17, 0.96);
  color: #f3e7dc;
}
.m-lb-figure { margin: 0; max-width: 92vw; text-align: center; }
.m-lb-figure img {
  max-width: 92vw;
  max-height: 84vh;
  max-height: 84svh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 2px;
}
.m-lb-figure figcaption {
  margin-top: 0.9rem;
  font-family: var(--f-titre);
  font-style: italic;
  font-size: 19px;
  min-height: 1.4em;
}
.m-lb-btn {
  position: absolute;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-family: var(--f-titre);
  font-size: 46px;
  line-height: 1;
  padding: 12px 18px;
  opacity: 0.75;
}
.m-lb-btn:hover, .m-lb-btn:focus-visible { opacity: 1; }
.m-lb-close { top: 8px; right: 12px; }
.m-lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.m-lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ─── Apparition douce ────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .m-reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
  .m-reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .m-hero-media { transition: none; }
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 980px) {
  .m-gallery { column-count: 2; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .m-nav a#nav-galerie { display: none; }
  .m-gallery { column-count: 2; column-gap: 8px; }
  .m-gallery-item { margin-bottom: 8px; }
  .m-float { display: inline-block; }
  .m-lb-prev, .m-lb-next { top: auto; bottom: 10px; transform: none; }
  .m-footer { flex-direction: column; }
}
