/* ============================================================
   SENFAS — Design tokens (wireframes hi-fi commerciaux)
   Color strategy: Committed (vert sapin profond + crème warm)
   Typo: Manrope (display, sans-serif sobre) + Geist (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Geist+Mono:wght@300;400;500&family=Geist:wght@300;400;500;600&display=swap');

:root {
  /* ---------- COLORS (OKLCH) — Warm-ground palette (Markal-inspired sober) ---------- */

  /* Crèmes warm — hue 80, fond de page */
  --cream-100:  oklch(98% 0.010 80);
  --cream-200:  oklch(96% 0.012 80);   /* fond principal — proche Markal #f7f2ee */
  --cream-300:  oklch(93% 0.014 75);
  --cream-400:  oklch(87% 0.016 70);

  /* Encres warm — texte sur crème, hue 50 */
  --ink-100:    oklch(72% 0.012 60);
  --ink-300:    oklch(52% 0.020 55);  /* texte secondaire */
  --ink-500:    oklch(34% 0.018 50);
  --ink-700:    oklch(22% 0.016 50);  /* texte par défaut */
  --ink-900:    oklch(16% 0.012 45);  /* titres — proche Markal #1a1817 */

  /* Vert sapin profond — accent committed (Markal-inspired #0c6744 / #119361) */
  --green-100:  oklch(94% 0.030 155);
  --green-300:  oklch(60% 0.110 155);
  --green-500:  oklch(40% 0.090 155);  /* accent principal */
  --green-700:  oklch(30% 0.080 155);  /* surface dominante */
  --green-900:  oklch(20% 0.060 155);

  /* Terre cuite — signal / CTA conversion (≤5 %) */
  --terra-300:  oklch(78% 0.110 55);
  --terra-500:  oklch(64% 0.150 55);
  --terra-700:  oklch(50% 0.130 55);

  /* Annotations colorées (panneau latéral) — gardées variées par lentille */
  --note-static:  oklch(58% 0.110 155);  /* 🟢 statique — sapin */
  --note-inter:   oklch(56% 0.130 240);  /* 🔵 interaction — bleu */
  --note-ai:      oklch(54% 0.180 305);  /* 🟣 IA — violet */
  --note-data:    oklch(64% 0.140 60);   /* 🟠 data — orange */
  --note-seo:     oklch(34% 0.018 50);   /* ⚫ SEO/a11y — encre warm */

  /* ---------- TYPE ---------- */
  --font-display: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, monospace;

  /* Échelle modulaire (ratio 1.333) */
  --text-xs:    clamp(11px, 0.7rem + 0.1vw, 12px);
  --text-sm:    clamp(13px, 0.8rem + 0.1vw, 14px);
  --text-base:  clamp(15px, 0.9rem + 0.2vw, 17px);
  --text-lg:    clamp(17px, 1rem + 0.3vw, 19px);
  --text-xl:    clamp(20px, 1.1rem + 0.5vw, 24px);
  --text-2xl:   clamp(26px, 1.3rem + 0.8vw, 32px);
  --text-3xl:   clamp(34px, 1.6rem + 1.4vw, 46px);
  --text-4xl:   clamp(46px, 2rem + 2.4vw, 64px);
  --text-5xl:   clamp(60px, 2.8rem + 3.5vw, 92px);
  --text-hero:  clamp(72px, 3.2rem + 5vw, 132px);

  /* ---------- SPACING (échelle 4pt complète, pas de trou) ---------- */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-7:  28px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;

  /* ---------- ELEVATION (rare) ---------- */
  --shadow-sm: 0 1px 2px oklch(16% 0.012 45 / 0.08), 0 0 0 1px oklch(87% 0.016 70);
  --shadow-md: 0 12px 32px oklch(16% 0.012 45 / 0.10), 0 0 0 1px oklch(87% 0.016 70);
  --shadow-lg: 0 32px 80px oklch(16% 0.012 45 / 0.16), 0 0 0 1px oklch(87% 0.016 70);

  /* ---------- LAYOUT ---------- */
  --container-max: 1320px;
  --container-narrow: 720px;
  --gutter: clamp(36px, 6vw, 88px);
  --rhythm-xs: clamp(40px, 5vw, 56px);
  --rhythm-sm: clamp(56px, 7vw, 88px);
  --rhythm-md: clamp(72px, 9vw, 120px);
  --rhythm-lg: clamp(96px, 11vw, 160px);
  --nav-h: 96px;          /* hauteur cumulée topbar + nav (compensation ancres) */
  --pager-h: 64px;        /* hauteur du pager fixe en bas */

  /* ---------- MOTION ---------- */
  --ease-out-quart: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-expo:  cubic-bezier(0.19, 1, 0.22, 1);
}

