/* =========================================================
   Boursimple — feuille de style principale
   Palette : bleu marine, bleu finance, or
   ========================================================= */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #edf1f8;
  --ink: #0b1b33;
  --ink-2: #35465d;
  --muted: #65758b;
  --line: #dde4ee;
  --brand: #0d47a1;
  --brand-2: #1565c0;
  --brand-ink: #ffffff;
  --brand-soft: #e6eef9;
  --gold: #c19a2e;
  --gold-soft: #f6eed6;
  --danger: #b4412f;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15,26,36,.04), 0 8px 24px rgba(15,26,36,.06);
  --shadow-lg: 0 2px 4px rgba(15,26,36,.05), 0 24px 48px rgba(15,26,36,.10);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --wrap: 1180px;
  --read: 720px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1220; --surface: #101b2d; --surface-2: #15233a; --ink: #ecf1f4; --ink-2: #c3ccd4;
    --muted: #8d9aa6; --line: #22324a; --brand: #5b9cff; --brand-2: #7cb1ff; --brand-ink: #04122a;
    --brand-soft: #13284a; --gold: #e0bb55; --gold-soft: #2c2614; color-scheme: dark;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #0a1220; --surface: #101b2d; --surface-2: #15233a; --ink: #ecf1f4; --ink-2: #c3ccd4;
  --muted: #8d9aa6; --line: #22324a; --brand: #5b9cff; --brand-2: #7cb1ff; --brand-ink: #04122a;
  --brand-soft: #13284a; --gold: #e0bb55; --gold-soft: #2c2614; color-scheme: dark;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px rgba(0,0,0,.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.7 var(--font-sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { top: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.01em; font-size: 19px; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo b { color: var(--brand); font-weight: 700; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .menu-btn { display: inline-grid; margin-left: auto; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: var(--radius-sm); }
}

/* ---------- Bandeau des cours ---------- */
.ticker { display: flex; align-items: stretch; height: 48px; background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.ticker-label { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 14px 0 16px; font: 700 10.5px/1.2 var(--font-sans);
  letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--brand); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.ticker-track { flex: 1; min-width: 0; height: 48px; overflow: hidden; }
@media (max-width: 520px) { .ticker-label { padding: 0 10px; font-size: 9.5px; } }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; font-variation-settings: "opsz" 72; }
h1 { font-size: clamp(34px, 5.4vw, 58px); }
h2 { font-size: clamp(26px, 3.2vw, 34px); }
h3 { font-size: 22px; }
p { margin: 0 0 1.1em; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12.5px/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--gold); border-radius: 2px; }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); line-height: 1.6; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 30%, transparent); }
.btn-primary:hover { background: var(--brand-2); color: var(--brand-ink); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink-2); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 18%, transparent), transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } .hero { padding: 96px 0 64px; } }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow-lg); }
.hero-card .chart { display: block; width: 100%; height: auto; }
.hero-card .caption { font-size: 13px; color: var(--muted); margin-top: 10px; }
.pattern { position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%); -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin: 8px 0 0; }
@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat strong { display: block; font: 600 30px/1.1 var(--font-serif); color: var(--ink); letter-spacing: -.02em; }
.stat span { font-size: 14px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.section-head h2 { margin: 8px 0 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.section-alt .card { background: var(--bg); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); color: var(--ink); }
.card h3 { font-size: 21px; margin: 6px 0 4px; }
.card p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; margin: 0; flex: 1; }
.card-cat { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.card-more { margin-top: 14px; font-weight: 600; font-size: 14.5px; color: var(--brand); }
.ticker-badge { position: absolute; top: 20px; right: 20px; font: 600 12px/1 var(--font-sans); letter-spacing: .06em; padding: 6px 9px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }

/* ---------- Article ---------- */
.article-hero { padding: 40px 0 28px; border-bottom: 1px solid var(--line); background: linear-gradient(to bottom, var(--surface), var(--bg)); }
.article-hero .wrap { max-width: calc(var(--read) + 360px); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs span[aria-hidden] { margin: 0 6px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 14px; color: var(--muted); margin-top: 18px; }
.meta .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; }
.meta .author { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 500; }
.article-layout { display: grid; gap: 40px; padding: 40px 0 64px; max-width: calc(var(--read) + 360px); }
@media (min-width: 1040px) { .article-layout { grid-template-columns: minmax(0, var(--read)) 280px; justify-content: space-between; } }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14.5px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc strong { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; margin: 0; }
.toc a { display: flex; gap: 10px; padding: 6px 0; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.toc a::before { content: counter(t, decimal-leading-zero); color: var(--gold); font-variant-numeric: tabular-nums; font-weight: 600; }
.toc a:hover, .toc a.active { color: var(--brand); }
@media (max-width: 1039px) { .toc { position: static; order: -1; } }
.toc:empty { display: none; }

.prose { min-width: 0; font-size: 18px; }
.prose h2 { margin: 1.8em 0 .55em; padding-top: .2em; }
.prose h3 { margin: 1.6em 0 .5em; font-size: 22px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--ink); }
.prose > p:first-child { font-size: 20px; color: var(--ink-2); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold); font-family: var(--font-serif); font-size: 21px; color: var(--ink); }

