/* حكم نت — feuille de style du site (style « Affiches », palette « Tons de chaux »)
   Polices auto-hébergées (SIL Open Font License) : Noto Kufi Arabic (citations, titres), Readex Pro (interface). */

@font-face { font-family: "Noto Kufi Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/noto-kufi-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/noto-kufi-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/noto-kufi-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Noto Kufi Arabic"; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url("/assets/fonts/noto-kufi-arabic-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/readex-pro-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/readex-pro-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/readex-pro-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Readex Pro"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/readex-pro-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }


:root {
  --bg: #F5F3EF;          /* chaux */
  --bg-2: #ECE8E1;
  --ink: #1B1733;
  --muted: #5D5872;
  --rule: #D9D4CB;

  /* affiches : tons de chaux, texte foncé */
  --t1: #D7E1EC;          /* bleu de chaux */
  --t2: #EFE0BF;          /* sable */
  --t3: #EBD3CF;          /* rose poudré */
  --t4: #D3E3D8;          /* sauge pâle */
  --t5: #DCD7E8;          /* lilas */
  --on-tint: #1B1733;

  /* accents */
  --ocre: #CFA35A;        /* boutons, étoiles */
  --ocre-light: #E3C58C;  /* ocre sur fond foncé */
  --on-ocre: #1B1733;
  --rose: #A8545A;        /* repères */
  --deep: #3D3756;        /* bandeaux foncés, pied de page */
  --on-deep: #FFFFFF;
  --accent-text: #9A4A50; /* liens sur fond clair */

  --kufi: "Noto Kufi Arabic", "Readex Pro", system-ui, sans-serif;
  --ui: "Readex Pro", "Noto Kufi Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --wrap: 1180px;
  --gap: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16141F;
    --bg-2: #1F1C2B;
    --ink: #F1EEF9;
    --muted: #A8A2C4;
    --rule: #34304A;
    --t1: #26334A;
    --t2: #3B3324;
    --t3: #40292C;
    --t4: #233A31;
    --t5: #2F2A45;
    --on-tint: #F1EEF9;
    --deep: #2A2640;
    --rose: #D38A8F;
    --accent-text: #E3A0A4;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1rem;
  line-height: 1.7;
}
a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.sr-only, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip:focus {
  position: fixed; inset-block-start: 10px; inset-inline-start: 10px; z-index: 10;
  background: var(--ink); color: var(--bg); padding: 8px 14px; text-decoration: none;
}

/* ───────── étoile à huit branches (khatam) ───────── */
.star { width: 1em; height: 1em; flex: none; }

/* ───────── en-tête ───────── */
.site-header { border-block-end: 3px solid var(--ink); background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center; gap: 28px; min-height: 76px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--kufi); font-weight: 700; font-size: 1.6rem; line-height: 1;
  text-decoration: none; letter-spacing: 0;
}
.logo .star { color: var(--rose); font-size: .9em; }
.nav { display: flex; gap: 22px; }
.nav a {
  text-decoration: none; font-weight: 600; padding-block: 24px 21px;
  border-block-end: 4px solid transparent;
}
.nav a:hover { border-color: var(--rule); }
.nav a[aria-current] { border-color: var(--ocre); }
.search { margin-inline-start: auto; flex: 0 1 300px; }
.search input {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 2px solid var(--ink); border-radius: 0;
  padding: 8px 12px;
}
.search input::placeholder { color: var(--muted); }

/* ───────── titres ───────── */
blockquote, h1 { text-wrap: balance; }
h1, h2, h3 { font-family: var(--kufi); font-weight: 700; line-height: 1.35; margin: 0; }
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.35rem; margin-block: 44px 18px;
}
.section-title::before {
  content: ""; width: 14px; height: 14px; background: var(--rose);
  transform: rotate(45deg); flex: none;
}

/* ───────── bandeau « حكمة اليوم » ───────── */
.today {
  background-color: var(--deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.5'%3E%3Crect x='18' y='18' width='28' height='28'/%3E%3Crect x='18' y='18' width='28' height='28' transform='rotate(45 32 32)'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--on-deep);
}
.today .wrap { padding-block: 56px 60px; text-align: center; }
.today-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ui); font-weight: 600; font-size: 1rem;
  background: var(--ocre); color: var(--on-ocre); padding: 4px 14px; margin: 0;
}
.today blockquote {
  margin: 26px auto 18px; max-width: 900px;
  font-family: var(--kufi); font-weight: 600;
  font-size: clamp(1.75rem, 4.2vw, 3rem); line-height: 1.6;
}
.today blockquote a { text-decoration: none; }
.today blockquote a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 10px; }
.today .by { margin: 0 0 30px; font-size: 1.15rem; font-weight: 600; color: var(--ocre-light); }
.today .by a { text-decoration: none; }
.today .actions { justify-content: center; }