/* ============================================================
   BASE
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--cream-200);
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* marge tournante : laisse respirer le pager fixe (ajouté par wireframe-pager.js) */
body.has-wf-pager {
  padding-bottom: var(--pager-h);
}

/* anchored sections clear the sticky nav */
section[id], article[id], div[id] {
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

::selection {
  background: var(--green-500);
  color: var(--cream-100);
}

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

/* ============================================================
   TYPO UTILITIES
   ============================================================ */

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--ink-900);
}

/* .display-italic — préservé pour compat des classes, mais Manrope n'a pas d'italique éditorial.
   On utilise un weight différent + couleur accent pour marquer le rôle "accent" sans italique. */
.display-italic {
  font-style: normal;
  font-weight: 600;
  color: var(--green-700);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-300);
}

.tabular {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms var(--ease-out-quart);
}

/* ============================================================
   ANNOTATIONS PANEL
   ============================================================ */

.note-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--cream-100);
  margin: 0 4px;
  vertical-align: middle;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 160ms var(--ease-out-quart), box-shadow 200ms var(--ease-out-quart);
}

.note-marker:hover {
  transform: scale(1.18);
  box-shadow: 0 0 0 4px oklch(96% 0.012 80 / 0.95), 0 0 0 5px currentColor;
}

.note-marker.is-active {
  transform: scale(1.25);
  box-shadow: 0 0 0 4px oklch(96% 0.012 80), 0 0 0 6px currentColor;
  animation: notePulse 1.6s var(--ease-out-quart) infinite;
}

@keyframes notePulse {
  0%, 100% { box-shadow: 0 0 0 4px oklch(96% 0.012 80), 0 0 0 6px currentColor; }
  50%      { box-shadow: 0 0 0 4px oklch(96% 0.012 80), 0 0 0 10px oklch(54% 0.180 305 / 0.18); }
}

.note-marker[data-type="static"] { background: var(--note-static); color: oklch(96% 0.012 80); }
.note-marker[data-type="inter"]  { background: var(--note-inter); }
.note-marker[data-type="ai"]     { background: var(--note-ai); }
.note-marker[data-type="data"]   { background: var(--note-data); }
.note-marker[data-type="seo"]    { background: var(--note-seo); }

/* === Panneau annotations === */

.notes-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: clamp(320px, 32vw, 420px);
  height: 100vh;
  background: var(--cream-100);
  border-left: 1px solid var(--cream-400);
  display: flex;
  flex-direction: column;
  font-size: var(--text-sm);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 360ms var(--ease-out-expo);
  box-shadow: -32px 0 80px oklch(16% 0.012 45 / 0.08);
}

.notes-panel.is-open {
  transform: translateX(0);
}

.notes-panel-header {
  padding: var(--s-6) var(--s-6) var(--s-4);
  border-bottom: 1px solid var(--cream-300);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--s-3);
  align-items: center;
}

.notes-panel-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.notes-panel-title h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-lg);
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.notes-panel-title-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-300);
}

.notes-counter {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-700);
  background: var(--cream-300);
  padding: 4px 10px;
  border-radius: 999px;
  font-feature-settings: "tnum";
}

.notes-counter [data-current] {
  color: var(--green-700);
  font-weight: 500;
}

.notes-panel-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--cream-400);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--ink-700);
  transition: all 200ms var(--ease-out-quart);
}

.notes-panel-close:hover {
  background: var(--ink-900);
  color: var(--cream-100);
  border-color: var(--ink-900);
}

.notes-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--cream-300);
  background: var(--cream-200);
}

