/* Guide : une affiche à lire, colonne centrée (admin.css chargé avant).
   Propriétés « logiques » (inline-start…) : la version arabe se met en miroir toute seule. */
.doc-langs {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  max-width: 760px; margin: 28px auto 0; padding: 0 clamp(18px, 5vw, 48px);
}
.doc-langs button {
  padding: 8px 18px; border-radius: 999px; background: #fff; color: var(--sarcelle-fonce);
  border: 2px solid var(--sauge); font: 700 14px/1.2 var(--sans);
}
.doc-langs button[lang="ar"] { font: 700 15px/1.2 var(--arabe); }
.doc-langs button[aria-pressed="true"] { background: var(--sarcelle); border-color: var(--sarcelle); color: var(--creme); }

.doc { max-width: 760px; margin-inline: auto; padding: 28px clamp(18px, 5vw, 48px) 64px; display: grid; gap: 34px; }
.doc .lead { margin: 0; font: 500 21px/1.6 var(--serif); color: var(--encre); }
.doc h2 {
  margin: 0 0 14px; font: 700 1.1rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--sarcelle);
}
.doc section { display: grid; gap: 14px; }
.doc ol, .doc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.doc li { line-height: 1.6; }
.doc b { color: var(--sarcelle-fonce); }

/* Version arabe : Naskh pour la lecture, Kufi pour les titres. */
.doc[lang="ar"] { font: 19px/1.9 "Noto Naskh Arabic", var(--arabe); }
.doc[lang="ar"] .lead { font: 500 23px/1.9 "Noto Naskh Arabic", var(--arabe); }
.doc[lang="ar"] h2 { font: 700 1.15rem/1.4 var(--arabe); letter-spacing: 0; }
.doc[lang="ar"] li { line-height: 1.9; }

/* Le parcours : étapes numérotées en orange, reliées par un trait. */
.path { counter-reset: n; position: relative; }
.path li { counter-increment: n; position: relative; padding-inline-start: 52px; min-height: 36px; }
.path li::before {
  content: counter(n); position: absolute; inset-inline-start: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--orange); color: #2a1406; font: 700 16px/1 var(--sans);
}
.path li:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-start: 17px; top: 36px; bottom: -12px; width: 2px; background: var(--sauge);
}
.doc[lang="ar"] .path li::before { content: counter(n, arabic-indic); font-family: var(--arabe); }

/* Pas à pas de l'imam : chiffres sarcelle dans une carte. */
.steps { counter-reset: s; padding: 18px 20px !important; background: #fff; border-radius: 18px; box-shadow: 0 0 0 2px var(--sauge); }
.steps li { counter-increment: s; position: relative; padding-inline-start: 34px; }
.steps li::before { content: counter(s) "."; position: absolute; inset-inline-start: 0; font: 700 18px/1.5 var(--sans); color: var(--sarcelle); }
.doc[lang="ar"] .steps li::before { content: counter(s, arabic-indic) "."; font-family: var(--arabe); }

/* Puces de couleur de l'affiche. */
.dots li { position: relative; padding-inline-start: 25px; }
.dots li::before { content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 13px; height: 13px; border-radius: 50%; background: var(--feuille); }
.dots li:nth-child(4n+2)::before { background: var(--orange); }
.dots li:nth-child(4n+3)::before { background: var(--jaune); }
.dots li:nth-child(4n+4)::before { background: var(--sarcelle); }

/* Encadré données : bordure orange, comme le dôme. */
.notice { padding: 22px; background: #fdf0e6; border-radius: 18px; box-shadow: 0 0 0 3px var(--orange); }
.notice h2 { color: var(--orange-texte); }
.notice p { margin: 0; line-height: 1.65; }
.doc[lang="ar"] .notice p { line-height: 1.9; }

/* Section responsables : seulement avec le code responsable. */
.doc .admin-only { display: none; }
body:has(.tabs:not([hidden])) .doc .admin-only { display: grid; }
