:root {
  /* === PALETTE DARK MODE (Principal — fidèle à zawaya.qa) === */
  --bg-primary: #0e0e0e;
  --bg-elevated: #1a1a1a;
  --bg-secondary: #111111;
  --accent: #c5a880;
  --accent-light: #d4b896;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-tertiary: rgba(255, 255, 255, 0.45);
  --border: rgba(255, 255, 255, 0.12);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --surface-glass: rgba(255, 255, 255, 0.04);

  /* === CONTEXTUEL === */
  --green: #0f5b4f;
  --wine: #7d1f3a;

  /* === LAYOUT === */
  --radius: 2px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

/* ─── RESET ─── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text-primary);
  background: var(--bg-primary);
  font-family: Inter, Manrope, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* ─── TOPBAR ─── */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 54px);
  color: var(--text-primary);
  transition: background 180ms ease, box-shadow 180ms ease;
}
.topbar.scrolled {
  background: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 23px;
  font-weight: 600;
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav a {\n  opacity: 0.65;\n  transition: opacity 180ms ease, color 180ms ease;\n}\n.nav a:hover { opacity: 1; color: var(--accent); }

/* ─── LANG SWITCH ─── */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  margin-right: 8px;
}
.lang {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 28px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  transition: color 180ms ease, background 180ms ease;
}
.lang:hover { color: var(--text-primary); }
.lang.active {
  color: var(--bg-primary);
  background: var(--accent);
}
.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}
.menu-button span { width: 18px; height: 1.5px; background: currentColor; }

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 88svh;
  overflow: hidden;
  display: grid;
  align-items: end;
  color: var(--text-primary);
  isolation: isolate;
}
.hero-image, .hero-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-image { z-index: -3; object-fit: cover; }
.hero-overlay {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(14,14,14,.88), rgba(14,14,14,.4) 58%, rgba(14,14,14,.55)),
    linear-gradient(0deg, rgba(14,14,14,.8), transparent 58%);
}
.hero-content {
  width: min(860px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 106px);
  padding: 128px 0 172px;
}
.label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  letter-spacing: 0.01em;
  line-height: 1.04;
  font-weight: 400;
}
h1 { max-width: 930px; font-size: clamp(48px, 7vw, 96px); }
h2 { max-width: 840px; font-size: clamp(33px, 4.5vw, 64px); }
h3 {
  margin: 0 0 10px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.15;
}
.hero-text {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--text-secondary);
  font-size: clamp(17px, 2vw, 20px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 34px; }