.notes-filter {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--cream-400);
  background: var(--cream-100);
  color: var(--ink-500);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 160ms var(--ease-out-quart);
}

.notes-filter:hover {
  border-color: var(--ink-700);
  color: var(--ink-900);
}

.notes-filter.is-active {
  background: var(--ink-900);
  color: var(--cream-100);
  border-color: var(--ink-900);
}

.notes-filter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.notes-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--s-2) var(--s-6);
  scroll-behavior: smooth;
}

.note-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--cream-300);
  cursor: pointer;
  align-items: start;
  position: relative;
  transition: padding 200ms var(--ease-out-quart);
}

.note-item:last-child {
  border-bottom: none;
}

.note-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--green-500);
  border-radius: 0 2px 2px 0;
  transition: height 240ms var(--ease-out-quart);
}

.note-item.is-active::before {
  height: 60%;
}

.note-item.is-active {
  padding-left: var(--s-2);
}

.note-item.is-hidden {
  display: none;
}

.note-item .note-marker {
  margin-top: 1px;
  cursor: pointer;
}

.note-item-body strong {
  color: var(--ink-900);
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
  font-size: var(--text-sm);
  line-height: 1.35;
}

.note-item.is-active .note-item-body strong {
  color: var(--green-700);
}

.note-item-body p {
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.55;
}

.notes-panel-footer {
  padding: var(--s-3) var(--s-6);
  border-top: 1px solid var(--cream-300);
  background: var(--cream-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-300);
}

.notes-panel-footer kbd {
  font-family: var(--font-mono);
  background: var(--cream-100);
  border: 1px solid var(--cream-400);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  color: var(--ink-700);
  margin: 0 2px;
}

/* Toggle button */
.notes-panel-toggle {
  position: fixed;
  top: var(--s-4);
  right: var(--s-4);
  z-index: 101;
  background: var(--ink-900);
  color: var(--cream-100);
  border: none;
  padding: 10px var(--s-4) 10px var(--s-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  transition: all 200ms var(--ease-out-quart);
  box-shadow: var(--shadow-md);
}

.notes-panel-toggle:hover {
  background: var(--green-700);
  transform: translateY(-1px);
}

.notes-panel-toggle .toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-300);
  animation: notePulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

.notes-panel-toggle .toggle-count {
  font-family: var(--font-mono);
  background: oklch(100% 0 0 / 0.15);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
}

.notes-panel.is-open ~ .notes-panel-toggle .toggle-dot {
  display: none;
}

/* === Mini-map verticale (cachée par défaut, visible quand panneau ouvert) === */
.notes-minimap {
  position: fixed;
  right: clamp(330px, 32.5vw, 432px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 99;
  display: none;
  flex-direction: column;
  gap: 6px;
  background: oklch(100% 0 0 / 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid var(--cream-400);
  padding: var(--s-2);
  border-radius: 999px;
}

.notes-panel.is-open ~ .notes-minimap {
  display: flex;
}

.notes-minimap-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out-quart), background 160ms var(--ease-out-quart);
  position: relative;
}

.notes-minimap-dot:hover {
  transform: scale(1.3);
  background: currentColor;
}

.notes-minimap-dot.is-active {
  background: currentColor;
  transform: scale(1.3);
}

.notes-minimap-dot[data-type="static"] { color: var(--note-static); }
.notes-minimap-dot[data-type="inter"]  { color: var(--note-inter); }
.notes-minimap-dot[data-type="ai"]     { color: var(--note-ai); }
.notes-minimap-dot[data-type="data"]   { color: var(--note-data); }
.notes-minimap-dot[data-type="seo"]    { color: var(--note-seo); }

/* === Tooltip flottant au click sur marker (site reste visible) === */
.note-tooltip {
  position: fixed;
  width: 380px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--cream-100);
  border: 1px solid var(--cream-400);
  border-radius: 12px;
  padding: var(--s-5) var(--s-5) var(--s-4);
  box-shadow:
    0 24px 60px oklch(16% 0.012 45 / 0.28),
    0 0 0 1px oklch(87% 0.016 70),
    0 0 0 6px oklch(96% 0.012 80 / 0.6);
  z-index: 9999;
  font-family: var(--font-body);
  animation: tooltipIn 280ms var(--ease-out-expo);
  transform-origin: top left;
}

