/* Groupement paroissial de Persan — feuille de style du site.
   Encre marine et papier chaud ; une couleur par clocher, prise au vitrail
   du logo et aux affiches de la paroisse. */

:root {
  --paper: #f6f2e9;
  --paper-deep: #ede6d6;
  --card: #fffdf8;
  --ink: #1c2541;
  --ink-soft: #4b5168;
  --ink-faint: #7a7f90;
  --rule: #dcd3c0;
  --gold: #e8a317;

  --violet: #6a3a9e;
  --ocre: #c9820f;
  --vert: #3a8a3c;
  --bleu: #1b7db6;
  --rouge: #c4372c;
  --marine: #1c2541;

  --sans: "Oswald", "Arial Narrow", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*,
*::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-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--violet); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.1; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* Le filet vitrail : des verres de couleur séparés par des plombs. */
.lead-line {
  height: 8px;
  background: linear-gradient(90deg,
    var(--rouge) 0 14%, #fff 14% 14.6%,
    var(--gold) 14.6% 31%, #fff 31% 31.6%,
    var(--bleu) 31.6% 47%, #fff 47% 47.6%,
    var(--violet) 47.6% 60%, #fff 60% 60.6%,
    var(--vert) 60.6% 72%, #fff 72% 72.6%,
    var(--marine) 72.6% 86%, #fff 86% 86.6%,
    var(--rouge) 86.6% 100%);
}

/* Libellés en capitales condensées, comme le logo. */
.kicker {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tone-violet { --tone: var(--violet); }
.tone-ocre { --tone: var(--ocre); }
.tone-vert { --tone: var(--vert); }
.tone-bleu { --tone: var(--bleu); }
.tone-rouge { --tone: var(--rouge); }
.tone-marine { --tone: var(--marine); }

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

.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: relative; z-index: 20; }

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }

.brand { display: block; flex: none; }
.brand img { height: 54px; width: auto; }

.nav { display: flex; align-items: center; }
.nav > ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav li { position: relative; }

.nav a.nav-link {
  display: block;
  padding: 10px 11px;
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid transparent;
}
.nav a.nav-link:hover { color: var(--ink); border-bottom-color: var(--gold); }
.nav a.nav-link[aria-current="page"] { border-bottom-color: var(--ink); }

.nav .sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  box-shadow: 0 10px 24px rgba(28, 37, 65, 0.08);
}
.nav li:hover > .sub,
.nav li:focus-within > .sub { display: block; }
.nav .sub a { display: block; padding: 8px 16px; text-decoration: none; font-size: 1rem; }
.nav .sub a:hover { background: var(--paper); color: var(--ink); }

.nav .nav-don a.nav-link { background: var(--ink); color: #fff; margin-left: 8px; border-bottom: 0; padding: 10px 16px; }
.nav .nav-don a.nav-link:hover { background: var(--violet); color: #fff; }

.menu-toggle { display: none; }

@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .menu-toggle summary {
    list-style: none;
    cursor: pointer;
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.95rem;
    padding: 10px 14px;
    border: 1px solid var(--ink);
  }
  .menu-toggle summary::-webkit-details-marker { display: none; }
  .menu-toggle[open] summary { background: var(--ink); color: #fff; }
  .menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 24px;
  }
  .menu-panel ul { list-style: none; margin: 0; padding: 0; }
  .menu-panel > ul > li { border-bottom: 1px solid var(--rule); }
  .menu-panel a { display: block; padding: 12px 0; text-decoration: none; }
  .menu-panel .top { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.06em; }
  .menu-panel .sub a { padding: 6px 0 6px 18px; color: var(--ink-soft); }
  .menu-panel .sub { padding-bottom: 8px; }
  .brand img { height: 44px; }
  .masthead { min-height: 72px; }
}

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

.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(28px, 5vw, 72px); align-items: center; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.2vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 14px 0 22px;
}
.hero h1 em { font-style: italic; color: var(--violet); }
.hero .lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 34em; }

.next-mass {
  margin-top: 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 20px;
  align-items: baseline;
  padding: 18px 22px;
  background: var(--card);
  border-left: 6px solid var(--tone, var(--ink));
  max-width: 460px;
}
.next-mass .kicker { grid-column: 1 / -1; }
.next-mass .time { font-family: var(--sans); font-size: 2.6rem; line-height: 1; }
.next-mass .where { font-size: 1.15rem; }
.next-mass .where strong { display: block; font-weight: 600; }

