/* =========================================================
   SPCL Mali — Plateforme nationale du contenu local minier
   Design system v1.0
   ========================================================= */

:root {
  /* Mali institutional palette */
  --mali-green: #14B53A;
  --mali-green-dark: #0E8829;
  --mali-green-darker: #0A6620;
  --mali-yellow: #FCD116;
  --mali-yellow-dark: #E5BD0F;
  --mali-red: #CE1126;
  --mali-red-dark: #A30E1F;

  /* Neutrals */
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Semantic */
  --primary: var(--mali-green-dark);
  --primary-hover: var(--mali-green-darker);
  --accent: var(--mali-yellow);
  --danger: var(--mali-red);
  --bg: #ffffff;
  --bg-alt: var(--gray-50);
  --text: var(--gray-900);
  --text-muted: var(--gray-600);
  --border: var(--gray-200);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Shadow */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);

  /* Radius */
  --r-sm: 6px;
  --r: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  --container: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

/* ===== Layout ===== */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-alt { background: var(--bg-alt); }

/* ===== Government Top-bar ===== */
.gov-bar {
  background: var(--gray-900);
  color: #fff;
  font-size: .82rem;
  padding: 6px 0;
}
.gov-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gov-bar a { color: rgba(255,255,255,.85); }
.gov-bar a:hover { color: #fff; }
.gov-mark { display: flex; align-items: center; gap: 8px; }
.flag-strip {
  display: inline-flex;
  height: 12px;
  width: 22px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15);
}
.flag-strip span { display: block; width: 33.34%; height: 100%; }
.flag-strip .s1 { background: var(--mali-green); }
.flag-strip .s2 { background: var(--mali-yellow); }
.flag-strip .s3 { background: var(--mali-red); }
.gov-bar-links { display: flex; gap: 18px; }
@media (max-width: 720px) { .gov-bar-links { display: none; } }

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.95);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-logo {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--mali-green) 0%, var(--mali-green-dark) 100%);
  color: #fff;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.brand-logo::before {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--mali-yellow);
}
.brand-logo::after {
  content: '';
  position: absolute;
  inset: auto 0 3px 0;
  height: 3px;
  background: var(--mali-red);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1rem; color: var(--gray-900); letter-spacing: -.01em; }
.brand-text small { font-size: .78rem; color: var(--text-muted); letter-spacing: .02em; text-transform: uppercase; }

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--gray-700);
  font-weight: 500;
  font-size: .92rem;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all .15s;
}
.main-nav a:hover { background: var(--gray-100); color: var(--gray-900); }
.main-nav a.active { color: var(--primary); background: rgba(20, 181, 58, 0.08); }

.header-cta { display: flex; align-items: center; gap: 10px; }

@media (max-width: 1024px) {
  .main-nav { display: none; }
  .header-cta .btn-ghost { display: none; }
}

/* Mobile menu trigger */
.menu-toggle {
  display: none;
  background: var(--gray-100);
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle:hover { background: var(--gray-200); }
.menu-toggle svg { width: 22px; height: 22px; }
@media (max-width: 1024px) { .menu-toggle { display: inline-flex; } }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 100;
  display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer-panel {
  position: absolute;
  right: 0; top: 0;
  width: 320px;
  max-width: 90vw;
  height: 100%;
  background: #fff;
  padding: 24px 20px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.mobile-drawer-panel .close {
  background: var(--gray-100);
  border: 0;
  width: 38px; height: 38px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 16px;
}
.mobile-nav a {
  display: block;
  padding: 12px 14px;
  font-weight: 500;
  color: var(--gray-800);
  border-radius: 8px;
  margin-bottom: 4px;
}
.mobile-nav a:hover { background: var(--gray-50); }
.mobile-nav a.active { background: rgba(20,181,58,.08); color: var(--primary); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .93rem;
  text-decoration: none;
  transition: all .15s;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(14,136,41,.2);
}
.btn-primary:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(14,136,41,.25); }
.btn-ghost {
  background: transparent;
  color: var(--gray-800);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn-yellow {
  background: var(--mali-yellow);
  color: var(--gray-900);
}
.btn-yellow:hover { background: var(--mali-yellow-dark); color: var(--gray-900); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-sm { padding: 7px 12px; font-size: .85rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 70px 0 80px;
  background:
    radial-gradient(circle at 80% 10%, rgba(252, 209, 22, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(20, 181, 58, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--mali-green) 0%, var(--mali-green) 33.33%, var(--mali-yellow) 33.33%, var(--mali-yellow) 66.66%, var(--mali-red) 66.66%, var(--mali-red) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 40px 0 60px; }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  background: rgba(20,181,58,.08);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 .hl { color: var(--primary); }
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); }
.hero-stat { }
.hero-stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--gray-900); }
.hero-stat span { font-size: .85rem; color: var(--text-muted); }

.hero-visual {
  position: relative;
}
.hero-card {
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}
.hero-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.hero-card-header h4 { margin: 0; font-size: 1rem; }
.hero-card-header .live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--primary); font-weight: 600;
}
.hero-card-header .live::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(20,181,58,.2);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.kpi-tile {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 14px;
}
.kpi-tile .lbl { font-size: .75rem; color: var(--text-muted); margin-bottom: 4px; }
.kpi-tile .val { font-size: 1.4rem; font-weight: 700; color: var(--gray-900); line-height: 1; }
.kpi-tile .trend { font-size: .72rem; color: var(--primary); margin-top: 4px; font-weight: 600; }
.kpi-tile .trend.down { color: var(--danger); }