.note-tooltip::before {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  background: var(--cream-100);
  border: 1px solid var(--cream-400);
  transform: rotate(45deg);
  pointer-events: none;
}

.note-tooltip[data-pos="right"]::before {
  left: -7px;
  top: var(--pointer-y, 24px);
  border-right: none;
  border-top: none;
}

.note-tooltip[data-pos="left"]::before {
  right: -7px;
  top: var(--pointer-y, 24px);
  border-left: none;
  border-bottom: none;
}

.note-tooltip[data-pos="below"]::before {
  top: -7px;
  left: var(--pointer-x, 24px);
  border-right: none;
  border-bottom: none;
}

.note-tooltip[data-pos="above"]::before {
  bottom: -7px;
  left: var(--pointer-x, 24px);
  border-left: none;
  border-top: none;
}

.note-tooltip-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-3);
  align-items: center;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--cream-300);
}

.note-tooltip-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--cream-100);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}
.note-tooltip-num[data-type="static"] { background: var(--note-static); }
.note-tooltip-num[data-type="inter"]  { background: var(--note-inter); }
.note-tooltip-num[data-type="ai"]     { background: var(--note-ai); }
.note-tooltip-num[data-type="data"]   { background: var(--note-data); }
.note-tooltip-num[data-type="seo"]    { background: var(--note-seo); }

.note-tooltip-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.note-tooltip-close {
  width: 28px; height: 28px;
  border: 1px solid var(--cream-400);
  background: var(--cream-100);
  color: var(--ink-500);
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 200ms var(--ease-out-quart);
  flex-shrink: 0;
}
.note-tooltip-close:hover {
  background: var(--ink-900);
  color: var(--cream-100);
  border-color: var(--ink-900);
  transform: rotate(90deg);
}
.note-tooltip-close svg { width: 12px; height: 12px; }

.note-tooltip-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-700);
  margin-bottom: var(--s-4);
  letter-spacing: -0.005em;
}
.note-tooltip-body strong { color: var(--ink-900); font-weight: 500; }
.note-tooltip-body em { font-style: italic; color: var(--green-700); font-weight: 500; }

.note-tooltip-foot {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  justify-content: space-between;
  padding-top: var(--s-3);
  border-top: 1px solid var(--cream-300);
  flex-wrap: wrap;
}

.note-tooltip-category {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-300);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.note-tooltip-category-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
}

.note-tooltip-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

.note-tooltip-nav-btn {
  width: 26px; height: 26px;
  border: 1px solid var(--cream-400);
  background: var(--cream-100);
  color: var(--ink-500);
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 160ms var(--ease-out-quart);
}
.note-tooltip-nav-btn:hover:not(:disabled) {
  background: var(--green-700);
  color: var(--cream-100);
  border-color: var(--green-700);
}
.note-tooltip-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.note-tooltip-nav-btn svg { width: 12px; height: 12px; }

.note-tooltip-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-300);
  min-width: 44px;
  text-align: center;
}

.note-tooltip-link {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-700);
  background: transparent;
  border: 1px solid var(--green-700);
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 160ms var(--ease-out-quart);
}
.note-tooltip-link:hover {
  background: var(--green-700);
  color: var(--cream-100);
}

@keyframes tooltipIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 640px) {
  .note-tooltip {
    width: calc(100vw - 24px);
    padding: var(--s-4);
  }
  .note-tooltip::before { display: none; }
}

.screenshot-mode .note-tooltip { display: none !important; }

/* === Wireframe pager (navigation entre wireframes en bas d'écran) === */
.wf-pager {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--pager-h);
  z-index: 80;
  background: oklch(16% 0.012 45 / 0.96);
  backdrop-filter: blur(12px);
  color: var(--cream-100);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  border-top: 1px solid oklch(30% 0.060 155 / 0.4);
}

.wf-pager-link {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0 var(--s-6);
  color: oklch(82% 0.040 155);
  text-decoration: none;
  transition: all 240ms var(--ease-out-quart);
  min-width: 0;
}

