/* Mosquée de Bron — feuille de style unique */

:root {
  --vert: #2f7d0c;          /* vert du logo, assombri pour le contraste */
  --vert-clair: #4baa11;
  --vert-pale: #eef6e8;
  --bleu: #2a8fd0;
  --bleu-clair: #7acafd;
  --texte: #23272a;
  --texte-doux: #5a6166;
  --fond: #ffffff;
  --fond-alt: #f6f7f4;
  --bord: #e2e5df;
  --sombre: #1d2a1a;
  --rayon: 10px;
  --ombre: 0 2px 10px rgba(0, 0, 0, .07);
  --largeur: 1140px;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--texte);
  background: var(--fond);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vert); }
a:hover { color: var(--vert-clair); }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 16px; }
.visuellement-cache {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.lien-evitement {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--vert); color: #fff; padding: 8px 14px; border-radius: var(--rayon);
}
.lien-evitement:focus { top: 8px; color: #fff; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .75em 1.4em; border-radius: 999px; border: 2px solid var(--vert);
  background: var(--vert); color: #fff; font-weight: 600; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.bouton:hover { background: var(--vert-clair); border-color: var(--vert-clair); color: #fff; }
.bouton--contour { background: transparent; color: var(--vert); }
.bouton--contour:hover { background: var(--vert); color: #fff; }
.bouton--clair { background: #fff; border-color: #fff; color: var(--vert); }
.bouton--clair:hover { background: var(--vert-pale); border-color: var(--vert-pale); color: var(--vert); }
.bouton--transparent { background: transparent; border-color: #fff; color: #fff; }
.bouton--transparent:hover { background: #fff; color: var(--vert); }

/* ---------- Bandeau d'infos ---------- */
.infos-haut { background: var(--sombre); color: #d8e2d3; font-size: .875rem; }
.infos-haut .conteneur { display: flex; flex-wrap: wrap; gap: .25em 1.5em; padding-top: 6px; padding-bottom: 6px; }
.infos-haut a { color: #fff; text-decoration: none; }
.infos-haut a:hover { text-decoration: underline; }

/* ---------- En-tête et navigation ---------- */
.entete {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--bord);
  backdrop-filter: blur(6px);
}
.entete .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.logo img { width: 130px; height: auto; }
.nav-principale ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.nav-principale a {
  display: block; padding: .5em .7em; border-radius: 6px;
  color: var(--texte); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap;
}
.nav-principale a:hover { background: var(--vert-pale); color: var(--vert); }
.nav-principale a[aria-current="page"] { color: var(--vert); box-shadow: inset 0 -2px 0 var(--vert); border-radius: 0; }
.nav-principale .nav-don a { background: var(--vert); color: #fff; border-radius: 999px; padding: .5em 1.1em; margin-left: 6px; }
.nav-principale .nav-don a:hover { background: var(--vert-clair); color: #fff; }

.bouton-menu {
  display: none; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--bord); border-radius: 8px;
  padding: 8px 12px; font: inherit; font-weight: 600; color: var(--texte); cursor: pointer;
}
.bouton-menu .barres, .bouton-menu .barres::before, .bouton-menu .barres::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative; transition: transform .2s;
}
.bouton-menu .barres::before, .bouton-menu .barres::after { content: ""; position: absolute; left: 0; }
.bouton-menu .barres::before { top: -6px; }
.bouton-menu .barres::after { top: 6px; }
.bouton-menu[aria-expanded="true"] .barres { background: transparent; }
.bouton-menu[aria-expanded="true"] .barres::before { transform: translateY(6px) rotate(45deg); }
.bouton-menu[aria-expanded="true"] .barres::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .bouton-menu { display: inline-flex; }
  .nav-principale {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--bord); box-shadow: var(--ombre);
    max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .js .nav-principale { display: none; }
  .js .nav-principale.ouverte { display: block; }
  .nav-principale ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 0; }
  .nav-principale a { padding: .8em .5em; border-bottom: 1px solid var(--bord); border-radius: 0; font-size: 1rem; }
  .nav-principale a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--vert); padding-left: .9em; }
  .nav-principale .nav-don a { margin: 12px 0 0; text-align: center; border-bottom: 0; border-radius: 999px; }
}

/* ---------- Héros (accueil) ---------- */
.heros {
  position: relative; color: #fff; isolation: isolate;
  min-height: min(78vh, 620px); display: flex; align-items: center;
  background: var(--sombre) url("../img/photos/facade-banniere.webp") center / cover no-repeat;
}
.heros::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(16, 30, 12, .85) 0%, rgba(16, 30, 12, .55) 55%, rgba(16, 30, 12, .2) 100%);
}
.heros .conteneur { padding-top: 64px; padding-bottom: 64px; }
.heros__surtitre { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--bleu-clair); font-size: .9rem; }
.heros p { max-width: 36em; font-size: 1.15rem; color: #eef3ea; }
.heros__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }

