/* DînApp — site vitrine
   Charte reprise de mobile/src/theme/theme.ts :
   vert profond (spiritualité) + or discret (savoir/lumière) */

:root {
  --primary: #0B3D2E;
  --primary-light: #145C43;
  --accent: #C9A24B;
  --accent-light: #E0B84A;
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #5C5C5C;
  --text-on-primary: #FFFFFF;
  --text-muted-on-primary: #D9E8DF;
  --border: #E5E1D8;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --max-width: 1120px;
  --shadow: 0 20px 45px -20px rgba(11, 61, 46, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; color: var(--text-secondary); }

a { color: inherit; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 240, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand span {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}
.nav-links a:hover { color: var(--primary); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--text-on-primary) !important;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--primary-light); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-top: 1px solid transparent;
}
.mobile-menu.open {
  max-height: 320px;
  border-top-color: var(--border);
}
.mobile-menu a {
  padding: 16px 24px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:hover { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--primary) 0%, #0d3527 60%, #0a2e21 100%);
  color: var(--text-on-primary);
  padding-block: 84px 0;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-eyebrow {
  color: var(--accent-light);
}
.hero-eyebrow::before { background: var(--accent-light); }

.hero h1 {
  color: #fff;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.08;
  margin-top: 18px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-light);
}
.hero p.lead {
  color: var(--text-muted-on-primary);
  font-size: 18px;
  max-width: 46ch;
  margin-top: 20px;
}

/* ---------- Store badges ---------- */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
}
.store-badges.center { justify-content: center; }
.store-badge {
  display: inline-flex;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.store-badge img { display: block; height: 53px; width: auto; }
a.store-badge:hover { transform: translateY(-2px); }
.store-badge.disabled {
  position: relative;
  filter: grayscale(1);
  opacity: 0.55;
  cursor: default;
}
.badge-soon {
  position: absolute;
  top: -10px;
  right: -10px;
  font-style: normal;
  font-family: 'Karla', sans-serif;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #21180a;
  background: var(--accent);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  filter: none;
  opacity: 1;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,0.35);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-gold {
  background: var(--accent);
  color: #21180a;
}
.btn-gold:hover { background: var(--accent-light); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: #fff;
}
.btn-outline:hover { border-color: #fff; }
.btn-outline.disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}
.hero-trust {
  margin-top: 26px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted-on-primary);
}
.hero-trust strong { color: #fff; }

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-art .frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 960 / 2087; /* matches the real screenshots so each held screen isn't cropped */
  border-radius: 38px;
  border: 6px solid rgba(255,255,255,0.14);
  background: var(--primary-light);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.screen-scroll {
  display: flex;
  flex-direction: column;
}
.hero-art .frame img {
  width: 100%;
  height: auto;
  display: block;
  flex-shrink: 0;
}
html.js .screen-scroll {
  animation: screenScroll 22s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
/* 5 stacked screenshots (4 unique + 1 repeat of the first for a seamless
   loop) inside .screen-scroll — translateY percentages resolve against the
   wrapper's OWN total height (5 images), so one image = 100%/5 = 20%. */
@keyframes screenScroll {
  0%, 20%   { transform: translateY(0); }
  25%, 45%  { transform: translateY(-20%); }
  50%, 70%  { transform: translateY(-40%); }
  75%, 95%  { transform: translateY(-60%); }
  100%      { transform: translateY(-80%); }
}
@media (prefers-reduced-motion: reduce) {
  html.js .screen-scroll { animation: none; }
}
.hero-art .glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 50% 30%, rgba(201,162,75,0.35), transparent 60%);
  z-index: -1;
}
.hero-wave {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 70px;
}

/* ---------- Sections ---------- */
section { padding-block: 88px; }
.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); margin-top: 12px; }
.section-head p { font-size: 17px; }
.section-head.left { margin: 0 0 44px; text-align: left; }

