/* Musée Héritage — thème 2026 (refresh responsive du site RapidWeaver) */

@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: italic; font-display: swap; src: url("fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }

:root {
  --ink: #1d2b3a;          /* bleu marine du thème d'origine */
  --ink-soft: #3c4b5b;
  --paper: #f6f1e8;        /* papier ancien */
  --card: #fffdf9;
  --line: #e4dccd;
  --red: #a52a2a;          /* rouge doris */
  --red-dark: #82201f;
  --gold: #b88a3e;
  --muted: #6b6457;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 43, 58, .06), 0 8px 24px rgba(29, 43, 58, .07);
  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
.layout { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- En-tête ---------- */
.masthead {
  position: relative;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(20, 30, 42, .92) 0%, rgba(20, 30, 42, .72) 45%, rgba(20, 30, 42, .35) 100%),
    url("header.jpg") center 40% / cover no-repeat,
    var(--ink);
}
.masthead::after { /* filet rouge, rappel du bandeau d'origine */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}
.masthead .masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 150px; padding-top: 24px; padding-bottom: 28px; }
.brand { color: #fff; text-decoration: none; display: flex; flex-direction: column; }
.brand:hover { color: #fff; }
.brand-name { font: 700 clamp(2.2rem, 5vw, 3.4rem)/1 var(--serif); letter-spacing: .01em; }
.brand-logo { display: block; width: clamp(240px, 34vw, 420px); height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
.brand-tag { font: italic 600 clamp(1.05rem, 2.2vw, 1.35rem)/1.3 var(--serif); color: #f0dcb4; margin-top: 12px; }

.menu-toggle {
  display: none; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px; padding: 10px 16px; font: 600 .95rem var(--sans); cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

.hours-strip { display: none; background: var(--card); border-bottom: 1px solid var(--line); font-size: .95rem; padding: 10px 0; color: var(--ink-soft); }
.hours-strip strong { color: var(--red); }

/* ---------- Mise en page ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
  padding-top: 36px; padding-bottom: 56px;
}
.content { min-width: 0; }
.prose {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 48px);
  overflow-wrap: anywhere;
}

/* ---------- Typographie du contenu ---------- */
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: var(--serif); color: var(--ink); line-height: 1.15; margin: 1.6em 0 .5em; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 700; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 700; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.prose h3 { font-size: 1.45rem; font-weight: 600; }
.prose h4 { font-size: 1.35rem; font-weight: 600; }
.prose h1:not(.sr-only):not(.page-title) + h2, .prose h2 + h3 { border-bottom: 0; color: var(--red); font-style: italic; font-weight: 600; margin-top: .2em; }
.prose > :first-child, .prose .block > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose strong { font-weight: 600; }
.prose em { color: var(--ink-soft); }
.prose ul { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--red); }
.prose img { display: inline-block; border-radius: 8px; box-shadow: 0 4px 18px rgba(29, 43, 58, .14); margin: .5em 0; vertical-align: middle; }
.prose img[src*="signature"] { box-shadow: none; border-radius: 0; }
.prose p[style*="center"] img { display: block; margin-left: auto; margin-right: auto; }

.video { position: relative; aspect-ratio: 16 / 9; width: 100%; max-width: 760px; margin: 1em 0; border-radius: 10px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; display: block; cursor: pointer; }
.prose .video-play img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; box-shadow: none; display: block; transition: filter .2s; }
.video-play:hover img, .video-play:focus-visible img { filter: brightness(.8); }
.video-icon { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; margin: -25px 0 0 -36px; border-radius: 14px; background: var(--red); box-shadow: 0 4px 16px rgba(0,0,0,.35); transition: transform .2s; }
.video-icon::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.video-play:hover .video-icon { transform: scale(1.08); }

/* Blocs issus de « Stacks » (pages Médias et Dons) */
.block { margin-bottom: 1.4em; }
.block:empty { display: none; }
.media { margin-bottom: 1.6em; display: flow-root; }
.media-img { max-width: 46%; margin-bottom: .6em; }
.media-right .media-img { float: right; margin-left: 24px; }
.media-left .media-img { float: left; margin-right: 24px; }
.media-img img { margin: 0; }
.columns { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; margin: 1.5em 0; padding: 24px; background: var(--paper); border-radius: 12px; }
.columns h1, .columns h2 { font-size: 1.8rem; border-bottom: 0; margin-top: 0; }
.center { text-align: center; }

/* Accueil */
.notice { border-left: 4px solid var(--red); background: #fbf3e6; border-radius: 0 12px 12px 0; padding: 16px 20px; margin: 0 0 2em; }
.notice p { margin: 0; }
.notice p + p { margin-top: .4em; }
.notice-title { font: 700 1.3rem/1.3 var(--serif); color: var(--ink); }
.intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.intro h2 { margin-top: 0; }
.prose .intro-img { width: 100%; margin: 0; }
.lead { font-size: 1.15rem; font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 2em 0; }
.fact { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
a.fact:hover { border-color: var(--gold); color: var(--ink); }
.fact-label { font: 700 1.2rem/1.2 var(--serif); color: var(--red); }
.fact-value { font-size: .98rem; line-height: 1.4; }
.signature-line { text-align: right; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gallery figure { margin: 0; }
.prose .gallery img { width: 100%; margin: 0 0 .6em; }
.gallery figcaption { font-size: .95rem; color: var(--ink-soft); line-height: 1.45; }

/* Emplacement */
.location { display: grid; gap: 14px; margin-bottom: 1.6em; }
.location-address { font-style: normal; font-size: 1.15rem; line-height: 1.5; padding: 18px 20px; background: var(--paper); border-radius: 12px; border-left: 4px solid var(--red); }
.location-hint { margin: 0; color: var(--ink-soft); }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.map { margin: 0; }
.prose .map img { width: 100%; border-radius: 12px; margin: 0; }
.map figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; text-align: right; }

/* Page Faire un don */
.donate-box { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 0 12px 12px 0; padding: 22px 24px; margin: 1.8em 0; }
.prose .donate-box h2 { margin-top: 0; border-bottom: 0; }
.donate-box p:last-child { margin-bottom: 0; }

/* Fil d'Ariane */
.breadcrumb ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--gold); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); text-decoration: underline; }

/* ---------- Barre latérale ---------- */
.sidebar { position: sticky; top: 20px; display: grid; gap: 20px; }
.nav-card, .info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.nav-card { padding: 10px; }
.nav-list, .nav-sub { list-style: none; margin: 0; padding: 0; }
.nav-list > li > a {
  display: block; padding: 10px 14px; border-radius: 9px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; line-height: 1.3;
  transition: background .15s, color .15s;
}
.nav-list > li > a:hover { background: var(--paper); color: var(--red); }
.nav-list > li.is-active > a { background: var(--ink); color: #fff; }
.nav-sub { margin: 4px 0 8px 14px; padding-left: 10px; border-left: 2px solid var(--line); }
.nav-sub a { display: block; padding: 6px 10px; border-radius: 7px; font-size: .95rem; color: var(--ink-soft); text-decoration: none; line-height: 1.3; }
.nav-sub a:hover { color: var(--red); background: var(--paper); }
.nav-sub a[aria-current="page"] { color: var(--red); font-weight: 600; }

.info-card { padding: 20px 22px; }
.info-card h2 { font: 700 1.35rem/1.2 var(--serif); margin: 0 0 8px; color: var(--ink); }
.hours-card { background: var(--ink); color: #e9edf2; border-color: var(--ink); }
.hours-card h2 { color: #f0dcb4; }
.hours-card p { margin: 0; font-size: 1.05rem; }
.hours-card p + p { margin-top: .7em; }
.hours-card .hours-note { font-size: .92rem; color: #c3ccd6; line-height: 1.45; }
.hours-card a { color: #f0dcb4; font-weight: 600; font-size: .95rem; }
.hours-strip a { color: var(--red); font-weight: 600; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.link-list li:last-child { border-bottom: 0; }
.link-list a { text-decoration: none; }
.rss { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; }
.rss::before { content: ""; width: 14px; height: 14px; border-radius: 3px; background: radial-gradient(circle at 25% 75%, #fff 2px, transparent 2.5px), #e3842b; }

/* ---------- Blog « Evénements » ---------- */
.blog-entry { padding-bottom: 1.6em; margin-bottom: 1.6em; border-bottom: 1px solid var(--line); }
.blog-entry:last-child { border-bottom: 0; margin-bottom: 0; }
.prose .blog-entry-title { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0 0 .2em; }
.blog-entry-date { font-size: .9rem; color: var(--muted); margin-bottom: 1em; }
.blog-entry-date a { color: var(--muted); }
.blog-entry-body img { margin: .8em 0; }
.blog-archive-headings-wrapper { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 1.5em; padding-bottom: .6em; border-bottom: 2px solid var(--ink); }
.blog-archive-month { font: 700 1.9rem/1 var(--serif); text-transform: capitalize; }

/* ---------- Formulaire de contact ---------- */
.contact-intro { padding: 20px 22px; background: var(--paper); border-radius: 12px; margin-bottom: 26px; }
.message-text strong { font-size: 1.05rem; }
.contact-groups { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .98rem; }
.contact-form { display: grid; gap: 18px; max-width: 620px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field label span { color: var(--red); }
.form-input-field {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #cfc6b6; border-radius: 10px; padding: 11px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.form-input-field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(184, 138, 62, .35); }
textarea.form-input-field { resize: vertical; min-height: 160px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  appearance: none; border: 1px solid var(--red); background: var(--red); color: #fff;
  font: 600 1rem var(--sans); padding: 11px 24px; border-radius: 999px; cursor: pointer;
}
a.btn { display: inline-block; text-decoration: none; }
a.btn:hover { color: #fff; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: #cfc6b6; }
.btn-ghost:hover { background: var(--paper); border-color: var(--ink); }
.cf-turnstile { min-height: 65px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: 10px; padding: 14px 18px; margin: 0 0 22px; font-weight: 600; border: 1px solid; }
.alert-success { background: #edf6ee; border-color: #9cc9a3; color: #1f5a2b; }
.alert-error { background: #fbeeec; border-color: #e3a9a1; color: #8a231b; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: #c9d1da; font-size: .95rem; border-top: 4px solid var(--red); }
.site-footer .footer-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; }
.footer-inner p { margin: 0; }
.footer-brand { font: 700 1.6rem/1 var(--serif); color: #fff; margin-bottom: 8px !important; }
.site-footer a { color: #f0dcb4; }
.footer-meta { text-align: right; }
.footer-credit { font-size: .85rem; color: #8f9caa; margin-top: 4px !important; }

/* ---------- Tablette & mobile ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 20px; padding-bottom: 40px; }
  .sidebar { position: static; }
  .hours-strip { display: block; }
  .page-home .hours-strip { display: none; }
  .hours-card { display: none; }
  .menu-toggle { display: inline-flex; }
  .masthead .masthead-inner { min-height: 0; padding-top: 14px; padding-bottom: 16px; }

  /* le menu devient un panneau déroulant sous l'en-tête */
  .site-header { display: contents; }
  .masthead { position: sticky; top: 0; z-index: 50; }
  .nav-card {
    position: fixed; z-index: 60; left: 12px; right: 12px; top: var(--nav-top, 90px);
    max-height: calc(100dvh - var(--nav-top, 90px) - 12px); overflow-y: auto;
    padding: 10px; box-shadow: 0 18px 48px rgba(0, 0, 0, .3);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  body.nav-open .nav-card { opacity: 1; visibility: visible; transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(15, 22, 31, .45); z-index: 40; }
  .nav-sub[hidden] { display: block; }
  .nav-list > li > a { padding: 13px 14px; font-size: 1.05rem; }
}
@media (max-width: 600px) {
  body { font-size: 1.02rem; }
  .wrap { padding: 0 14px; }
  .brand-tag { display: none; }
  .brand-name { font-size: 2rem; }
  .brand-logo { width: min(230px, 62vw); }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu-toggle { padding: 12px; }
  .prose { border-radius: 12px; padding: 22px 18px; }
  .media-img { float: none !important; max-width: 100%; margin: 0 0 1em !important; text-align: center; }
  .columns { grid-template-columns: 1fr; text-align: left; }
  .intro, .facts { grid-template-columns: 1fr; }
  .intro-img { order: -1; }
  .columns .center { text-align: center; }
  .site-footer .footer-inner { flex-direction: column; align-items: flex-start; padding-top: 28px; padding-bottom: 28px; }
  .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .sidebar, .site-footer, .breadcrumb, .video { display: none !important; }
  body { background: #fff; }
  .layout { display: block; padding: 0; }
  .prose { box-shadow: none; border: 0; padding: 0; }
}