.hero-figure { margin: 0; position: relative; }
.hero-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.hero-figure figcaption { margin-top: 10px; font-size: 0.9rem; color: var(--ink-faint); font-style: italic; }

.band { padding: clamp(48px, 7vw, 96px) 0; }
.band-deep { background: var(--paper-deep); }

.band-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.band-head h2 { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.04em; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.band-head .more { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.9rem; }

/* La grille des messes. */
.timetable { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.timetable h3 { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em; font-size: 1rem; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.timetable ol { list-style: none; margin: 0; padding: 0; }
.slot {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 4px 16px;
  padding: 14px 0 14px 16px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.slot::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; background: var(--tone, var(--ink)); }
.slot .time { font-family: var(--sans); font-size: 1.6rem; line-height: 1.1; }
.slot .day { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.95rem; line-height: 1.9; }
.slot .town { font-size: 1.15rem; }
.slot .town a { text-decoration: none; }
.slot .town a:hover { text-decoration: underline; }
.slot .rule { display: block; font-size: 0.95rem; color: var(--ink-faint); }
.timetable-note { margin-top: 24px; font-size: 1rem; color: var(--ink-soft); }

/* Affiches. */
.posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.poster { margin: 0; display: flex; flex-direction: column; }
.poster-image { display: block; background: var(--card); border: 1px solid var(--rule); padding: 10px; }
.poster-image img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--paper); }
.poster figcaption { padding-top: 14px; }
.poster h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin: 6px 0 6px; line-height: 1.25; }
.poster .place { font-size: 0.98rem; color: var(--ink-soft); margin: 0 0 8px; }
.poster .summary { font-size: 1rem; margin: 0; }

/* Les clochers. */
.belfries { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; list-style: none; margin: 0; padding: 0; }
.belfry a { display: block; text-decoration: none; }
.belfry img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: saturate(0.9); transition: filter 0.2s; }
.belfry a:hover img { filter: saturate(1.1); }
.belfry .name { display: block; margin-top: 12px; padding-top: 8px; border-top: 4px solid var(--tone, var(--ink)); font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.05rem; }
.belfry .church { display: block; font-size: 0.95rem; color: var(--ink-soft); }

.closing-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 72px); }
.closing .kicker { margin-bottom: 12px; }
.closing-address { font-size: clamp(1.4rem, 2.6vw, 1.8rem); line-height: 1.3; margin-bottom: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions .button { margin-top: 0; }
.next-mass .where a { font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Pages de contenu ---------- */

.page-head { padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--rule); }
.crumbs { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-head h1 { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.02em; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1; }
.page-head .lede { margin: 22px 0 0; font-size: 1.3rem; color: var(--ink-soft); max-width: 40em; }

.subnav { display: flex; flex-wrap: wrap; gap: 6px 28px; margin-top: 28px; list-style: none; padding: 0; }
.subnav a { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.95rem; text-decoration: none; padding-bottom: 4px; border-bottom: 2px solid transparent; }
.subnav a:hover { border-bottom-color: var(--gold); color: var(--ink); }
.subnav a[aria-current="page"] { border-bottom-color: var(--ink); }

.toc { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 28px 0 0; padding: 0; }
.toc a { display: inline-block; padding: 6px 14px; border: 1px solid var(--rule); background: var(--card); text-decoration: none; font-size: 1rem; }
.toc a:hover { border-color: var(--ink); color: var(--ink); }

.sections { padding-top: clamp(24px, 4vw, 48px); padding-bottom: clamp(48px, 7vw, 96px); }
.section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  padding: clamp(36px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 24px;
}
.section:last-child { border-bottom: 0; }
.section.no-image { grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr); }
.section.flip .section-media { order: -1; }
.section .kicker { color: var(--tone, var(--ink-soft)); }
.section h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 8px 0 18px; line-height: 1.15; }
.section-media { margin: 0; }
.section-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 6px solid var(--tone, transparent); }

.prose ul { padding-left: 1.1em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.3em; }
.prose li::marker { color: var(--tone, var(--gold)); }
.prose strong { font-weight: 600; }

