/* ============================================================
   Les Amis Montorientais — feuille de style
   ============================================================ */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Regular.woff2") format("woff2"),
       url("../fonts/EBGaramond-Regular.woff")  format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper:      #faf8f4;
  --paper-alt:  #f1ece2;
  --card:       #ffffff;
  --ink:        #23261f;
  --ink-soft:   #585e4f;
  --line:       #e2dbcc;
  --green:      #4a6b3f;
  --green-dark: #35502c;
  --ochre:      #b06c2c;
  --ochre-dark: #94591f;

  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --head-h: 68px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35,38,31,.05), 0 8px 24px rgba(35,38,31,.07);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

a { color: var(--green-dark); }

:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-dark);
  color: #fff;
  padding: .75rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------------- En-tête ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(35,38,31,.05);
}

.header-inner {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 46px;
  height: 36px;
  flex: 0 0 auto;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 3px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.22rem;
  letter-spacing: .01em;
}
.brand-sub {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Navigation */

.nav ul {
  display: flex;
  align-items: center;
  gap: .35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  display: block;
  padding: .5rem .8rem;
  border-radius: 999px;
  font-size: .95rem;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color .18s ease, background-color .18s ease;
}
.nav a:hover { color: var(--ink); background: rgba(74,107,63,.09); }
.nav a.is-active { color: var(--green-dark); background: rgba(74,107,63,.13); font-weight: 600; }

/* Bouton hamburger */

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(35,38,31,.45);
  opacity: 0;
  transition: opacity .25s ease;
}
.nav-backdrop.is-shown { opacity: 1; }

/* ---------------- Accueil ---------------- */

.hero {
  position: relative;
  min-height: min(78vh, 680px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;   /* garde le cèdre et les bâtiments dans le cadre */
  z-index: -2;
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* deux voiles superposés : le ciel est très clair, le texte est blanc */
  background:
    linear-gradient(90deg,  rgba(20,26,18,.62) 0%,  rgba(20,26,18,.34) 48%, rgba(20,26,18,.05) 85%),
    linear-gradient(180deg, rgba(20,26,18,.42) 0%,  rgba(20,26,18,.22) 45%, rgba(20,26,18,.66) 100%);
}
.hero-body {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  padding: 5rem 0 6rem;
  color: #fff;
  max-width: 48rem;
}
.hero-eyebrow {
  margin: 0 0 .9rem;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.82);
}
.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,.3);
}
.hero-lead {
  margin: 0 0 2rem;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.55;
  color: rgba(255,255,255,.93);
  max-width: 34rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero-scroll {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  translate: -50% 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}
.hero-scroll span {
  width: 11px;
  height: 11px;
  border-right: 2px solid rgba(255,255,255,.8);
  border-bottom: 2px solid rgba(255,255,255,.8);
  rotate: 45deg;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(-3px); opacity: .55; }
  50%      { transform: translateY(3px);  opacity: 1; }
}

/* ---------------- Boutons ---------------- */

.btn {
  display: inline-block;
  padding: .78rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ochre); color: #fff; }
.btn-primary:hover { background: var(--ochre-dark); }
.btn-ghost { border-color: rgba(255,255,255,.65); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.16); border-color: #fff; }
.btn-outline {
  border-color: var(--green);
  color: var(--green-dark);
  padding: .6rem 1.2rem;
  font-size: .95rem;
}
.btn-outline:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-lg { padding: 1rem 2rem; font-size: 1.08rem; }

/* ---------------- Sections ---------------- */

.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--paper-alt); }

.eyebrow {
  margin: 0 0 .5rem;
  font-size: .73rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
}
.section h2 {
  margin: 0 0 1.6rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.5vw, 2.85rem);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.section-intro {
  margin: 0 0 2.2rem;
  max-width: 44rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.section-note { margin: 1.1rem 0 0; font-size: .95rem; }
.section-note .sep { color: var(--line); margin: 0 .55rem; }

.link-arrow { text-decoration: none; border-bottom: 1px solid rgba(53,80,44,.35); }
.link-arrow:hover { border-bottom-color: var(--green-dark); }
.link-arrow::after { content: " \2197"; }

.prose { max-width: 42rem; }
.prose p { margin: 0 0 1.15rem; }
.prose .lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

/* Chiffres clés */

.facts {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.facts li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
}
.fact-n {
  display: block;
  font-family: var(--serif);
  font-size: 2.3rem;
  line-height: 1;
  color: var(--green-dark);
  margin-bottom: .45rem;
}
.fact-l { display: block; font-size: .95rem; color: var(--ink-soft); }

/* ---------------- Agenda ---------------- */

.agenda {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.event {
  display: flex;
  gap: 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.6rem;
}

.event-date {
  flex: 0 0 auto;
  width: 72px;
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 1.1rem;
}
.event-day {
  display: block;
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--green-dark);
}
.event-month {
  display: block;
  margin-top: .25rem;
  font-size: .72rem;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--ochre);
}

