/* ==========================================================================
   Actualités & Médias — styles partagés par actualites.html et medias.html
   (chargé après base.css). Préfixes : .actu-*, .agenda-*, .fb-*, .abo-*,
   .galerie-*, .lightbox*, .player*, .affiche-*
   ========================================================================== */

.page-hero .btn-row { margin-top: 1.6rem; }
.section-head .lead { margin-bottom: 0; }

/* ---------- Filtres (actualités + albums photo) ---------- */
.filtres { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 clamp(22px, 3vw, 36px); padding: 0; list-style: none; }
.filtre {
  font: 600 .95rem/1 var(--font-titre); cursor: pointer; color: var(--texte);
  background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon-s); padding: .8em 1.3em;
  min-height: 44px; transition: background .2s, color .2s, border-color .2s;
}
.filtre:hover { border-color: var(--bleu-logo); color: var(--bleu-logo); }
.filtre[aria-pressed="true"] { background: var(--bleu-logo); color: #fff; border-color: var(--bleu-logo); }
.filtre__n { opacity: .6; font-weight: 500; margin-left: .35em; }
.resultats-info { font-size: .9rem; color: var(--texte-doux); margin: -10px 0 18px; min-height: 1.4em; }

/* ---------- À la une ---------- */
.actu-une {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(8px, 2vw, 24px); padding: clamp(10px, 1.4vw, 16px); overflow: hidden; margin-bottom: clamp(28px, 4vw, 56px);
}
.actu-une__visuel { min-height: clamp(240px, 36vw, 440px); border-radius: var(--rayon-s); }
.actu-une__corps { padding: clamp(18px, 3vw, 44px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .2rem; }
.actu-une__corps .eyebrow { margin-bottom: 0; }
.actu-une__corps h3 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); text-transform: uppercase; font-weight: 700; margin: .3em 0 .5em; }
.actu-une__corps p { color: var(--texte-doux); }
@media (max-width: 800px) { .actu-une { grid-template-columns: 1fr; } .actu-une__visuel { min-height: 220px; } }

/* Visuel de carte : recadrage du vitrail teinté + écusson discret.
   --cat (couleur) et --pos (cadrage) sont posés en ligne par actus.js. */
.actu-visuel {
  position: relative; overflow: hidden; display: block;
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--cat, var(--orange)) 22%, rgba(255, 255, 255, .55)), rgba(255, 255, 255, .62)),
    url("../assets/img/vitrail-small.jpg") var(--pos, center) / cover no-repeat;
  background-color: var(--bg-alt);
}
.actu-visuel::after {
  content: ""; position: absolute; inset: 0; background: url("../assets/logos/logo-vertical-bleu.png") center / auto 46% no-repeat; opacity: .85;
}
.actu-visuel .badge { position: absolute; z-index: 1; left: 16px; top: 16px; background: var(--surface); color: var(--bleu-logo); border-color: var(--ligne); }

.actu-date { font-size: .92rem; color: var(--texte-doux); text-transform: capitalize; margin: 0 0 .4rem; display: block; }
.actu-une .actu-date { color: var(--accent-texte); font-weight: 600; }

/* ---------- Grille d'articles ---------- */
.actu-grille { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.actu-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: var(--ombre-s);
  overflow: hidden; transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.actu-card:hover { transform: translateY(-4px); border-color: rgba(0, 61, 114, .35); box-shadow: var(--ombre); }
.actu-card .actu-visuel { aspect-ratio: 16 / 10; }
.actu-card__corps { padding: clamp(18px, 2.2vw, 26px); display: flex; flex-direction: column; flex: 1; }
.actu-card h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); margin-bottom: .45em; }
.actu-card p { color: var(--texte-doux); font-size: .98rem; flex: 1; }
.actu-lien { font-weight: 600; text-decoration: none; color: var(--bleu); display: inline-flex; gap: .4em; align-items: center; margin-top: .4rem; min-height: 44px; }
.actu-lien:hover { color: var(--accent-texte); }
.actu-lien span { transition: transform .2s; } .actu-lien:hover span { transform: translateX(4px); }
.actu-vide { padding: 28px; border: 1px dashed var(--ligne); border-radius: var(--rayon); text-align: center; color: var(--texte-doux); grid-column: 1 / -1; }
.actu-card[hidden] { display: none; }