/* ───────── boutons ───────── */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer;
  padding: 9px 18px; border: 2px solid currentColor; border-radius: 0;
  background: transparent; color: inherit;
}
.btn svg { width: 18px; height: 18px; }
.btn--main { background: var(--ocre); border-color: var(--ocre); color: var(--on-ocre); }
.btn:hover { transform: translate(0, -2px); box-shadow: 0 3px 0 currentColor; }
.btn--main:hover { box-shadow: 0 3px 0 var(--ink); }
.btn[data-done]::after { content: attr(data-done); }

/* ───────── mur d'affiches ───────── */
.wall {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
}
.wall--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wall--compact .poster { min-height: 190px; }
.wall > li { display: flex; }
.wall > .big { grid-column: span 2; }
.wall > .full { grid-column: 1 / -1; }
/* image de citation (rangs 1, 2, 3, 5, 8… de chaque auteur) */
.wall > .card-row { display: block; }
.card-img, .card-thumb { display: block; line-height: 0; }
.card-img img, .card-thumb img { width: 100%; height: auto; box-shadow: 0 1px 0 var(--rule); }
.card-img:hover img { outline: 3px solid var(--ocre); outline-offset: 3px; }
.card-thumb { margin-block-start: 18px; }
.ad-between { margin-block-start: 48px; }
/* pages d'états lourds (حزن، وحدة…) : orienter vers أمل / طمأنينة */
.gentle { margin-block-end: 22px; padding: 16px 18px; background: var(--bg-2); border-inline-start: 4px solid var(--ocre); }
.gentle p { margin: 0 0 10px; font-weight: 600; }
.card { margin: 0; width: 100%; }
.card-cap { padding: 14px 2px 4px; }
.card-cap blockquote { margin: 0; font-family: var(--kufi); font-weight: 600; font-size: 1.05rem; line-height: 1.8; }
.card-cap blockquote a { color: inherit; text-decoration: none; }
.card-cap blockquote a:hover { text-decoration: underline; text-decoration-color: var(--ocre); }
.card-cap p { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: .9rem; }
.card-cap .who { color: var(--accent-text); font-weight: 600; text-decoration: none; }
.card-cap .who::before { content: "— "; }
.card-cap .tags { display: inline-flex; gap: 10px; }
.card-cap .tags a { color: var(--muted); text-decoration: none; }
.card-cap .tags a:hover { color: var(--ink); }