/* ===== Cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  transition: all .2s;
}
.card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(20,181,58,.08);
  color: var(--primary);
  border-radius: 10px;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: .93rem; color: var(--text-muted); margin: 0; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  color: var(--primary); font-weight: 600; font-size: .9rem;
}
.card-link:hover { gap: 10px; }

/* "Je suis…" persona cards */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.persona-card {
  position: relative;
  padding: 32px 26px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all .2s;
}
.persona-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
}
.persona-card:nth-child(2)::before { background: var(--mali-yellow); }
.persona-card:nth-child(3)::before { background: var(--mali-red); }
.persona-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.persona-card .pc-tag { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.persona-card h3 { font-size: 1.4rem; margin: 4px 0 12px; }
.persona-card p { font-size: .92rem; color: var(--text-muted); margin-bottom: 20px; }

/* ===== Section header ===== */
.section-header { text-align: center; margin-bottom: 48px; }
.section-header .eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { font-size: 1.1rem; color: var(--text-muted); max-width: 680px; margin: 0 auto; }
.section-header.left { text-align: left; }
.section-header.left p { margin: 0; }

/* ===== Stats band ===== */
.stats-band {
  background: linear-gradient(135deg, var(--gray-900) 0%, #1a2942 100%);
  color: #fff;
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}
.stats-band::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(20,181,58,.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(252,209,22,.08) 0%, transparent 40%);
}
.stats-band .container { position: relative; }
.stats-band h2 { color: #fff; text-align: center; margin-bottom: 8px; }
.stats-band .sub { color: rgba(255,255,255,.65); text-align: center; max-width: 600px; margin: 0 auto 40px; }
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.stat-card {
  text-align: center;
  padding: 24px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r);
  backdrop-filter: blur(10px);
}
.stat-card .num {
  font-size: 2.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, var(--mali-yellow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-card .lbl { font-size: .9rem; color: rgba(255,255,255,.75); }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); }
table.t {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: .92rem;
}
table.t th, table.t td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.t th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: var(--gray-50); }

/* ===== Badges ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--gray-100);
  color: var(--gray-700);
}
.badge-green { background: rgba(20,181,58,.1); color: var(--mali-green-dark); }
.badge-yellow { background: rgba(252,209,22,.18); color: #8a6900; }
.badge-red { background: rgba(206,17,38,.1); color: var(--mali-red-dark); }
.badge-gray { background: var(--gray-100); color: var(--gray-700); }
.badge-blue { background: rgba(59,130,246,.1); color: #1e40af; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ===== Forms ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--gray-900);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20,181,58,.12);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

/* ===== Filters bar ===== */
.filters {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 24px;
}
.filters .form-control { flex: 1; min-width: 180px; }

/* ===== Footer ===== */
.site-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.7);
  padding: 56px 0 24px;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-grid h5 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: rgba(255,255,255,.65); font-size: .9rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand { max-width: 360px; }
.footer-brand p { font-size: .9rem; line-height: 1.6; margin-top: 12px; }
.footer-flag { display: flex; height: 4px; border-radius: 2px; overflow: hidden; max-width: 60px; margin-top: 16px; }
.footer-flag span { flex: 1; }
.footer-bottom {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .82rem;
}

