/* =====================================================
   style.css — sayfallah.com — CSS UNIQUE
   Contient : reset, pages, nav, zakat, budget, footer
   ===================================================== */

/* ── Variables ─────────────────────────────────────── */
:root {
    --gold:        #FFD700;
    --gold-dim:    rgba(255,215,0,.45);
    --gold-ghost:  rgba(255,215,0,.06);
    --bg:          #080d1c;
    --bg2:         #0d1b3e;
    --text:        #e8e8e8;
    --text-dim:    #a0b8d4;
    --muted:       #6a84a4;
    --border:      rgba(255,215,0,.15);
    --border-dim:  rgba(255,215,0,.07);
    --green:       #4CAF7D;
    --red:         #e05050;
    --blue:        #5ba3e8;
    --purple:      #9b7de8;
    --orange:      #e8964c;
    --nav-h:       62px;
    --font:        'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --mono:        'Courier New', Courier, monospace;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    padding-top: var(--nav-h);
}
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
img, svg { display: block; }

/* ── Animations ────────────────────────────────────── */
@keyframes fadeIn  { from{opacity:0} to{opacity:1} }
@keyframes fadeUp  { from{opacity:0;transform:translateY(28px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }
@keyframes glow    { 0%,100%{text-shadow:0 0 18px rgba(255,215,0,.4),0 0 36px rgba(255,215,0,.2)} 50%{text-shadow:0 0 32px rgba(255,215,0,.8),0 0 64px rgba(255,215,0,.4)} }
@keyframes floatUp { 0%,100%{transform:translateY(0) rotate(0deg)} 50%{transform:translateY(-12px) rotate(2deg)} }
@keyframes crescGlow { 0%,100%{opacity:.85} 50%{opacity:1} }
@keyframes bounceArrow { 0%,100%{transform:rotate(45deg) translateY(0)} 50%{transform:rotate(45deg) translateY(5px)} }
@keyframes blink   { 0%,100%{opacity:1} 50%{opacity:.2} }
@keyframes spin    { to{transform:rotate(360deg)} }

/* ══════════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════════ */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 500;
    height: var(--nav-h);
    background: rgba(8,13,28,.92);
    border-bottom: 1px solid var(--border-dim);
    backdrop-filter: blur(14px);
    transition: background .3s, box-shadow .3s;
}
.site-nav.scrolled {
    background: rgba(5,8,18,.98);
    box-shadow: 0 4px 40px rgba(0,0,0,.6);
    border-bottom-color: var(--border);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    height: 100%; padding: 0 28px;
    display: flex; align-items: center; gap: 16px;
}
/* Brand */
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0; transition: opacity .25s;
}
.nav-brand:hover { opacity: .8; }
.nav-hilal {
    width: 28px; height: 32px;
    filter: drop-shadow(0 0 7px rgba(255,215,0,.5));
    animation: floatUp 7s ease-in-out infinite;
}
.nav-brand-ar { font-size: .92rem; color: var(--gold); direction: rtl; line-height: 1.2; display: block; }
.nav-brand-fr { font-size: .5rem;  color: var(--gold-dim); letter-spacing: 3px; text-transform: uppercase; display: block; }
/* Links */
.nav-links {
    display: flex; align-items: center; gap: 1px;
    list-style: none; flex: 1; justify-content: flex-end;
}
.nav-links li { position: relative; }
.nav-link, .nav-link-btn {
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 7px 13px;
    color: var(--text-dim); background: transparent;
    border: 1px solid transparent;
    font-family: inherit; cursor: pointer;
    transition: border-color .2s, background .2s, color .2s;
    white-space: nowrap;
}
.nav-link:hover, .nav-link-btn:hover {
    border-color: var(--border-dim); background: var(--gold-ghost); color: var(--gold);
}
.nav-link.active, .nav-link-btn.active {
    border-color: var(--border); background: var(--gold-ghost); color: var(--gold);
}
.nl-ar { font-size: .76rem; color: var(--gold); direction: rtl; line-height: 1.3; }
.nl-fr { font-size: .52rem; color: var(--gold-dim); letter-spacing: 2px; text-transform: uppercase; }
/* Dropdown arrow */
.nav-arrow { width: 10px; height: 6px; transition: transform .25s; display: block; }
.nav-dd-open .nav-arrow { transform: rotate(180deg); }
/* Dropdown */
.nav-dd {
    position: absolute; top: calc(100% + 4px); right: 0;
    min-width: 220px;
    background: rgba(8,13,28,.98);
    border: 1px solid var(--border);
    box-shadow: 0 16px 48px rgba(0,0,0,.8);
    opacity: 0; transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .18s, transform .18s;
    z-index: 600;
}
.nav-dd-open .nav-dd { opacity: 1; transform: translateY(0); pointer-events: all; }
.nav-dd a, .nav-dd-soon {
    display: flex; flex-direction: column; gap: 1px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-dim);
    color: var(--text-dim); transition: background .18s;
}
.nav-dd a:last-of-type { border-bottom: none; }
.nav-dd a:hover { background: var(--gold-ghost); color: var(--gold); }
.nav-dd-soon { opacity: .35; font-style: italic; cursor: default; }
.dd-ar { font-size: .8rem; color: var(--gold); direction: rtl; }
.dd-fr { font-size: .64rem; color: var(--muted); }
/* Burger */
.nav-burger {
    display: none; flex-direction: column; justify-content: center;
    gap: 5px; width: 36px; height: 36px;
    background: transparent; border: 1px solid var(--border-dim);
    padding: 6px; transition: border-color .2s;
}
.nav-burger:hover { border-color: var(--gold); }
.burger-bar { display: block; width: 100%; height: 1.5px; background: var(--gold); transition: transform .25s, opacity .25s; transform-origin: center; }
.nav-burger.open .burger-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open .burger-bar:nth-child(2) { opacity: 0; }
.nav-burger.open .burger-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
/* Mobile panel */
.nav-mobile {
    display: none; flex-direction: column;
    background: rgba(5,8,18,.99);
    border-top: 1px solid var(--border-dim);
    overflow: hidden; max-height: 0;
    transition: max-height .35s ease;
}
.nav-mobile.open { display: flex; max-height: 700px; }
.nm-link {
    display: flex; justify-content: space-between;
    padding: 13px 22px;
    border-bottom: 1px solid var(--border-dim);
    color: var(--text-dim); transition: background .18s;
}
.nm-link:hover { background: var(--gold-ghost); color: var(--gold); }
.nm-group-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 13px 22px; width: 100%;
    background: transparent; border: none; border-bottom: 1px solid var(--border-dim);
    color: var(--text-dim); cursor: pointer; font-family: inherit;
    transition: background .18s;
}
.nm-group-btn:hover { background: var(--gold-ghost); color: var(--gold); }
.nm-sub { display: none; background: rgba(0,0,0,.3); }
.nm-sub.open { display: block; }
.nm-sub-link {
    display: block; padding: 10px 22px 10px 34px;
    color: var(--muted); font-size: .86rem;
    border-bottom: 1px solid var(--border-dim);
    transition: background .18s, color .18s;
}
.nm-sub-link:hover { background: var(--gold-ghost); color: var(--gold); }
.nm-sub-soon { display: block; padding: 10px 22px 10px 34px; color: #334; font-size: .82rem; font-style: italic; border-bottom: 1px solid var(--border-dim); }

/* ── Khutba Al-Hajah ─────────────────────────────── */
.khutba-hajah {
    position: fixed;
    top: calc(var(--nav-h) + 8px); right: 20px;
    z-index: 400; max-width: 440px; direction: rtl;
}
.khutba-toggle {
    background: rgba(13,27,62,.92); border: 1px solid var(--gold);
    color: var(--gold); padding: 8px 20px; font-size: .88rem;
    cursor: pointer; text-align: center; letter-spacing: 1px;
    border-radius: 2px 2px 0 0; transition: background .3s; user-select: none;
}
.khutba-toggle:hover { background: rgba(255,215,0,.1); }
.khutba-content {
    display: none;
    background: rgba(8,13,30,.98); border: 1px solid var(--gold);
    border-top: none; padding: 18px 20px 14px;
    box-shadow: 0 12px 50px rgba(0,0,0,.8); backdrop-filter: blur(6px);
}
.khutba-content.open { display: block; animation: slideDown .3s ease; }
.kh-arabic  { font-size: .95rem; color: var(--gold); line-height: 2.1; text-align: right; }
.kh-french  { font-size: .76rem; color: var(--text-dim); line-height: 1.8; text-align: left; direction: ltr; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-dim); font-style: italic; }