.callout { margin: 1.8em 0; padding: 20px 22px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); font-size: 16.5px; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout-title { display: block; font-weight: 700; margin-bottom: 6px; color: var(--brand); }
.callout.warn { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 35%, transparent); }
.callout.warn .callout-title { color: var(--gold); }

.keypoints { margin: 0 0 2em; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.keypoints h2 { font: 700 13px/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; padding: 0; }
.keypoints ul { margin: 0; padding-left: 1.1em; font-size: 16.5px; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: s; position: relative; padding: 2px 0 10px 54px; margin: 0 0 14px !important; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 16px; }

.prose .cards { margin: 1em 0 1.6em; }
.prose .card h3 { margin: 6px 0 4px; font-size: 21px; }
.prose .steps h3 { margin: 4px 0 6px; font-size: 20px; }
.steps p { margin-bottom: 0; }

.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin: 0 0 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 16px; color: var(--ink-2); font-size: 16.5px; }
.faq details > div p:last-child { margin: 0; }

.disclaimer { margin-top: 2.4em; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; color: var(--muted); line-height: 1.6; }
.related { border-top: 1px solid var(--line); padding: 48px 0 64px; }

/* ---------- Ads (espaces réservés, évite le CLS) ---------- */
.ad { margin: 2em 0; min-height: 280px; display: grid; place-items: center; text-align: center; }
.ad::before { content: "Publicité"; display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad ins { display: block; width: 100%; }

/* ---------- Glossary ---------- */
.glossary-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; }
.glossary-nav a { display: inline-grid; place-items: center; min-width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 600; color: var(--ink-2); }
.glossary dt { font-family: var(--font-serif); font-weight: 600; font-size: 20px; margin-top: 1.4em; }
.glossary dd { margin: .3em 0 0; color: var(--ink-2); }

/* ---------- Simple page ---------- */
.page { padding: 40px 0 72px; }
.page .prose { max-width: var(--read); }