.poster {
  --c: var(--t1); --on: var(--on-tint);
  position: relative; flex: 1;
  display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  margin: 0; min-height: 250px; padding: 26px 24px 20px;
  background: var(--c); color: var(--on);
  transition: transform .2s ease;
}
.poster:hover { transform: translateY(-4px); }
.poster .star {
  position: absolute; inset-block-start: 18px; inset-inline-end: 18px;
  font-size: 22px; opacity: .35;
}
.poster blockquote {
  margin: 0; padding-inline-end: 26px;
  font-family: var(--kufi); font-weight: 600;
  font-size: 1.5rem; line-height: 1.7;
}
.big .poster blockquote { font-size: clamp(1.6rem, 2.5vw, 2.1rem); line-height: 1.6; }
.poster blockquote a { text-decoration: none; }
.poster blockquote a::after { content: ""; position: absolute; inset: 0; } /* toute l'affiche cliquable */
.poster figcaption {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px;
  font-size: .95rem;
}
.poster .who { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.poster .who::before { content: ""; width: 22px; height: 3px; background: currentColor; }
.poster .who:hover { text-decoration: underline; }
.poster .tags { display: flex; gap: 10px; opacity: .85; font-size: .85rem; }
.poster .tags a { text-decoration: none; }
.poster .tags a:hover { text-decoration: underline; }

.c1 { --c: var(--t1); }
.c2 { --c: var(--t2); }
.c3 { --c: var(--t3); }
.c4 { --c: var(--t4); }
.c5 { --c: var(--t5); }

/* ───────── publicité ───────── */
.ad {
  display: grid; place-items: center; width: 100%;
  min-height: 110px; margin-block: 0;
  border: 2px dashed var(--rule); color: var(--muted); font-size: .85rem;
  background: var(--bg-2);
}
.ad--side { min-height: 260px; }
.ad--page { margin-block: 32px; }
/* vrais blocs AdSense : place réservée (pas de saut de mise en page), petite mention « إعلان » */
.ad--live { display: block; border: 0; background: none; min-height: 140px; text-align: center; }
.ad--live::before { content: "إعلان"; display: block; font-size: .7rem; color: var(--muted); margin-block-end: 4px; }
.ad--live.ad--side { min-height: 280px; }
.ad--live:has(ins[data-ad-status="unfilled"]) { display: none; }   /* aucune annonce disponible */
.wall li.full:has(> .ad--live ins[data-ad-status="unfilled"]) { display: none; }

/* ───────── tuiles de thèmes ───────── */
.tiles {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px; grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tiles a {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 112px; padding: 14px 16px; text-decoration: none;
  background: var(--c, var(--t1)); color: var(--on-tint);
  outline: 2px solid transparent; outline-offset: -2px;
}
.tiles a:hover { outline-color: var(--ink); }
.tiles .name { font-family: var(--kufi); font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
.tiles .n { font-size: .85rem; opacity: .75; }
.tiles li:nth-child(5n+1) a { --c: var(--t1); }
.tiles li:nth-child(5n+2) a { --c: var(--t2); }
.tiles li:nth-child(5n+3) a { --c: var(--t3); }
.tiles li:nth-child(5n+4) a { --c: var(--t4); }
.tiles li:nth-child(5n+5) a { --c: var(--t5); }

/* ───────── auteurs ───────── */
.arch {
  display: grid; place-items: center; flex: none;
  width: 52px; height: 64px; border-radius: 26px 26px 0 0;
  background: var(--c, var(--t4)); color: var(--on, var(--on-tint));
  font-family: var(--kufi); font-weight: 700; font-size: 1.5rem; line-height: 1;
  padding-block-start: 6px;
}
.people {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px 22px; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.people a {
  display: flex; align-items: flex-end; gap: 12px; text-decoration: none;
  padding-block-end: 10px; border-block-end: 2px solid var(--rule);
}
.people a:hover { border-color: var(--ink); }
.people b { display: block; font-family: var(--kufi); font-size: 1.02rem; line-height: 1.35; }
.people small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.people li:nth-child(4n+1) .arch { --c: var(--t4); }
.people li:nth-child(4n+2) .arch { --c: var(--t3); }
.people li:nth-child(4n+3) .arch { --c: var(--t1); }
.people li:nth-child(4n+4) .arch { --c: var(--t2); }

.more {
  display: inline-flex; align-items: center; gap: 8px; margin-block-start: 18px;
  font-weight: 600; color: var(--accent-text); text-decoration: none;
  border-block-end: 2px solid currentColor;
}
.more:hover { color: var(--ink); }

/* photo d'auteur : arche + bichromie aux couleurs de l'affiche */
.arch--photo { padding: 0; overflow: hidden; isolation: isolate; }
.arch--photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%;
  filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply;
}
.credit { margin: 10px 0 0; font-size: .75rem; opacity: .7; }

/* affiche avec image */
.poster--img { padding-block-start: 0; }
.poster-img {
  display: block; width: calc(100% + 48px); margin-inline: -24px;
  aspect-ratio: 16 / 9; height: auto; object-fit: cover;
}

/* ───────── fil d'Ariane ───────── */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: .88rem; }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; opacity: .55; }
.crumbs a { text-decoration: none; opacity: .85; }
.crumbs a:hover { text-decoration: underline; opacity: 1; }

/* ───────── en-tête de page (auteur / thème) ───────── */
.band { --c: var(--deep); --on: var(--on-deep); background: var(--c); color: var(--on); }
.band.c2 { --c: var(--t2); --on: var(--on-tint); }
.band.c3 { --c: var(--t3); --on: var(--on-tint); }
.band .wrap { padding-block: 22px 40px; }
.band h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.4; margin-block-start: 18px; }
.band .latin { font-family: var(--ui); font-size: 1.05rem; opacity: .8; }
.band .lead { max-width: 640px; margin: 10px 0 0; font-size: 1.08rem; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.facts li { border: 2px solid currentColor; padding: 2px 12px; font-size: .9rem; }
.facts b { font-weight: 600; }
.author-band .author-id { display: flex; align-items: flex-end; gap: 22px; margin-block-start: 18px; }
.author-band h1 { margin-block-start: 0; }
.author-band .arch {
  --c: var(--ocre); --on: var(--on-ocre);
  width: 104px; height: 130px; border-radius: 52px 52px 0 0; font-size: 3rem;
}

/* ───────── tri / pagination ───────── */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block: 28px 18px; }
.toolbar p { margin: 0; color: var(--muted); font-size: .92rem; }
.sort { display: flex; border: 2px solid var(--ink); }
.sort a { padding: 6px 14px; text-decoration: none; font-size: .92rem; font-weight: 600; }
.sort a + a { border-inline-start: 2px solid var(--ink); }
.sort a[aria-current] { background: var(--ink); color: var(--bg); }
.sort a:not([aria-current]):hover { background: var(--bg-2); }

