/* ============================================================
   MY BET-KNESSET — Design Tokens
   ============================================================ */
:root {
  /* === Palette officielle navy + or + cream === */
  --navy:          #0a1f3a;   /* fond sections sombres */
  --navy-mid:      #142a4a;   /* variations navy */
  --navy-ink:      #050f1f;   /* navy le plus profond / texte sur boutons or */
  --navy-dark:     #050f1f;
  --gold:          #c9a14a;   /* or principal — accents, boutons */
  --gold-light:    #e3c47a;   /* or clair — titres dorés, hover */
  --gold-deep:     #9c7a2e;   /* or profond — texte doré sur fond clair */
  --cream:         #f5efe2;   /* texte sur fond sombre */
  --cream-soft:    #fbf7ec;   /* fond sections claires */
  --white:         #f5efe2;   /* remplace blanc pur */
  --paper:         #fbf7ec;
  --text:          #1a1a1a;   /* encre — texte sur fond clair */
  --text-soft:     #4a3f33;
  --muted:         #8a7a66;
  --border:        rgba(201,161,74,0.25);
  --border-soft:   rgba(201,161,74,0.12);
  --border-strong: rgba(201,161,74,0.4);
  --green:         #34C759;
  --red:           #FF3B30;
  --red-soft:      #FFF0EF;
  --blue:          #5B7FA6;

  /* === Typography === */
  --font-display:    'Frank Ruhl Libre', 'Playfair Display', Georgia, serif;
  --font-display-he: 'Noto Serif Hebrew', 'Frank Ruhl Libre', serif;
  --font-body:       -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --font-mono:       'JetBrains Mono', 'Courier New', monospace;

  /* === Radii === */
  --r-sm:  3px;
  --r-md:  5px;
  --r-lg:  8px;

  /* === Shadows === */
  --shadow-sm:  0 1px 3px rgba(10,31,58,0.08);
  --shadow-md:  0 4px 16px rgba(10,31,58,0.12);
  --shadow-lg:  0 12px 32px rgba(10,31,58,0.18);
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream-soft);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }
input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }

/* === Headings === */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -0.015em; font-weight: 600; }
h1 { font-size: 56px; margin-bottom: 16px; }
h2 { font-size: 40px; margin-bottom: 12px; }
h3 { font-size: 28px; margin-bottom: 10px; }
h4 { font-size: 18px; margin-bottom: 8px; }
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4 { font-family: var(--font-display-he); letter-spacing: 0; }

/* === Utility kicker === */
.kicker {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* === Ornament === */
.ornament span {
  display: block;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  position: relative;
}
.ornament span::before {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--gold);
  font-size: 10px;
  background: var(--cream-soft);
  padding: 0 8px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 12.5px; }
.btn-lg { height: 52px; padding: 0 32px; font-size: 15px; }

.btn-primary {
  background: var(--gold);
  color: var(--navy-ink);
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: var(--shadow-lg);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); background: var(--cream-soft); }

.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-danger:hover { background: #c0392b; border-color: #c0392b; }

/* === Form fields === */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--cream-soft);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--cream);
  box-shadow: 0 0 0 3px rgba(201,161,74,0.12);
}
.field input::placeholder { color: var(--muted); }

/* === Status badges === */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-green  { background: #D3F5E3; color: #13612E; }
.badge-red    { background: #FDDEDD; color: #7F1D1D; }
.badge-gold   { background: rgba(201,161,74,0.18); color: var(--gold-deep); }
.badge-blue   { background: #D6E8F8; color: #0E3C6E; }
.badge-gray   { background: rgba(10,31,58,0.08); color: var(--navy); }

/* B3 — Activer le compte : bloc mot de passe temporaire + hint */
.bk-temp-pass { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.bk-temp-pass code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 16px; letter-spacing: 0.08em; background: rgba(10,31,58,0.06); padding: 6px 12px; border-radius: 6px; }
.bk-hint { color: #7A6F5E; font-size: 12.5px; margin-top: 6px; }

/* ============================================================ */
/* B5 — Portail fidèle (page /fidele.html, 5 sections lecture seule) */
/* ============================================================ */
body { background: linear-gradient(135deg, #f5ede4 0%, #ede3d6 100%); margin: 0; min-height: 100vh; }
.fidele-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px; background: var(--white, #fff);
  border-bottom: 1px solid var(--border, #e0d9cc); box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.fidele-brand { font-family: var(--font-display, "Playfair Display", serif); font-size: 18px; color: var(--navy, #0a1f3a); }
.fidele-syn { flex: 1; font-size: 14px; color: var(--text-soft, #5a4d3e); font-style: italic; }
.fidele-actions { display: flex; gap: 10px; }

.fidele-main { max-width: 920px; margin: 0 auto; padding: 24px 16px 80px; display: flex; flex-direction: column; gap: 24px; }
.fidele-section {
  background: var(--white, #fff); border: 1px solid var(--border, #e0d9cc); border-radius: 12px;
  padding: 20px 24px; box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
.fidele-section h2 { margin: 0 0 14px; font-family: var(--font-display, "Playfair Display", serif); font-size: 20px; color: var(--navy, #0a1f3a); }

.fidele-empty, .fidele-loading { padding: 16px; text-align: center; color: var(--muted, #8a7a68); font-style: italic; font-size: 14px; }
.fidele-error { padding: 12px; color: #7F1D1D; background: #FDDEDD; border-radius: 6px; font-size: 13px; }
.fidele-hint { margin-top: 12px; color: var(--muted, #8a7a68); font-size: 12.5px; font-style: italic; }

.fidele-totals {
  margin-top: 12px; padding: 10px 14px; background: rgba(201,161,74,0.08);
  border-radius: 6px; font-size: 13.5px; line-height: 1.6;
}

.fidele-shabbats, .fidele-minianim { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fidele-shabbat-item, .fidele-minian-item { padding: 8px 12px; background: rgba(10,31,58,0.03); border-radius: 6px; font-size: 14px; }
.fidele-minian-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--gold-deep, #8B7355); }
.fidele-shabbat-info { margin: 0 0 12px; color: var(--text-soft, #5a4d3e); font-size: 13px; font-style: italic; }

.fidele-footer { text-align: center; padding: 16px; color: var(--muted, #8a7a68); font-size: 11px; }

@media (max-width: 640px) {
  .fidele-header { padding: 10px 14px; gap: 10px; }
  .fidele-brand { font-size: 16px; }
  .fidele-syn { font-size: 12px; }
  .fidele-main { padding: 14px 8px 60px; gap: 16px; }
  .fidele-section { padding: 14px 16px; }
}