/* ─── BUTTONS ─── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button.primary {
  color: var(--bg-primary);
  background: var(--accent);
}
.button.primary:hover {
  box-shadow: 0 8px 24px rgba(197, 168, 128, 0.25);
}
.button.ghost {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.25);
}
.button.ghost:hover {
  background: rgba(255,255,255,0.1);
}

/* ─── HERO SUMMARY BAR ─── */
.hero-summary {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 34px;
  width: min(680px, calc(100% - 36px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
}
.hero-summary article {
  min-height: 112px;
  padding: 18px;
  background: rgba(14, 14, 14, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero-summary strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}
.hero-summary span {
  display: block;
  margin-top: 10px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 14px;
}

/* ─── SECTIONS ─── */
.section { padding: clamp(72px, 9vw, 128px) 0; }
.wrap { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.two-col {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  gap: clamp(32px, 6vw, 86px);
  align-items: center;
}

/* Section Intro / Diagnostic */
.intro {
  background: var(--bg-elevated);
}
.diagnostic-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.diagnostic-grid article {
  padding: 22px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.diagnostic-grid span,
.reason-card span,
.mini-grid span,
.plan-board span,
.kpi-grid span,
.journey-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.diagnostic-grid p { margin: 0; color: var(--text-secondary); }

/* Section head */
.section-head { display: grid; gap: 12px; margin-bottom: 34px; }
.section-head p:not(.label),
.site-reason p,
.calculator p {
  max-width: 760px;
  color: var(--text-secondary);
  font-size: 18px;
}

/* Section muted (alternée) */
.muted { background: var(--bg-secondary); }

/* ─── PILLAR TABS ─── */
.pillar-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.pillar-tabs, .reason-buttons, .week-tabs { display: flex; flex-wrap: wrap; gap: 10px; }
.pillar-tabs { flex-direction: column; }
.tab, .reason, .week {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--text-secondary);
  padding: 10px 17px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.tab:hover, .reason:hover, .week:hover {
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.25);
}
.tab.active, .reason.active, .week.active {
  color: var(--bg-primary);
  background: var(--accent);
  border-color: var(--accent);
}

/* Pillar & Reason Cards */
.pillar-card, .reason-card, .score-card,
.diagnostic-grid article,
.kpi-grid article,
.plan-board article {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-hover);
}
.pillar-card { padding: clamp(22px, 4vw, 38px); }
.pillar-card > p:not(.label) { color: var(--text-secondary); font-size: 18px; }
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.mini-grid div {
  border-radius: var(--radius);
  background: var(--surface-glass);
  border: 1px solid var(--border);
  padding: 18px;
}
.mini-grid strong { display: block; line-height: 1.25; color: var(--text-primary); }

/* Site reason */
.site-reason { align-items: start; }
.reason-buttons { margin-top: 24px; }
.reason-card { padding: clamp(22px, 4vw, 36px); }
.reason-card ul { margin: 18px 0 0; padding-left: 20px; color: var(--text-secondary); }
.reason-card li + li { margin-top: 7px; }

/* ─── JOURNEY ─── */
.journey { color: var(--text-primary); background: var(--bg-elevated); }
.section-head.light p:not(.label) { color: var(--text-secondary); }
.journey-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.journey-grid article {
  min-height: 240px;
  border-radius: var(--radius);
  padding: 22px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  transition: border-color 250ms ease;
}
.journey-grid article:hover { border-color: rgba(197, 168, 128, 0.3); }
.journey-grid h3 { color: var(--text-primary); }
.journey-grid p { margin: 0; color: var(--text-secondary); }

/* ─── PLAN BOARD ─── */
.week-tabs { margin-bottom: 24px; }
.plan-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.plan-board article {
  min-height: 230px;
  padding: 22px;
  transition: border-color 250ms ease;
}
.plan-board article:hover { border-color: rgba(197, 168, 128, 0.3); }
.plan-board strong {
  display: block;
  margin-bottom: 10px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}
.plan-board p { margin: 0; color: var(--text-secondary); }

/* ─── SCORE CALCULATOR ─── */
.score-card { padding: clamp(22px, 4vw, 34px); }
.score-card label {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
  font-weight: 800;
  color: var(--text-primary);
  font-size: 14px;
}
.score-card label strong { color: var(--accent); }
.score-card input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  margin-bottom: 24px;
}
.score-result {
  border-radius: var(--radius);
  background: rgba(197, 168, 128, 0.08);
  border: 1px solid rgba(197, 168, 128, 0.2);
  padding: 22px;
}
.score-result span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.score-result strong {
  display: block;
  margin: 4px 0 8px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}
.score-result p { margin: 0; color: var(--text-secondary); }

/* ─── KPI GRID ─── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.kpi-grid article {
  padding: 22px;
  min-height: 190px;
  transition: border-color 250ms ease;
}
.kpi-grid article:hover { border-color: rgba(197, 168, 128, 0.3); }
.kpi-grid strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}
.kpi-grid p { margin: 10px 0 0; color: var(--text-secondary); }

/* ─── FOOTER ─── */
.footer {
  color: var(--text-primary);
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 30px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.footer span { color: var(--text-tertiary); }
.footer a {
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: opacity 180ms ease;
}
.footer a:hover { opacity: 0.75; }

/* ─── UPGRADE TABS (Moderniser) ─── */
.upgrade-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.upgrade-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-hover);
  padding: clamp(22px, 4vw, 38px);
}
.upgrade-content span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.upgrade-content > p { color: var(--text-secondary); font-size: 18px; }
.upgrade-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.upgrade-feature {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-glass);
  padding: 18px;
}
.upgrade-feature strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 15px;
}
.upgrade-feature p { margin: 0; color: var(--text-secondary); font-size: 14px; }

/* ─── PRICING GRID ─── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.pricing-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-hover);
  padding: clamp(22px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  transition: border-color 250ms ease, transform 250ms ease;
}
.pricing-card:hover { border-color: rgba(197, 168, 128, 0.3); }
.pricing-card > span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pricing-amount {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 16px;
}
.pricing-amount strong {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-primary);
}
.pricing-desc { color: var(--text-secondary); margin: 0 0 16px; }
.pricing-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}
.pricing-card li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
}
.pricing-card li:last-child { border-bottom: 1px solid var(--border); }
.pricing-card .button { margin-top: 20px; width: 100%; }

/* Featured pricing card */
.pricing-card.featured {
  border-color: var(--accent);
  background: rgba(197, 168, 128, 0.06);
  transform: scale(1.02);
}
.pricing-card.featured:hover { transform: scale(1.04); }
.pricing-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 16px;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  white-space: nowrap;
}

