/* ============================================================
   CleanRide Bénin — Blog Design System
   Premium editorial. Blue trust + WhatsApp green conversion.
   ============================================================ */

:root {
  /* Brand */
  --blue: #0066FF;
  --blue-700: #0052CC;
  --blue-800: #0a3f99;
  --blue-50: #EAF1FF;
  --blue-100: #D6E4FF;
  --green: #00C853;
  --green-700: #00A844;
  --green-50: #E6F8EE;

  /* Ink + surfaces */
  --ink: #0E1525;
  --ink-soft: #3A4252;
  --muted: #6B7280;
  --faint: #9AA2B1;
  --bg: #FFFFFF;
  --gray: #F5F7FA;
  --gray-deep: #EEF1F6;
  --border: #E4E8F0;
  --border-soft: #EDF0F5;

  /* Type */
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Cyber extras (used by theme.css) */
  --secondary: #2563EB;
  --gold: #FFD700;
  --surface: #ffffff;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Shadow */
  --sh-xs: 0 1px 2px rgba(16,21,37,.06);
  --sh-sm: 0 2px 8px rgba(16,21,37,.06), 0 1px 2px rgba(16,21,37,.04);
  --sh-md: 0 8px 28px rgba(16,21,37,.08), 0 2px 6px rgba(16,21,37,.04);
  --sh-lg: 0 24px 60px rgba(16,21,37,.12), 0 6px 16px rgba(16,21,37,.06);
  --sh-blue: 0 12px 30px rgba(0,102,255,.28);
  --sh-green: 0 12px 30px rgba(0,200,83,.30);

  /* Rhythm — overridden by density tweak */
  --gap: 28px;
  --section-y: 88px;
  --maxw: 1200px;
}

/* density variants */
[data-density="aere"]  { --section-y: 116px; --gap: 36px; }
[data-density="dense"] { --section-y: 64px;  --gap: 20px; }

/* color ambiance variants */
[data-ambiance="clair"]  { --gray: #F7F9FC; --gray-deep: #F0F3F8; }
[data-ambiance="confiance"] { /* default */ }
[data-ambiance="profond"] {
  --gray: #F1F5FC; --gray-deep: #E7EEFA; --blue-50:#E4EEFF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--blue-100); }

/* ---------- Layout primitives ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }
.section { padding: var(--section-y) 0; }
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; }

/* ---------- Type scale ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue);
}
.eyebrow.green { color: var(--green-700); }
h1,h2,h3,h4 { margin: 0; line-height: 1.12; letter-spacing: -.022em; font-weight: 800; font-family: var(--display); }
.display, .h-xl, .h-lg, .cr-card-title, .cr-cat-name, .cr-stat-val, .cr-statblock-val, .cr-hero-stat b { font-family: var(--display); }
.display { font-size: clamp(38px, 5vw, 62px); font-weight: 800; letter-spacing: -.03em; line-height: 1.06; }
.h-xl { font-size: clamp(30px, 3.6vw, 46px); }
.h-lg { font-size: clamp(25px, 2.6vw, 34px); }
.h-md { font-size: 22px; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-soft); line-height: 1.65; }
.muted { color: var(--muted); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 650; font-size: 15px; line-height: 1; border: 0;
  padding: 14px 22px; border-radius: var(--r-md); transition: .18s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--sh-blue); }
.btn-primary:hover { background: var(--blue-700); transform: translateY(-1px); }
.btn-green { background: var(--green); color: #fff; box-shadow: var(--sh-green); }
.btn-green:hover { background: var(--green-700); transform: translateY(-1px); }
.btn-ghost { background: var(--gray); color: var(--ink); }
.btn-ghost:hover { background: var(--gray-deep); }
.btn-outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--blue); color: var(--blue); }
.btn-lg { padding: 17px 28px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 10px 15px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- Chips / tags ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: #fff; box-shadow: inset 0 0 0 1.4px var(--border);
  font-size: 13.5px; font-weight: 550; color: var(--ink-soft);
  transition: .16s ease;
}
.chip:hover { box-shadow: inset 0 0 0 1.4px var(--blue); color: var(--blue); transform: translateY(-1px); }
.chip.is-active { background: var(--blue); color: #fff; box-shadow: none; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; padding: 6px 11px; border-radius: var(--r-pill);
  background: var(--blue-50); color: var(--blue-700);
}
.tag.green { background: var(--green-50); color: var(--green-700); }

.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); display: inline-block; }
.meta { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--muted); font-weight: 500; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.card-pad { padding: 22px; }

/* placeholder imagery — striped, with monospace label */
.ph {
  position: relative; background:
    repeating-linear-gradient(135deg, var(--gray) 0 14px, var(--gray-deep) 14px 28px);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px; letter-spacing: .04em; color: var(--faint);
  background: rgba(255,255,255,.78); padding: 5px 10px; border-radius: 6px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.ph.blue {
  background:
    repeating-linear-gradient(135deg, var(--blue-50) 0 14px, var(--blue-100) 14px 28px);
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.input, .textarea, .select {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  padding: 13px 15px; border-radius: var(--r-md);
  background: #fff; border: 1.5px solid var(--border); transition: .16s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50);
}
.textarea { resize: vertical; min-height: 110px; }

/* ---------- Divider ---------- */
.hr { height: 1px; background: var(--border); border: 0; margin: 0; }

/* ---------- Animations ---------- */
@keyframes rise { from { transform: translateY(16px); } to { transform: none; } }
@keyframes pop  { from { transform: scale(.97); } to { transform: none; } }
/* Animation is transform-only so content is never hidden if the clock is frozen. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .5s cubic-bezier(.2,.7,.2,1); }
}

/* ---------- Scrollbar (search suggestions etc) ---------- */
.scroll-thin::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-thin::-webkit-scrollbar-thumb { background: var(--gray-deep); border-radius: 8px; }

/* ============================================================
   RESPONSIVE MOBILE — Primitives globales
   ============================================================ */
@media (max-width: 820px) {
  .wrap { padding: 0 22px; }
  .wrap-narrow { padding: 0 22px; }
}
@media (max-width: 560px) {
  .lead { font-size: clamp(16px, 4.5vw, 18px); }
  .h-md { font-size: 20px; }
  .btn-lg { padding: 15px 22px; font-size: 15px; }
}
@media (max-width: 420px) {
  .btn { font-size: 14px; }
  .btn-sm { padding: 9px 13px; font-size: 13px; }
  .btn-lg { padding: 13px 18px; font-size: 14.5px; }
  .h-md { font-size: 18px; }
  .lead { font-size: 15.5px; }
  .card-pad { padding: 16px; }
  .tag { font-size: 11px; padding: 5px 9px; }
}