/* ══════════════════════════════════════════════════════
   PAGES — structure commune
══════════════════════════════════════════════════════ */
.page {
    min-height: 100vh; position: relative;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; overflow: hidden;
}
.page-1 { background: radial-gradient(ellipse at 60% 40%, #1a3566 0%, #0d1b3e 55%, #080d1c 100%); }
.page-2 { background: radial-gradient(ellipse at 40% 60%, #0f2040 0%, #080d1c 70%); }
#starsCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ── Hilal ───────────────────────────────────────── */
.crescent-wrap { position: absolute; top: 28px; left: 36px; z-index: 5; width: 110px; height: 110px; animation: floatUp 7s ease-in-out infinite; }
.crescent-svg  { width: 100%; height: 100%; filter: drop-shadow(0 0 14px rgba(255,215,0,.55)); }
.crescent-path { animation: crescGlow 4s ease-in-out infinite; }
.star-poly     { animation: crescGlow 4s ease-in-out infinite .6s; }

/* ── Container ───────────────────────────────────── */
.container { position: relative; z-index: 10; text-align: center; padding: 50px 24px; max-width: 860px; width: 92%; }

/* ── Basmala ─────────────────────────────────────── */
.basmala     { font-size: 2.7rem; color: var(--gold); font-weight: 700; direction: rtl; line-height: 1.6; text-shadow: 0 0 28px rgba(255,215,0,.45); animation: fadeIn 1.8s ease forwards; }
.basmala-sub { font-size: 1rem; color: #d4c47a; margin-top: 6px; margin-bottom: 36px; font-style: italic; opacity: 0; animation: fadeUp 1.4s ease .6s forwards; }

/* ── Deco frame ──────────────────────────────────── */
.deco-frame { width: 300px; min-height: 140px; margin: 0 auto 28px; border: 1.5px solid rgba(255,215,0,.5); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: rgba(0,0,0,.25); box-shadow: 0 0 50px rgba(255,215,0,.1), inset 0 0 30px rgba(255,215,0,.04); opacity: 0; animation: fadeUp 1.4s ease .9s forwards; }
.corner { position: absolute; width: 14px; height: 14px; border-color: var(--gold); border-style: solid; }
.corner.tl { top:-4px; left:-4px; border-width: 2px 0 0 2px; }
.corner.tr { top:-4px; right:-4px; border-width: 2px 2px 0 0; }
.corner.bl { bottom:-4px; left:-4px; border-width: 0 0 2px 2px; }
.corner.br { bottom:-4px; right:-4px; border-width: 0 2px 2px 0; }
.welcome-ar { font-size: 2.4rem; color: var(--gold); direction: rtl; line-height: 1.4; animation: glow 3.5s ease-in-out infinite; }
.welcome-fr { font-size: .85rem; color: var(--muted); letter-spacing: 4px; text-transform: uppercase; margin-top: 6px; }
h1 { font-size: 2rem; color: #fff; letter-spacing: 5px; text-transform: uppercase; margin-bottom: 16px; opacity: 0; animation: fadeUp 1.4s ease 1.1s forwards; }
.description { font-size: .98rem; color: var(--text-dim); line-height: 2.1; max-width: 580px; margin: 0 auto 24px; opacity: 0; animation: fadeUp 1.4s ease 1.3s forwards; }

/* ── Boutons accueil ─────────────────────────────── */
.home-tools { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 0 auto 24px; opacity: 0; animation: fadeUp 1.4s ease 1.5s forwards; }
.home-tool-btn { padding: 11px 22px; border: 1.5px solid var(--border); background: transparent; color: var(--gold); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; transition: background .3s, border-color .3s, color .3s, transform .25s; }
.home-tool-btn:hover { background: var(--gold); color: var(--bg2); border-color: var(--gold); transform: translateY(-2px); }
.htb-ar  { direction: rtl; font-size: .88rem; }
.htb-sep { display: inline-block; width: 1px; height: 14px; background: var(--border); }
.htb-fr  { font-size: .68rem; letter-spacing: 2px; text-transform: uppercase; }

/* ── Scroll btn ──────────────────────────────────── */
.scroll-btn { background: transparent; border: 1.5px solid rgba(255,215,0,.5); color: var(--gold); padding: 12px 36px; font-size: .92rem; letter-spacing: 3px; text-transform: uppercase; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; transition: border-color .3s, background .3s; opacity: 0; animation: fadeUp 1.4s ease 1.7s forwards; }
.scroll-btn:hover { background: rgba(255,215,0,.08); border-color: var(--gold); }
.scroll-arrow { display: block; width: 10px; height: 10px; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg); animation: bounceArrow 2s ease-in-out infinite; margin-top: 2px; }
.geo-pattern { position: absolute; bottom: 0; left: 0; right: 0; height: 90px; background: repeating-linear-gradient(-60deg, transparent, transparent 18px, rgba(255,215,0,.05) 18px, rgba(255,215,0,.05) 36px); pointer-events: none; }

/* ── Page 2 éléments ─────────────────────────────── */
.section-heading { text-align: center; margin-bottom: 44px; opacity: 0; animation: fadeUp 1s ease .1s forwards; }
.heading-ar  { font-size: 2.4rem; color: var(--gold); direction: rtl; text-shadow: 0 0 18px rgba(255,215,0,.35); }
.heading-fr  { font-size: .9rem; color: var(--muted); letter-spacing: 4px; text-transform: uppercase; margin-top: 6px; }
.heading-line { width: 80px; height: 1px; background: linear-gradient(to right, transparent, var(--gold), transparent); margin: 14px auto 0; }
.hadith-box  { border: 1px solid rgba(255,215,0,.25); border-left: 3px solid var(--gold); background: rgba(255,255,255,.03); padding: 30px 32px; max-width: 740px; margin: 0 auto 44px; opacity: 0; animation: fadeUp 1s ease .25s forwards; }
.hadith-ornament { font-size: 1rem; color: rgba(255,215,0,.4); margin-bottom: 14px; }
.hadith-ar   { font-size: 1.08rem; color: var(--gold); direction: rtl; text-align: right; line-height: 2.2; margin-bottom: 14px; }
.hadith-fr   { font-size: .97rem; color: var(--text-dim); line-height: 1.9; font-style: italic; margin-bottom: 14px; }
.hadith-source { font-size: .82rem; color: rgba(255,215,0,.6); text-align: center; padding-top: 10px; border-top: 1px solid rgba(255,215,0,.12); }
.cards-grid  { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 22px; max-width: 780px; margin: 0 auto 44px; opacity: 0; animation: fadeUp 1s ease .4s forwards; }
.card        { border: 1px solid rgba(255,215,0,.18); background: rgba(255,255,255,.03); padding: 32px 20px 26px; text-align: center; transition: transform .3s, border-color .3s, box-shadow .3s; }
.card:hover  { transform: translateY(-7px); border-color: rgba(255,215,0,.6); box-shadow: 0 16px 42px rgba(0,0,0,.4), 0 0 20px rgba(255,215,0,.08); }
.card-ar     { font-size: 1.4rem; color: var(--gold); direction: rtl; margin-bottom: 4px; }
.card-fr-title { font-size: .78rem; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 14px; }
.card-text   { font-size: .86rem; color: var(--text-dim); line-height: 1.8; }
.card-dalil  { font-size: .82rem; color: rgba(255,215,0,.6); direction: rtl; display: block; line-height: 1.8; margin-bottom: 4px; }
.card-source { font-size: .72rem; color: rgba(255,215,0,.4); display: block; margin-top: 4px; }
.gold { color: var(--gold); }
.ayah-box    { border: 1px solid rgba(255,215,0,.3); background: rgba(255,215,0,.03); padding: 32px; max-width: 640px; margin: 0 auto 44px; text-align: center; opacity: 0; animation: fadeUp 1s ease .55s forwards; }
.ayah-ar     { font-size: 1.9rem; color: var(--gold); direction: rtl; line-height: 1.8; margin-bottom: 14px; text-shadow: 0 0 16px rgba(255,215,0,.25); }
.ayah-fr     { font-size: .98rem; color: #c8d8ee; font-style: italic; margin-bottom: 10px; }
.ayah-ref    { font-size: .8rem; color: var(--muted); }
.buttons     { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; opacity: 0; animation: fadeUp 1s ease .7s forwards; }
.btn         { padding: 13px 34px; font-size: .92rem; border: 1.5px solid rgba(255,215,0,.55); background: transparent; color: var(--gold); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; letter-spacing: 1px; transition: background .3s, border-color .3s, color .3s, transform .25s; }
.btn:hover   { background: var(--gold); color: var(--bg2); border-color: var(--gold); transform: translateY(-3px); }
.btn-ar      { direction: rtl; font-size: .95rem; }
.btn-sep     { display: inline-block; width: 1px; height: 16px; background: rgba(255,215,0,.35); }

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.site-footer { border-top: 1px solid var(--border-dim); background: rgba(0,0,0,.4); margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 44px 28px 32px; display: flex; gap: 44px; flex-wrap: wrap; }
.footer-brand { flex: 1; min-width: 180px; }
.footer-basmala { font-size: 1.35rem; color: var(--gold); direction: rtl; margin-bottom: 6px; }
.footer-tagline { font-size: .72rem; color: var(--muted); font-style: italic; }
.footer-nav   { display: flex; gap: 36px; flex-wrap: wrap; }
.fn-col       { display: flex; flex-direction: column; gap: 9px; min-width: 120px; }
.fn-title     { font-size: .58rem; color: var(--gold-dim); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 4px; }
.fn-link      { font-size: .8rem; color: var(--muted); text-decoration: none; transition: color .2s; }
.fn-link:hover { color: var(--gold); }
.fn-soon      { font-size: .76rem; color: #334; font-style: italic; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 14px 28px; border-top: 1px solid var(--border-dim); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .74rem; color: rgba(255,215,0,.25); }
.footer-dot   { color: rgba(255,215,0,.15); }

/* ── Original footer (page 2 accueil) ────────────── */
.footer { width: 100%; margin-top: 60px; padding: 18px 24px; text-align: center; color: rgba(255,215,0,.3); font-size: .82rem; letter-spacing: 1px; border-top: 1px solid rgba(255,215,0,.08); display: flex; align-items: center; justify-content: center; gap: 12px; }
.footer-dot { color: rgba(255,215,0,.2); font-size: 1.2rem; }

/* ══════════════════════════════════════════════════════
   ZAKAT
══════════════════════════════════════════════════════ */
.page-zakat {
    background: radial-gradient(ellipse at 55% 30%, #162a1e 0%, #0a1810 50%, #080d1c 100%);
    min-height: 100vh; position: relative; padding-bottom: 0;
    justify-content: flex-start; align-items: stretch;
}
.crescent-small { width: 70px !important; height: 70px !important; top: 14px !important; left: 20px !important; }

/* Live bar */
.live-bar { position: sticky; top: var(--nav-h); z-index: 40; width: 100%; background: rgba(0,0,0,.55); border-bottom: 1px solid var(--border-dim); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; backdrop-filter: blur(6px); }
.live-cell { padding: 8px 14px; text-align: center; border-right: 1px solid var(--border-dim); min-width: 88px; }
.live-cell:last-child { border-right: none; }
.lc-lbl { font-size: .56rem; color: rgba(255,215,0,.4); letter-spacing: 2px; text-transform: uppercase; }
.lc-val { font-size: .95rem; color: var(--gold); font-weight: 600; margin-top: 2px; }
.lc-sub { font-size: .56rem; color: var(--muted); }
.live-dot { display: inline-block; width: 5px; height: 5px; background: var(--green); border-radius: 50%; margin-right: 3px; animation: blink 2s infinite; vertical-align: middle; }

/* Zakat wrap */
.zakat-wrap { position: relative; z-index: 10; width: 92%; max-width: 860px; margin: 0 auto; padding: 36px 0 60px; }

/* Panels */
.z-panel { border: 1px solid var(--border-dim); background: rgba(255,255,255,.025); margin-bottom: 14px; }
.z-panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border-dim); cursor: pointer; user-select: none; transition: background .25s; }
.z-panel-head:hover { background: rgba(255,215,0,.03); }
.z-panel-ar  { font-size: 1rem; color: var(--gold); direction: rtl; flex: 1; }
.z-panel-fr  { font-size: .62rem; color: var(--muted); letter-spacing: 2.5px; text-transform: uppercase; }
.z-chev      { color: rgba(255,215,0,.3); font-size: .65rem; transition: transform .25s; }
.z-chev.open { transform: rotate(0deg); }
.z-chev:not(.open) { transform: rotate(180deg); }
.z-panel-body { padding: 18px; display: none; }
.z-panel-body.open { display: block; }

/* Champs Zakat */
.z-field  { display: flex; flex-direction: column; gap: 4px; }
.z-label  { font-size: .56rem; color: var(--muted); letter-spacing: 2.5px; text-transform: uppercase; }
.z-input, .z-select { width: 100%; padding: 9px 11px; background: rgba(0,0,0,.4); border: 1px solid var(--border-dim); color: var(--text); font-size: .88rem; outline: none; transition: border-color .2s; font-family: var(--font); -webkit-appearance: none; }
.z-input:focus, .z-select:focus { border-color: var(--border); }
.z-input::placeholder { color: #3a5060; }
.z-select option { background: var(--bg2); }
.z-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* Nissab opts */
.nissab-opts { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 5px; }
.n-opt { border: 1px solid var(--border-dim); background: rgba(0,0,0,.2); padding: 12px 8px; text-align: center; cursor: pointer; transition: all .2s; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.n-opt:hover  { border-color: var(--border); }
.n-opt.active { border-color: rgba(255,215,0,.6); background: var(--gold-ghost); }
.n-ar { font-size: .82rem; color: var(--gold); direction: rtl; }
.n-fr { font-size: .62rem; color: var(--muted); }
.n-icon-css { display: block; width: 22px; height: 22px; margin-bottom: 2px; }
.n-balance { border: 1.5px solid rgba(255,215,0,.5); border-radius: 50%; position: relative; }
.n-balance::after { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: rgba(255,215,0,.5); transform: translateY(-50%); }
.n-gold   { background: linear-gradient(135deg,#FFD700,#B8860B); clip-path: polygon(50% 0%,100% 50%,50% 100%,0% 50%); }
.n-silver { background: linear-gradient(135deg,#C0C0C0,#808080); clip-path: polygon(50% 0%,100% 50%,50% 100%,0% 50%); }

/* Holdings */
.z-lines { display: flex; flex-direction: column; gap: 8px; }
.z-line { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; padding: 12px; background: rgba(0,0,0,.2); border: 1px solid rgba(255,215,0,.04); animation: fadeUp .2s ease; }
.z-del { background: transparent; border: 1px solid rgba(224,80,80,.2); color: rgba(224,80,80,.5); width: 30px; height: 30px; font-size: 1.1rem; cursor: pointer; transition: all .15s; }
.z-del:hover { border-color: var(--red); color: var(--red); }

/* Résultat Zakat */
.z-res-cell { padding: 10px 12px; background: rgba(0,0,0,.22); border: 1px solid var(--border-dim); }
.z-res-lbl  { font-size: .58rem; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
.z-res-val  { font-size: .86rem; color: #e8e0cc; font-family: var(--mono); }
.z-total-row { display: flex; align-items: center; justify-content: space-between; padding: 18px; background: var(--gold-ghost); border: 1px solid var(--border-dim); flex-wrap: wrap; gap: 14px; }
.z-amount-big { font-size: 1.9rem; color: var(--gold); font-family: var(--mono); font-weight: bold; text-shadow: 0 0 20px rgba(255,215,0,.3); }
.breakdown-line { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; border-bottom: 1px solid var(--border-dim); font-size: .84rem; }
.breakdown-line:last-child { border: none; }
.bl-lbl { color: var(--muted); }
.bl-val { color: var(--gold); font-family: var(--mono); }
.breakdown-sub .bl-lbl, .breakdown-sub .bl-val { font-weight: 600; font-size: .9rem; }
.breakdown-total { border-top: 1px solid var(--border) !important; margin-top: 6px; padding-top: 8px !important; }
.badge-yes { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: .76rem; border: 1px solid rgba(76,175,125,.4); color: var(--green); background: rgba(76,175,125,.07); }
.badge-no  { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: .76rem; border: 1px solid rgba(224,80,80,.35); color: var(--red); background: rgba(224,80,80,.06); }

/* ══════════════════════════════════════════════════════
   BUDGET
══════════════════════════════════════════════════════ */
.page-budget {
    background: radial-gradient(ellipse at 50% 20%, #0e1f3a 0%, #080d1c 70%);
    min-height: 100vh; position: relative; padding-bottom: 0;
    justify-content: flex-start; align-items: stretch;
}

/* En-tête */
.budget-actions { position: relative; z-index: 10; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; max-width: 1200px; margin: 0 auto; padding: 24px 28px 0; }
.budget-title-ar { font-size: 1.9rem; color: var(--gold); direction: rtl; animation: glow 3.5s ease-in-out infinite; }
.budget-title-fr { font-size: .62rem; color: var(--muted); letter-spacing: 5px; text-transform: uppercase; margin-top: 3px; }
.ba-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ba-btn   { padding: 8px 14px; font-size: .72rem; letter-spacing: 2px; }
.ba-pdf   { border-color: rgba(224,85,101,.4) !important; color: #e05565 !important; }
.ba-pdf:hover   { background: #e05565 !important; color: #fff !important; border-color: #e05565 !important; }
.ba-xlsx  { border-color: rgba(62,207,122,.4) !important; color: #3ecf7a !important; }
.ba-xlsx:hover  { background: #3ecf7a !important; color: var(--bg2) !important; border-color: #3ecf7a !important; }
.ba-csv   { border-color: rgba(91,163,232,.4) !important; color: #5ba3e8 !important; }
.ba-csv:hover   { background: #5ba3e8 !important; color: #fff !important; border-color: #5ba3e8 !important; }
.ba-json  { border-color: rgba(155,125,232,.4) !important; color: #9b7de8 !important; }
.ba-json:hover  { background: #9b7de8 !important; color: #fff !important; border-color: #9b7de8 !important; }

/* Layout */
.budget-layout { position: relative; z-index: 10; display: grid; grid-template-columns: 1fr 360px; max-width: 1200px; margin: 0 auto; min-height: calc(100vh - 160px); }
.budget-form   { border-right: 1px solid var(--border-dim); display: flex; flex-direction: column; }
.budget-result { position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow-y: auto; background: rgba(0,0,0,.25); border-left: 1px solid var(--border-dim); display: flex; flex-direction: column; }

/* Onglets budget */
.budget-tabs { display: flex; background: rgba(0,0,0,.4); border-bottom: 1px solid var(--border-dim); overflow-x: auto; scrollbar-width: none; position: sticky; top: var(--nav-h); z-index: 10; }
.budget-tabs::-webkit-scrollbar { display: none; }
.btab { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 0 14px; height: 44px; white-space: nowrap; background: transparent; border: none; border-bottom: 2px solid transparent; color: var(--muted); font-size: .66rem; transition: all .2s; cursor: pointer; font-family: inherit; flex-shrink: 0; }
.btab:hover  { color: var(--text-dim); border-bottom-color: rgba(255,215,0,.2); }
.btab.active { color: var(--gold); border-bottom-color: var(--gold); }
.btab-ar     { font-size: .68rem; color: rgba(255,215,0,.6); direction: rtl; }
.btab.active .btab-ar { color: var(--gold); }
.btab-panel  { display: none; padding: 20px 24px 80px; flex-direction: column; gap: 16px; }
.btab-panel.active { display: flex; }

/* Blocs budget */
.b-bloc      { display: flex; flex-direction: column; gap: 0; }
.b-bloc-head { display: flex; align-items: center; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--border-dim); margin-bottom: 4px; }
.bh-ar       { font-size: .86rem; color: var(--gold); direction: rtl; }
.bh-fr       { font-size: .56rem; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; }
.b-badge     { margin-left: auto; font-family: var(--mono); font-size: .68rem; color: var(--gold); border: 1px solid var(--border-dim); padding: 2px 7px; background: var(--gold-ghost); }

/* Champs budget */
.b-field  { display: flex; flex-direction: column; gap: 4px; }
.b-label  { font-size: .54rem; color: var(--muted); letter-spacing: 3px; text-transform: uppercase; }
.b-input, .b-select { width: 100%; padding: 8px 10px; background: rgba(0,0,0,.38); border: 1px solid var(--border-dim); color: var(--text); font-size: .86rem; outline: none; transition: border-color .2s; -webkit-appearance: none; font-family: var(--font); }
.b-input:focus, .b-select:focus { border-color: var(--border); }
.b-input::placeholder { color: #3a5060; opacity: 1; }
.b-select option { background: var(--bg2); }
.b-inp-wrap { position: relative; }
.b-inp-wrap .b-input { padding-right: 44px; }
.b-inp-badge { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: .62rem; color: var(--gold-dim); pointer-events: none; }
.b-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.b-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* Lignes budget */
.b-lines { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.b-line  { display: grid; gap: 6px; align-items: end; padding: 8px 10px; background: rgba(0,0,0,.2); border: 1px solid rgba(255,215,0,.04); transition: border-color .2s; animation: fadeUp .2s ease; }
.b-line:hover { border-color: var(--border-dim); }
.b-line-dep   { grid-template-columns: 20px 120px 1fr 90px 90px 28px; }
.b-line-abo   { display: flex; flex-direction: column; gap: 7px; }
.b-line-abo-top { display: grid; grid-template-columns: 1fr 95px 85px 28px; gap: 7px; align-items: end; }
.b-line-eco   { grid-template-columns: 1fr 100px 28px; }
.b-drag-handle { display: flex; align-items: center; justify-content: center; cursor: grab; color: #334; font-size: .85rem; user-select: none; align-self: flex-end; padding-bottom: 4px; }
.b-drag-handle:active { cursor: grabbing; color: var(--gold); }
.b-del { background: transparent; border: 1px solid rgba(224,80,80,.15); color: rgba(224,80,80,.35); width: 28px; height: 28px; font-size: .95rem; cursor: pointer; transition: all .15s; display: flex; align-items: center; justify-content: center; align-self: flex-end; }
.b-del:hover { border-color: var(--red); color: var(--red); }
.b-add-btn { align-self: flex-start; padding: 7px 14px; font-size: .68rem; letter-spacing: 2px; margin-top: 4px; }

/* Mois selector */
.b-mois-grid { display: flex; flex-wrap: wrap; gap: 3px; }
.b-mois-btn  { padding: 3px 6px; font-size: .58rem; border: 1px solid rgba(255,255,255,.07); background: transparent; color: var(--muted); cursor: pointer; transition: all .15s; }
.b-mois-btn.on { background: var(--gold-ghost); border-color: var(--border); color: var(--gold); }
.b-abo-calc  { font-size: .62rem; color: var(--purple); font-family: var(--mono); margin-top: 3px; }

/* Aides budget */
.b-aide-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: rgba(76,175,125,.025); border: 1px solid rgba(76,175,125,.07); transition: border-color .2s; }
.b-aide-row:hover { border-color: rgba(76,175,125,.18); }

/* Total bars */
.b-total-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; font-size: .76rem; }
.b-bar-purple { background: rgba(155,125,232,.05); border: 1px solid rgba(155,125,232,.15); }
.b-bar-green  { background: rgba(76,175,125,.04);  border: 1px solid rgba(76,175,125,.15); }
.b-bar-gold   { background: var(--gold-ghost);      border: 1px solid var(--border-dim); }

/* Zone import */
.b-import-zone { border: 1px dashed var(--border-dim); background: var(--gold-ghost); padding: 28px; text-align: center; cursor: pointer; transition: all .2s; }
.b-import-zone:hover, .b-import-zone.drag-over { border-color: var(--border); background: rgba(255,215,0,.08); }

/* Résultats budget */
.br-solde     { padding: 18px 20px 12px; border-bottom: 1px solid var(--border-dim); }
.br-eye       { font-size: .5rem; color: var(--muted); letter-spacing: 4px; text-transform: uppercase; margin-bottom: 4px; }
.br-amount    { font-family: var(--mono); font-size: 1.85rem; font-weight: 700; transition: color .35s; }
.br-amount.pos  { color: var(--green); text-shadow: 0 0 16px rgba(76,175,125,.25); }
.br-amount.neg  { color: var(--red);   text-shadow: 0 0 16px rgba(224,80,80,.25); }
.br-amount.zero { color: var(--text-dim); }
.br-sub       { font-size: .64rem; color: var(--muted); margin-top: 4px; }
.br-rev       { padding: 8px 20px; border-bottom: 1px solid var(--border-dim); display: flex; gap: 10px; flex-wrap: wrap; }
.br-rev-cell  { flex: 1; min-width: 80px; }
.br-rev-lbl   { font-size: .5rem; color: var(--muted); letter-spacing: 2.5px; text-transform: uppercase; }
.br-rev-val   { font-family: var(--mono); font-size: .84rem; margin-top: 3px; }
.br-chart     { padding: 14px 20px 8px; border-bottom: 1px solid var(--border-dim); }
.br-chart-title { font-size: .5rem; color: var(--muted); letter-spacing: 4px; text-transform: uppercase; margin-bottom: 8px; }
.br-legend    { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; }
.br-leg-item  { display: flex; align-items: center; gap: 7px; font-size: .68rem; color: var(--text-dim); }
.br-leg-dot   { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.br-leg-pct   { margin-left: auto; font-family: var(--mono); font-size: .64rem; color: var(--muted); }
.br-leg-val   { font-family: var(--mono); font-size: .66rem; color: var(--gold-dim); }
.br-metrics   { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border-dim); }
.br-m         { padding: 9px 12px; border-right: 1px solid var(--border-dim); border-bottom: 1px solid var(--border-dim); }
.br-m:nth-child(even) { border-right: none; }
.br-m-lbl     { font-size: .5rem; color: var(--muted); letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 4px; }
.br-m-val     { font-family: var(--mono); font-size: .83rem; color: var(--text); }

/* Ratio 50/30/20 */
.br-ratio        { padding: 13px 20px 18px; }
.br-ratio-title  { font-size: .5rem; color: var(--muted); letter-spacing: 4px; text-transform: uppercase; margin-bottom: 12px; }
.br-rit          { margin-bottom: 10px; }
.br-rit-head     { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.br-rit-lbl      { font-size: .68rem; color: var(--text-dim); }
.br-rit-pct      { font-family: var(--mono); font-size: .72rem; font-weight: 700; }
.br-rit-pct.ok   { color: var(--green); }
.br-rit-pct.warn { color: var(--orange); }
.br-rit-pct.over { color: var(--red); }
.br-bar-bg       { height: 5px; background: rgba(255,255,255,.04); position: relative; }
.br-bar-fill     { height: 100%; transition: width .5s cubic-bezier(.4,0,.2,1); min-width: 1px; }
.br-f-need       { background: linear-gradient(to right,#5ba3e8,#7c6ae8); }
.br-f-want       { background: linear-gradient(to right,#e84caf,#e87c4c); }
.br-f-save       { background: linear-gradient(to right,#3ecf7a,#4ce8c8); }
.br-bar-mark     { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: rgba(255,215,0,.4); }
.br-rit-ideal    { font-size: .55rem; color: var(--muted); margin-top: 2px; }
.br-tip          { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--border-dim); color: var(--gold-dim); font-size: .55rem; cursor: pointer; vertical-align: middle; margin-left: 4px; transition: all .18s; }
.br-tip:hover    { border-color: var(--gold); color: var(--gold); background: var(--gold-ghost); }
.br-tip-content  { background: rgba(8,13,28,.97); border: 1px solid var(--border-dim); padding: 10px 12px; margin-top: 6px; font-size: .7rem; color: var(--text-dim); animation: fadeUp .15s ease; }
.br-tip-row      { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.03); }
.br-tip-row:last-child { border: none; }
.br-tip-lbl      { color: var(--muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-tip-val      { font-family: var(--mono); color: var(--gold); white-space: nowrap; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 860px) {
    .nav-links { display: none; }
    .nav-burger { display: flex; }
    .khutba-hajah { max-width: 90vw; right: 8px; }
}
@media (max-width: 960px) {
    .budget-layout { grid-template-columns: 1fr; }
    .budget-result { position: static; height: auto; }
    .btab-panel { padding: 18px 16px 60px; }
}
@media (max-width: 768px) {
    .basmala { font-size: 1.9rem; }
    .welcome-ar { font-size: 1.8rem; }
    h1 { font-size: 1.4rem; }
    .deco-frame { width: 260px; }
    .crescent-wrap { width: 80px; height: 80px; top: 16px; left: 16px; }
    .heading-ar { font-size: 1.8rem; }
    .ayah-ar { font-size: 1.4rem; }
    .cards-grid { grid-template-columns: 1fr; max-width: 340px; }
    .hadith-box { padding: 20px 18px; }
    .z-grid2, .nissab-opts { grid-template-columns: 1fr; }
    .live-cell { min-width: 75px; padding: 6px 8px; }
    .b-grid2, .b-grid3 { grid-template-columns: 1fr; }
    .b-line-dep { grid-template-columns: 20px 1fr 80px 28px; }
    .budget-actions { padding: 18px 16px 0; }
    .footer-inner { gap: 28px; padding: 32px 18px 24px; }
}
@media (max-width: 480px) {
    .nav-inner { padding: 0 14px; }
    .nav-brand-fr { display: none; }
    .ba-btn { padding: 7px 10px; font-size: .66rem; }
}