.wf-pager-link:hover {
  background: oklch(20% 0.060 155);
  color: var(--cream-100);
}

.wf-pager-link.is-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.wf-pager-link.next {
  justify-content: flex-end;
  text-align: right;
}

.wf-pager-arrow {
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 200ms var(--ease-out-quart);
}

.wf-pager-link:hover .wf-pager-arrow {
  transform: translateX(0);
}

.wf-pager-link.prev:hover .wf-pager-arrow { transform: translateX(-4px); }
.wf-pager-link.next:hover .wf-pager-arrow { transform: translateX(4px); }

.wf-pager-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wf-pager-label {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: oklch(60% 0.040 155);
}

.wf-pager-title {
  color: var(--cream-100);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: -0.01em;
  font-weight: 500;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-pager-center {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 0 var(--s-6);
  border-left: 1px solid oklch(30% 0.060 155 / 0.4);
  border-right: 1px solid oklch(30% 0.060 155 / 0.4);
}

.wf-pager-index {
  color: var(--green-300);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid oklch(40% 0.080 155);
  background: transparent;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  transition: all 200ms var(--ease-out-quart);
}

.wf-pager-index:hover {
  background: oklch(40% 0.080 155);
  color: var(--cream-100);
}

.wf-pager-index .wf-pager-grid-icon {
  flex-shrink: 0;
  transition: transform 200ms var(--ease-out-quart);
}

.wf-pager-index:hover .wf-pager-grid-icon {
  transform: scale(1.15) rotate(90deg);
}

.wf-pager-home {
  color: oklch(60% 0.040 155);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 160ms var(--ease-out-quart);
}

.wf-pager-home:hover {
  background: oklch(20% 0.060 155);
  color: var(--green-300);
}

.wf-pager-progress {
  display: flex;
  gap: 4px;
}

.wf-pager-tick {
  width: 18px;
  height: 3px;
  background: oklch(30% 0.060 155);
  border-radius: 2px;
  transition: background 200ms var(--ease-out-quart);
}

.wf-pager-tick.is-current {
  background: var(--green-300);
}

.wf-pager-tick.is-passed {
  background: oklch(50% 0.080 155);
}

@media (max-width: 768px) {
  .wf-pager {
    grid-template-columns: 1fr 1fr;
  }
  .wf-pager-center {
    display: none;
  }
  .wf-pager-title {
    display: none;
  }
}

/* === Wireframe overview overlay (vue d'ensemble des 12 templates) === */
.wf-overview {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: stretch;
  justify-content: center;
  background: oklch(16% 0.012 45 / 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: clamp(20px, 4vw, 56px);
  overflow-y: auto;
  animation: overviewFadeIn 240ms var(--ease-out-quart);
}

.wf-overview.is-open {
  display: flex;
}

@keyframes overviewFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.wf-overview-panel {
  width: 100%;
  max-width: 1280px;
  margin: auto;
  background: var(--cream-100);
  border-radius: 18px;
  box-shadow: 0 40px 100px oklch(16% 0.012 45 / 0.40);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: overviewSlideIn 320ms var(--ease-out-quart);
}

@keyframes overviewSlideIn {
  from { opacity: 0; transform: translateY(24px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wf-overview-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: var(--s-6);
  padding: var(--s-8) var(--s-10) var(--s-6);
  border-bottom: 1px solid var(--cream-300);
}

.wf-overview-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-500);
  margin-bottom: var(--s-3);
}

.wf-overview-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--green-500);
}

.wf-overview-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 1.4rem + 1.6vw, 44px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0;
}

/* Accent dans le titre de l'overview : Manrope, pas d'italique éditorial — poids + couleur */
.wf-overview-title em {
  font-style: normal;
  color: var(--green-500);
  font-weight: 600;
}

.wf-overview-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

.wf-overview-kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-300);
  margin-right: var(--s-3);
}

.wf-overview-kbd kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--cream-400);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--cream-200);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-700);
  margin: 0 1px;
}

.wf-overview-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--cream-400);
  background: transparent;
  color: var(--ink-700);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 200ms var(--ease-out-quart);
}

.wf-overview-home:hover {
  background: var(--cream-200);
  border-color: var(--ink-300);
}