.verse { margin: 26px 0 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); font-style: italic; font-size: 1.12rem; color: var(--ink-soft); }
.verse p { margin: 0 0 8px; }
.verse cite { font-style: normal; font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; color: var(--ink); }

.button {
  display: inline-block;
  margin-top: 10px;
  padding: 11px 20px;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.button:hover { background: var(--violet); color: #fff; }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.button.ghost:hover { background: var(--ink); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: clamp(20px, 3vw, 36px); padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(48px, 7vw, 96px); }
.card { background: var(--card); border-top: 4px solid var(--tone, var(--ink)); scroll-margin-top: 24px; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.card-body { padding: 20px 22px 24px; }
.card h2 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; margin: 6px 0 12px; line-height: 1.2; }
.card .prose { font-size: 1.02rem; }
.card .prose p { margin-bottom: 0.4em; }

.noticeboard { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(48px, 7vw, 96px); }
.noticeboard .posters { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.noticeboard .poster { scroll-margin-top: 24px; }
.noticeboard .poster-image img { aspect-ratio: auto; }

.missing { padding-top: clamp(48px, 8vw, 120px); padding-bottom: clamp(48px, 8vw, 120px); }

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

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(48px, 7vw, 96px); }
.contact-block { margin-bottom: 30px; }
.contact-block h2 { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.1em; font-size: 1rem; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.contact-block .big { font-family: var(--serif); font-size: 1.6rem; line-height: 1.3; }
.contact-block .big a { text-decoration: none; }
.contact-block .big a:hover { text-decoration: underline; }
.contact-map { margin: 0; }
.contact-map img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.contact-map figcaption { font-size: 0.95rem; color: var(--ink-faint); margin-top: 8px; }

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

.site-footer { background: var(--ink); color: #e6e8ef; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.site-footer h2 { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem; color: var(--gold); margin-bottom: 14px; font-weight: 500; }
.site-footer p { margin: 0 0 6px; }
.site-footer .footer-title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.25; color: #fff; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 18px 0 28px; font-size: 0.9rem; color: #a9aec0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-base a { color: #a9aec0; }

/* ---------- Petits écrans ---------- */

@media (max-width: 900px) {
  .hero-grid, .timetable, .contact-grid, .closing-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-figure img { aspect-ratio: 4 / 3; }
  .posters { grid-template-columns: 1fr 1fr; }
  .belfries { grid-template-columns: repeat(3, 1fr); }
  .section, .section.no-image { grid-template-columns: 1fr; }
  .section.flip .section-media { order: 0; }
}

@media (max-width: 560px) {
  body { font-size: 1.06rem; }
  .posters { grid-template-columns: 1fr; }
  .belfries { grid-template-columns: 1fr 1fr; }
  .next-mass .time { font-size: 2.1rem; }
  .slot { grid-template-columns: 4.6rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
.missing-head { border: 0; padding-top: 12px; }
.poster-title { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin: 6px 0; line-height: 1.25; }
.draft-banner { margin: 0; padding: 10px var(--gutter); background: var(--gold); color: var(--ink); font-family: var(--sans); letter-spacing: 0.04em; text-align: center; }

/* Coins légèrement arrondis : images, cartes et boutons. */
:root { --radius-image: 8px; --radius-control: 5px; }

.hero-figure img,
.belfry img,
.section-media img,
.contact-map img,
.poster-image { border-radius: var(--radius-image); }
.poster-image img { border-radius: 4px; }

.card { border-radius: var(--radius-image); overflow: hidden; }
.next-mass { border-radius: 0 var(--radius-image) var(--radius-image) 0; }

.button,
.toc a,
.nav .nav-don a.nav-link,
.menu-toggle summary { border-radius: var(--radius-control); }

/* Texte riche des sections (éditeur de l'admin) */
.prose > div { margin-bottom: 1em; }
.prose h1, .prose h3 { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.05rem; font-weight: 500; margin: 1.4em 0 0.5em; }
.section .prose h2, .card .prose h2, .prose h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; margin: 1.2em 0 0.4em; }
.prose u { text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.prose blockquote { margin: 1em 0; padding-left: 18px; border-left: 3px solid var(--gold); font-style: italic; color: var(--ink-soft); }
.prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose a { color: inherit; }