/* ---------- Newsletter / CTA band ---------- */
.band { border-radius: 28px; padding: 40px 28px; background: linear-gradient(135deg, #0d47a1, #061f48); overflow: hidden; color: #fff; position: relative; overflow: hidden; }
.band h2 { color: #fff; }
.band p { color: rgba(255,255,255,.85); max-width: 620px; }
.band .btn-primary { background: #fff; color: #0d47a1; box-shadow: none; }
.band::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255,255,255,.07); }
@media (min-width: 720px) { .band { padding: 52px 56px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: 15px; color: var(--ink-2); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h3 { font: 700 13px/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 6px 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* ---------- Cookie banner ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px 20px; font-size: 14.5px; display: none; }
.consent.show { display: block; }
.consent p { margin: 0 0 12px; color: var(--ink-2); }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }
.consent .btn { padding: 9px 16px; font-size: 14.5px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .toc, .ad, .consent, .related { display: none !important; } }

/* =========================================================
   Une (hero), logo marocain, photos, marchés, actualités
   ========================================================= */
.logo { gap: 11px; }
.logo .logo-mark { width: 54px; height: 54px; filter: drop-shadow(0 3px 8px rgba(184,134,42,.35)); }
.site-footer .logo .logo-mark { width: 76px; height: 76px; }
@media (max-width: 520px) { .logo .logo-mark { width: 48px; height: 48px; } }
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-text small { font: 500 11.5px/1.2 "Noto Kufi Arabic", var(--font-sans); color: var(--gold); letter-spacing: 0; margin-top: 3px; text-align: left; }

:root { --zellige: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1'%3E%3Crect x='19' y='19' width='26' height='26'/%3E%3Crect x='19' y='19' width='26' height='26' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3Cpath d='M0 32h8M56 32h8M32 0v8M32 56v8M0 0l8 8M64 0l-8 8M0 64l8-8M64 64l-8-8'/%3E%3C/g%3E%3C/svg%3E"); }

.une { position: relative; overflow: hidden; color: #fff; background: #071d3f; isolation: isolate; }
.une-bg { position: absolute; inset: 0; z-index: -3; }
.une-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.une::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(100deg, rgba(5,20,48,.96) 0%, rgba(7,32,78,.86) 42%, rgba(9,48,112,.45) 75%, rgba(9,48,112,.25) 100%),
              linear-gradient(to top, rgba(5,20,48,.85), transparent 45%); }
.une-pattern { position: absolute; inset: 0; z-index: -1; background-image: var(--zellige); background-size: 64px 64px; opacity: .07; pointer-events: none;
  mask-image: linear-gradient(105deg, #000 0%, transparent 70%); -webkit-mask-image: linear-gradient(105deg, #000 0%, transparent 70%); }
.une-grid { display: grid; gap: 36px; align-items: center; padding-top: 72px; padding-bottom: 64px; }
@media (min-width: 980px) { .une-grid { grid-template-columns: 1.2fr .8fr; padding-top: 104px; padding-bottom: 96px; } }
.une-kicker { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.une h1 { color: #fff; font-size: clamp(38px, 6vw, 68px); margin: 22px 0 18px; }
.une h1 em { font-style: italic; color: #f1cf72; }
.une-lede { font-size: clamp(17px, 1.9vw, 20px); line-height: 1.65; color: rgba(255,255,255,.84); max-width: 590px; }
.btn-gold { background: linear-gradient(135deg, #f1cf72, #d9a93b); color: #1b1404; box-shadow: 0 10px 26px rgba(217,169,59,.35); }
.btn-gold:hover { color: #1b1404; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(217,169,59,.45); }
.btn-glass { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255,255,255,.18); color: #fff; }
.une-stats { display: flex; flex-wrap: wrap; gap: 14px 36px; margin-top: 40px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.14); }
.une-stats strong { display: block; font: 600 28px/1.1 var(--font-serif); color: #fff; }
.une-stats span { font-size: 13.5px; color: rgba(255,255,255,.7); }
.une-card { border-radius: 24px; padding: 18px 18px 14px; background: rgba(8,26,60,.55); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 60px rgba(0,0,0,.35); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.une-card-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.75); margin: 2px 4px 8px; }
.une-card-head a { color: #f1cf72; text-decoration: none; letter-spacing: 0; text-transform: none; }
.une-card-note { margin: 8px 4px 0; font-size: 12px; color: rgba(255,255,255,.55); }
.section-sub { color: var(--muted); margin: 8px 0 0; max-width: 620px; }
.band { position: relative; }
.band .btn-gold { position: relative; z-index: 1; }

/* Widgets TradingView */
.tv-box { position: relative; width: 100%; }
.tv-box .tradingview-widget-container__widget, .tv-box iframe { height: 100% !important; width: 100% !important; }
.tv-box:not([data-mounted])::after { content: "Chargement des données…"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: var(--muted);
  background: repeating-linear-gradient(90deg, transparent 0 40px, color-mix(in srgb, var(--line) 50%, transparent) 40px 41px); border-radius: 12px; }
.tv-mini { height: 230px; }
.tv-heatmap { height: 520px; }
.tv-heatmap-xl { height: 680px; }
.tv-movers { height: 520px; }
.tv-indices { height: 470px; }
.tv-stock { height: 380px; }
@media (max-width: 700px) { .tv-heatmap { height: 440px; } .tv-heatmap-xl { height: 520px; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); overflow: hidden; }
.market-grid { display: grid; gap: 22px; }
@media (min-width: 980px) { .market-grid { grid-template-columns: 1fr 1fr; } .market-grid-home { grid-template-columns: 1.7fr 1fr; } }
.market-block { margin: 0 0 40px; }
.market-head h2 { margin: 0 0 6px; font-size: clamp(22px, 2.6vw, 28px); }
.market-head p { color: var(--muted); margin: 0 0 16px; max-width: 760px; }
.stock-box { margin: 0 0 2em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 14px 8px; box-shadow: var(--shadow); }
.stock-box-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 2px 4px 10px; font-size: 15px; }
.stock-box-head span { font-size: 12.5px; color: var(--muted); }

/* Cartes avec photo */
.card { padding: 0; gap: 0; overflow: hidden; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 24px; flex: 1; }
.card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-date { font-size: 13px; font-weight: 600; color: var(--muted); }
.card-date::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 7px; vertical-align: 1px; }

/* Photo d'article */
.article-figure { margin: 0 0 2em; }
.article-figure img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius); display: block; background: var(--surface-2); box-shadow: var(--shadow); }
.article-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.news-date { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); background: var(--gold-soft); padding: 4px 10px; border-radius: 999px; }
.sources { margin-top: 2.2em; padding: 18px 20px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.sources h2 { font: 700 13px/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; padding: 0; }
.sources ul { margin: 0; padding-left: 1.1em; font-size: 15px; }
@media (max-width: 520px) { .logo-text small { font-size: 10.5px; } .une-card { padding: 14px 12px 10px; } }
/* =========================================================
   Terminal de marché (heatmap + valeurs du jour)
   ========================================================= */
.mkt { position: relative; border-radius: 28px; padding: 22px; color: #e8eef7; isolation: isolate; overflow: hidden;
  background: radial-gradient(1200px 400px at 0% 0%, rgba(30,136,229,.22), transparent 60%), radial-gradient(800px 360px at 100% 100%, rgba(224,181,74,.12), transparent 60%), linear-gradient(160deg, #0b1d3d, #071328 70%);
  border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 70px rgba(7,19,40,.35), inset 0 1px 0 rgba(255,255,255,.06); }
.mkt::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--zellige); background-size: 64px 64px; opacity: .04; pointer-events: none; }
@media (min-width: 720px) { .mkt { padding: 28px; } }
.mkt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; margin-bottom: 20px; }
.mkt-head h2 { color: #fff; margin: 10px 0 6px; font-size: clamp(26px, 3.4vw, 38px); }
.mkt-head p { margin: 0; color: rgba(232,238,247,.7); max-width: 560px; font-size: 15.5px; }
.mkt-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: .03em;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.mkt-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.mkt-status[data-state="open"] .dot { background: #22c55e; animation: pulse 2s infinite; }
.mkt-status[data-state="pre"] .dot { background: #f59e0b; }
.mkt-status[data-state="closed"] .dot { background: #ef4444; }
.mkt-status .time { color: rgba(232,238,247,.55); font-weight: 500; }
.mkt-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.seg button { appearance: none; border: 0; background: transparent; color: rgba(232,238,247,.75); font: 600 13.5px/1 var(--font-sans); padding: 9px 13px; border-radius: 9px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: #fff; }
.seg button[aria-pressed="true"] { background: #fff; color: #0b1d3d; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.mkt-fs { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: #fff; }
.mkt-fs:hover { background: rgba(255,255,255,.12); }
.mkt-body { display: grid; gap: 16px; }
@media (min-width: 1000px) { .mkt-body { grid-template-columns: minmax(0, 1fr) 340px; } }
.mkt-pane { border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08); padding: 8px; overflow: hidden; }
.mkt-pane-title { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(232,238,247,.6); }
.mkt .tv-heatmap { height: 560px; }
.mkt .tv-movers { height: 560px; }
.mkt .tv-box:not([data-mounted])::after { color: rgba(232,238,247,.5); background: repeating-linear-gradient(90deg, transparent 0 40px, rgba(255,255,255,.04) 40px 41px); }
@media (max-width: 700px) { .mkt .tv-heatmap { height: 460px; } .mkt .tv-movers { height: 480px; } .seg button { padding: 8px 10px; font-size: 12.5px; } }
.mkt-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-top: 16px; font-size: 12.5px; color: rgba(232,238,247,.55); }
.legend { display: flex; align-items: center; gap: 10px; }
.legend-bar { width: 220px; max-width: 46vw; height: 10px; border-radius: 99px; background: linear-gradient(90deg, #b2182b, #f23645 22%, #3b4252 50%, #089981 78%, #0b6b4f); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.mkt-foot a { color: #f1cf72; text-decoration: none; font-weight: 600; }
.mkt:fullscreen { border-radius: 0; padding: 20px 24px; overflow: auto; }
.mkt:fullscreen .tv-heatmap, .mkt:fullscreen .tv-movers { height: calc(100vh - 210px); }
/* =========================================================
   Langues : sélecteur, liens, arabe et darija (RTL)
   ========================================================= */
.tv-box:not([data-mounted])::after { content: var(--loading-text, "…"); }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 14px/1 var(--font-sans); cursor: pointer; }
.lang-btn svg { width: 17px; height: 17px; }
.lang-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 190px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: none; z-index: 60; }
.lang-menu.open { display: block; }
.lang-menu a { display: flex !important; align-items: center; gap: 10px; padding: 10px 12px !important; border-radius: 10px !important; color: var(--ink-2); text-decoration: none; font-size: 15px; }
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: var(--surface-2); color: var(--ink); }
.lang-code { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); font: 700 11.5px/1 var(--font-sans); }
@media (max-width: 900px) { .lang { order: 10; } .lang-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0; margin-top: 6px; } .lang-btn { display: none; } }
.footer-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 16px; font-size: 13.5px; }
.footer-langs > span { width: 100%; color: var(--muted); font-weight: 600; }
.footer-langs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; }
.footer-langs a[aria-current="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.footer-social { margin-top: 14px; font-size: 13.5px; }
.footer-social a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); text-decoration: none; }
.card-lang { display: inline-block; margin-inline-start: 6px; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 10.5px; letter-spacing: .04em; }
.section-market { padding-top: 64px; }

[dir="rtl"] { --font-sans: "IBM Plex Sans Arabic", "Noto Kufi Arabic", Tahoma, sans-serif; --font-serif: "Noto Kufi Arabic", "IBM Plex Sans Arabic", Tahoma, sans-serif; }
[dir="rtl"] body { font-size: 17.5px; line-height: 1.85; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; line-height: 1.45; font-weight: 700; }
[dir="rtl"] *, [dir="rtl"] *::before, [dir="rtl"] *::after { letter-spacing: 0 !important; }
[dir="rtl"] .eyebrow, [dir="rtl"] .card-cat, [dir="rtl"] th, [dir="rtl"] .toc strong, [dir="rtl"] .keypoints h2, [dir="rtl"] .site-footer h3, [dir="rtl"] .sources h2, [dir="rtl"] .une-card-head, [dir="rtl"] .mkt-pane-title { text-transform: none; }
[dir="rtl"] .une h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.35; }
[dir="rtl"] .une h1 em, [dir="rtl"] .hero h1 em { font-style: normal; }
[dir="rtl"] .une::before { background: linear-gradient(260deg, rgba(5,20,48,.96) 0%, rgba(7,32,78,.86) 42%, rgba(9,48,112,.45) 75%, rgba(9,48,112,.25) 100%), linear-gradient(to top, rgba(5,20,48,.85), transparent 45%); }
[dir="rtl"] .une-pattern { mask-image: linear-gradient(255deg, #000 0%, transparent 70%); -webkit-mask-image: linear-gradient(255deg, #000 0%, transparent 70%); }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol, [dir="rtl"] .keypoints ul, [dir="rtl"] .sources ul { padding-left: 0; padding-right: 1.3em; }
[dir="rtl"] .prose blockquote { border-left: 0; border-right: 3px solid var(--gold); padding: 4px 22px 4px 0; }
[dir="rtl"] .steps > li { padding: 2px 54px 10px 0; }
[dir="rtl"] .steps > li::before { left: auto; right: 0; }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
[dir="rtl"] .logo-text small { text-align: right; }
[dir="rtl"] .card-more, [dir="rtl"] .mkt-foot a { unicode-bidi: plaintext; }
[dir="rtl"] .faq summary::after { margin-right: auto; }
/* =========================================================
   Ambiance marocaine chaleureuse (sable, zellige, simplicité)
   ========================================================= */
:root {
  --bg: #faf6ef; --surface: #ffffff; --surface-2: #f4ede1; --line: #eadfcc;
  --ink: #13213a; --ink-2: #3b4656; --muted: #6f6a60;
  --brand: #0d47a1; --brand-2: #1565c0; --brand-soft: #e8eefa;
  --gold: #c8962c; --gold-soft: #faf0d9; --terracotta: #b4532a; --mint: #0f766e;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(60,40,10,.05), 0 10px 26px rgba(60,40,10,.07);
  --shadow-lg: 0 2px 6px rgba(60,40,10,.06), 0 26px 50px rgba(60,40,10,.12);
  --zellige-band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='20' viewBox='0 0 72 20'%3E%3Crect width='72' height='20' fill='%230a2f73'/%3E%3Cpath d='M36 6L40 10L36 14L32 10z' fill='%23d9b566'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0c1424; --surface: #121c30; --surface-2: #17233a; --line: #26344d; --gold-soft: #2c2614; }
}
:root[data-theme="dark"] { --bg: #0c1424; --surface: #121c30; --surface-2: #17233a; --line: #26344d; --gold-soft: #2c2614; }

/* Bandes de zellige en haut de page et au-dessus du pied de page */
.site-header::before { content: ""; display: block; height: 10px; background: var(--zellige-band) repeat-x; background-size: auto 10px; }
.site-footer { position: relative; padding-top: 70px; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 12px; background: var(--zellige-band) repeat-x; background-size: auto 12px; }
.header-row { height: 74px; }
@media (max-width: 900px) { .nav { top: 84px; } }

/* Navigation plus simple, bouton d'action doré */
.nav a { font-size: 15.5px; }
.nav .nav-cta { margin-inline-start: 6px; background: linear-gradient(135deg, #f1cf72, #d9a93b); color: #1b1404 !important; font-weight: 700; padding: 9px 16px; box-shadow: 0 6px 16px rgba(217,169,59,.3); }
.nav .nav-cta:hover { background: linear-gradient(135deg, #f5d989, #e0b247); }
@media (max-width: 900px) { .nav .nav-cta { margin: 6px 0 4px; text-align: center; } }

/* Cartes plus douces et lisibles */
.card { border-radius: 20px; border-color: var(--line); }
.card-body { padding: 20px 22px 22px; }
.card-cat { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--gold-soft); color: #8a6414; font-size: 11.5px; }
[data-theme="dark"] .card-cat { color: var(--gold); }
.card h3 { font-size: 20px; line-height: 1.3; }
.card-more { color: var(--brand); }
.section-alt { background: var(--surface-2); border-color: var(--line); position: relative; }
.section-head h2 { font-size: clamp(26px, 3vw, 34px); }
.btn-ghost { border-radius: 999px; background: var(--surface); }
.keypoints { border-radius: 20px; border-inline-start: 4px solid var(--gold); }
.callout { border-radius: 16px; }
.article-hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }

/* Bloc d'accueil « Par où commencer ? » */
.start { padding: 56px 0 36px; }
.start-head { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.start-head .eyebrow { justify-content: center; }
.start-head .eyebrow::before { display: none; }
.start-head h2 { margin: 10px 0 8px; font-size: clamp(28px, 3.6vw, 40px); }
.start-head p { color: var(--muted); margin: 0; font-size: 17px; }
.start-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.start-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 26px 24px 24px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s; overflow: hidden; }
.start-card::after { content: ""; position: absolute; inset-inline-end: -30px; top: -30px; width: 120px; height: 120px; background-image: var(--zellige); background-size: 40px 40px; opacity: .06; filter: invert(1); }
[data-theme="dark"] .start-card::after { filter: none; }
.start-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); color: var(--ink); }
.start-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); margin-bottom: 6px; }
.start-card:nth-child(2) .start-ico { background: var(--gold-soft); color: #9a6b0f; }
.start-card:nth-child(3) .start-ico { background: #e3f3f0; color: var(--mint); }
[data-theme="dark"] .start-card:nth-child(3) .start-ico { background: #12302c; }
.start-ico svg { width: 30px; height: 30px; }
.start-card h3 { margin: 0; font-size: 22px; }
.start-card p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.6; flex: 1; }
.start-go { margin-top: 10px; font-weight: 700; color: var(--brand); }
.trust { list-style: none; margin: 26px auto 0; padding: 14px 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; max-width: 900px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust-ico { display: inline-grid; color: var(--mint); }
.trust-ico svg { width: 19px; height: 19px; }
@media (max-width: 640px) { .trust { border-radius: 20px; justify-content: flex-start; } }
.section-market { padding-top: 32px; }

/* Pied de page plus chaleureux */
.site-footer { background: var(--surface-2); }
.footer-langs a { background: var(--surface); }
/* Recherche et sujets du moment */
.nav .nav-search { padding: 0; }
@media (max-width: 900px) { .nav .nav-search { width: 100%; border-radius: 10px; } }
.site-search { display: flex; gap: 10px; max-width: 640px; margin: 0 0 26px; }
.site-search input { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 500 17px var(--font-sans); }
.site-search input:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.search-msg { color: var(--muted); }
.topics { background: var(--surface); border-bottom: 1px solid var(--line); }
.topics-row { display: flex; align-items: center; gap: 8px; padding-top: 12px; padding-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.topics-row::-webkit-scrollbar { display: none; }
.topics-row strong { flex: none; font-size: 13.5px; color: var(--ink); margin-inline-end: 6px; }
.topic { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.topic:hover { border-color: var(--gold); color: var(--ink); }