.pager { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 32px 0; }
.pager > * {
  min-width: 44px; height: 44px; display: grid; place-items: center; padding-inline: 12px;
  border: 2px solid var(--ink); text-decoration: none; font-weight: 600;
}
.pager [aria-current] { background: var(--ink); color: var(--bg); }
.pager span:not([aria-current]) { border-color: transparent; }
.pager a:hover { background: var(--ocre); border-color: var(--ocre); color: var(--on-ocre); }
.pager .edge { margin-inline-start: auto; }

/* ───────── deux colonnes : contenu + latéral ───────── */
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; align-items: start; }
.with-side .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.side .section-title:first-child { margin-block-start: 28px; }
.side .people { grid-template-columns: 1fr; }
.side .ad { margin-block-start: 28px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  display: block; padding: 4px 14px; text-decoration: none; font-weight: 600; font-size: .95rem;
  border: 2px solid var(--ink);
}
.chips a:hover { background: var(--ink); color: var(--bg); }

/* ───────── page حكمة ───────── */
.quote-page { padding-block: 26px 10px; }
.quote-stage { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: end; margin-block-start: 18px; }
.gate {
  --c: var(--t3); --on: var(--on-tint);
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 26px;
  min-height: 560px; margin: 0; padding: 150px 56px 44px;
  background: var(--c); color: var(--on);
  border-radius: 999px 999px 0 0 / 260px 260px 0 0;
  text-align: center;
}
.gate .star { position: absolute; inset-block-start: 74px; inset-inline: 0; margin-inline: auto; font-size: 42px; color: var(--ocre); opacity: 1; }
.gate h1 {
  font-weight: 700; font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.55;
}
.gate figcaption { font-size: 1.15rem; font-weight: 600; }
.gate figcaption a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.gate figcaption a::before, .gate figcaption a::after { content: ""; width: 28px; height: 3px; background: currentColor; }
.gate figcaption a:hover { text-decoration: underline; }
.gate .mark { font-family: var(--kufi); font-size: .9rem; opacity: .7; }

.gate--img { justify-content: flex-start; padding-block-start: 0; overflow: hidden; min-height: 0; }
.gate-img {
  display: block; width: calc(100% + 112px); margin-inline: -56px; height: auto;
  aspect-ratio: 4 / 3; max-height: 360px; object-fit: cover;
}
.gate--img .star { position: relative; inset: auto; margin: -47px auto -8px; font-size: 42px; filter: drop-shadow(0 0 0 var(--c)); }
.gate--img .star polygon { stroke: var(--c); stroke-width: 2.5px; paint-order: stroke; }
.quote-aside > * + * { margin-block-start: 22px; }
.quote-aside .actions { flex-direction: column; }
.quote-aside .btn { justify-content: center; }
.original { border-block: 2px solid var(--ink); padding-block: 10px; }
.original summary { cursor: pointer; font-weight: 600; }
.original p { margin: 10px 0 0; font-size: 1.02rem; line-height: 1.6; text-align: left; }
.original .src { display: block; color: var(--muted); font-size: .88rem; margin-block-start: 4px; }
.about {
  display: flex; align-items: flex-end; gap: 14px; text-decoration: none;
}
.about h2 { font-size: 1.25rem; }
.about p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.about a { text-decoration: none; }
.about a:hover { text-decoration: underline; }

/* ───────── pied de page ───────── */
.site-footer { margin-block-start: 72px; background: var(--deep); color: var(--on-deep); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding-block: 34px; }
.site-footer .logo .star { color: var(--ocre); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .92rem; }
.site-footer nav a { text-decoration: none; opacity: .85; }
.site-footer nav a:hover { opacity: 1; text-decoration: underline; }