/* ---------- Agenda ---------- */
.agenda-liste { list-style: none; margin: 0; padding: 0; display: grid; }
.agenda-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: clamp(16px, 3vw, 40px); align-items: center;
  border-top: 1px solid var(--ligne); padding: clamp(18px, 2.6vw, 30px) 0;
}
.agenda-item:last-child { border-bottom: 1px solid var(--ligne); }
.agenda-date {
  display: grid; justify-items: center; align-content: center; min-width: clamp(82px, 12vw, 128px); padding: 8px 0;
  color: var(--bleu-logo); text-align: center; line-height: 1;
}
.agenda-date__jour { font-family: var(--font-titre); font-weight: 700; font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4rem); letter-spacing: -.02em; }
.agenda-date__jour--plage { font-size: clamp(1.4rem, 1rem + 1.8vw, 2.3rem); }
.agenda-date__mois { font-family: var(--font-titre); text-transform: uppercase; font-weight: 600; letter-spacing: .12em; font-size: clamp(.8rem, .7rem + .5vw, 1.1rem); margin-top: .35em; }
.agenda-corps h3 { margin-bottom: .3em; font-size: clamp(1.2rem, 1rem + 1vw, 1.8rem); }
.agenda-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .95rem; color: var(--texte-doux); margin: 0 0 .6rem; padding: 0; list-style: none; }
.agenda-meta li { display: inline-flex; align-items: center; gap: .45em; }
.agenda-meta svg { width: 1.05em; height: 1.05em; fill: none; stroke: var(--accent-texte); stroke-width: 2; flex: none; }
.agenda-corps p { color: var(--texte-doux); font-size: .98rem; margin: 0; max-width: 62ch; }
.agenda-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: .6rem; }
.btn--sm { padding: .85em 1.3em; font-size: .9rem; white-space: nowrap; }
@media (max-width: 760px) {
  .agenda-item { grid-template-columns: auto 1fr; }
  .agenda-item .btn { grid-column: 1 / -1; }
}
.agenda-passes { margin-top: clamp(24px, 3vw, 40px); }
.agenda-passes summary { cursor: pointer; font-weight: 600; padding: 10px 0; min-height: 44px; }
.agenda-passes ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; color: var(--texte-doux); font-size: .95rem; }
.agenda-passes li { padding: 12px 16px; border: 1px solid var(--ligne); border-radius: var(--rayon-s); }
.agenda-passes time { color: var(--titre); font-weight: 600; margin-right: .6em; }

/* ---------- Facebook ---------- */
.fb-bloc { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 820px) { .fb-bloc { grid-template-columns: 1fr; } }
.fb-encart { padding: clamp(22px, 3vw, 36px); }
.fb-entete { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--ligne); margin-bottom: 18px; }
.fb-entete__logo { flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--bleu-logo); display: grid; place-items: center; }
.fb-entete__logo img { width: 38px; height: auto; }
.fb-entete strong { display: block; font-size: 1.1rem; line-height: 1.2; }
.fb-entete span { font-size: .9rem; color: var(--texte-doux); }
.fb-vignettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.fb-vignettes img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--rayon); background: var(--bg-alt); }
.fb-bloc .btn svg { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; }
.btn--fb svg { width: 1.2em; height: 1.2em; fill: currentColor; }