.event-body { min-width: 0; }
.event-title {
  margin: 0 0 .25rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.2;
}
.event-when {
  margin: 0 0 .7rem;
  font-size: .95rem;
  color: var(--ink-soft);
}
.event-place {
  margin: 0 0 .7rem;
  font-size: .95rem;
  color: var(--ink-soft);
}
.event-place::before { content: "\1F4CD\00A0"; }

.event-desc { font-size: 1rem; }
.event-desc p  { margin: 0 0 .6rem; }
.event-desc ul,
.event-desc ol { margin: .5rem 0; padding-left: 1.3rem; }
.event-desc li { margin-bottom: .35rem; }
.event-desc br:first-child { display: none; }

.agenda-vide {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--ink-soft);
  margin: 0;
}

.agenda-maj {
  margin: 1rem 0 0;
  font-size: .85rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------------- Albums ---------------- */

.albums {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.album a {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.album a:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: 0 2px 4px rgba(35,38,31,.06), 0 16px 34px rgba(35,38,31,.13);
}
.album img {
  width: 100%;
  height: 185px;
  object-fit: cover;
  background: var(--paper-alt);
}
.album-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.15rem 1.15rem;
}
.album-title { font-family: var(--serif); font-size: 1.3rem; }
.album-cta {
  font-size: .82rem;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}
.album-cta::after { content: " \2197"; }

/* ---------------- Adhérer ---------------- */

.give {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
}
.give-text p { margin: 0 0 1.15rem; }
.give-text .lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  line-height: 1.45;
  margin-bottom: 1.3rem;
}
.tax {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  font-size: .97rem;
  color: var(--ink-soft);
}
.tax strong { color: var(--ink); }

.give-cta {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
  text-align: center;
  position: sticky;
  top: calc(var(--head-h) + 1.5rem);
}
.give-cta .btn { width: 100%; }
.give-note { margin: .9rem 0 0; font-size: .85rem; color: var(--ink-soft); }

/* ---------------- Contact ---------------- */

.contact-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.75rem;
}
.contact-card h3 {
  margin: 0 0 .9rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.4rem;
}
.contact-card address { font-style: normal; line-height: 1.8; }
.contact-card p { margin: 0 0 .9rem; }
.contact-card p:last-child { margin-bottom: 0; }
.mail { font-size: 1.08rem; word-break: break-all; }
.contact-note { font-size: .95rem; color: var(--ink-soft); }
.coords {
  font-variant-numeric: tabular-nums;
  font-size: .92rem;
  color: var(--ink-soft);
  letter-spacing: .02em;
}

/* ---------------- Pied de page ---------------- */

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.72);
  padding: 3rem 0 3.5rem;
  margin-top: 0;
}
.footer-inner { text-align: center; }
.footer-logo {
  width: 150px;
  height: auto;
  margin: 0 auto 1.1rem;
  border-radius: 10px;
}
.footer-meta { margin: 0 0 1.25rem; font-size: .9rem; }

.footer-social { margin: 0 0 1.5rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.15rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: .93rem;
  transition: background-color .18s ease, border-color .18s ease;
}
.footer-social a:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.6); }
.footer-social svg { flex: 0 0 auto; }
.footer-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem 1.5rem;
}
.footer-links a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .93rem;
  border-bottom: 1px solid transparent;
}
.footer-links a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.5); }

/* ============================================================
   Tablette et mobile
   ============================================================ */

@media (max-width: 900px) {
  .give { grid-template-columns: 1fr; }
  .give-cta { position: static; }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 95;
    width: min(82vw, 330px);
    height: 100dvh;
    padding: calc(var(--head-h) + 1.5rem) 1.5rem 2rem;
    background: var(--paper);
    border-left: 1px solid var(--line);
    box-shadow: -14px 0 40px rgba(35,38,31,.14);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }

  .nav ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .nav a {
    padding: .85rem 1rem;
    border-radius: 10px;
    font-size: 1.08rem;
  }

  .hero { min-height: min(86vh, 620px); }
  .hero-body { padding: 4rem 0 5rem; }
  .album img { height: 165px; }

  .event { gap: 1rem; padding: 1.2rem 1.25rem; }
  .event-date { width: 54px; padding-right: .85rem; }
  .event-day { font-size: 2rem; }
  .event-title { font-size: 1.3rem; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .brand-name { font-size: 1.08rem; }
  .brand-sub { font-size: .62rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
}

/* Impression et accessibilité */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
