/* ==========================================================================
   Mosquée Assalam, Verviers
   Palette tirée du logo (vert) et de la façade (brique). Le rouge brique
   est réservé au don : il doit se voir partout où l'on peut donner.
   ========================================================================== */

@font-face {
  font-family: "Young Serif";
  src: url("../fonts/young-serif-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-400-700.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("../fonts/amiri-arabic-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --paper: #f5f7f1;
  --paper-2: #e8ede1;
  --surface: #ffffff;
  --ink: #14261f;
  --ink-2: #41564c;
  --green: #173f38;
  --green-2: #235f52;
  --green-deep: #0d2824;
  --brick: #9a3a2a;
  --brick-2: #7e2d20;
  --brass: #b08a3e;
  --brass-ink: #76571a;
  --line: rgba(20, 38, 31, 0.16);
  --line-strong: rgba(20, 38, 31, 0.3);

  --serif: "Young Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --arabic: "Amiri", "Noto Naskh Arabic", "Geeza Pro", "Traditional Arabic", serif;

  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --maxw: 1200px;
  --header-h: 72px;
  --section-pad: clamp(3.75rem, 8vw, 7rem);
  --radius: 10px;

  /* Briques en appareil à joints décalés (motif du don) */
  --bricks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='20' viewBox='0 0 48 20'%3E%3Cg fill='%239a3a2a'%3E%3Crect x='0' y='0' width='22' height='8'/%3E%3Crect x='24' y='0' width='22' height='8' fill='%23a8462f'/%3E%3Crect x='-12' y='10' width='22' height='8' fill='%23a8462f'/%3E%3Crect x='12' y='10' width='22' height='8'/%3E%3Crect x='36' y='10' width='22' height='8' fill='%23a8462f'/%3E%3C/g%3E%3C/svg%3E");

  /* Étoiles à huit pointes (khatam), très discrètes */
  --stars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23b08a3e' stroke-width='1' stroke-opacity='.6'%3E%3Cg transform='translate(36 36)'%3E%3Crect x='-14' y='-14' width='28' height='28'/%3E%3Crect x='-14' y='-14' width='28' height='28' transform='rotate(45)'/%3E%3C/g%3E%3Cg%3E%3Crect x='-14' y='-14' width='28' height='28'/%3E%3Crect x='-14' y='-14' width='28' height='28' transform='rotate(45)'/%3E%3C/g%3E%3Cg transform='translate(72 0)'%3E%3Crect x='-14' y='-14' width='28' height='28'/%3E%3Crect x='-14' y='-14' width='28' height='28' transform='rotate(45)'/%3E%3C/g%3E%3Cg transform='translate(0 72)'%3E%3Crect x='-14' y='-14' width='28' height='28'/%3E%3Crect x='-14' y='-14' width='28' height='28' transform='rotate(45)'/%3E%3C/g%3E%3Cg transform='translate(72 72)'%3E%3Crect x='-14' y='-14' width='28' height='28'/%3E%3Crect x='-14' y='-14' width='28' height='28' transform='rotate(45)'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

  --arch-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M0 12V5.4C0 3.2 2.8 1.4 5 0c2.2 1.4 5 3.2 5 5.4V12z'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--green);
  text-wrap: balance;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

/* Mots longs (allemand, néerlandais) : coupure propre plutôt que débordement */
h1, h2, h3, h4, .lvl, .room-name, summary { overflow-wrap: break-word; }
html[lang="de"] body, html[lang="nl"] body { hyphens: auto; }

a { color: var(--green-2); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--brick); }

:focus-visible {
  outline: 3px solid var(--green-2);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.footer :focus-visible,
.topbar :focus-visible { outline-color: #fff; }

.ar {
  font-family: var(--arabic);
  direction: rtl;
  unicode-bidi: isolate;
  font-weight: 400;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.45rem;
  border: 2px solid transparent;
  border-radius: 6px;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--brick { background: var(--brick); color: #fff; }
.btn--brick:hover { background: var(--brick-2); color: #fff; }
.btn--line { border-color: var(--green); color: var(--green); background: transparent; }
.btn--line:hover { background: var(--green); color: #fff; }
.btn--paper { background: #fff; color: var(--brick); }
.btn--paper:hover { background: var(--paper-2); color: var(--brick-2); }
.btn--sm { min-height: 44px; padding: 0.55rem 1.1rem; font-size: 0.95rem; }

/* ---------- Bandeau des horaires ---------- */
.topbar {
  background: var(--green-deep);
  color: #e6eee9;
  font-size: 0.9rem;
}
.topbar__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 44px;
}
.topbar__next { margin: 0; line-height: 1.35; }
.topbar__next strong { color: #fff; font-weight: 600; }
.strip { display: none; list-style: none; gap: 0.25rem; }
.strip li {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.2rem 0.7rem;
  border-radius: 6px;
  color: #bccbc3;
}
.strip b { font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.strip li.is-next { background: rgba(255, 255, 255, 0.12); color: #fff; }
.strip li.is-next b { color: #f2d99a; }
.topbar__link { color: #fff; white-space: nowrap; }
@media (min-width: 1100px) {
  .strip { display: flex; }
}

/* Sélecteur de langue (FR · NL · EN · DE · AR) */
.lang { display: flex; flex: none; gap: 0.15rem; margin-left: auto; }
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 36px;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  color: #bccbc3;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.lang a:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.lang a[aria-current="true"] { background: #fff; color: var(--green-deep); }
/* Cinq langues sur un petit téléphone : boutons un peu plus étroits pour que
   le texte des horaires garde sa place. */
@media (max-width: 480px) {
  .topbar__bar { gap: 0.75rem; }
  .lang { gap: 0; }
  .lang a { min-width: 2.1rem; padding-inline: 0.3rem; }
}

/* ---------- En-tête ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header.is-stuck {
  border-color: var(--line);
  box-shadow: 0 6px 18px -14px rgba(13, 40, 36, 0.5);
}
.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--green);
  text-decoration: none;
}
.brand:hover { color: var(--green); }
.brand img { width: 44px; height: auto; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font: 400 1.3rem/1.1 var(--serif); }
.brand__ar { font-size: 1.1rem; color: var(--brass-ink); line-height: 1.2; margin-top: 0.15rem; text-align: left; direction: rtl; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--green);
  font: 600 0.95rem/1 var(--sans);
  cursor: pointer;
}
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }

.nav { display: contents; }
.nav__list {
  display: none;
  list-style: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  padding: 0.75rem var(--gutter) 1.5rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 30px -20px rgba(13, 40, 36, 0.45);
}
.nav__list.is-open { display: block; }
.nav__list a:not(.btn) {
  display: block;
  padding: 0.95rem 0.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font: 400 1.25rem/1.2 var(--serif);
  text-decoration: none;
}
.nav__list a:not(.btn):hover,
.nav__list a:not(.btn)[aria-current="page"] { color: var(--brick); }
.nav__list .btn { margin-top: 1.1rem; width: 100%; }

@media (min-width: 980px) {
  .menu-btn { display: none; }
  .nav { display: flex; align-items: center; }
  .nav__list {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav__list a:not(.btn) {
    padding: 0.5rem 0.8rem;
    border: 0;
    font: 500 1rem/1 var(--sans);
    border-radius: 6px;
  }
  .nav__list a:not(.btn):hover { background: var(--paper-2); color: var(--green); }
  .nav__list a:not(.btn)[aria-current="page"] { color: var(--green); box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
  .nav__list .btn { margin: 0 0 0 0.75rem; width: auto; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-pad); }
.section--wash { background: var(--paper-2); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.sec-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); max-width: 46rem; }
.sec-head h2 { font-size: clamp(1.9rem, 3.8vw, 3.05rem); }
.sec-head p { margin: 1rem 0 0; font-size: 1.15rem; color: var(--ink-2); max-width: 58ch; }

.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 54ch; }

/* Puces en forme d'arc */
.arches { list-style: none; display: grid; gap: 0.85rem; }
.arches li { position: relative; padding-left: 1.7rem; }
.arches li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.42em;
  width: 0.78em; height: 0.94em;
  background: var(--brass);
  -webkit-mask: var(--arch-mask) center / contain no-repeat;
  mask: var(--arch-mask) center / contain no-repeat;
}

/* ---------- Forme en arc (celle du logo) ---------- */
.arch { clip-path: url(#arch-clip); -webkit-clip-path: url(#arch-clip); }
.arch-frame { position: relative; padding: 0 14px 14px 0; }
.arch-frame::before {
  content: "";
  position: absolute;
  inset: 14px 0 0 14px;
  background: var(--brass);
  opacity: 0.55;
  clip-path: url(#arch-clip);
  -webkit-clip-path: url(#arch-clip);
}
.arch-frame::after {
  content: "";
  position: absolute;
  inset: 14px 0 0 14px;
  background: var(--paper);
  clip-path: url(#arch-clip-inner);
  -webkit-clip-path: url(#arch-clip-inner);
  z-index: 0;
}
.arch-frame > * { position: relative; z-index: 1; }

/* ---------- Héros ---------- */
.hero {
  position: relative;
  padding-block: clamp(2rem, 5vw, 4.25rem) clamp(3.5rem, 7vw, 6.5rem);
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(62%, 780px);
  background: var(--stars);
  opacity: 0.55;
  -webkit-mask: radial-gradient(ellipse at 70% 45%, #000 0, transparent 68%);
  mask: radial-gradient(ellipse at 70% 45%, #000 0, transparent 68%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; gap: 2.75rem; align-items: center; }
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5.5fr); gap: clamp(2.5rem, 4.5vw, 4rem); }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
  padding: 0.4rem 0.95rem 0.4rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}
.status svg { width: 26px; height: 26px; color: #2f7d4f; flex: none; }

.hero h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); line-height: 1.06; letter-spacing: -0.015em; }
.hero .lead { margin: 1.5rem 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
@media (max-width: 520px) { .hero__actions .btn { flex: 1 1 100%; } }

.hero__seq > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero__seq > *:nth-child(2) { animation-delay: 0.08s; }
.hero__seq > *:nth-child(3) { animation-delay: 0.16s; }
.hero__seq > *:nth-child(4) { animation-delay: 0.24s; }
.hero__visual { animation: rise 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__seq > *, .hero__visual { animation: none; }
}

/* ---------- Comparateur avant / après ---------- */
.ba-wrap { max-width: 700px; margin-inline: auto; width: 100%; }
.ba {
  --pos: 50%;
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
@media (min-width: 640px) { .ba { aspect-ratio: 1.7 / 1; } }
.ba__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 55% 60%;
  pointer-events: none;
}
.ba__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__tag {
  position: absolute;
  bottom: 0.9rem;
  padding: 0.3rem 0.75rem;
  background: rgba(13, 40, 36, 0.82);
  color: #fff;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  pointer-events: none;
}
.ba__tag--before { left: 12%; }
.ba__tag--after { right: 12%; }
.ba__line {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(13, 40, 36, 0.25);
  pointer-events: none;
}
.ba__knob {
  position: absolute;
  top: 56%;
  left: var(--pos);
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--green);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(13, 40, 36, 0.35);
  pointer-events: none;
}
.ba__knob svg { width: 26px; height: 26px; }
.ba__range {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
.ba:has(.ba__range:focus-visible) .ba__knob { outline: 3px solid var(--green-2); outline-offset: 3px; }
.caption {
  margin: 1.6rem 0 0;
  max-width: 52ch;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------- Verset ---------- */
.verse {
  position: relative;
  padding-block: clamp(3rem, 6vw, 5rem);
  background: var(--green);
  color: #eaf1ed;
  text-align: center;
  overflow: hidden;
}
.verse::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--stars);
  opacity: 0.35;
  filter: brightness(1.7);
  -webkit-mask: linear-gradient(90deg, #000, transparent 30%, transparent 70%, #000);
  mask: linear-gradient(90deg, #000, transparent 30%, transparent 70%, #000);
}
.verse .wrap { position: relative; }
.verse blockquote { margin: 0 auto; max-width: 46rem; }
.verse blockquote p {
  margin: 0;
  font: 400 clamp(1.5rem, 3.4vw, 2.4rem)/1.32 var(--serif);
  color: #fff;
  text-wrap: balance;
}
.verse cite {
  display: block;
  margin-top: 1.4rem;
  font-style: normal;
  font-size: 0.98rem;
  color: #c4d5cc;
}

/* ---------- La mosquée ---------- */
.about { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.about__text h3, .panel h3 { font-size: 1.3rem; margin: 2rem 0 1rem; }
.panel {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brass);
  border-radius: 4px var(--radius) var(--radius) var(--radius);
}
.panel h3:first-child { margin-top: 0; }
.panel .quote {
  margin: 1.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font: 400 1.2rem/1.45 var(--serif);
  color: var(--green);
}

/* ---------- Activités ---------- */
.index { list-style: none; display: grid; column-gap: clamp(2rem, 6vw, 5rem); }
@media (min-width: 800px) { .index { grid-template-columns: 1fr 1fr; } }
.index li {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line-strong);
  font: 400 1.22rem/1.3 var(--serif);
  color: var(--green);
}
.index li:last-child { border-bottom: 1px solid var(--line-strong); }
@media (min-width: 800px) { .index li:nth-last-child(2) { border-bottom: 1px solid var(--line-strong); } }
.index svg {
  flex: none;
  width: 30px; height: 30px;
  fill: none; stroke: var(--brass-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.note { margin-top: 1.6rem; color: var(--ink-2); max-width: 58ch; }

/* ---------- Horaires ---------- */
.times { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 900px) { .times { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.times__date { font: 400 1.35rem/1.3 var(--serif); color: var(--green); margin: 0 0 0.35rem; font-variant-numeric: lining-nums; }
.times__next { margin: 0 0 1.5rem; font-size: 1.1rem; color: var(--ink-2); }
.times__next strong { color: var(--ink); }
.prayers { list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.prayers li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1.25rem 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
  border-left: 5px solid transparent;
}
.prayers li:last-child { border-bottom: 0; }
.prayers .p-name { font: 400 1.25rem/1.2 var(--serif); color: var(--green); }
.prayers .p-ar { font-size: 1.35rem; color: var(--brass-ink); line-height: 1; }
.prayers .p-time { min-width: 3.9rem; text-align: right; font: 600 1.35rem/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.prayers li.is-sun .p-name { font-family: var(--sans); font-size: 1.02rem; color: var(--ink-2); }
.prayers li.is-sun .p-time { font-size: 1.1rem; color: var(--ink-2); font-weight: 500; }
.prayers li.is-next { background: #f3ead4; border-left-color: var(--brass); }
.times__foot { margin-top: 1rem; font-size: 0.92rem; color: var(--ink-2); max-width: 60ch; }
.times__status { padding: 1rem 1.25rem; }

/* ---------- Projet : explorateur d'étages ---------- */
.explorer { display: grid; gap: 1.75rem; margin-top: clamp(2rem, 4vw, 3rem); }
@media (min-width: 900px) { .explorer { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; } }
.stack { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
@media (min-width: 900px) { .stack { grid-template-columns: 1fr; gap: 0.5rem; } }
.stack button {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.stack button:hover { border-color: var(--green); }
.stack .lvl { font: 600 1.05rem/1.2 var(--sans); color: var(--green); }
.stack .area { font-size: 0.92rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.stack button[aria-selected="true"] { background: var(--green); border-color: var(--green); }
.stack button[aria-selected="true"] .lvl,
.stack button[aria-selected="true"] .area { color: #fff; }
@media (min-width: 900px) {
  .stack button { width: var(--w, 100%); min-width: 15rem; }
}

.floor { display: grid; gap: 1.5rem; }
@media (min-width: 640px) and (max-width: 899px) { .floor { grid-template-columns: 1fr 1fr; align-items: start; } }
.floor__img { aspect-ratio: 16 / 10; }
.floor__img img { width: 100%; height: 100%; object-fit: cover; }
.floor h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 1rem; }
.floor h3 span { font: 600 1.05rem/1 var(--sans); color: var(--brass-ink); font-variant-numeric: tabular-nums; }
.rooms { list-style: none; margin-top: 1.1rem; }
.rooms li { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.42rem 0; }
.rooms li::after { content: ""; order: 2; flex: 1; align-self: end; margin-bottom: 0.35em; border-bottom: 1.5px dotted var(--line-strong); }
.rooms b { order: 3; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rooms .room-name { order: 1; }
.floor__src { margin: 1rem 0 0; font-size: 0.88rem; color: var(--ink-2); }
.floor__img-cap { margin: 0.9rem 0 0; font-size: 0.88rem; color: var(--ink-2); }

.two-col { display: grid; gap: clamp(2rem, 5vw, 4rem); margin-top: clamp(3rem, 6vw, 5rem); }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col h3 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.two-col .heritage { margin-top: 1.5rem; font: 400 1.25rem/1.4 var(--serif); color: var(--green); }

/* ---------- Bandeau don ---------- */
.cta {
  position: relative;
  background: var(--green-deep);
  color: #e6eee9;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--stars);
  filter: brightness(1.8);
  opacity: 0.28;
  -webkit-mask: linear-gradient(100deg, transparent 35%, #000);
  mask: linear-gradient(100deg, transparent 35%, #000);
}
.cta__inner { position: relative; display: grid; gap: 1.5rem; padding-block: clamp(3.25rem, 7vw, 5.5rem); align-items: center; }
@media (min-width: 860px) { .cta__inner { grid-template-columns: 1fr auto; gap: 3rem; } }
.cta h2 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 18ch; }
.cta p { margin: 1rem 0 0; font-size: 1.15rem; color: #c8d8d0; max-width: 46ch; }
.cta .btn { min-height: 56px; padding-inline: 2rem; font-size: 1.1rem; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 900px) { .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.dl { margin: 0; display: grid; gap: 0; }
.dl > div { padding: 1.05rem 0; border-top: 1px solid var(--line-strong); display: grid; gap: 0.2rem; }
.dl > div:last-child { border-bottom: 1px solid var(--line-strong); }
.dl dt { font-weight: 600; color: var(--green); font-size: 0.98rem; }
.dl dd { margin: 0; }
.dl a { font-weight: 600; }
.map {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
}
.map::before { content: ""; position: absolute; inset: 0; background: var(--stars); opacity: 0.5; }
.map > div { position: relative; max-width: 30ch; }
.map p { font-size: 0.92rem; color: var(--ink-2); margin: 0.9rem 0 0; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-link { display: inline-block; margin-top: 0.75rem; font-size: 0.95rem; }

/* ---------- Pied de page ---------- */
.footer { position: relative; background: var(--green-deep); color: #c3d3ca; font-size: 0.98rem; }
.footer::before { content: ""; display: block; height: 20px; background: var(--bricks) 0 0 / 48px 20px repeat-x; }
.footer a { color: #fff; }
.footer a:hover { color: #f2d99a; }
.footer__grid { display: grid; gap: 2.5rem; padding-block: clamp(2.75rem, 6vw, 4.5rem) 2.5rem; }
@media (min-width: 860px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1.2fr; } }
.footer h2 { font: 400 1.15rem/1.2 var(--serif); color: #fff; margin-bottom: 0.9rem; }
.footer .brand { color: #fff; margin-bottom: 1.1rem; }
.footer .brand__ar { color: #f2d99a; }
.footer ul { list-style: none; display: grid; gap: 0.5rem; }
.footer__iban { font: 600 1.1rem/1.3 var(--sans); color: #fff; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.footer__legal {
  padding-block: 1.4rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.88rem;
  color: #9fb4aa;
}
.footer__legal p { margin: 0 0 0.3rem; }

/* Bouton de don flottant (mobile) */
.fab {
  position: fixed;
  left: var(--gutter); right: var(--gutter);
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  z-index: 40;
  box-shadow: 0 10px 26px -8px rgba(60, 20, 10, 0.55);
  opacity: 0;
  transform: translateY(140%);
  pointer-events: none;
  transition: transform 0.3s, opacity 0.3s;
}
.fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 760px) { .fab { display: none; } }
@media (max-width: 759px) { .footer { padding-bottom: 5rem; } }
@media (prefers-reduced-motion: reduce) { .fab { transition: none; } }

/* ==========================================================================
   Page « don »
   ========================================================================== */
.facts {
  display: grid;
  gap: 0;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.facts > div { padding: 1.1rem 0; display: grid; gap: 0.1rem; }
.facts > div + div { border-top: 1px solid var(--line); }
.facts dt { font-size: 0.95rem; color: var(--ink-2); order: 2; }
.facts dd { margin: 0; font: 400 1.5rem/1.2 var(--serif); color: var(--green); order: 1; font-variant-numeric: lining-nums; }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(3, 1fr); }
  .facts > div { padding: 1.4rem 1.5rem; }
  .facts > div:first-child { padding-left: 0; }
  .facts > div + div { border-top: 0; border-left: 1px solid var(--line); }
}
.facts .brick { color: var(--brick); }

.hadith { padding-block: clamp(3rem, 7vw, 5.5rem); }
.hadith blockquote { margin: 0 auto; max-width: 40rem; text-align: center; }
.hadith .kicker { margin: 0 0 1rem; color: var(--brass-ink); font-weight: 600; }
.hadith .kicker .ar { font-size: 1.7em; line-height: 0; vertical-align: -0.12em; margin-inline: 0.1em; }
.hadith blockquote p.q { font: 400 clamp(1.45rem, 3vw, 2.15rem)/1.35 var(--serif); color: var(--green); margin: 0; text-wrap: balance; }
.hadith cite { display: block; margin-top: 1.25rem; font-style: normal; color: var(--ink-2); }

/* Panneau de don */
.give { background: var(--green-deep); position: relative; }
.give::before { content: ""; display: block; height: 20px; background: var(--bricks) 0 0 / 48px 20px repeat-x; }
.give__inner { padding-block: clamp(3rem, 7vw, 5.5rem); }
.give .sec-head h2 { color: #fff; }
.give .sec-head p { color: #c8d8d0; }
.give__grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 960px) { .give__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; } }

.card {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2.25rem);
}
.card h3 { font-size: 1.4rem; margin-bottom: 1rem; }
.card h3 .n {
  display: inline-grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  margin-right: 0.6rem;
  background: var(--brick);
  color: #fff;
  border-radius: 50%;
  font: 600 1rem/1 var(--sans);
  vertical-align: 0.1em;
}
.card__intro { margin: 0 0 1.25rem; color: var(--ink-2); }

.amounts { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.amounts legend { padding: 0; margin-bottom: 0.7rem; font-weight: 600; color: var(--green); }
.chips { position: relative; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.6rem;
  min-height: 48px;
  padding: 0.4rem 1.1rem;
  background: var(--paper);
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  font: 600 1.05rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.chips label:hover { border-color: var(--green); }
.chips input:checked + label { background: var(--green); border-color: var(--green); color: #fff; }
.chips input:focus-visible + label { outline: 3px solid var(--green-2); outline-offset: 3px; }

.qr { display: grid; gap: 1.25rem; justify-items: center; text-align: center; }
@media (min-width: 560px) { .qr { grid-template-columns: auto 1fr; justify-items: start; text-align: left; align-items: center; gap: 1.75rem; } }
.qr__box { width: 208px; padding: 0.6rem; background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--radius); }
.qr__box svg { width: 100%; height: auto; }
.qr__amount { margin: 0 0 0.5rem; font: 400 1.5rem/1.2 var(--serif); color: var(--green); font-variant-numeric: lining-nums; }
.qr__hint { margin: 0; font-size: 0.95rem; color: var(--ink-2); }

.details { margin: 0; }
.details > div { padding: 1rem 0; border-top: 1px solid var(--line); display: grid; gap: 0.5rem; }
.details > div:first-child { border-top: 0; padding-top: 0; }
.details dt { font-size: 0.92rem; color: var(--ink-2); }
.details dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; }
.details .val { font: 600 1.2rem/1.3 var(--sans); font-variant-numeric: tabular-nums; word-break: break-word; }
.details .val--iban { font-size: clamp(1.3rem, 5.2vw, 1.65rem); letter-spacing: 0.02em; }
.copy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  background: var(--paper);
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: 6px;
  font: 600 0.95rem/1 var(--sans);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.copy:hover { background: var(--green); color: #fff; }
.copy svg { width: 18px; height: 18px; }
.copy.is-done { background: #2f7d4f; border-color: #2f7d4f; color: #fff; }

.steps { list-style: none; counter-reset: s; display: grid; gap: 1rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.steps li::before {
  content: counter(s);
  display: grid; place-items: center;
  width: 2rem; height: 2rem;
  background: var(--paper-2);
  color: var(--green);
  border-radius: 50%;
  font: 400 1.1rem/1 var(--serif);
  font-variant-numeric: lining-nums;
}
.note-card { background: #f3ead4; border-radius: var(--radius); padding: 1.1rem 1.25rem; color: var(--ink); margin-top: 1.5rem; font-size: 0.98rem; }
.note-card strong { color: var(--brass-ink); }
.pad-top { padding-top: 0.2rem; }

.meter { margin-top: 2rem; }
.meter__row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-weight: 600; color: #fff; margin-bottom: 0.6rem; }
.meter__track { height: 20px; background: rgba(255, 255, 255, 0.14); border-radius: 4px; overflow: hidden; }
.meter__fill { height: 100%; width: var(--p, 0%); background: var(--bricks) 0 0 / 48px 20px repeat; }

/* Sept raisons */
.reasons { list-style: none; display: grid; gap: 0; counter-reset: r; }
@media (min-width: 860px) { .reasons { grid-template-columns: 1fr 1fr; column-gap: clamp(2.5rem, 6vw, 5rem); } }
.reasons li {
  counter-increment: r;
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0 0.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line-strong);
}
.reasons li::before { content: counter(r); font: 400 2.4rem/1 var(--serif); color: var(--brick); font-variant-numeric: lining-nums; }
.reasons h3 { font-size: 1.28rem; line-height: 1.25; margin-bottom: 0.5rem; }
.reasons p { margin: 0; color: var(--ink-2); }
.reasons .hadith-inline { margin-top: 0.6rem; color: var(--green); font-style: italic; }
@media (min-width: 860px) {
  .reasons li:last-child { grid-column: 1 / -1; }
  .reasons li:last-child > div { max-width: 56ch; }
}

.brief { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .brief { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.brief .rooms-sum { list-style: none; margin: 1.5rem 0; border-top: 1px solid var(--line-strong); }
.brief .rooms-sum li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.brief .rooms-sum span { color: var(--ink-2); }
.brief .rooms-sum b { font-variant-numeric: tabular-nums; }

.funding { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 900px) { .funding { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.funding .big { font: 400 clamp(2.6rem, 6vw, 4.2rem)/1 var(--serif); color: var(--brick); margin: 0 0 0.4rem; font-variant-numeric: lining-nums; }
.pledge { margin-top: 2.5rem; padding-left: 1.25rem; border-left: 4px solid var(--brass); font: 400 1.3rem/1.45 var(--serif); color: var(--green); max-width: 34ch; }

/* FAQ */
.faq { display: grid; gap: 0; max-width: 52rem; }
.faq details { border-top: 1px solid var(--line-strong); }
.faq details:last-child { border-bottom: 1px solid var(--line-strong); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
  font: 400 1.25rem/1.3 var(--serif);
  color: var(--green);
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  border-right: 2px solid var(--brick);
  border-bottom: 2px solid var(--brick);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, 0); }
.faq .answer { padding: 0 0 1.4rem; max-width: 60ch; color: var(--ink-2); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Petits écrans */
@media (max-width: 440px) {
  .brand__name { font-size: 1.12rem; }
  .brand__ar { font-size: 1rem; }
  .brand img { width: 40px; }
  .brand { gap: 0.6rem; }
}
@media (max-width: 360px) {
  .brand__name { font-size: 1.02rem; }
  .brand img { width: 34px; }
  .menu-btn { padding-inline: 0.7rem; }
  .chips label { min-width: 4.1rem; padding-inline: 0.8rem; }
}

@media print {
  .topbar, .header, .fab, .cta, .map { display: none !important; }
  body { background: #fff; }
}

/* ==========================================================================
   Arabe (ar) : écriture de droite à gauche
   Ce bloc ne s'applique qu'à html[lang="ar"] / html[dir="rtl"] : les autres
   langues ne sont pas touchées. Texte arabe courant = polices du système
   (aucun téléchargement). « Amiri » (sous-ensemble) ne sert qu'aux quelques
   mots décoratifs (classe .ar) : il ne contient pas assez de lettres pour
   le texte courant.
   ========================================================================== */
html[lang="ar"] {
  --serif: "Young Serif", "Noto Naskh Arabic", "Traditional Arabic", "Geeza Pro", "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", system-ui, sans-serif;
}
html[lang="ar"] body { font-size: 1.15rem; line-height: 1.8; }

/* L'espacement des lettres coupe la liaison des lettres arabes ; les interlignes
   serrés du français écrasent les signes au-dessus et au-dessous des lettres. */
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4 { letter-spacing: 0; line-height: 1.4; }
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.35; }
html[lang="ar"] .brand__name,
html[lang="ar"] .index li,
html[lang="ar"] .faq summary,
html[lang="ar"] .reasons h3,
html[lang="ar"] .panel .quote,
html[lang="ar"] .pledge,
html[lang="ar"] .two-col .heritage,
html[lang="ar"] .hadith blockquote p.q,
html[lang="ar"] .verse blockquote p,
html[lang="ar"] .prayers .p-name,
html[lang="ar"] .times__date,
html[lang="ar"] .nav__list a:not(.btn) { line-height: 1.55; }

/* Sens de lecture : ce qui était à gauche passe à droite */
html[dir="rtl"] .skip-link { left: auto; right: 1rem; }
html[dir="rtl"] .lang { direction: ltr; margin-left: 0; margin-right: auto; } /* FR NL EN DE AR : même ordre partout */
html[dir="rtl"] .brand__ar,                 /* le nom du site est déjà en arabe */
html[dir="rtl"] .prayers .p-ar { display: none; } /* idem pour le nom arabe des prières */
html[dir="rtl"] .arches li { padding-left: 0; padding-right: 1.7rem; }
html[dir="rtl"] .arches li::before { left: auto; right: 0; }
html[dir="rtl"] .arch-frame { padding: 0 0 14px 14px; }
html[dir="rtl"] .arch-frame::before,
html[dir="rtl"] .arch-frame::after { inset: 14px 14px 0 0; }
html[dir="rtl"] .hero::before {
  right: auto; left: 0;
  -webkit-mask: radial-gradient(ellipse at 30% 45%, #000 0, transparent 68%);
  mask: radial-gradient(ellipse at 30% 45%, #000 0, transparent 68%);
}
html[dir="rtl"] .status { padding: 0.4rem 0.5rem 0.4rem 0.95rem; }
html[dir="rtl"] .panel { border-radius: var(--radius) 4px var(--radius) var(--radius); }
html[dir="rtl"] .prayers li {
  grid-template-columns: 1fr auto;
  padding: 1rem 1.1rem 1rem 1.25rem;
  border-left: 0;
  border-right: 5px solid transparent;
}
html[dir="rtl"] .prayers li.is-next { border-right-color: var(--brass); }
html[dir="rtl"] .prayers .p-time { text-align: left; }
html[dir="rtl"] .stack button { text-align: right; }
html[dir="rtl"] .card h3 .n { margin-right: 0; margin-left: 0.6rem; }
html[dir="rtl"] .pledge { padding-left: 0; padding-right: 1.25rem; border-left: 0; border-right: 4px solid var(--brass); }
html[dir="rtl"] .cta::before {
  -webkit-mask: linear-gradient(260deg, transparent 35%, #000);
  mask: linear-gradient(260deg, transparent 35%, #000);
}
@media (min-width: 560px) {
  html[dir="rtl"] .qr { text-align: right; }
}
@media (min-width: 760px) {
  html[dir="rtl"] .facts > div:first-child { padding-left: 1.5rem; padding-right: 0; }
  html[dir="rtl"] .facts > div + div { border-left: 0; border-right: 1px solid var(--line); }
}
@media (min-width: 980px) {
  html[dir="rtl"] .nav__list .btn { margin: 0 0.75rem 0 0; }
}

/* Le comparateur avant / après reste dans le sens « physique » : le curseur,
   le découpage de l'image et le bouton rond doivent rester d'accord, quel que
   soit le navigateur. */
html[dir="rtl"] .ba { direction: ltr; }

/* Téléphone, e-mail, IBAN : toujours lisibles de gauche à droite, sinon
   « +32 470 … » s'affiche à l'envers dans une phrase arabe. */
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="mailto:"],
html[dir="rtl"] .val--iban,
html[dir="rtl"] .footer__iban { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .footer__iban { text-align: right; }
