/* ==========================================================================
   Page « Messes et célébrations » — thème clair, chargé après base.css
   Idée visuelle : la carte sombre « affiche » (vitrail + cadre dégradé, gérée
   par base.css) posée sur un fond crème ; tout le reste est clair et sobre.
   ========================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
section[id] { scroll-margin-top: calc(var(--header-h) - 10px); }

/* ---------- Bandeau : liens d'ancrage ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6rem; }
.chips a {
  text-decoration: none; font-weight: 500; font-size: .95rem; padding: .55em 1.1em; border-radius: var(--rayon-s);
  color: var(--bleu-logo); border: 1px solid var(--ligne); background: rgba(255, 255, 255, .85); transition: border-color .2s, color .2s, background .2s;
}
.chips a:hover { border-color: var(--bleu-logo); background: var(--bleu-logo); color: #fff; }

/* ---------- Programme : la carte affiche sur fond clair ---------- */
.affiche { padding-top: clamp(36px, 6vw, 72px); }
.affiche__inner { width: 100%; max-width: 820px; margin-inline: auto; padding-inline: var(--gutter); }

/* Réglages de typographie du composant .messes pour coller aux affiches */
.affiche .messes {
  border-radius: var(--rayon);
  padding: clamp(22px, 4.5vw, 52px) clamp(18px, 4.5vw, 56px) clamp(24px, 4vw, 44px);
}
.affiche .messes__titre { letter-spacing: -.005em; line-height: 1.02; }
.affiche .messes__periode { margin-bottom: 1.1rem; }
.affiche .messes__semaine { font-weight: 400; font-size: clamp(.98rem, .85rem + .7vw, 1.4rem); line-height: 1.35; }
.affiche .messes__jour:first-of-type { margin-top: 1.6rem; }
.affiche .messes__jour h3 { font-weight: 700; letter-spacing: -.015em; line-height: 1.1; font-size: clamp(1.35rem, 1rem + 2.1vw, 2.5rem); margin-bottom: .15em; }
.affiche .messes__heures { font-weight: 300; font-size: clamp(1.2rem, .95rem + 1.5vw, 2.1rem); line-height: 1.35; letter-spacing: .005em; }
.affiche .messes__heures b { font-weight: 300; }
.affiche .messes__jour--chapelle h3 { font-size: clamp(1.2rem, .95rem + 1.7vw, 2.05rem); letter-spacing: -.03em; }
.affiche .messes__devise { display: none; } /* la devise est reprise sous la carte, comme sur l'affiche */
.affiche .messes .form-note { margin: 1.4rem 0 0; }

/* Devise + croix */
.affiche__bas { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin-top: clamp(18px, 3vw, 32px); }
.affiche__devise { margin: 0; max-width: 14ch; font-family: var(--font-corps); font-weight: 400; font-size: clamp(.95rem, .85rem + .6vw, 1.25rem); line-height: 1.25; color: var(--texte); }
.affiche__croix { grid-column: 2; width: clamp(64px, 9vw, 104px); height: auto; justify-self: center; }
.affiche__actions { justify-content: center; margin-top: clamp(22px, 4vw, 36px); }
.affiche__actions .btn[disabled] { opacity: .65; cursor: not-allowed; transform: none; background: transparent; color: var(--bleu-logo); }
.affiche__actions .btn[disabled]:hover { background: transparent; color: var(--bleu-logo); }
.affiche__actions .badge { font-size: .7rem; }

/* Lien Facebook, simple */
.affiche__fb { margin: clamp(22px, 3.5vw, 34px) 0 0; text-align: center; }
.affiche__fb a { display: inline-flex; align-items: center; gap: .55em; color: var(--bleu-logo); font-weight: 600; text-decoration: none; font-size: clamp(.95rem, .85rem + .6vw, 1.2rem); }
.affiche__fb a:hover { color: var(--accent-texte); }
.affiche__fb .fb { flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; background: #1877f2; color: #fff; display: grid; place-items: center; font: 800 1em/1 Arial, sans-serif; }

/* ---------- Exemple de temps fort (même carte .messes, en plus petit) ---------- */
.messes--exemple { padding: clamp(22px, 3.5vw, 40px) clamp(18px, 3vw, 36px); margin: 0; }
.messes--exemple .messes__special { margin-top: 2.2rem; }
.messes--exemple .messes__special .messes__jour { margin-top: 1.1rem !important; }
.messes--exemple .messes__devise { font-size: .85rem; }
.messes--exemple .messes__jour h3 { font-size: clamp(1.3rem, 1.05rem + 1.2vw, 2rem); }
.messes--exemple .messes__heures { font-size: clamp(1.1rem, .95rem + .9vw, 1.6rem); font-weight: 300; }
.messes--exemple .messes__semaine { font-size: clamp(.95rem, .85rem + .5vw, 1.2rem); }
.split--top { align-items: start; }


/* ---------- Agenda ---------- */
.agenda__titre { font-family: var(--font-accent); font-weight: 600; text-transform: none; font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); color: var(--accent-texte); letter-spacing: 0; }
.agenda__liste { display: grid; gap: clamp(14px, 2vw, 20px); }
.evt { display: grid; grid-template-columns: auto 1fr; gap: clamp(14px, 2.4vw, 28px); align-items: start; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre-s); padding: clamp(16px, 2.4vw, 28px); }
.evt__date { min-width: 78px; text-align: center; padding: .8rem .8rem .7rem; border-radius: var(--rayon-s); background: var(--bleu-logo); color: #fff; display: grid; line-height: 1; }
.evt__jour { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); font-weight: 700; }
.evt__mois { font-size: .9rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-top: .25rem; }
.evt__quand { margin: 0 0 .2rem; font-size: .9rem; color: var(--accent-texte); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.evt h3 { font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); margin-bottom: .4em; }
.evt p { color: var(--texte-doux); }
.evt__meta { list-style: none; padding: 0; margin: .6rem 0 .8rem; display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; font-size: .95rem; }
.evt__meta span { color: var(--texte-doux); text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; margin-right: .3em; }
.evt__meta em { color: var(--texte-doux); }
.evt--passe { background: transparent; box-shadow: none; }
.evt--passe .evt__date { background: var(--bg-alt); color: var(--texte); border: 1px solid var(--ligne); }
.agenda__passes { margin-top: clamp(28px, 4vw, 48px); }
.agenda__passes summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .7em; font-weight: 600; padding: .8em 1.3em; border-radius: var(--rayon-s); border: 1px solid var(--ligne); background: var(--surface); color: var(--bleu-logo); transition: border-color .2s;
}
.agenda__passes summary::-webkit-details-marker { display: none; }
.agenda__passes summary::before { content: "+"; font-size: 1.3em; line-height: 1; color: var(--accent-texte); width: .8em; text-align: center; }
.agenda__passes[open] summary::before { content: "–"; }
.agenda__passes summary:hover { border-color: var(--bleu-logo); }
.agenda__passes .agenda__liste { margin-top: 1.2rem; }

