/* Palette reprise de l'app (lib/theme.dart : DawamColors). */
:root {
  --bg: #0a1e24;
  --bg2: #0c242b;
  --surface: #123840;
  --surface2: #0f3038;
  --gold: #d8b863;
  --gold-soft: #e7ce92;
  --green: #4fb49a;
  --green-deep: #2e7d6e;
  --cream: #f3ecdd;
  --muted: #89a2a4;
  --line: rgba(216, 184, 99, 0.16);
  --max: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Léger halo doré en fond, comme le halo derrière le croissant du logo. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 40% at 78% 8%, rgba(216, 184, 99, 0.10), transparent 60%),
    radial-gradient(50% 40% at 10% 30%, rgba(79, 180, 154, 0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .brand-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }

.arabic { font-family: 'Amiri', serif; direction: rtl; }

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 30, 36, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 34px; height: 34px; }
.brand-name { font-size: 24px; letter-spacing: 0.5px; color: var(--gold-soft); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 14px; transition: color 0.2s; }
.nav-links a:hover { color: var(--gold-soft); }
.nav-cta {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--gold-soft) !important;
  font-weight: 600;
  background: rgba(216, 184, 99, 0.08);
}
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

/* Sélecteur de langue */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(216, 184, 99, 0.08);
  border: 1px solid var(--line); border-radius: 100px;
  color: var(--gold-soft); font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 14px; cursor: pointer; transition: border-color 0.2s;
}
.lang-btn:hover { border-color: var(--gold); }
.lang-btn svg { width: 16px; height: 16px; stroke: var(--gold-soft); fill: none; stroke-width: 1.5; }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  list-style: none; min-width: 178px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px; z-index: 30;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu button {
  width: 100%; text-align: start;
  background: none; border: 0; border-radius: 9px;
  color: var(--cream); font-family: inherit; font-size: 14px;
  padding: 9px 12px; cursor: pointer; transition: background 0.15s;
}
.lang-menu button:hover { background: var(--surface); }
.lang-menu button[aria-current="true"] { color: var(--gold-soft); background: rgba(216, 184, 99, 0.10); }
@media (max-width: 720px) { .lang-menu { inset-inline-end: 0; } }

/* Masque la traduction du verset quand elle est vide (langue arabe). */
.verse-tr:empty { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 88px 0 72px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 6px 14px;
  margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 6vw, 60px); }
