/* =====================================================================
   Plateforme Mosquée — feuille de style principale
   Couleurs : vert émeraude profond, or, ivoire.  Polices : Fraunces / Source Sans 3 / Amiri
   ===================================================================== */
:root {
  --green-900: #0b2e22;
  --green-800: #0f3d2e;
  --green-700: #145c43;
  --green-100: #e3efe8;
  --gold: #c9a24a;
  --gold-light: #e6c97f;
  --gold-soft: #f6ecd2;
  --ivory: #f8f4ea;
  --paper: #ffffff;
  --ink: #1b2620;
  --muted: #5f6b63;
  --line: #e4dccb;
  --danger: #a33a2a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 61, 46, .06), 0 8px 24px rgba(15, 61, 46, .07);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "Amiri", "Traditional Arabic", serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23e6c97f' stroke-width='1' opacity='.55'%3E%3Cpath d='M40 4l10 26 26 10-26 10-10 26-10-26L4 40l26-10z'/%3E%3Crect x='22' y='22' width='36' height='36' transform='rotate(45 40 40)'/%3E%3Crect x='22' y='22' width='36' height='36'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 17px/1.6 var(--font-body); }
img { max-width: 100%; height: auto; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--green-900); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; color: var(--green-900); margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.ar { font-family: var(--font-ar); font-size: 1.15em; }
[hidden] { display: none !important; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--ink); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(780px, 100% - 32px); }
.section { padding: clamp(48px, 7vw, 84px) 0; }
.section-tint { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--gold); margin: 0 0 .4em; }
.eyebrow.ar, .eyebrow .ar { text-transform: none; letter-spacing: 0; font-size: 1.05rem; }
.link-more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.meta { color: var(--muted); font-size: .92rem; margin: 0; }
.small { font-size: .88rem; }
.empty { color: var(--muted); font-style: italic; padding: 18px 0; margin: 0; }
.h-sub { margin-top: 40px; font-size: 1.3rem; }
.h-sub:first-child { margin-top: 0; }