.wf-overview-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--cream-400);
  background: var(--cream-100);
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 200ms var(--ease-out-quart);
}

.wf-overview-close:hover {
  background: var(--ink-700);
  color: var(--cream-100);
  border-color: var(--ink-700);
  transform: rotate(90deg);
}

.wf-overview-body {
  padding: var(--s-8) var(--s-10) var(--s-10);
  display: flex;
  flex-direction: column;
  gap: var(--s-10);
}

.wf-overview-section-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--cream-300);
}

.wf-overview-section-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--green-500);
}

.wf-overview-section-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}

/* Sous-titre de section overview : remplace l'italique décoratif par couleur atténuée */
.wf-overview-section-name em {
  font-style: normal;
  color: var(--ink-300);
  font-weight: 400;
  font-size: var(--text-base);
  margin-left: var(--s-2);
}

.wf-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s-4);
}

.wf-overview-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--s-3);
  padding: var(--s-4);
  background: var(--cream-200);
  border: 1px solid var(--cream-400);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-700);
  transition: all 220ms var(--ease-out-quart);
  overflow: hidden;
  min-height: 168px;
}

.wf-overview-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, oklch(60% 0.110 155 / 0.10) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 240ms var(--ease-out-quart);
  pointer-events: none;
}

.wf-overview-card:hover {
  transform: translateY(-3px);
  border-color: var(--green-500);
  box-shadow: 0 12px 32px oklch(16% 0.012 45 / 0.10);
}

.wf-overview-card:hover::before {
  opacity: 1;
}

.wf-overview-card.is-current {
  background: var(--green-700);
  border-color: var(--green-500);
  color: var(--cream-100);
}

.wf-overview-card.is-current .wf-overview-card-num,
.wf-overview-card.is-current .wf-overview-card-title {
  color: var(--cream-100);
}

.wf-overview-card.is-current .wf-overview-card-pill {
  background: var(--green-500);
  color: var(--cream-100);
  border-color: oklch(60% 0.110 155);
}

.wf-overview-card.is-current .wf-overview-card-arrow {
  color: var(--green-300);
}

.wf-overview-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wf-overview-card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-300);
  text-transform: uppercase;
}

.wf-overview-card-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--cream-400);
  background: var(--cream-100);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  text-transform: uppercase;
}

.wf-overview-card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink-900);
  margin: 0;
}

.wf-overview-card-desc {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--ink-300);
  margin: 0;
}

.wf-overview-card.is-current .wf-overview-card-desc {
  color: oklch(82% 0.040 155);
}

.wf-overview-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid oklch(40% 0.012 45 / 0.08);
}

.wf-overview-card.is-current .wf-overview-card-foot {
  border-top-color: oklch(60% 0.080 155 / 0.3);
}

.wf-overview-card-cue {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  color: var(--ink-300);
  text-transform: uppercase;
}

.wf-overview-card.is-current .wf-overview-card-cue {
  color: var(--green-300);
}

.wf-overview-card-arrow {
  font-size: 16px;
  color: var(--ink-300);
  transition: transform 200ms var(--ease-out-quart);
}

.wf-overview-card:hover .wf-overview-card-arrow {
  transform: translateX(4px);
  color: var(--green-500);
}

.wf-overview-current-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-300);
  box-shadow: 0 0 0 4px oklch(60% 0.110 155 / 0.25);
  animation: overviewPulse 2s var(--ease-out-quart) infinite;
}

@keyframes overviewPulse {
  0%, 100% { box-shadow: 0 0 0 4px oklch(60% 0.110 155 / 0.25); }
  50%      { box-shadow: 0 0 0 8px oklch(60% 0.110 155 / 0.10); }
}

@media (max-width: 768px) {
  .wf-overview {
    padding: 12px;
  }
  .wf-overview-head {
    grid-template-columns: 1fr;
    padding: var(--s-6) var(--s-4) var(--s-4);
  }
  .wf-overview-actions {
    justify-content: flex-end;
  }
  .wf-overview-kbd {
    display: none;
  }
  .wf-overview-body {
    padding: var(--s-4);
  }
  .wf-overview-grid {
    grid-template-columns: 1fr;
  }
}