/* ---------- Feature grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
}
.feature-card .icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: #EAF5EE;
  margin-bottom: 18px;
  color: var(--primary);
}
.feature-card .icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 18px; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; margin-bottom: 0; }

/* ---------- Split / highlight sections ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split.reverse .split-media { order: 2; }
.split.reverse .split-text { order: 1; }
.split-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
  object-fit: cover;
}
.split-text ul {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 14px;
}
.split-text li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
}
.split-text li::before {
  content: '✓';
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.tone-band {
  background: var(--primary);
  color: var(--text-on-primary);
}
.tone-band p { color: var(--text-muted-on-primary); }
.tone-band .split-text li { color: #fff; }
.tone-band .split-text li::before { background: var(--accent); color: #21180a; }

/* ---------- Premium ---------- */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.plan.highlight {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  position: relative;
}
.plan.highlight::before {
  content: 'Le plus populaire';
  position: absolute;
  top: -13px;
  left: 28px;
  background: var(--accent);
  color: #21180a;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
html:lang(en) .plan.highlight::before {
  content: 'Most popular';
}
html:lang(ar) .plan.highlight::before {
  content: 'الأكثر رواجًا';
}
.plan h3 { font-size: 18px; margin-bottom: 4px; }
.plan .price {
  font-family: 'Fraunces', serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0 4px;
}
.plan .price span { font-size: 14px; font-weight: 400; color: var(--text-secondary); font-family: 'Karla', sans-serif; }
.plan ul { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; flex: 1; }
.plan li { font-size: 14.5px; display: flex; gap: 10px; }
.plan li::before { content: '✓'; color: var(--primary); font-weight: 700; }
.plan .btn { justify-content: center; width: 100%; }
.plan.free .price { color: var(--text); }

/* ---------- CTA band ---------- */
.cta-band {
  background: radial-gradient(circle at 20% 20%, #12503b, var(--primary) 55%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--text-muted-on-primary); max-width: 50ch; margin-inline: auto; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding-block: 48px;
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-brand .brand span { color: var(--primary); }
.footer-brand p { margin-top: 12px; font-size: 14px; max-width: 32ch; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.footer-social svg { width: 17px; height: 17px; }
.footer-col h4 {
  font-family: 'Karla', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { text-decoration: none; font-size: 14.5px; color: var(--text-secondary); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Interior page header ---------- */
.page-header {
  background: linear-gradient(180deg, var(--primary) 0%, #0d3527 60%, #0a2e21 100%);
  color: #fff;
  padding-block: 64px 56px;
  text-align: center;
}
.page-header .eyebrow { color: var(--accent-light); justify-content: center; }
.page-header .eyebrow::before { background: var(--accent-light); }
.page-header h1 {
  color: #fff;
  font-size: clamp(32px, 4.4vw, 48px);
  margin-top: 14px;
}
.page-header p {
  color: var(--text-muted-on-primary);
  font-size: 17px;
  max-width: 56ch;
  margin: 14px auto 0;
}

/* ---------- Language switch ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
}
.lang-switch a {
  padding: 7px 12px;
  text-decoration: none;
  color: var(--text-secondary);
}
.lang-switch a.active {
  background: var(--primary);
  color: #fff !important;
}
.lang-switch a:hover:not(.active) { color: var(--primary); }
.mobile-menu .lang-switch { margin: 16px 24px; }

/* ---------- Prayer times widget ---------- */
.prayer-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}
.prayer-locate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.prayer-status {
  font-size: 14.5px;
  color: var(--text-secondary);
  flex: 1;
  min-width: 200px;
}
.prayer-status strong { color: var(--text); }
.prayer-next {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 22px;
}
.prayer-next .eyebrow { color: var(--accent-light); }
.prayer-next .eyebrow::before { background: var(--accent-light); }
.prayer-next .name {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 700;
  margin: 6px 0 2px;
}
.prayer-next .countdown { color: var(--text-muted-on-primary); font-size: 15px; }
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.prayer-cell {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
}
.prayer-cell.is-next { background: var(--tipBg, #FBF7EC); border-color: var(--accent); }
.prayer-cell .p-name { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.prayer-cell .p-time { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700; margin-top: 4px; }
.prayer-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.prayer-options label { font-size: 13.5px; font-weight: 700; color: var(--text-secondary); }
.prayer-options select {
  font-family: 'Karla', sans-serif;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.prayer-night {
  margin-top: 18px;
  background: linear-gradient(135deg, #1c1b3a, #2b2a55);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.prayer-night .label { font-size: 14px; color: var(--text-muted-on-primary); }
.prayer-night .value { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 700; color: var(--accent-light); }

/* ---------- Community gallery ---------- */
.partner-card {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 40px;
}
.partner-card .partner-since {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.partner-card h2 { color: #fff; margin-top: 4px; }
.partner-card p { color: var(--text-muted-on-primary); margin-bottom: 0; }
.partner-card .funding {
  margin-top: 14px;
  font-weight: 700;
  color: #fff;
}
.partner-logo {
  width: 84px; height: 84px;
  border-radius: 22px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #21180a;
  flex-shrink: 0;
}
.partner-logo svg { width: 38px; height: 38px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/4;
  text-decoration: none;
  display: block;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent);
}
.gallery-credit { font-size: 13px; color: var(--text-secondary); margin-top: 14px; text-align: center; }

/* ---------- Premium benefits & comparison ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 16px;
}
.benefit-card .check {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.benefit-card .check svg { width: 16px; height: 16px; stroke-width: 3; }
.benefit-card h3 { font-size: 16.5px; margin-bottom: 4px; }
/* Retour utilisateur (16 sept.) : le texte sous chaque titre de bénéfice
   Premium était trop clair (gris hérité de `p`) — repassé en texte foncé
   pour une meilleure lisibilité sur fond blanc. */
.benefit-card p { color: var(--text); }
.benefit-card p { font-size: 14px; margin-bottom: 0; }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 14.5px;
}
.compare-table thead th {
  background: var(--primary);
  color: #fff;
  font-family: 'Fraunces', serif;
  font-size: 15px;
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table td:first-child { font-weight: 700; width: 22%; }
.compare-table ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.compare-table li { display: flex; gap: 8px; }
.compare-table li::before { content: '✓'; color: var(--primary); font-weight: 700; flex-shrink: 0; }
.compare-table td.premium-col li::before { color: var(--accent); }
.table-scroll { overflow-x: auto; }

/* ---------- Motion: scroll reveal ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.in-view {
  opacity: 1;
  transform: none;
}
html.js .features-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
html.js .features-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
html.js .features-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
html.js .features-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
html.js .features-grid .reveal:nth-child(6) { transition-delay: 0.4s; }
html.js .pricing .reveal:nth-child(2) { transition-delay: 0.1s; }
html.js .pricing .reveal:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal,
  html.js .reveal.in-view {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Hover / focus polish ---------- */
.nav-links a {
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: right 0.25s ease;
}
.nav-links a:hover::after { right: 0; }

.btn { transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.feature-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.plan {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.plan:hover { transform: translateY(-4px); }
.plan.highlight:hover { transform: translateY(-6px); }

.split-media img {
  transition: transform 0.4s ease;
}
.split-media:hover img { transform: scale(1.02); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Reviews carousel ---------- */
.reviews-carousel { position: relative; max-width: 720px; margin: 0 auto; }
.reviews-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.reviews-track::-webkit-scrollbar { display: none; }
.review-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
}
.review-stars { display: flex; gap: 3px; color: var(--border); margin-bottom: 14px; }
.review-stars .is-filled { color: var(--accent); }
.review-stars svg { width: 18px; height: 18px; }
.review-text { font-family: 'Fraunces', serif; font-size: 18px; line-height: 1.5; color: var(--text); margin-bottom: 18px; }
.review-meta { display: flex; align-items: center; gap: 12px; font-size: 13.5px; }
.review-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  flex-shrink: 0;
}
.review-date { color: var(--text-secondary); font-size: 12.5px; }
.reviews-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 20px; }
.reviews-prev, .reviews-next {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  cursor: pointer;
}
.reviews-prev:hover, .reviews-next:hover { background: var(--bg); }
.reviews-prev svg, .reviews-next svg { width: 18px; height: 18px; }
.reviews-dots { display: flex; gap: 8px; }
.reviews-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  padding: 0;
  cursor: pointer;
}
.reviews-dots button.is-active { background: var(--primary); width: 20px; border-radius: 4px; }

/* ---------- FAQ ---------- */
.faq-category { max-width: 760px; margin: 0 auto 40px; }
.faq-category:last-child { margin-bottom: 0; }
.faq-category h2 {
  font-family: 'Karla', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  margin-bottom: 14px;
}
.faq-list { display: grid; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 46px 18px 22px;
  font-family: 'Karla', sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--text);
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--primary);
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item .faq-answer { padding: 0 22px 20px; margin: 0; font-size: 14.5px; color: var(--text-secondary); }
.faq-item .faq-answer a { color: var(--primary); }

/* ---------- Legal pages (Mentions légales, Conditions d'utilisation) ---------- */
.legal-updated { color: var(--text-secondary); font-size: 13.5px; margin-bottom: 28px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 40px; list-style: none; }
.legal-toc a {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
}
.legal-toc a:hover { border-color: var(--primary); }
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h2 {
  font-family: 'Karla', sans-serif;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  margin: 44px 0 14px;
  scroll-margin-top: 90px;
}
.legal-content h2:first-of-type { margin-top: 0; }
.legal-content p, .legal-content li { font-size: 15px; }
.legal-content ul { padding-left: 1.2em; display: grid; gap: 8px; margin: 0 0 1em; }
.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 16px 0;
}
.legal-content table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.legal-content th, .legal-content td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal-content tr:last-child td { border-bottom: none; }
.legal-content th { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); }

/* ---------- Blog / guides ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.blog-card .tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.blog-card h2, .blog-card h3 { font-size: 22px; margin-bottom: 10px; }
.blog-card p { font-size: 15px; flex: 1; }
.blog-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 6px;
}
.blog-card .more { color: var(--primary); font-weight: 700; }
.blog-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--primary) 0%, #0d3527 100%);
  border-color: transparent;
  padding: 36px;
}
.blog-card.featured h2 { color: #fff; font-size: clamp(26px, 3.4vw, 34px); }
.blog-card.featured p, .blog-card.featured .meta { color: var(--text-muted-on-primary); }
.blog-card.featured .tag, .blog-card.featured .more { color: var(--accent-light); }

.breadcrumb { max-width: 720px; margin: 0 auto 28px; font-size: 13.5px; color: var(--text-secondary); }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted-on-primary);
}
.article-content { max-width: 720px; margin: 0 auto; }
.article-content h2 {
  font-size: clamp(24px, 3vw, 30px);
  margin: 52px 0 16px;
  scroll-margin-top: 90px;
}
.article-content h3 { font-size: 20px; margin: 32px 0 10px; }
.article-content p, .article-content li { font-size: 17px; line-height: 1.75; color: #333; }
.article-content strong { color: var(--text); }
.article-content a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content ul, .article-content ol { padding-inline-start: 1.3em; display: grid; gap: 10px; margin: 0 0 1.3em; }
.article-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 26px;
  margin: 0 0 12px;
}
.article-toc p { font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 8px; color: var(--primary-light); }
.article-toc ol { margin: 0; gap: 4px; }
.article-toc li { font-size: 15.5px; }
.article-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 28px 0;
}
.article-note p { font-size: 15.5px; line-height: 1.65; margin: 0; }
.article-note p + p { margin-top: 10px; }
.article-table { overflow-x: auto; margin: 0 0 1.5em; }
.article-content table { border-collapse: collapse; width: 100%; font-size: 15px; }
.article-content th, .article-content td { text-align: start; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.article-content th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.article-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #0d3527 100%);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  margin: 56px 0 0;
  text-align: center;
}
.article-cta h2 { color: #fff; font-size: clamp(22px, 3vw, 28px); margin: 0 0 12px; }
.article-cta p { color: var(--text-muted-on-primary); font-size: 16px; max-width: 46ch; margin: 0 auto 22px; }
.article-related { max-width: 960px; margin: 64px auto 0; }
.article-related > h2 { font-size: 22px; margin-bottom: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { gap: 20px; }
}
/* Six nav links (incl. Blog) need ~980px: collapse to the hamburger menu earlier than the rest of the layout. */
.nav-links a { white-space: nowrap; }
@media (max-width: 1020px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .nav-right > .lang-switch { display: none; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .nav-right > .lang-switch { display: none; } /* stays reachable inside the mobile menu */
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-inline: auto; }
  .store-badges { justify-content: center; }
  .hero-trust { justify-content: center; }
  .hero-art { order: -1; margin-bottom: 8px; }
  .hero-art .frame { max-width: 240px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media, .split.reverse .split-text,
  .split .split-media, .split .split-text { order: initial; }
  .pricing { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .benefits-grid { grid-template-columns: 1fr; }
  .prayer-grid { grid-template-columns: repeat(3, 1fr); }
  .partner-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 560px) {
  section { padding-block: 60px; }
  .article-content table { font-size: 14px; }
  .article-content th, .article-content td { padding: 9px 7px; }
  .blog-card.featured { padding: 26px; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .cta-band { padding: 40px 22px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .prayer-grid { grid-template-columns: repeat(2, 1fr); }
  .prayer-widget { padding: 22px; }
  .compare-table th, .compare-table td { padding: 12px; font-size: 13.5px; }
}

/* ---------- Arabic (RTL) ---------- */
/* Most of the layout (nav, footer grid, flex rows, split sections) mirrors
   automatically once `dir="rtl"` is set on <html> — flexbox/grid "row"
   direction follows the document direction with no extra CSS. Only rules
   below use a fixed left/right/text-align rather than a logical value, so
   only those need an explicit override here. */
html[lang="ar"] body { font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 {
  font-family: 'Amiri', 'Cairo', Georgia, serif;
}
html[dir="rtl"] .plan.highlight::before { left: auto; right: 28px; }
html[dir="rtl"] .faq-item summary { padding: 18px 22px 18px 46px; }
html[dir="rtl"] .faq-item summary::after { right: auto; left: 20px; }
html[dir="rtl"] .legal-content ul { padding-left: 0; padding-right: 1.2em; }
html[dir="rtl"] .legal-card { border-left: none; border-right: 3px solid var(--primary-light); }
html[dir="rtl"] .legal-content th, html[dir="rtl"] .legal-content td { text-align: right; }
html[dir="rtl"] .compare-table th, html[dir="rtl"] .compare-table td { text-align: right; }
/* Numbers, times and prices stay legible left-to-right even inside RTL text. */
html[dir="rtl"] .price, html[dir="rtl"] .p-time, html[dir="rtl"] .countdown,
html[dir="rtl"] .prayer-night .value, html[dir="rtl"] .nextPrayerCountdown {
  direction: ltr; unicode-bidi: isolate; display: inline-block;
}
