/* ───────────────────────────────────────────────
   Heshbon Nefesh — feuille de style partagée
   Palette crépuscule · typo hébraïque · RTL-aware
   ─────────────────────────────────────────────── */

:root {
  --paper:      #F8F8F6;   /* papier doux, calme */
  --paper-2:    #FFFFFF;   /* surface carte */
  --ink:        #1C2230;   /* encre nuit (indigo-noir) */
  --indigo:     #2A3150;   /* bandeau du soir */
  --gold:       #9C7B2E;   /* or laiton, lisible sur clair (texte/liens) */
  --gold-soft:  #C9A84C;   /* or de marque, filets & accents décoratifs */
  --muted:      #6A7080;   /* texte secondaire */
  --line:       #E5E3DD;   /* filets discrets */
  --maxw:       680px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Heebo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── Bandeau du soir (header) ───────────────── */
.topbar {
  background: var(--indigo);
  border-bottom: 2px solid var(--gold-soft);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
}
.wordmark .he {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
}
.wordmark .lat {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--gold-soft);
  letter-spacing: 0.3px;
}

/* ── Sélecteur de langue ────────────────────── */
.langs { display: flex; gap: 4px; }
.langs a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  padding: 4px 9px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.langs a:hover { color: #fff; }
.langs a.active {
  color: var(--indigo);
  background: var(--gold-soft);
  font-weight: 600;
}

/* ── Contenu ─────────────────────────────────── */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 24px;
}
.doc-title {
  font-family: "Frank Ruhl Libre", serif;
  font-weight: 700;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.doc-rule {
  width: 56px;
  height: 3px;
  background: var(--gold-soft);
  border-radius: 2px;
  margin-bottom: 14px;
}
.doc-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 40px;
}
.lede {
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 36px;
}

/* Sections légales numérotées */
.clause { margin-bottom: 28px; }
.clause h2 {
  font-family: "Frank Ruhl Libre", serif;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.clause h2 .num {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  min-width: 22px;
}
.clause p { color: #353B49; margin-bottom: 8px; }
.clause ul { list-style: none; padding: 0; }
.clause li {
  position: relative;
  padding-inline-start: 18px;
  margin-bottom: 8px;
  color: #353B49;
}
.clause li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold-soft);
}
.clause strong { font-weight: 600; }
a.inline { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); }
a.inline:hover { border-color: var(--gold); }

/* ── Footer ──────────────────────────────────── */
footer {
  max-width: var(--maxw);
  margin: 56px auto 0;
  padding: 28px 24px 48px;
  border-top: 1px solid var(--line);
  text-align: center;
}
footer nav { margin-bottom: 14px; }
footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  margin: 0 10px;
}
footer nav a:hover { color: var(--ink); }
.copyright { font-size: 13px; color: #A7ABB4; }

/* ── RTL (hébreu) ────────────────────────────── */
[dir="rtl"] body,
[dir="rtl"] {
  font-family: "Heebo", -apple-system, sans-serif;
}
[dir="rtl"] .clause h2 { flex-direction: row; }

/* ── Apparition douce ────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  main { animation: rise 0.5s ease both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 480px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  main { padding-top: 40px; }
}