/* ───────── responsive ───────── */
@media (max-width: 1080px) {
  .wall--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .with-side, .quote-stage { grid-template-columns: 1fr; }
  .wall, .wall--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-aside .actions { flex-direction: row; }
}
@media (max-width: 760px) {
  .site-header .wrap { flex-wrap: wrap; gap: 0 22px; padding-block-end: 14px; }
  .nav { gap: 16px; font-size: .95rem; }
  .nav a { padding-block: 18px 14px; }
  .search { flex-basis: 100%; }
  .logo { font-size: 1.6rem; inline-size: 100%; padding-block-start: 16px; }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 16px; }
  .wall, .wall--4, .with-side .wall { grid-template-columns: 1fr; }
  .wall > .big { grid-column: auto; }
  .poster { min-height: 200px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people { grid-template-columns: 1fr; }
  .today .wrap { padding-block: 40px 44px; }
  .gate { min-height: 0; padding: 110px 24px 32px; border-radius: 999px 999px 0 0 / 150px 150px 0 0; }
  .gate .star { inset-block-start: 50px; font-size: 32px; }
  .gate--img { padding-block-start: 0; }
  .gate-img { width: calc(100% + 48px); margin-inline: -24px; max-height: 260px; }
  .gate--img .star { margin-block: -38px -10px; }
  .author-band .arch { width: 76px; height: 96px; border-radius: 38px 38px 0 0; font-size: 2.2rem; }
  .pager .edge { margin-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .poster, .btn { transition: none; }
  .poster:hover, .btn:hover { transform: none; }
}
@media (prefers-color-scheme: dark) {
  .arch--photo img { mix-blend-mode: luminosity; }
}

/* ───────── compléments du site ───────── */
.test-banner { background: var(--ocre); color: var(--on-ocre); text-align: center; font-size: .85rem; font-weight: 600; padding: 4px 12px; }
.lead-block { max-width: 760px; }
.bio, .intro { max-width: 760px; margin: 14px 0 0; font-size: 1.05rem; line-height: 1.9; }
.band .bio, .band .intro { color: inherit; }
.poster .who--plain { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.poster .who--plain::before { content: ""; width: 22px; height: 3px; background: currentColor; }
.src { margin: 0; color: var(--muted); font-size: .88rem; }

/* recherche */
.search { position: relative; }
.search-results {
  position: absolute; inset-inline: 0; inset-block-start: calc(100% + 4px); z-index: 20;
  list-style: none; margin: 0; padding: 4px 0; background: var(--bg); border: 2px solid var(--ink);
  max-height: 60vh; overflow: auto;
}
.search-results:empty { display: none; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 6px 12px; text-decoration: none; }
.search-results a:hover, .search-results a[aria-selected="true"] { background: var(--bg-2); }
.search-results small { color: var(--muted); }
.search-page .search-results { position: static; border: 0; max-height: none; }
.search-page .search-results a { padding: 10px 0; border-block-end: 2px solid var(--rule); }

/* index des auteurs */
.letters { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 24px 0 0; padding: 0; }
.letters a { display: grid; place-items: center; min-width: 40px; height: 40px; border: 2px solid var(--ink);
  text-decoration: none; font-family: var(--kufi); font-weight: 700; }
.letters a:hover, .letters a[aria-current] { background: var(--ink); color: var(--bg); }
.letter-group { scroll-margin-top: 16px; }
.letter-group > h2 { font-size: 2rem; margin-block: 40px 14px; }

/* pages fixes */
.prose { max-width: 760px; padding-block: 24px 0; font-size: 1.05rem; line-height: 1.95; }
.prose h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-block-end: 18px; }
.prose h2 { font-size: 1.35rem; margin-block: 28px 10px; }
.prose a { color: var(--accent-text); }

.empty { color: var(--muted); padding: 24px 0; }
.band.c1 { --c: var(--t1); --on: var(--on-tint); }
.band.c4 { --c: var(--t4); --on: var(--on-tint); }
.band.c5 { --c: var(--t5); --on: var(--on-tint); }
.wall > li { scroll-margin-top: 16px; }
.wall > li:target .poster { outline: 3px solid var(--ocre); outline-offset: 3px; }
@media (max-width: 600px) {
  .gate--img .star { inset: auto; }
}

/* source d'un hadith (« متفق عليه »…), à la fin du texte */
.hsrc { font-style: normal; font-weight: 400; font-size: .72em; opacity: .75; }
/* jamais plus large que l'écran : un mot ou une source très longs passent à la ligne */
.wall > li, .layout > *, .poster, .card { min-width: 0; }
.poster blockquote, .card-cap blockquote, .quote-stage h1 { overflow-wrap: anywhere; }

/* familles d'auteurs (/qaail/dawr/…) */
.family-chips { margin-block-start: 12px; }
.family-chips small { opacity: .65; font-size: .8em; }
.family-chips a[aria-current] { background: var(--ink); color: var(--bg); }