/* ---------- Annonce ---------- */
.annonce { background: #fff8e1; border-bottom: 1px solid #f1e2b0; }
.annonce .conteneur { display: flex; gap: 14px; align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.annonce__icone { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #e9a400; color: #fff; display: grid; place-items: center; font-weight: 700; }
.annonce p { margin: 0; }
.annonce time { display: block; font-size: .85rem; color: var(--texte-doux); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section--alt { background: var(--fond-alt); }
.section__entete { max-width: 700px; margin-bottom: 32px; }
.section__entete--centre { margin-left: auto; margin-right: auto; text-align: center; }
.surtitre { display: block; color: var(--vert); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: .4em; }
.chapo { font-size: 1.1rem; color: var(--texte-doux); }

.deux-colonnes { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .deux-colonnes { grid-template-columns: 1fr 1fr; } }
.photo-arrondie { border-radius: var(--rayon); box-shadow: var(--ombre); }

.liste-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 1.5em 0; padding: 0; list-style: none; }
.liste-chiffres li { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 12px 14px; }
.liste-chiffres strong { display: block; font-size: 1.5rem; color: var(--vert); }
.liste-chiffres span { font-size: .9rem; color: var(--texte-doux); }

/* ---------- Cartes ---------- */
.grille-cartes { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.carte {
  background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 24px; box-shadow: var(--ombre); display: flex; flex-direction: column;
}
.carte h3 { margin-bottom: .4em; }
.carte p { color: var(--texte-doux); font-size: .97rem; }
.carte .lien-carte { margin-top: auto; font-weight: 600; text-decoration: none; }
.carte .lien-carte::after { content: " →"; }
.carte__icone {
  width: 52px; height: 52px; border-radius: 50%; margin-bottom: 14px;
  background: var(--vert-pale); color: var(--vert); display: grid; place-items: center;
}
.carte__icone svg { width: 26px; height: 26px; }

/* ---------- Horaires (raccourci accueil) ---------- */
.bandeau-horaires { background: linear-gradient(120deg, var(--vert) 0%, #1f5f08 100%); color: #fff; }
.bandeau-horaires .conteneur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.bandeau-horaires h2 { margin-bottom: .2em; }
.bandeau-horaires p { margin: 0; color: #e3f0dc; }
.prieres { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 14px 0 0; padding: 0; }
.prieres li { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 600; font-size: .9rem; }
.prieres img { width: 28px; height: 28px; }

/* ---------- Vidéos (chargées au clic) ---------- */
.grille-videos { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.video { margin: 0; }
.video__lecteur {
  display: block; position: relative; aspect-ratio: 16 / 9; width: 100%; border: 0; padding: 0; cursor: pointer;
  border-radius: var(--rayon); overflow: hidden; background: #000 center / cover no-repeat;
}
.video__lecteur::after {
  content: ""; position: absolute; inset: 50% auto auto 50%; width: 68px; height: 48px; transform: translate(-50%, -50%);
  border-radius: 12px; background: rgba(0, 0, 0, .7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: background-color .2s;
}
.video__lecteur:hover::after, .video__lecteur:focus-visible::after { background-color: #c00; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--rayon); display: block; }
.video figcaption { margin-top: 8px; font-weight: 600; font-size: .97rem; }

/* ---------- Appel au don ---------- */
.appel-don { position: relative; color: #fff; isolation: isolate; text-align: center; background: var(--sombre) url("../img/bannieres/interieur-calligraphie.webp") center / cover; }
.appel-don::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(20, 45, 12, .82); }
.appel-don blockquote { margin: 0 auto 1.5em; max-width: 40em; font-size: 1.2rem; font-style: italic; }
.appel-don cite { display: block; margin-top: .5em; font-size: .95rem; font-style: normal; color: var(--bleu-clair); }

/* ---------- Pied de page ---------- */
.pied { background: var(--sombre); color: #c9d4c4; font-size: .95rem; }
.pied .conteneur { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px; }
@media (min-width: 760px) { .pied .conteneur { grid-template-columns: 1.3fr 1fr 1fr; } }
.pied h2 { color: #fff; font-size: 1.05rem; margin-bottom: .8em; }
.pied a { color: #fff; text-decoration: none; }
.pied a:hover { text-decoration: underline; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: .45em; }
.pied address { font-style: normal; }
.pied__logo { background: #fff; border-radius: 8px; padding: 8px 12px; display: inline-block; margin-bottom: 14px; }
.pied__logo img { width: 120px; }
.pied__bas { border-top: 1px solid rgba(255, 255, 255, .12); }
.pied__bas .conteneur { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 16px; padding-bottom: 16px; font-size: .85rem; grid-template-columns: none; }

/* ---------- Pages intérieures ---------- */
.entete-page {
  position: relative; color: #fff; isolation: isolate; padding: 56px 0 48px;
  /* l'image de fond est donnée dans style="background-image:url(img/…)" de chaque page */
  background-color: var(--sombre); background-position: center; background-size: cover; background-repeat: no-repeat;
}
.entete-page::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(16, 30, 12, .72); }
.entete-page h1 { margin-bottom: .2em; }
.entete-page p { margin: 0; max-width: 40em; color: #e6eee1; font-size: 1.1rem; }
.ariane { font-size: .85rem; margin-bottom: 10px; color: #cfdcc8; }
.ariane a { color: #fff; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose blockquote {
  margin: 1.2em 0; padding: 14px 18px; border-left: 4px solid var(--vert);
  background: var(--vert-pale); border-radius: 0 var(--rayon) var(--rayon) 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure { margin: 1.5em 0; }
.prose figcaption { font-size: .9rem; color: var(--texte-doux); margin-top: 6px; }
.citation-source { display: block; font-size: .9rem; color: var(--texte-doux); margin-top: .3em; }
.encadre { background: var(--fond-alt); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px 22px; margin: 1.5em 0; }
.encadre > :last-child { margin-bottom: 0; }
.encadre--vert { background: var(--vert-pale); border-color: #cfe3c2; }

.mise-en-page { display: grid; gap: 40px; }
@media (min-width: 960px) { .mise-en-page { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.colonne-laterale { display: grid; gap: 20px; }
@media (min-width: 960px) { .colonne-laterale { position: sticky; top: 96px; } }
.colonne-laterale h2 { font-size: 1.2rem; }
.colonne-laterale .liste-chiffres { grid-template-columns: 1fr 1fr; margin: 0; }
.colonne-laterale .liste-chiffres strong { font-size: 1.3rem; }
.deux-colonnes > * { min-width: 0; }
.illustration-centree { width: 100%; max-width: 420px; justify-self: center; }
/* les ancres ne passent pas sous l'en-tête collant */
[id] { scroll-margin-top: 96px; }

/* Frise chronologique */
.frise { list-style: none; margin: 1.5em 0; padding: 0; border-left: 3px solid var(--vert-pale); }
.frise li { position: relative; padding: 0 0 1.4em 24px; margin: 0; }
.frise li::before {
  content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px;
  border-radius: 50%; background: #fff; border: 3px solid var(--vert);
}
.frise .date { display: block; font-weight: 700; color: var(--vert); }

/* Galerie */
.galerie { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 0; padding: 0; list-style: none; }
.galerie figure { margin: 0; }
.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rayon); }
.galerie figcaption { font-size: .88rem; color: var(--texte-doux); margin-top: 6px; }

/* Sommaire en pastilles */
.sommaire { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 28px; padding: 0; }
.sommaire a {
  display: block; padding: .4em 1em; border-radius: 999px; border: 1px solid var(--bord);
  background: #fff; text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--texte);
}
.sommaire a:hover { border-color: var(--vert); color: var(--vert); }

/* Sections dépliables */
.depliant { border: 1px solid var(--bord); border-radius: var(--rayon); background: #fff; margin-bottom: 12px; scroll-margin-top: 96px; }
.depliant > summary {
  list-style: none; cursor: pointer; padding: 18px 52px 18px 20px; position: relative;
  font-weight: 700; font-size: 1.15rem;
}
.depliant > summary::-webkit-details-marker { display: none; }
.depliant > summary h2 { display: inline; font-size: inherit; margin: 0; }
.depliant > summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--vert); border-bottom: 2px solid var(--vert); transform: rotate(45deg); transition: transform .2s;
}
.depliant[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.depliant[open] > summary { border-bottom: 1px solid var(--bord); }
.depliant__corps { padding: 20px; }
.depliant__corps::after { content: ""; display: table; clear: both; }
.depliant__illustration, .flottant-droite { float: right; width: 38%; max-width: 260px; margin: 0 0 12px 20px; border-radius: var(--rayon); }
@media (max-width: 600px) { .depliant__illustration, .flottant-droite { float: none; width: 100%; max-width: 320px; margin: 0 auto 16px; } }
.efface { clear: both; }

/* Moyens de don */
.moyens-don { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 28px 0; }
.moyens-don .carte h2 { font-size: 1.2rem; }
.moyens-don .carte p { color: var(--texte); }
.moyens-don dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: .95rem; }
.moyens-don dt { color: var(--texte-doux); }
.moyens-don dd { margin: 0; font-weight: 600; }

/* Contact */
.coordonnees { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.coordonnees li { display: flex; gap: 14px; align-items: flex-start; }
.coordonnees .carte__icone { margin: 0; flex: none; width: 44px; height: 44px; }
.coordonnees strong { display: block; }
.carte-plan { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--rayon); background: var(--fond-alt); }
@media (min-width: 860px) { .carte-plan { aspect-ratio: auto; height: 100%; min-height: 380px; } }

/* ---------- Horaires (Tawkit) ---------- */
.cadre-horaires { border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); background: #fff; }
.cadre-horaires iframe { display: block; width: 100%; height: 1000px; border: 0; }
@media (max-width: 600px) { .cadre-horaires iframe { height: 1300px; } }
.note-horaires { font-size: .9rem; color: var(--texte-doux); margin-top: 10px; }
.espace-haut { margin-top: 40px; }
.carte h2 { font-size: 1.2rem; }

/* ---------- Actualités ---------- */
.liste-actus { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.actu { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); display: flex; flex-direction: column; }
.actu__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.actu__corps { padding: 18px 20px 20px; }
.actu__corps h3 { font-size: 1.1rem; margin-bottom: .4em; }
.actu__corps p { color: var(--texte-doux); font-size: .97rem; margin-bottom: .6em; }
.actu__corps p:last-child { margin-bottom: 0; }
.actu__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem !important; margin-bottom: .6em !important; }
.actu__type { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; padding: 3px 8px; border-radius: 999px; background: var(--vert-pale); color: var(--vert); }
.actu__type--annonce { background: #fff1c7; color: #7a5600; }
.actu__type--evenement { background: #dcefff; color: #1d5f8f; }
.actu__lieu { font-weight: 600; color: var(--texte) !important; }
.actu--sans-image .actu__corps { border-top: 4px solid var(--vert); }
.message-vide, .message-erreur { grid-column: 1 / -1; color: var(--texte-doux); margin: 0; }
.message-erreur { color: #a3261b; }

/* Texte à compléter avant la mise en ligne (mentions légales) */
mark.a-completer { background: #ffe066; color: #5c4200; padding: 0 4px; border-radius: 3px; font-weight: 600; }

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