.hero h1 .accent { color: var(--gold-soft); }
.hero .lead {
  color: var(--muted);
  font-size: 18px;
  margin: 22px 0 30px;
  max-width: 520px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #14251b;
  box-shadow: 0 10px 30px rgba(216, 184, 99, 0.22);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

.hero-visual { position: relative; display: flex; justify-content: center; }

/* Cadre de téléphone. */
.phone {
  position: relative;
  width: 270px;
  aspect-ratio: 1284 / 2778;
  border-radius: 40px;
  padding: 10px;
  background: linear-gradient(160deg, #1c3a42, #0a1a20);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
}
.phone::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 7px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; display: block; }

.hero-visual .phone.back {
  position: absolute;
  transform: rotate(-8deg) translate(-58px, 26px) scale(0.9);
  filter: brightness(0.8);
  z-index: 0;
}
.hero-visual .phone.front { z-index: 1; transform: rotate(3deg); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 56px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { margin-top: 40px; }
  .hero-visual .phone.back { display: none; }
  .hero-visual .phone.front { transform: none; }
}

/* ---------- Sections ---------- */
section { position: relative; z-index: 1; }
.section-pad { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .tag {
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}
.section-head h2 { font-size: clamp(30px, 4.5vw, 44px); margin: 12px 0 14px; }
.section-head p { color: var(--muted); font-size: 17px; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: linear-gradient(180deg, rgba(216, 184, 99, 0.05), var(--surface));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px;
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(216, 184, 99, 0.4); }
.card .icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(216, 184, 99, 0.12);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.card .icon svg { width: 22px; height: 22px; stroke: var(--gold-soft); fill: none; stroke-width: 1.6; }
.card h3 { font-size: 22px; margin-bottom: 8px; color: var(--cream); }
.card p { color: var(--muted); font-size: 14.5px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Bandeau Coran */
.quran {
  background:
    radial-gradient(60% 100% at 85% 0%, rgba(79, 180, 154, 0.10), transparent 60%),
    var(--bg2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.quran-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.quran .verse {
  font-family: 'Amiri', serif;
  direction: rtl;
  font-size: 30px;
  line-height: 2;
  color: var(--gold-soft);
  margin-bottom: 14px;
}
.quran .verse-tr { color: var(--muted); font-style: italic; margin-bottom: 6px; }
.quran .verse-ref { color: var(--gold); font-weight: 600; font-size: 13px; letter-spacing: 0.5px; }
.quran h2 { font-size: clamp(28px, 4vw, 40px); margin: 22px 0 14px; }
.quran p { color: var(--muted); font-size: 16px; max-width: 460px; }
@media (max-width: 860px) { .quran-grid { grid-template-columns: 1fr; text-align: center; } .quran p { margin: 0 auto; } .quran .verse { direction: rtl; } }

/* Galerie captures */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x mandatory; }
.gallery .phone { flex: 0 0 auto; width: 240px; scroll-snap-align: center; }
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: var(--line); border-radius: 100px; }

/* Confidentialité / Support */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px 30px;
}
.panel h3 { font-size: 24px; margin-bottom: 10px; }
.panel p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.panel a.inline { color: var(--gold-soft); font-weight: 600; border-bottom: 1px solid var(--line); }
.panel a.inline:hover { border-color: var(--gold); }
.checklist { list-style: none; display: grid; gap: 10px; margin-bottom: 6px; }
.checklist li { display: flex; gap: 10px; color: var(--cream); font-size: 14.5px; align-items: flex-start; }
.checklist li svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; stroke: var(--green); fill: none; stroke-width: 2; }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }

/* Langues */
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.lang-chip {
  padding: 8px 18px; border: 1px solid var(--line); border-radius: 100px;
  color: var(--gold-soft); font-size: 14px; background: rgba(216, 184, 99, 0.05);
}

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 20px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot .brand-name { font-size: 20px; }
.foot-links { display: flex; gap: 22px; }
.foot-links a { color: var(--muted); font-size: 14px; }
.foot-links a:hover { color: var(--gold-soft); }
.copyright { color: var(--muted); font-size: 13px; width: 100%; text-align: center; margin-top: 20px; }

/* Pages secondaires (privacy / support) */
.doc { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 60px 24px 80px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.doc h2 { font-size: 26px; margin: 34px 0 12px; color: var(--gold-soft); }
.doc p, .doc li { color: var(--cream); opacity: 0.9; margin-bottom: 12px; }
.doc ul { padding-left: 22px; }
.doc a { color: var(--gold-soft); border-bottom: 1px solid var(--line); }
.back-home { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-bottom: 30px; }
.back-home:hover { color: var(--gold-soft); }
.back-home::before { content: '\2190'; } /* flèche gauche, inversée en RTL */

/* ---------- Droite à gauche (arabe, ourdou) ---------- */
[dir="rtl"] body,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 {
  font-family: 'Noto Naskh Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
}
/* La marque et les puces de langue restent en latin. */
[dir="rtl"] .brand-name { font-family: 'Cormorant Garamond', serif; }
[dir="rtl"] .eyebrow, [dir="rtl"] .section-head .tag, [dir="rtl"] .verse-ref { letter-spacing: 0; }
[dir="rtl"] .back-home::before { content: '\2192'; } /* flèche droite */
[dir="rtl"] .doc ul { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .hero-visual .phone.front { transform: rotate(-3deg); }
[dir="rtl"] .hero-visual .phone.back { transform: rotate(8deg) translate(58px, 26px) scale(0.9); }
/* Le verset coranique reste toujours en RTL, quelle que soit la langue. */
.verse { direction: rtl; }