/* ---------- En-tête ---------- */
.site-header { background: var(--green-900); color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 rgba(230, 201, 127, .25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand strong { display: block; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; }
.brand .ar { display: block; color: var(--gold-light); font-size: 1.05rem; line-height: 1.2; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a { color: rgba(255, 255, 255, .85); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.main-nav a[aria-current] { color: var(--green-900); background: var(--gold-light); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255, 255, 255, .4); color: #fff; padding: 8px 14px; border-radius: 8px; font: inherit; cursor: pointer; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid var(--green-700); background: var(--paper); color: var(--green-800); font: 600 .97rem var(--font-body); text-decoration: none; cursor: pointer; transition: transform .12s, background .12s; }
.btn:hover { background: var(--green-100); color: var(--green-900); transform: translateY(-1px); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--green-900); }
.btn-gold:hover { background: var(--gold-light); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--green-900); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: #fbeae6; color: var(--danger); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--green-700); font: inherit; text-decoration: underline; cursor: pointer; }
.linklike.danger { color: var(--danger); }

/* ---------- Héro (khoutba de vendredi) ---------- */
.hero { position: relative; background: var(--green-800); color: #fff; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: .18; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold)); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; padding: clamp(48px, 8vw, 96px) 0; align-items: center; }
.hero .eyebrow { color: var(--gold-light); }
.hero-label { font-weight: 700; color: rgba(255, 255, 255, .8); margin-bottom: .6em; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.hero-label .ar { color: var(--gold-light); font-size: 1.4rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.3rem); margin-bottom: .3em; }
.hero-ar { font-family: var(--font-ar); font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--gold-light); margin: 0 0 .6em; line-height: 1.5; }
.page-head .hero-ar { color: var(--gold); }
.hero-resume { font-size: 1.1rem; color: rgba(255, 255, 255, .86); max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hijri { color: rgba(255, 255, 255, .7); }
.hero-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(230, 201, 127, .35); border-radius: 20px; padding: 26px; backdrop-filter: blur(4px); }
.hero-imam { display: flex; gap: 16px; align-items: center; text-decoration: none; color: #fff; padding-bottom: 20px; margin-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.hero-imam img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); background: var(--green-700); }
.hero-imam small { display: block; color: var(--gold-light); text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; }
.hero-imam strong { display: block; font-family: var(--font-display); font-size: 1.25rem; }
.hero-imam em { font-style: normal; color: rgba(255, 255, 255, .75); font-size: .92rem; }
.jumua-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 12px; margin: 0; }
.jumua-times div { background: rgba(0, 0, 0, .18); border-radius: 12px; padding: 12px; text-align: center; }
.jumua-times dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .7); }
.jumua-times dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.5rem; color: var(--gold-light); }
.jumua-times dd.small { font-family: var(--font-body); font-size: .95rem; color: #fff; }

/* ---------- Bandeau prières ---------- */
.prayers { background: var(--paper); border-bottom: 1px solid var(--line); }
.prayer-strip { list-style: none; margin: 0; padding: 18px 0 6px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.prayer-strip li { text-align: center; padding: 12px 6px; border-radius: 12px; border: 1px solid transparent; transition: .2s; }
.prayer-strip .p-name { display: block; font-weight: 700; font-size: .9rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.prayer-strip .ar { display: block; color: var(--green-700); font-size: 1.15rem; line-height: 1.3; }
.prayer-strip .p-time { display: block; font-family: var(--font-display); font-size: 1.45rem; color: var(--green-900); }
.prayer-strip li.is-next { background: var(--green-800); border-color: var(--green-800); }
.prayer-strip li.is-next * { color: #fff; }
.prayer-strip li.is-next .ar { color: var(--gold-light); }
.prayer-strip li.jumua { background: var(--gold-soft); border-color: var(--gold-light); }
.prayer-note { text-align: center; font-size: .82rem; color: var(--muted); margin: 0; padding-bottom: 12px; }

/* ---------- Programme de la semaine ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 18px; }
.week button { font: 700 .95rem var(--font-body); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; cursor: pointer; color: var(--muted); }
.week button span { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--green-900); }
.week button.is-friday { border-color: var(--gold); }
.week button[aria-selected="true"] { background: var(--green-800); border-color: var(--green-800); color: rgba(255, 255, 255, .8); }
.week button[aria-selected="true"] span { color: var(--gold-light); }
.day-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 24px; box-shadow: var(--shadow); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px dashed var(--line); align-items: start; }
.timeline li:last-child { border-bottom: 0; }
.timeline a { font-weight: 700; color: var(--green-900); text-decoration: none; }
.timeline a:hover { text-decoration: underline; }
.tl-time { font-family: var(--font-display); font-size: 1.2rem; color: var(--green-700); }
.tl-khoutba { background: linear-gradient(90deg, var(--gold-soft), transparent); margin: 0 -24px; padding-inline: 24px !important; }

/* ---------- Grilles & cartes ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stack { display: grid; gap: 14px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 a { color: var(--green-900); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card .ar { color: var(--green-700); margin: -.2em 0 .5em; }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--green-100); color: var(--green-800); margin: 0 4px 6px 0; }
.tag-light { background: #f1ede3; color: var(--muted); }
.tag-gold, .tag-conference { background: var(--gold-soft); color: #7a5b13; }
.tag-causerie { background: #e9e6f5; color: #4a3f86; }
.tag-cours { background: var(--green-100); color: var(--green-800); }
.chips { display: flex; flex-wrap: wrap; margin-bottom: 14px; }

.sermon-card { display: grid; grid-template-columns: 66px 1fr; gap: 16px; }
.sermon-date { background: var(--green-800); color: #fff; border-radius: 12px; text-align: center; padding: 10px 4px; align-self: start; }
.sermon-date .d { display: block; font-family: var(--font-display); font-size: 1.7rem; line-height: 1; color: var(--gold-light); }
.sermon-date .m { display: block; text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; margin-top: 4px; }
.sermon-body p:last-child { margin-bottom: 0; }

.event-card { border-top: 4px solid var(--green-700); display: flex; flex-direction: column; }
.event-card.type-conference { border-top-color: var(--gold); }
.event-card.type-causerie { border-top-color: #6c5fb5; }
.event-card .when { font-weight: 700; color: var(--green-800); margin-bottom: .3em; }

.imam-card { text-align: center; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .15s; }
.imam-card:hover { transform: translateY(-3px); color: var(--ink); }
.imam-card img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 4px solid var(--gold-soft); margin-bottom: 10px; background: var(--green-100); }
.imam-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--green-900); }

/* ---------- Services ---------- */
.services { padding-top: 0; }
.section-tint + .services, .services { padding-top: clamp(48px, 7vw, 84px); }
.service { border-radius: 20px; padding: clamp(28px, 4vw, 44px); position: relative; overflow: hidden; }
.service .ar { font-size: 1.8rem; margin: 0 0 .2em; }
.service-mariage { background: var(--green-800); color: #fff; }
.service-mariage::before { content: ""; position: absolute; inset: 0; background: var(--pattern); opacity: .12; pointer-events: none; }
.service-mariage h2 { color: #fff; }
.service-mariage .ar { color: var(--gold-light); }
.service-mariage p { color: rgba(255, 255, 255, .85); position: relative; }
.service-question { background: var(--gold-soft); border: 1px solid var(--gold-light); }
.service-question .ar { color: #7a5b13; }
.service .btn { position: relative; }

.banner-annonce { background: var(--gold); color: var(--green-900); padding: 10px 0; font-size: .95rem; }
.annonce.is-important { border-color: var(--gold); background: #fffaf0; }

/* ---------- En-têtes de pages intérieures ---------- */
.page-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: clamp(40px, 6vw, 70px) 0; position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 4px; background: linear-gradient(90deg, var(--green-700), var(--gold)); }
.page-head p:last-child { margin-bottom: 0; color: var(--muted); max-width: 70ch; }
.byline { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-top: 8px; }
.byline img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.byline strong, .byline small { display: block; }
.byline small { color: var(--muted); }

.prose { font-size: 1.08rem; }
.prose .lead { font-size: 1.2rem; color: var(--green-900); border-left: 4px solid var(--gold); padding-left: 18px; margin-bottom: 1.6em; }
.refs { margin-top: 2em; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 24px; }
.refs h2 { font-size: 1.1rem; }
.video { aspect-ratio: 16 / 9; margin: 0 0 1.5em; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; }
audio { width: 100%; margin-bottom: 1.5em; }
.callout { background: var(--gold-soft); border-radius: 12px; padding: 16px 20px; margin: 1.2em 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 0 0 1.6em; }
.facts div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; color: var(--green-900); }

/* ---------- Profil imam ---------- */
.profile-grid { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.profile-photo { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; border: 6px solid var(--gold-soft); box-shadow: var(--shadow); background: var(--green-100); }
.stats { list-style: none; padding: 0; margin: 14px 0 22px; display: flex; gap: 26px; flex-wrap: wrap; color: var(--muted); }
.stats strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--green-800); margin-right: 4px; }
.profile-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start; }
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; font: 700 1rem var(--font-body); color: var(--muted); padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button[aria-selected="true"] { color: var(--green-900); border-bottom-color: var(--gold); }

/* ---------- Filtres, pastilles, pagination ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.filters input, .filters select { flex: 1 1 220px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.pills a { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .93rem; }
.pills a[aria-current] { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.pills.small a { padding: 5px 12px; font-size: .85rem; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 30px; }
.pager a { min-width: 40px; text-align: center; padding: 8px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; background: var(--paper); }
.pager a[aria-current] { background: var(--green-800); color: #fff; border-color: var(--green-800); }

.weekly-table { display: grid; gap: 14px; }
.weekly-row { display: grid; grid-template-columns: 140px 1fr; gap: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.weekly-row h3 { margin: 0; color: var(--green-700); }
.weekly-row ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.weekly-row li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; }
.weekly-row a { font-weight: 700; color: var(--green-900); text-decoration: none; }
.weekly-row small { display: block; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 16px; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 20px; margin: 0; display: grid; gap: 14px; background: var(--paper); }
.form legend { font-family: var(--font-display); font-weight: 600; color: var(--green-900); padding: 0 8px; font-size: 1.1rem; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; color: var(--ink); }
.form label small { font-weight: 400; color: var(--muted); }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
input, select, textarea { font: 400 1rem var(--font-body); color: var(--ink); background: #fff; border: 1px solid #cfc6b2; border-radius: 10px; padding: 11px 13px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--green-700); outline: 3px solid rgba(20, 92, 67, .15); }
textarea { resize: vertical; }
.ar-input { font-family: var(--font-ar); font-size: 1.2rem; }
.form .checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .checkbox input { width: auto; margin-top: 4px; accent-color: var(--green-700); }
.field-error { color: var(--danger); font-weight: 600; font-size: .88rem; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 160px; }

.alert { padding: 14px 18px; border-radius: 12px; margin: 18px 0; font-weight: 600; }
.alert-ok { background: #e3f2ea; color: #145c43; border: 1px solid #b9dcc8; }
.alert-ko { background: #fbeae6; color: var(--danger); border: 1px solid #efc4ba; }
.alert-warn { background: #fdf3dc; color: #7a5b13; border: 1px solid var(--gold-light); }
.success-box { background: var(--paper); border: 2px solid var(--green-700); border-radius: 18px; padding: 32px; text-align: center; }
.success-box .ref { font-family: var(--font-display); font-size: 1.6rem; color: var(--green-700); letter-spacing: .05em; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; vertical-align: middle; }
.badge-ok { background: #e3f2ea; color: #145c43; }
.badge-ko { background: #fbeae6; color: var(--danger); }
.badge-warn { background: #fdf3dc; color: #7a5b13; }
.badge-muted { background: #eeeae0; color: var(--muted); }

.info-blocks .card h2 { font-size: 1.25rem; }
ul.check { list-style: none; padding: 0; margin: 0; }
ul.check li { padding-left: 26px; position: relative; margin-bottom: 8px; }
ul.check li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }
ol.steps { padding-left: 0; list-style: none; counter-reset: s; margin: 0; }
ol.steps li { counter-increment: s; padding-left: 38px; position: relative; margin-bottom: 10px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--green-800); color: var(--gold-light); font-weight: 700; font-size: .85rem; display: grid; place-items: center; }

.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq summary { padding: 14px 18px; cursor: pointer; font-weight: 600; }
.faq-a { padding: 0 18px 16px; }
.faq-q { font-style: italic; color: var(--muted); }
.result { margin-top: 20px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--green-900); color: rgba(255, 255, 255, .78); padding: 56px 0 0; margin-top: 0; position: relative; }
.site-footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--gold); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.3fr; gap: 32px; }
.site-footer h3 { color: var(--gold-light); font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-name { font-family: var(--font-display); font-size: 1.3rem; color: #fff; margin: 0; }
.site-footer .ar { color: var(--gold-light); font-size: 1.3rem; margin: 0 0 .5em; }
.site-footer input { background: rgba(255, 255, 255, .95); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding: 18px 0; font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--green-900); flex-direction: column; padding: 12px 16px 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .main-nav.is-open { display: flex; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero-grid, .two-cols, .grid-2, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }
  .prayer-strip { grid-template-columns: repeat(3, 1fr); }
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .week button { font-size: .75rem; padding: 8px 2px; }
  .week button span { font-size: 1.05rem; }
  .day-panel { padding: 6px 16px; }
  .timeline li { grid-template-columns: 58px 1fr; gap: 10px; }
  .tl-khoutba { margin: 0 -16px; padding-inline: 16px !important; }
  .profile-grid { grid-template-columns: 1fr; text-align: center; }
  .profile-grid .chips, .stats { justify-content: center; }
  .profile-photo { width: 170px; height: 170px; margin: 0 auto; }
  .weekly-row { grid-template-columns: 1fr; gap: 8px; }
  .brand strong { font-size: 1rem; }
  .imam-card img { width: 110px; height: 110px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .site-header, .site-footer, .no-print, .admin-side { display: none !important; } body { background: #fff; } }

/* =====================================================================
   v2 — personnalisation, horaires, vidéos, galerie, contact
   ===================================================================== */
.brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 50%; }
.brand-sub { display: block; color: var(--gold-light); font-size: .85rem; line-height: 1.2; }
.hero.has-photo { background: var(--green-900) var(--hero-photo) center / cover no-repeat; }
.hero.has-photo::before { background: linear-gradient(100deg, color-mix(in srgb, var(--green-900) 94%, transparent) 30%, color-mix(in srgb, var(--green-800) 70%, transparent)); opacity: 1; }
.p-iqama { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-top: 2px; }
.prayer-strip li.is-next .p-iqama { color: var(--gold-light); }
.socials { display: flex; gap: 14px; flex-wrap: wrap; }
.center-link { text-align: center; margin-top: 28px; }
.page-image { width: 100%; border-radius: var(--radius); margin: 0 0 1.5em; box-shadow: var(--shadow); }

/* Présentation */
.presentation { display: grid; gap: 40px; align-items: center; }
.presentation.has-img { grid-template-columns: 1fr 1.2fr; }
.presentation img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); }

/* Affiches */
.event-card.has-image { padding-top: 0; overflow: hidden; }
.event-img { display: block; margin: 0 -22px 16px; aspect-ratio: 16 / 9; background: var(--green-100); }
.event-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Vidéos */
.videos-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; align-items: start; }
.video-feature .video { margin-bottom: 14px; box-shadow: var(--shadow); }
.video-card { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s; }
.video-card:hover { transform: translateY(-2px); color: var(--ink); }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--green-800); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(0, 0, 0, .55); border: 2px solid #fff; }
.play::after { content: ""; position: absolute; left: 20px; top: 15px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
.video-meta { display: grid; gap: 4px; padding: 0 18px 16px; }
.video-meta strong { color: var(--green-900); line-height: 1.3; }
.videos-layout .stack .video-card { grid-template-columns: 150px 1fr; align-items: center; gap: 14px; }
.videos-layout .stack .video-meta { padding: 10px 14px 10px 0; }
.videos-layout .stack .play { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
.videos-layout .stack .play::after { left: 13px; top: 9px; border-width: 8px 0 8px 12px; }

/* Galerie */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery-item { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--green-100); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item span { position: absolute; inset: auto 0 0 0; padding: 18px 12px 10px; color: #fff; font-size: .88rem; font-weight: 600; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .88); display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 86vh; border-radius: 8px; }
.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }
.lightbox button { position: absolute; top: 14px; right: 14px; background: #fff; border: 0; border-radius: 999px; padding: 8px 14px; font: 700 .9rem var(--font-body); cursor: pointer; }

/* Nous trouver */
.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: stretch; }
.contact-layout.no-map { grid-template-columns: 1fr; }
.contact-adresse { font-family: var(--font-display); font-size: 1.3rem; color: var(--green-900); }
.contact-list { display: grid; gap: 10px; margin: 0 0 22px; }
.contact-list div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.contact-list dt { color: var(--muted); font-weight: 600; }
.contact-list dd { margin: 0; }
.map { min-height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* Page horaires */
.today-prayers { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); margin-bottom: 48px; }
.today-head h2 { margin-bottom: 4px; }
.today-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 20px; }
.today-cell { border: 1px solid var(--line); border-radius: 14px; padding: 16px 10px; text-align: center; display: grid; gap: 2px; }
.today-cell .p-name { font-weight: 700; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.today-cell .p-name small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.today-cell .ar { color: var(--green-700); font-size: 1.3rem; }
.today-cell .p-time { font-family: var(--font-display); font-size: 2rem; color: var(--green-900); line-height: 1.1; }
.today-cell.is-next { background: var(--green-800); border-color: var(--green-800); }
.today-cell.is-next * { color: #fff; }
.today-cell.is-next .ar, .today-cell.is-next .p-iqama, .today-cell.is-next .next-label { color: var(--gold-light); }
.today-cell.jumua { background: var(--gold-soft); border-color: var(--gold-light); }
.next-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-top: 4px; }
.month-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.month-head h2 { margin: 0; text-align: center; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin-bottom: 12px; }
.prayer-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 620px; }
.prayer-table th, .prayer-table td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.prayer-table thead th { background: var(--green-800); color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; position: sticky; top: 0; }
.prayer-table thead .ar { display: block; color: var(--gold-light); font-size: 1rem; text-transform: none; }
.prayer-table tbody th { text-align: left; font-weight: 600; white-space: nowrap; }
.prayer-table td { font-weight: 700; color: var(--green-900); }
.prayer-table td small { display: block; font-weight: 400; color: var(--muted); font-size: .78rem; }
.prayer-table td.muted { font-weight: 400; color: var(--muted); }
.prayer-table tr.is-friday { background: var(--gold-soft); }
.prayer-table tr.is-today { background: var(--green-100); outline: 2px solid var(--green-700); outline-offset: -2px; }

@media (max-width: 1020px) {
  .videos-layout, .contact-layout, .presentation.has-img { grid-template-columns: 1fr; }
  .today-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .today-grid { grid-template-columns: repeat(2, 1fr); }
  .today-prayers { padding: 18px; }
  .contact-list div { grid-template-columns: 1fr; gap: 0; }
  .videos-layout .stack .video-card { grid-template-columns: 120px 1fr; }
}
@media print { .today-prayers, .page-head, .pills { display: none; } .prayer-table thead th { background: #eee; color: #000; } }