/* ===== Page header (sub-pages) ===== */
.page-header {
  background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
  padding: 50px 0 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--mali-green) 0%, var(--mali-green) 33.33%, var(--mali-yellow) 33.33%, var(--mali-yellow) 66.66%, var(--mali-red) 66.66%, var(--mali-red) 100%);
  opacity: .3;
}
.breadcrumb { font-size: .85rem; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: var(--gray-400); }
.page-header h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.page-header .lead { color: var(--text-muted); font-size: 1.05rem; max-width: 720px; margin: 0; }

/* ===== Dashboard charts ===== */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.dash-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
}
.dash-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-card-header h4 { margin: 0; font-size: .98rem; color: var(--gray-800); }
.dash-card-header .pill { font-size: .75rem; padding: 3px 8px; border-radius: 6px; background: var(--gray-100); color: var(--gray-600); font-weight: 600; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }
@media (max-width: 960px) {
  .col-3, .col-4 { grid-column: span 6; }
  .col-6, .col-8 { grid-column: span 12; }
}
@media (max-width: 560px) {
  .col-3 { grid-column: span 12; }
}

.kpi-big .val { font-size: 2.2rem; font-weight: 800; color: var(--gray-900); line-height: 1; margin-bottom: 6px; }
.kpi-big .lbl { color: var(--text-muted); font-size: .85rem; }
.kpi-big .meta { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: .8rem; }
.kpi-big .meta .up { color: var(--primary); font-weight: 600; }
.kpi-big .meta .dn { color: var(--danger); font-weight: 600; }
.kpi-big .target {
  margin-top: 14px;
  height: 6px;
  border-radius: 100px;
  background: var(--gray-100);
  overflow: hidden;
  position: relative;
}
.kpi-big .target span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--mali-green) 100%);
  border-radius: 100px;
}
.kpi-big .target-lbl { display: flex; justify-content: space-between; font-size: .72rem; color: var(--text-muted); margin-top: 6px; }

/* Chart container */
.chart-wrap { position: relative; height: 280px; }
.chart-wrap-sm { position: relative; height: 200px; }
.chart-wrap-lg { position: relative; height: 360px; }

/* ===== Article/Content typography ===== */
.prose { max-width: 820px; }
.prose h2 { margin-top: 1.8em; margin-bottom: .7em; padding-top: 1em; border-top: 1px solid var(--border); font-size: 1.5rem; }
.prose h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose p { color: var(--gray-700); line-height: 1.75; }
.prose ul, .prose ol { color: var(--gray-700); line-height: 1.75; padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(20,181,58,.04);
  border-radius: 0 8px 8px 0;
  color: var(--gray-800);
  font-style: italic;
}
.prose code { background: var(--gray-100); padding: 2px 6px; border-radius: 4px; font-size: .9em; }

.toc {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.toc h4 { font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }
.toc ol { padding-left: 1.2em; margin: 0; font-size: .92rem; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--gray-700); }
.toc a:hover { color: var(--primary); }