/* ---------- Abonnement ---------- */
.abo__tete { max-width: 640px; margin: 0 auto clamp(24px, 4vw, 44px); text-align: center; }
.abo__tete .lead { margin-inline: auto; }
.abo__choix { display: grid; gap: clamp(16px, 2.4vw, 28px); grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 860px) { .abo__choix { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.abo-carte { display: flex; flex-direction: column; }
.abo-carte__ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem; border-radius: var(--rayon); background: rgba(0, 61, 114, .08); color: var(--bleu-logo); }
.abo-carte__ico--wa { background: rgba(37, 211, 102, .16); color: #0b6b34; }
.abo-carte > .btn, .abo-carte > form { margin-top: auto; }
.abo-carte > .btn { align-self: flex-start; }
.abo-carte { padding: clamp(20px, 2.6vw, 32px); border: 1px solid var(--ligne); border-radius: var(--rayon); background: var(--surface); box-shadow: var(--ombre-s); }
.abo-carte h3 { font-size: 1.3rem; margin-bottom: .4em; }
.abo-carte p { color: var(--texte-doux); font-size: .98rem; }
.abo-carte .form { gap: 14px; }
.abo-carte .form-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.abo-carte .form-row .field { flex: 1 1 220px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn--wa { background: #25d366; color: #06361a; }
.btn--wa:hover { background: #3be87f; color: #06361a; }
.field__err { color: #b3261e; font-size: .88rem; min-height: 1.2em; }

/* ==========================================================================
   Médias
   ========================================================================== */

/* ---------- Galerie (mosaïque en colonnes) ---------- */
.galerie { columns: 3 190px; column-gap: clamp(12px, 1.8vw, 22px); }
.galerie-item { display: block; width: 100%; break-inside: avoid; margin: 0 0 clamp(12px, 1.8vw, 22px); padding: 0; border: 0; background: none; cursor: zoom-in; color: inherit; font: inherit; text-align: left; border-radius: var(--rayon-s); }
.galerie-item[hidden] { display: none; }
.galerie-item .ph, .galerie-item img { border-radius: var(--rayon-s); width: 100%; transition: transform .35s ease, box-shadow .35s ease; }
.galerie-item:hover .ph, .galerie-item:hover img { transform: scale(1.02); box-shadow: var(--ombre); }
.galerie-item img { height: auto; }
.galerie-item .ph { min-height: 0; background: linear-gradient(rgba(255, 255, 255, .8), rgba(245, 246, 248, .86)), url("../assets/img/vitrail-small.jpg") center / cover; border-style: solid; border-color: var(--ligne); box-shadow: var(--ombre-s); }
.galerie-item .ph--ratio-tall { aspect-ratio: 3 / 4; }
.galerie-item .ph--ratio-wide { aspect-ratio: 16 / 10; }
.galerie-item .ph--ratio-square { aspect-ratio: 1; }
.galerie-item .ph--ratio-std { aspect-ratio: 4 / 3; }
.ph__legende { display: grid; gap: 4px; justify-items: center; font-size: .9rem; }
.ph__legende b { color: var(--texte); font-weight: 600; }
.ph__legende small { font-family: var(--font-accent); font-weight: 500; font-size: .85rem; color: var(--accent-texte); }
.galerie-legende { display: block; font-size: .85rem; color: var(--texte-doux); padding: 8px 4px 0; }
.galerie-note { margin-top: 24px; font-size: .9rem; color: var(--texte-doux); }
.galerie-note code { background: var(--bg-alt); padding: .1em .45em; border-radius: var(--rayon-s); font-size: .9em; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(20, 14, 11, .88); display: none; align-items: center; justify-content: center; padding: clamp(12px, 3vw, 40px); }
.lightbox.is-open { display: flex; }
.lightbox__fig { margin: 0; width: min(1000px, 100%); display: grid; gap: 14px; justify-items: center; }
.lightbox__media { width: 100%; display: grid; place-items: center; max-height: 74vh; }
.lightbox__media img { max-height: 74vh; width: auto; border-radius: var(--rayon-s); }
.lightbox__media .ph { width: min(100%, 760px); border-style: solid; max-height: 74vh; min-height: 0; aspect-ratio: 4 / 3; }
.lightbox__cap { text-align: center; color: var(--creme); }
.lightbox__cap small { display: block; color: rgba(241, 239, 205, .75); margin-top: 2px; }
.lightbox__btn {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(241, 239, 205, .35); background: rgba(31, 21, 17, .9); color: var(--creme);
  display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s;
}
.lightbox__btn:hover { background: var(--orange); border-color: var(--orange); color: #190d06; }
.lightbox__btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close { top: clamp(10px, 2vw, 24px); right: clamp(10px, 2vw, 24px); }
.lightbox__prev { left: clamp(6px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: clamp(6px, 2vw, 24px); top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 14px; transform: none; } .lightbox__prev { left: 14px; } .lightbox__next { right: 14px; } }
body.lightbox-open { overflow: hidden; }

/* ---------- Lecteurs vidéo avec cadre de la paroisse ---------- */
.videos { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 56px); align-items: flex-start; }
.video-bloc { flex: 1 1 560px; min-width: 0; }
.video-bloc--portrait { flex: 0 1 340px; }
.video-bloc h3 { font-size: 1.25rem; margin: 1rem 0 .2em; }
.video-bloc p { color: var(--texte-doux); font-size: .95rem; margin: 0; }
.player { position: relative; border-radius: var(--rayon-s); overflow: hidden; background: var(--noir-3); isolation: isolate; box-shadow: var(--ombre); border: 1px solid var(--ligne); }
.player--paysage { aspect-ratio: 16 / 9; }
.player--portrait { aspect-ratio: 9 / 16; }
.player__scene {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 12%;
  background: linear-gradient(rgba(12, 7, 6, .4), rgba(12, 7, 6, .6)), url("../assets/img/vitrail-small.jpg") center / cover;
  color: var(--creme);
}
.player__scene--clair { background: linear-gradient(rgba(255, 255, 255, .82), rgba(245, 246, 248, .9)), url("../assets/img/vitrail-small.jpg") center / cover; color: #1b120d; }
.video-bloc .player__scene--clair .player__hint { color: rgba(27, 18, 13, .75); }
.player__play {
  width: clamp(56px, 12%, 84px); aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--orange); color: #190d06; cursor: pointer; display: grid; place-items: center; margin: 0 auto 12px;
  transition: transform .2s, background .2s;
}
.player__play:hover:not(:disabled) { transform: scale(1.08); background: var(--jaune); }
.player__play:disabled { opacity: .55; cursor: not-allowed; }
.player__play svg { width: 42%; fill: currentColor; margin-left: 6%; }
.player__titre { font-family: var(--font-titre); font-weight: 600; font-size: clamp(1rem, .9rem + .6vw, 1.35rem); }
.video-bloc .player__hint, .player__hint { font-size: .85rem; color: rgba(241, 239, 205, .8); max-width: 34ch; margin: .3rem auto 0; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
/* Le cadre est une image PNG transparente posée PAR-DESSUS la vidéo ;
   pointer-events:none laisse passer les clics vers le lecteur. */
.player__cadre { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; z-index: 2; }

/* ---------- Affiches téléchargeables ---------- */
.affiche-groupes { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .affiche-groupes { grid-template-columns: 340px minmax(0, 1fr); } }
.affiche-groupe { min-width: 0; }
.affiche-groupe .affiche-programme { max-width: 340px; }
.affiche-groupe h3 { margin-bottom: .8em; }
.affiche-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.affiche-item { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid var(--ligne); border-radius: var(--rayon-s); background: var(--surface); box-shadow: var(--ombre-s); }
.affiche-item__icone { width: 44px; height: 56px; border-radius: var(--rayon-s); background: var(--bleu-logo); display: grid; place-items: center; }
.affiche-item__icone svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.affiche-item strong { display: block; line-height: 1.25; }
.affiche-item small { color: var(--texte-doux); }
@media (max-width: 520px) { .affiche-item { grid-template-columns: auto 1fr; } .affiche-item .btn { grid-column: 1 / -1; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ==========================================================================
   Médias — mise en page rangée (galerie en grille régulière, vidéos alignées)
   ========================================================================== */
/* Galerie : grille régulière, vignettes toutes en 4:3 */
.galerie { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.galerie .galerie-item { margin: 0; break-inside: auto; }
.galerie .galerie-item .ph, .galerie .galerie-item img { aspect-ratio: 4 / 3; height: auto; width: 100%; object-fit: cover; }
@media (max-width: 520px) { .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.filtres { margin-bottom: .6rem; }
.resultats-info { margin: 0 0 1.2rem; }

/* Vidéos : paysage + portrait à la MÊME hauteur (colonnes 16:9 et 9:16 proportionnelles) */
.videos { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 40px); align-items: start; }
@media (min-width: 820px) { .videos { grid-template-columns: minmax(0, 256fr) minmax(0, 81fr); gap: clamp(16px, 2.4vw, 28px); } }
.video-bloc, .video-bloc--portrait { flex: none; width: 100%; }
@media (max-width: 819px) { .video-bloc--portrait { max-width: 260px; } }
.video-bloc h3 { font-size: 1.1rem; margin: .9rem 0 .15em; }
.video-bloc p { font-size: .92rem; }

.sbad-news-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.actu-visuel,.actu-une__img{position:relative;overflow:hidden}.actu-visuel .badge{position:relative;z-index:1}