/* ---------- Sacrements ---------- */
.sacrements { display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.sacrement {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre-s);
  padding: clamp(22px, 2.6vw, 30px); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.sacrement:hover { transform: translateY(-4px); box-shadow: var(--ombre); border-color: rgba(0, 61, 114, .3); }
.sacrement__n { display: flex; align-items: center; gap: .55em; font-family: var(--font-accent); font-weight: 700; font-size: 1.5rem; line-height: 1; color: var(--accent-texte); margin-bottom: .6rem; }
.sacrement__n::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c); }
.sacrement h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); }
.sacrement > p { color: var(--texte-doux); }
.sacrement__info { margin: auto 0 1.1rem !important; padding-top: .4rem; }
.sacrement .btn { padding: .85em 1.3em; font-size: .92rem; }

/* ---------- Intentions de messe ---------- */
#form-intention.frame { margin: 0; }
.intentions__intro .lead { margin-bottom: 1.2rem; }
.intentions__types { list-style: none; margin: 0 0 1.8rem; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.intentions__types li { padding: .4em 1em; border-radius: var(--rayon-s); background: var(--bg-alt); border: 1px solid var(--ligne); color: var(--bleu-logo); font-weight: 600; font-size: .92rem; }
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.etapes li { display: flex; gap: 16px; align-items: flex-start; }
.etapes b { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--bleu-logo); color: #fff; font-family: var(--font-titre); font-size: 1.05rem; }
.etapes strong { display: block; font-family: var(--font-titre); color: var(--titre); margin-bottom: .1rem; }
.etapes span { color: var(--texte-doux); font-size: .95rem; line-height: 1.5; }
.field-error { margin: 0; font-size: .9rem; color: #b3261e; font-weight: 500; }
.field-error[hidden] { display: none; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b3261e; }
#int-status:focus { outline: 3px solid var(--focus); outline-offset: 3px; }
.form .btn { justify-self: start; }
.form .field > .form-note { margin: 0; }

/* ---------- Petits écrans ---------- */
@media (max-width: 560px) {
  .affiche__bas { grid-template-columns: 1fr auto; }
  .affiche__devise { max-width: 12ch; }
  .affiche__actions .btn { width: 100%; }
  .evt { grid-template-columns: 1fr; }
  .evt__date { justify-self: start; display: flex; align-items: baseline; gap: .5rem; padding: .5rem 1rem; min-width: 0; }
  .evt__mois { margin-top: 0; }
  .form .btn { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .sacrement, .chips a { transition: none; }
  .sacrement:hover { transform: none; }
}

/* Aperçu fidèle du PSD, distinct du programme courant rendu par le widget. */
.affiche-originale { margin: 32px 0 0; }
.affiche-originale a { display: block; }
.affiche-originale img { width: 100%; height: auto; }
.affiche-originale figcaption { margin-top: 12px; color: var(--texte-doux); font-size: .85rem; line-height: 1.6; }

/* Programme + résumé des horaires côte à côte (écran large) */
.affiche__inner--duo { max-width: var(--max); }  /* même largeur que les autres sections de la page */
@media (min-width: 900px) {
  .affiche__inner--duo { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
  .affiche__inner--duo > .sr-only { grid-column: 1 / -1; }
}
.affiche__inner--duo [data-messes-widget] { max-width: 460px; margin-inline: auto; width: 100%; }
.affiche-resume { padding-top: 6px; }
.affiche-resume[hidden] { display: none; }
.affiche-resume h3 { margin: 0 0 .3em; }
.affiche-resume__periode { margin: 0 0 1.2rem; color: var(--texte-doux); font-weight: 600; }
.affiche-resume__liste { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--ligne); }
.affiche-resume__liste li { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--ligne); }
.affiche-resume__liste strong { color: var(--bleu-logo); font-family: var(--font-titre); font-weight: 600; }
.affiche-resume__liste span { font-size: 1.05rem; }
