/* Sha'ar — feuille unique, servie telle quelle. Aucun build, aucune police distante.
   La CSP du site interdit les styles inline (style-src 'self') : tout le style vit ici,
   pour les pages de confidentialité comme pour les pages d'assistance. */

:root {
  color-scheme: light dark;

  --bg: #fbfaf8;
  --fg: #1c1b19;
  --muted: #5f5c54;
  --rule: #e3dfd7;
  --link: #7a4a1e;
  --card: #f4f1eb;
  --accent-soft: #f1e6d5;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hebrew: -apple-system, BlinkMacSystemFont, "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew", "Noto Serif Hebrew", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141310;
    --fg: #e9e5dd;
    --muted: #a29c90;
    --rule: #302d26;
    --link: #d8ab6d;
    --card: #1e1c17;
    --accent-soft: #2a2317;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 5rem;
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding: 1rem 1rem 4rem; }
}

/* ---- Barre de site : wordmark et retour à l'accueil, identiques sur les dix pages ---- */

.sitebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
}

.wordmark .glyph { color: var(--link); font-size: 1.3rem; }

.sitebar .home { font-size: .875rem; white-space: nowrap; }

/* ---- Texte courant ---- */

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0 0 .35rem; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.12rem; line-height: 1.35; margin: 2.5rem 0 .75rem; font-weight: 650; }
h3 { font-size: 1rem; margin: 1.75rem 0 .5rem; font-weight: 650; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-inline-start: 1.35rem; }
li { margin: 0 0 .5rem; }
a { color: var(--link); text-underline-offset: 3px; }
strong { font-weight: 650; }

.updated { color: var(--muted); font-size: .875rem; margin: 0 0 2.25rem; }
.lede { color: var(--muted); margin: 0 0 1.4rem; }
.muted { color: var(--muted); font-size: .95rem; }

code { direction: ltr; unicode-bidi: isolate; font-size: .92em; }

/* Termes latins isolés dans une page hébraïque, et blocs d'adresse à lire de gauche à droite. */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .875rem;
}

footer p:last-child { margin-bottom: 0; }

/* ---- Surfaces encadrées, communes aux deux familles de pages ---- */

.summary,
.contact,
.card,
.q {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}

.summary { margin: 0 0 2rem; }
.contact { margin: 0; }
.card { margin: 0 0 1.15rem; }
.q { margin: 0 0 .75rem; scroll-margin-top: 1rem; }

.summary > :last-child,
.contact > :last-child,
.card > :last-child,
.q > :last-child { margin-bottom: 0; }

.summary h2 { margin-top: 0; }

/* ---- Pastilles : sélecteur de langue et sommaire des questions ---- */

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0 1.75rem;
}

.langs a,
.langs span,
.chip {
  display: inline-block;
  padding: .35rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--link);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}

.chip { color: var(--fg); }

.langs a:hover,
.chip:hover { border-color: var(--link); }

.langs [aria-current="page"] {
  background: var(--link);
  border-color: var(--link);
  color: var(--bg);
}

/* ---- Propre aux pages d'assistance ---- */

header.top { padding: 0; }

.quick { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.75rem; }

section { margin: 0 0 2.25rem; scroll-margin-top: 1rem; }

h2.section { font-size: 1.3rem; margin: 0 0 .9rem; }

.card h2 { margin: 0 0 .6rem; font-size: 1.2rem; }

.card.accent { border-color: var(--link); background: var(--accent-soft); }

.q h3 { margin: 0 0 .5rem; font-size: 1.05rem; line-height: 1.35; }

.path {
  display: block;
  background: var(--accent-soft);
  border-radius: 8px;
  padding: .6rem .85rem;
  margin: .75rem 0;
  font-size: .96rem;
  font-weight: 600;
}

.contact-line { margin: 0 0 .85rem; font-size: 1.05rem; }

.contact-line strong {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.heb { font-size: 1.15em; }

/* ---- Réglages propres à l'hébreu : police, interlignage, pas de capitales forcées ---- */

html[lang="he"] body {
  font-family: var(--hebrew);
  font-size: 17.5px;
  line-height: 1.75;
}

html[lang="he"] h1 { line-height: 1.3; letter-spacing: normal; }
html[lang="he"] h2 { line-height: 1.45; }
html[lang="he"] .q h3 { line-height: 1.4; }
html[lang="he"] strong { font-weight: 700; }
html[lang="he"] .heb { font-size: 1.05em; }
html[lang="he"] .contact-line strong { text-transform: none; letter-spacing: 0; }

@media (max-width: 480px) {
  html[lang="he"] body { font-size: 16.5px; }
}

/* ---- Page d'accueil ---- */

.docs { list-style: none; padding: 0; margin: 0 0 1rem; }
.docs > li { margin: 0 0 1.1rem; }
.docs .doc-name { display: block; font-weight: 650; margin-bottom: .4rem; }
.docs .langlist { display: flex; flex-wrap: wrap; gap: .5rem; }