/* ===== News / actualités ===== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  transition: all .2s;
  display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-img {
  height: 180px;
  background: linear-gradient(135deg, var(--mali-green) 0%, var(--mali-green-darker) 100%);
  position: relative;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.9);
}
.news-img.yellow { background: linear-gradient(135deg, var(--mali-yellow) 0%, #b58c00 100%); color: var(--gray-900); }
.news-img.red { background: linear-gradient(135deg, var(--mali-red) 0%, var(--mali-red-dark) 100%); }
.news-img.gray { background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-900) 100%); }
.news-img svg { width: 64px; height: 64px; opacity: .85; }
.news-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-meta { font-size: .8rem; color: var(--text-muted); display: flex; gap: 10px; margin-bottom: 10px; }
.news-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.news-card p { font-size: .92rem; color: var(--text-muted); flex: 1; margin-bottom: 14px; }

/* ===== Opportunités ===== */
.opp-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 22px;
  display: flex; gap: 18px;
  margin-bottom: 14px;
  transition: all .15s;
}
.opp-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow); }
.opp-icon {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(20,181,58,.08);
  color: var(--primary);
  border-radius: 10px;
}
.opp-icon.yellow { background: rgba(252,209,22,.18); color: #8a6900; }
.opp-icon.red { background: rgba(206,17,38,.08); color: var(--mali-red-dark); }
.opp-body { flex: 1; min-width: 0; }
.opp-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.opp-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.opp-action { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
@media (max-width: 720px) {
  .opp-card { flex-wrap: wrap; }
  .opp-action { width: 100%; align-items: stretch; }
}

/* ===== Pagination ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  display: grid; place-items: center;
  min-width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--gray-700);
  font-weight: 500;
  font-size: .9rem;
  padding: 0 10px;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== Login ===== */
.auth-shell {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-right { order: 1; padding: 32px 20px; }
  .auth-left { order: 2; padding: 32px 20px; }
  .auth-left h2 { font-size: 1.3rem; }
  .auth-left .demo-box { margin-top: 16px; padding: 14px; }
}
.auth-left {
  background: linear-gradient(135deg, var(--gray-900) 0%, #0a4d18 100%);
  color: #fff;
  padding: 60px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(252,209,22,.12) 0%, transparent 50%);
}
.auth-left h2 { color: #fff; max-width: 480px; font-size: 1.8rem; }
.auth-left p { color: rgba(255,255,255,.75); max-width: 480px; }
.auth-left .demo-box {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r);
  padding: 20px;
  max-width: 420px;
  margin-top: 30px;
  backdrop-filter: blur(8px);
  position: relative;
}
.auth-left .demo-box h4 { color: var(--mali-yellow); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.auth-left .demo-box code {
  display: block;
  background: rgba(0,0,0,.3);
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
  font-family: ui-monospace, monospace;
  font-size: .85rem;
  margin-bottom: 8px;
}
@media (max-width: 900px) { .auth-left { padding: 40px 24px; } }

.auth-right {
  display: flex; align-items: center; justify-content: center;
  padding: 60px 40px;
  background: var(--bg);
}
.auth-form { width: 100%; max-width: 420px; }
.auth-form h1 { font-size: 1.75rem; margin-bottom: 6px; }
.auth-form .lead { color: var(--text-muted); margin-bottom: 32px; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 4px; background: var(--gray-100); border-radius: 10px; margin-bottom: 20px; }
.role-switch button {
  border: 0; padding: 8px 4px; background: transparent;
  border-radius: 7px; font-weight: 600; font-size: .82rem; color: var(--gray-600); cursor: pointer;
  font-family: inherit;
}
.role-switch button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

/* ===== Sidebar layout (admin) ===== */
.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
@media (max-width: 900px) { .app-shell { grid-template-columns: 1fr; } }
.app-sidebar {
  background: var(--gray-900);
  color: #fff;
  padding: 24px 16px;
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
}
.app-sidebar .brand-mini {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 16px;
  color: #fff;
  text-decoration: none;
}
.app-sidebar .brand-mini strong { font-size: .95rem; color: #fff; }
.app-sidebar .brand-mini small { font-size: .7rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; display: block; }
.app-nav-section { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.4); padding: 16px 12px 6px; }
.app-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  font-weight: 500;
}
.app-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-nav a.active { background: rgba(20,181,58,.18); color: #fff; }
.app-nav svg { width: 18px; height: 18px; }
.app-main { padding: 28px 32px; background: var(--bg-alt); }
@media (max-width: 900px) { .app-sidebar { position: static; height: auto; } .app-main { padding: 24px 16px; } }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.05);
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 16px;
}
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--mali-green) 0%, var(--mali-yellow) 100%); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .85rem; }
.user-chip strong { color: #fff; font-size: .85rem; display: block; line-height: 1.2; }
.user-chip small { color: rgba(255,255,255,.55); font-size: .72rem; }

.app-topbar { background: #fff; padding: 14px 32px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; margin: -28px -32px 24px; }
@media (max-width: 900px) { .app-topbar { margin: -24px -16px 20px; padding: 12px 16px; } }
.app-topbar h2 { margin: 0; font-size: 1.3rem; }
.app-topbar-actions { display: flex; gap: 10px; align-items: center; }

/* ===== Section routing (espaces) ===== */
.section-view { display: none; }
.section-view.is-active { display: block; }
.section-view.is-active.is-default-grid > .dash-grid { animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ===== Misc utilities ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; } .mb-1 { margin-bottom: 8px; }
.mt-2 { margin-top: 16px; } .mb-2 { margin-bottom: 16px; }
.mt-3 { margin-top: 24px; } .mb-3 { margin-bottom: 24px; }
.mt-4 { margin-top: 32px; } .mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== Accessibility ===== */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ===== Print ===== */
@media print {
  .site-header, .site-footer, .gov-bar, .menu-toggle { display: none; }
  .container { max-width: 100%; }
}