.screenshot-mode .wf-overview { display: none !important; }

/* ============================================================
   COMPONENT BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  transition: all 200ms var(--ease-out-quart);
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink-900);
  color: var(--cream-100);
}

.btn-primary:hover {
  background: var(--green-700);
}

.btn-secondary {
  background: transparent;
  color: var(--ink-900);
  border: 1.5px solid var(--ink-700);
}

.btn-secondary:hover {
  background: var(--ink-900);
  color: var(--cream-100);
}

.btn-conversion {
  background: var(--terra-500);
  color: var(--cream-100);
}

.btn-conversion:hover {
  background: var(--terra-700);
}

.btn-link {
  background: transparent;
  padding: 0;
  color: var(--ink-900);
  border-bottom: 1.5px solid var(--ink-900);
  border-radius: 0;
  padding-bottom: 2px;
}

.btn-link:hover {
  color: var(--green-700);
  border-bottom-color: var(--green-700);
}

/* ============================================================
   BADGES (certifications, marques)
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--cream-300);
  color: var(--ink-700);
  border-radius: 3px;
}

.badge-accent {
  background: var(--green-100);
  color: var(--green-700);
}

.badge-signal {
  background: var(--terra-300);
  color: var(--terra-700);
}

/* ============================================================
   GRID HELPERS
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ============================================================
   SCROLL REVEAL (sobre)
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms var(--ease-out-quart), transform 600ms var(--ease-out-quart);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HEADER B2C PARTAGÉ (injecté par front-shell.js)
   ============================================================ */

.topbar {
  background: var(--green-900);
  color: var(--cream-200);
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-6);
}

.topbar-message {
  opacity: 0.85;
}

.topbar-cta {
  color: var(--cream-100);
  border-bottom: 1px solid oklch(80% 0.040 155 / 0.4);
  padding-bottom: 1px;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  transition: border-color 200ms var(--ease-out-quart);
}

.topbar-cta:hover {
  border-bottom-color: var(--cream-100);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(96% 0.012 80 / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out-quart), background 200ms var(--ease-out-quart);
}

.nav.is-scrolled {
  border-bottom-color: var(--cream-400);
  background: oklch(98% 0.010 80 / 0.96);
}

.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--s-8);
  padding: var(--s-4) 0;
}

.nav-logo svg {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: var(--s-8);
  list-style: none;
  font-size: var(--text-sm);
  font-weight: 500;
}

.nav-links a {
  position: relative;
  color: var(--ink-700);
  padding: 4px 0;
  transition: color 160ms var(--ease-out-quart);
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--green-700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out-quart);
}

.nav-links a:hover {
  color: var(--green-700);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  transform: scaleX(1);
}

.nav-links a.is-active {
  color: var(--green-700);
}

.nav-search {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--ink-700);
  background: transparent;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-700);
  transition: all 200ms var(--ease-out-quart);
}

.nav-search:hover {
  background: var(--ink-900);
  color: var(--cream-100);
  border-color: var(--ink-900);
}

.nav-pro {
  background: var(--terra-500);
  color: var(--cream-100);
  padding: 10px 18px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 200ms var(--ease-out-quart);
}

.nav-pro:hover {
  background: var(--terra-700);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-inner { grid-template-columns: auto 1fr auto; gap: var(--s-3); }
  .nav-pro { padding: 8px 12px; font-size: 10px; }
}

/* ============================================================
   FOOTER PARTAGÉ
   ============================================================ */

.site-footer {
  background: var(--green-900);
  color: var(--cream-200);
  padding: var(--s-20) 0 var(--s-8);
  margin-top: var(--s-32);
}

.site-footer a:hover {
  color: var(--cream-100);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }

  .notes-panel {
    width: 100%;
  }
}

/* ============================================================
   PRINT / SCREENSHOT MODE (pour le PDF devis)
   ============================================================ */

.screenshot-mode .notes-panel-toggle,
.screenshot-mode .notes-panel,
.screenshot-mode .notes-minimap,
.screenshot-mode .wf-pager {
  display: none !important;
}

.screenshot-mode body {
  padding-bottom: 0;
}
