/* ==========================================================================
   Barakah Capital — thème « finance islamique »
   Palette : émeraude profond, or, ivoire. Motifs géométriques (étoile à 8).
   ========================================================================== */

:root {
  --emerald: #0e4d3a;
  --emerald-deep: #083326;
  --emerald-soft: #e7f1ec;
  --gold: #c9a227;
  --gold-soft: #f5ecd4;
  --cream: #faf8f2;
  --ink: #1c2a24;
  --muted: #5c6b64;
  --line: #e2e8e1;
  --white: #fff;
  --danger-bg: #fbe9e7;
  --danger: #b3402c;
  --ok-bg: #e6f3ec;
  --ok: #0e6b47;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(14, 61, 46, 0.08);
  --font: 'Segoe UI', 'Helvetica Neue', Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, rgba(201, 162, 39, 0.05), transparent 30%),
    radial-gradient(circle at 85% 30%, rgba(14, 77, 58, 0.05), transparent 28%),
    var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.02em; }
h2 { font-size: 1.4rem; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8rem; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 760px; }
.center { text-align: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.row-end { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }

.kicker {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .74rem;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 .4rem;
}
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; font-size: 1.15rem; font-weight: 700; }

/* ── Bandeau supérieur ──────────────────────────────────────────────────── */
.topbar {
  background: var(--emerald-deep);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 62px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; flex: 0 0 auto;
  position: relative;
  transform: rotate(-45deg);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  box-shadow: inset 5px 3px 0 0 var(--gold);
  transform: rotate(20deg);
}
.brand-mark::after {
  content: "★";
  position: absolute;
  bottom: 14px; left: 13px;
  font-size: 9px;
  color: var(--gold);
  line-height: 1;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link {
  color: #dbe7e1; padding: 7px 11px; border-radius: 8px; font-size: .92rem; text-decoration: none;
}
.nav-link:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.08); }
.nav-link.active { color: var(--gold); font-weight: 600; background: rgba(201,162,39,.14); }
.top-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.beta-bar {
  background: var(--gold); color: #2b2003;
  font-size: .8rem; padding: 8px 0; font-weight: 600;
}
.beta-bar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.btn-gold {
  background: var(--emerald-deep); color: #fff; border-color: var(--emerald-deep);
}
.btn-gold:hover { background: #0a2e22; }
.main { min-height: 60vh; padding: 40px 0 60px; }

/* ── Boutons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; border: 1px solid transparent; border-radius: 9px;
  padding: 9px 16px; font-size: .92rem; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: background .15s, transform .05s; text-align: center;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 6px 11px; font-size: .82rem; }
.btn-primary { background: var(--emerald); color: #fff; }
.btn-primary:hover { background: var(--emerald-deep); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--emerald); border-color: var(--emerald); }
.btn-ghost:hover { background: var(--emerald-soft); text-decoration: none; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); text-decoration: none; }
button.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(201,162,39,.16), transparent 40%),
    linear-gradient(160deg, var(--emerald-deep), var(--emerald));
  color: #fff; padding: 74px 0 84px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .10; pointer-events: none;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.5) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.5) 0 1px, transparent 1px 18px);
}
.hero-inner { position: relative; }
.hero .kicker { color: var(--gold-soft); }
.hero-sub { font-size: 1.15rem; max-width: 58ch; color: #dcece4; }
.hero-cta { display: flex; gap: 12px; margin: 26px 0; flex-wrap: wrap; }
.hero-cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.hero-cta .btn-ghost:hover { background: rgba(255,255,255,.12); }
.hero-points { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.hp { font-size: .88rem; color: #cfe3d9; }

/* ── Grilles & cartes ───────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card-link { display: block; color: inherit; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.card-link:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(14,61,46,.14); text-decoration: none; }
.card-link h3 { color: var(--ink); }
.card h2 { font-size: 1.15rem; }
.asset-icon { font-size: 1.6rem; display: inline-block; margin-bottom: 6px; }
.stat p { font-size: 1.5rem; margin: 2px 0 0; }
.principle { border-top: 3px solid var(--gold); }
.risk-item { border-left: 3px solid var(--danger); }
.risk-item h3 { color: var(--danger); font-size: .98rem; }

.detail-grid { grid-template-columns: 1fr 340px; align-items: start; gap: 28px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.col-side .card.sticky { position: sticky; top: 84px; }
.col-side .card { box-shadow: var(--shadow); }

/* ── Bandes / sections ──────────────────────────────────────────────────── */
.section { padding: 26px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.link-arrow { font-weight: 600; }
.band-values { background: var(--emerald-soft); padding: 46px 0; }
.value h3 { color: var(--emerald-deep); }
.band-islam {
  background: linear-gradient(150deg, var(--emerald-deep), var(--emerald));
  color: #fff; padding: 52px 0;
}
.band-islam .kicker { color: var(--gold-soft); }
.islam-item { border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 18px; }
.islam-item h4 { color: #ffe9b0; }
.islam-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #2b2003;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 8px;
}

/* ── Étapes (process) ───────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.steps.vert { grid-template-columns: 1fr; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); }
.steps:not(.vert) .step { flex-direction: column; }
.step-n {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--emerald); color: #fff; display: inline-flex; align-items: center;
  justify-content: center; font-size: .8rem; font-weight: 700;
}
.step h4 { margin-bottom: 2px; }

/* ── Tags ───────────────────────────────────────────────────────────────── */
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 3px 9px; border-radius: 20px;
  background: #eef1ee; color: var(--muted);
}
.tag-green { background: var(--emerald-soft); color: var(--emerald-deep); }
.tag-amber { background: var(--gold-soft); color: #6d5203; }

/* ── Filtres / métriques ────────────────────────────────────────────────── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.filter { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--line); font-size: .88rem; }
.filter:hover { border-color: var(--emerald); text-decoration: none; }
.filter.active { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.meter { height: 8px; background: #edf0ec; border-radius: 20px; overflow: hidden; margin: 12px 0; }
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--emerald), #1f9c72); border-radius: 20px; }

/* ── Formulaires ────────────────────────────────────────────────────────── */
.form-card { max-width: 520px; margin: 0 auto; display: grid; gap: 14px; }
.form-group { display: grid; gap: 4px; }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 4px; color: var(--ink); }
label.checkbox { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: .85rem; color: var(--muted); }
label.checkbox input { margin-top: 3px; }
input[type=email], input[type=password], input[type=text], input[type=tel], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: .95rem; background: var(--white); font-family: inherit; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.field-error { color: var(--danger); font-size: .82rem; margin: 2px 0 0; min-height: 1.1em; display: none; }
.field-error.show { display: block; }
.form-status { min-height: 1.4em; margin-top: 4px; font-size: .9rem; }
.form-status.success { color: var(--ok); }
.form-status.error { color: var(--danger); }
.select-sm { width: auto; padding: 5px 8px; font-size: .82rem; }

/* ── Encadrés ───────────────────────────────────────────────────────────── */
.riskbox {
  background: var(--danger-bg); border: 1px solid #ecd3cd; border-radius: var(--radius);
  padding: 22px; margin-top: 10px;
}
.riskbox strong { color: var(--danger); }
.sharia-box {
  background: var(--ok-bg); border: 1px solid #c9e3d4; border-radius: var(--radius);
  padding: 20px; margin: 10px 0;
}
.sharia-box strong { color: var(--ok); }
.checklist { list-style: none; padding: 0; margin: 10px 0; }
.checklist li { padding-left: 24px; position: relative; margin-bottom: 8px; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700;
}
.checklist.muted li::before { color: var(--muted); }

/* ── Tableaux ───────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--emerald-soft); color: var(--emerald-deep); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.table tr:last-child td { border-bottom: none; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 10px; }
.faq details, details.faq {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px;
}
.faq summary { cursor: pointer; font-weight: 600; }
.faq summary::-webkit-details-marker { color: var(--gold); }

/* ── Alertes / toasts ───────────────────────────────────────────────────── */
.alert { padding: 12px 14px; border-radius: 9px; font-size: .88rem; margin: 10px 0; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #c9e3d4; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #ecd3cd; }
.hidden { display: none; }
.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 100; max-width: 340px;
  background: var(--emerald-deep); color: #fff; padding: 13px 18px; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: .9rem; opacity: 0;
  transform: translateY(8px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--danger); }

/* ── Divers ─────────────────────────────────────────────────────────────── */
.breadcrumb { font-size: .85rem; margin: 0 0 14px; }
.breadcrumb a { color: var(--muted); }
.summary-card { border-left: 4px solid var(--gold); }
.legal-section h2 { font-size: 1.08rem; color: var(--emerald-deep); margin-top: 18px; }
.legal-section p { color: #34443d; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { background: var(--emerald-deep); color: #cfe0d7; margin-top: 60px; padding: 46px 0 26px; }
.footer .brand { color: #fff; margin-bottom: 8px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr; gap: 26px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { color: #fff; font-size: .9rem; margin: 0 0 10px; }
.footer-col a { display: block; color: #bcd4c9; font-size: .86rem; padding: 3px 0; }
.footer-col a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 30px; padding-top: 20px; }
.riskline { color: #ffd9a0; font-size: .84rem; }