/* ─── CTA FINAL ─── */
.cta-final {
  background: linear-gradient(180deg, var(--bg-primary), rgba(197, 168, 128, 0.06));
  text-align: center;
}
.cta-final-content { max-width: 680px; margin: 0 auto; }
.cta-final-content p:not(.label) { color: var(--text-secondary); font-size: 18px; }
.cta-final .hero-actions { justify-content: center; }
.cta-reassurance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.cta-reassurance strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}
.cta-reassurance span {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 980px) {
  .menu-button { display: inline-flex; }
  .nav {
    position: fixed;
    top: 74px;
    left: 18px;
    right: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    color: var(--text-primary);
    background: rgba(14, 14, 14, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
  .hero-content { padding-bottom: 230px; }
  .hero-summary { left: 18px; right: 18px; width: auto; }
  .two-col, .pillar-layout { grid-template-columns: 1fr; }
  .pillar-tabs { flex-direction: row; }
  .mini-grid, .journey-grid, .plan-board, .kpi-grid, .upgrade-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .pricing-card.featured { transform: none; }
  .pricing-card.featured:hover { transform: none; }
}

@media (max-width: 620px) {
  .topbar { padding: 14px 16px; }
  .brand span:last-child { display: none; }
  .hero { min-height: 94svh; }
  .hero-content { width: calc(100% - 32px); margin-left: 16px; padding-top: 104px; padding-bottom: 286px; }
  h1 { font-size: 42px; }
  h2 { font-size: 32px; }
  .hero-actions .button { width: 100%; }
  .hero-summary { grid-template-columns: 1fr; bottom: 16px; }
  .hero-summary article { min-height: auto; padding: 13px 16px; }
  .hero-summary strong { font-size: 26px; display: inline-block; margin-right: 10px; }
  .hero-summary span { display: inline; }
  .mini-grid, .journey-grid, .plan-board, .kpi-grid, .upgrade-features { grid-template-columns: 1fr; }
  .cta-reassurance { grid-template-columns: 1fr; gap: 12px; }
}

/* ─── RTL (Arabic) ─── */
[dir="rtl"] { text-align: right; }
[dir="rtl"] body { font-family: 'Noto Kufi Arabic', 'Tajawal', Inter, sans-serif; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: 'Noto Kufi Arabic', 'Tajawal', Georgia, serif; }
[dir="rtl"] .topbar { flex-direction: row-reverse; }
[dir="rtl"] .nav { flex-direction: row-reverse; }
[dir="rtl"] .brand { flex-direction: row-reverse; }
[dir="rtl"] .lang-switch { margin-left: 8px; margin-right: auto; }
[dir="rtl"] .hero-content { left: auto; right: clamp(18px, 5vw, 64px); text-align: right; }
[dir="rtl"] .hero-summary { left: auto; right: clamp(18px, 5vw, 64px); }
[dir="rtl"] .hero-actions { justify-content: flex-end; }
[dir="rtl"] .two-col { direction: rtl; }
[dir="rtl"] .pillar-layout { direction: rtl; }
[dir="rtl"] .pillar-tabs { align-items: flex-end; }
[dir="rtl"] .reason-buttons { justify-content: flex-end; }
[dir="rtl"] .journey-grid article span { text-align: right; }
[dir="rtl"] .mini-grid div { text-align: right; }
[dir="rtl"] .footer-inner { flex-direction: row-reverse; }
[dir="rtl"] .cta-final { text-align: center; }
[dir="rtl"] .cta-final .hero-actions { justify-content: center; }
[dir="rtl"] ul { padding-right: 18px; padding-left: 0; }
[dir="rtl"] .section-head { text-align: right; }
[dir="rtl"] .section-head p { text-align: right; }
[dir="rtl"] .label { text-align: right; }
[dir="rtl"] .upgrade-content { text-align: right; }
[dir="rtl"] .upgrade-feature { text-align: right; }
@media (max-width: 980px) {
  [dir="rtl"] .topbar { flex-direction: row-reverse; }
  [dir="rtl"] .nav { align-items: stretch; text-align: right; }
  [dir="rtl"] .hero-content { right: auto; width: calc(100% - 36px); margin-right: 18px; }
}
@media (max-width: 620px) {
  [dir="rtl"] .hero-content { margin-right: 16px; margin-left: 0; }
  [dir="rtl"] .hero-summary strong { margin-right: 0; margin-left: 10px; }
}
