/* =========================================================
   Blog et pages à blocs (complète style.css)
   ========================================================= */

/* ---------- Liste des articles ---------- */
.post-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: #fff; box-shadow: var(--shadow); color: inherit; text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.post-card[hidden] { display: none; }
.post-card__img { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--pierre-100); overflow: hidden; }
.post-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .6s; }
.post-card:hover .post-card__img img { transform: scale(1.04); }
.post-card__vide {
  display: grid; place-items: center; height: 100%;
  font-family: var(--font-titre); font-size: 1.6rem; font-style: italic; color: var(--granit);
  background: radial-gradient(60% 70% at 80% 10%, rgba(var(--soleil-rvb),.35), transparent 60%), var(--pierre-100);
}
.post-card__body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 26px; flex: 1; }
.post-card__meta { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--granit); }
.post-card h3 { font-size: 1.35rem; margin: 0; color: var(--mer-900); }
.post-card__txt { color: var(--pierre-700); line-height: 1.5; }
.post-card__go { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--mer-900); }
.post-card__go svg { width: 18px; height: 18px; transition: transform .3s; }
.post-card:hover .post-card__go svg { transform: translateX(4px); }

/* Le premier article de la liste prend toute la largeur */
@media (min-width: 900px) {
  .post-grid--blog .post-card:first-child:not([hidden]) { grid-column: 1 / -1; flex-direction: row; }
  .post-grid--blog .post-card:first-child .post-card__img { flex: 0 0 55%; aspect-ratio: auto; min-height: 360px; }
  .post-grid--blog .post-card:first-child .post-card__body { padding: 40px; justify-content: center; }
  .post-grid--blog .post-card:first-child h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
}

/* Filtres par thème */
.blog-filtres { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.blog-filtres button {
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  padding: .5em 1.1em; border-radius: 999px; background: #fff; color: var(--mer-800);
  border: 1px solid var(--pierre-200); transition: background .2s, color .2s, border-color .2s;
}
.blog-filtres button:hover { border-color: var(--mer-800); }
.blog-filtres button[aria-pressed="true"] { background: var(--mer-900); border-color: var(--mer-900); color: #fff; }

/* ---------- Article ---------- */
.article-head { max-width: 860px; }
.article-head .eyebrow a { color: inherit; text-decoration: none; }
.article-head .eyebrow a:hover { text-decoration: underline; }
.page-hero .article-meta { font-size: .95rem; font-weight: 700; color: var(--pierre-700); margin-top: 1.4em; }
.article-cover { max-width: 1000px; margin-top: -20px; }
.article-cover img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.article-body { margin-inline: auto; font-size: 1.1rem; line-height: 1.75; }
.article-body > :first-child { margin-top: 0; }
.article-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: 1.2em 0; }
.article-body blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--soleil);
  font-family: var(--font-titre); font-size: 1.35rem; line-height: 1.4; color: var(--mer-900);
}
.article-body blockquote p { color: inherit; }
.article-body a { color: var(--granit-dark); }

/* ---------- Pages à blocs ---------- */
.bloc-texte { margin-inline: auto; }
.bloc-texte--centre { text-align: center; }
.bloc-texte--centre .eyebrow { justify-content: center; }
.bloc-texte--centre .hero__cta { justify-content: center; }
.bloc-texte .hero__cta, .bloc-md + .hero__cta { opacity: 1; animation: none; margin-top: 1.6em; }
.section--dark .prose p, .section--dark .prose li, .section--dark .bloc-md { color: rgba(255,255,255,.85); }
.bloc-citation { max-width: 900px; text-align: center; }
.bloc-citation .big-quote { margin-bottom: .4em; }
.bloc-citation__auteur { font-weight: 800; color: var(--pierre-700); }
.section--dark .big-quote { color: #fff; }
.section--dark .bloc-citation__auteur { color: var(--soleil); }
.bloc-encadre { padding-block: 24px; }
.bloc-encadre .prose { margin-inline: auto; }
.bloc-encadre .notice p:last-child { margin-bottom: 0; }

/* ---------- Couleurs choisies dans l'admin pour un élément (carte, fond de bloc) ---------- */
/* Le texte passe en blanc ou en foncé selon la couleur (--texte-auto, calculée à la construction). */
.card--perso, .section--perso { color: var(--texte-auto); }
.card--perso h3, .card--perso p, .card--perso li, .card--perso a,
.section--perso h2, .section--perso h3, .section--perso p, .section--perso li, .section--perso a,
.section--perso .eyebrow, .section--perso .lead, .section--perso .big-quote, .section--perso .bloc-md,
.section--perso .section__head p, .section--perso .bloc-citation__auteur { color: var(--texte-auto); }
.card--perso .card__num { color: currentColor; opacity: .14; }
/* Une carte sans couleur à elle garde ses couleurs normales, même posée sur un fond de bloc coloré */
.section--perso .card:not(.card--perso) { color: var(--encre); }
.section--perso .card:not(.card--perso) :is(h3, h4) { color: var(--mer-900); }
.section--perso .card:not(.card--perso) :is(p, li) { color: var(--encre); }
.section--perso .card:not(.card--perso) a { color: var(--mer-700); }
/* Mots mis en avant (en bleu d'habitude) : jaune sur fond foncé, bleu foncé sur fond clair */
.card--perso em, .section--perso h2 em, .section--perso .big-quote em, .section--perso .eyebrow { color: var(--accent-auto); }

/* ---------- Bloc « Événement » (pages à blocs) ---------- */
.evenement {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 3vw, 36px); align-items: start;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 40px);
  color: var(--encre);
}
.evenement:has(.evenement__photo) { grid-template-columns: auto 1fr minmax(0, 320px); }
.evenement__date {
  display: grid; justify-items: center; min-width: 110px; padding: 16px 12px; border-radius: var(--radius-sm);
  background: var(--soleil); color: var(--mer-900); text-align: center; line-height: 1.1;
}
.evenement__date span { font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.evenement__date strong { font-family: var(--font-titre); font-size: 3.2rem; font-weight: 600; margin: 4px 0; }
.evenement__corps h2 { margin-bottom: .5em; }
.evenement__corps h2 em { font-style: italic; font-weight: 500; color: var(--granit); }
.evenement__infos { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 6px; }
.evenement__infos b { display: inline-block; min-width: 64px; color: var(--granit-dark); font-weight: 800; }
.evenement__programme { list-style: none; padding: 0; margin: 1.2em 0 0; border-left: 3px solid var(--granit-pale); }
.evenement__programme li { display: flex; gap: 14px; padding: 6px 0 6px 16px; }
.evenement__programme time { flex: none; min-width: 52px; font-weight: 800; color: var(--granit-dark); }
.evenement .hero__cta { opacity: 1; animation: none; margin-top: 1.6em; }
.evenement__photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-sm); }
@media (max-width: 760px) {
  .evenement, .evenement:has(.evenement__photo) { grid-template-columns: 1fr; }
  .evenement__date { grid-auto-flow: column; justify-content: start; gap: 10px; min-width: 0; align-items: baseline; }
  .evenement__date strong { font-size: 2rem; margin: 0; }
}
