:root {
  --bg: #0e0f11;
  --bg2: #15171a;
  --bg3: #1c1f24;
  --border: #2a2d33;
  --text: #e8e9eb;
  --muted: #6b7280;
  --accent: #4a9eff;
  --accent2: #00d4aa;
  --accent3: #f59e0b;
  --accent4: #e879a0;
  --red: #ff6b6b;
  --mono: 'DM Mono', monospace;
  --serif: 'Playfair Display', serif;
  --sans: 'DM Sans', sans-serif;
  --gold: #d4a853;
  --tip-text: #b0d8d0;
  --warning-text: #c8a040;
  --surface-hover: rgba(255,255,255,0.02);
  --shadow-deep: rgba(0,0,0,0.45);
  --shadow-card: rgba(0,0,0,0.35);
}

[data-theme="light"] {
  --bg:    #f5f6f8;
  --bg2:   #ffffff;
  --bg3:   #eef0f3;
  --border: #dde1e8;
  --text:   #1a1d23;
  --muted:  #5a6274;
  --accent:  #2b7de9;
  --accent2: #00a882;
  --accent3: #d97706;
  --accent4: #db5a8e;
  --red:     #dc2626;
  --gold:    #b8912a;
  --tip-text: #0d6b58;
  --warning-text: #7a5200;
  --surface-hover: rgba(0,0,0,0.025);
  --shadow-deep: rgba(0,0,0,0.12);
  --shadow-card: rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
}

/* HEADER */
header {
  padding: 60px 40px 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(74,158,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.header-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
header h1 {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
}
header h1 span { color: var(--accent2); font-style: italic; }
header p {
  color: var(--muted);
  font-size: 16px;
  max-width: 600px;
  line-height: 1.6;
}
.version-badge {
  display: inline-block;
  margin-top: 20px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

/* LAYOUT */
.container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 200px);
}

/* SIDEBAR */
nav {
  border-right: 1px solid var(--border);
  padding: 30px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
nav::-webkit-scrollbar { width: 3px; }
nav::-webkit-scrollbar-track { background: transparent; }
nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.nav-section {
  padding: 6px 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 4px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}
nav a:hover, nav a.active {
  color: var(--text);
  background: rgba(74,158,255,0.06);
  border-left-color: var(--accent);
}
nav a .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* MAIN CONTENT */
main {
  padding: 40px 50px;
  max-width: 900px;
}

.module {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.module-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.module-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.module-tag .tag-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.module-header h2 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
}
.module-header .subtitle {
  color: var(--muted);
  font-size: 15px;
  font-style: italic;
  font-family: var(--serif);
}

/* CARDS */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
}
.card h3 {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
}
.card p { color: var(--muted); font-size: 14px; line-height: 1.7; }

/* PARAM BLOCKS */
.param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
@media (max-width: 700px) { .param-grid { grid-template-columns: 1fr; } }

.param-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}
.param-name {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 4px;
}
.param-range {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent3);
  margin-bottom: 8px;
}
.param-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* PHOTOGRAPHER TIP */
.tip {
  background: rgba(0, 212, 170, 0.06);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 20px 0;
  position: relative;
}
.tip::before {
  content: '📷';
  position: absolute;
  top: -10px; left: 20px;
  background: var(--bg);
  padding: 0 6px;
  font-size: 16px;
}
.tip-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent2);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.tip p { font-size: 14px; color: var(--tip-text); line-height: 1.6; }

/* WARNING */
.warning {
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}
.warning p { font-size: 13px; color: var(--warning-text); }

/* WORKFLOW */
.workflow {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 20px 0;
}
.workflow-step {
  display: flex;
  gap: 14px;
  position: relative;
}
.workflow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13px;
  top: 28px;
  width: 1px;
  height: 100%;
  background: var(--border);
}
.step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  flex-shrink: 0; position: relative; z-index: 1;
}
.step-content {
  padding: 2px 0 10px;
}
.step-content h4 { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.step-content p { font-size: 13px; color: var(--muted); }
.step-notes {
  list-style: none; padding: 0; margin: 4px 0 0 0;
  display: flex; flex-direction: column; gap: 1px;
}
.step-notes li {
  font-size: 12px; color: var(--muted);
  padding-left: 16px; position: relative; line-height: 1.5;
}
.step-notes li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--border); font-family: var(--mono); font-size: 11px;
}
.step-notes li strong { color: var(--text); }
/* Override .editorial cascade when .workflow is inside .editorial */
.editorial .step-content h4 {
  font-size: 13px; font-weight: 500; color: var(--text);
  margin: 0 0 2px; font-family: var(--mono);
}
.editorial .step-notes {
  padding-left: 0; padding-right: 0;
  margin: 4px 0 0 0;
}
.editorial .step-notes li { margin: 0; }
.step-tag {
  display: inline-block; font-size: 10px; font-family: var(--mono);
  padding: 1px 7px; border-radius: 99px;
  border: 1px solid var(--border); color: var(--muted);
  margin-left: 8px; vertical-align: middle; letter-spacing: 0.02em;
}

/* TABLE */
table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13px; }
th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
td:first-child { font-family: var(--mono); font-size: 12px; color: var(--accent); }
td:nth-child(2) { color: var(--accent3); font-family: var(--mono); font-size: 11px; }
td:last-child { color: var(--muted); }
tr:hover td { background: rgba(74,158,255,0.03); }

/* LOOK PRESETS */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.preset-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.preset-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.preset-color {
  width: 100%; height: 50px;
  border-radius: 5px;
  margin-bottom: 10px;
}
.preset-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.preset-desc { font-size: 11px; color: var(--muted); }

/* BREADCRUMB */
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb span { color: var(--border); }

/* SEARCH */
.search-bar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.search-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--accent); }

/* HOME */
.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 30px;
}
.home-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
}
.home-card:hover {
  border-color: var(--accent);
  background: rgba(74,158,255,0.04);
  transform: translateY(-2px);
}
.home-card-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}
.home-card h3 { font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.home-card p { font-size: 12px; color: var(--muted); line-height: 1.5; }

code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--accent2);
}

.highlight { color: var(--accent); font-weight: 500; }
.highlight2 { color: var(--accent2); }
.highlight3 { color: var(--accent3); }

hr { border: none; border-top: 1px solid var(--border); margin: 28px 0; }

h3.section-title {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}
h3.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-top-link {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  background: var(--bg);
  padding-left: 8px;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  cursor: pointer;
  line-height: 1;
}
h3.section-title:hover .section-top-link { opacity: 1; }
.section-top-link:hover { color: var(--accent); }

/* ─── Hamburger button (desktop : caché) ─── */
.nav-toggle {
  display: none;
}
.nav-overlay {
  display: none;
}

/* ─── Responsive mobile ─── */
@media (max-width: 768px) {
  /* Bouton hamburger */
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 200;
    width: 40px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
  }

  /* Overlay sombre derrière la nav */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }
  .nav-overlay.open {
    display: block;
  }

  /* Container : 1 colonne */
  .container {
    grid-template-columns: 1fr;
  }

  /* Nav slide depuis la gauche */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 100;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  nav.open {
    transform: translateX(0);
  }

  /* Header padding réduit */
  header {
    padding: 50px 20px 30px;
  }

  /* Main padding réduit */
  main {
    padding: 24px 16px;
    max-width: 100%;
  }

  /* Grilles en 1 colonne */
  .home-grid {
    grid-template-columns: 1fr;
  }
  .preset-grid {
    grid-template-columns: 1fr;
  }
  .workflow {
    grid-template-columns: 1fr;
  }
  .param-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Lexique — Page ─── */
.lex-search { margin-bottom: 8px; }
.lex-search input {
  width: 100%; padding: 8px 14px; font-size: 13px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font-family: var(--sans);
  transition: border-color 0.15s;
}
.lex-search input:focus { outline: none; border-color: var(--accent); }

.lex-cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; }
.lex-cat-btn {
  font-size: 12px; padding: 4px 12px; border-radius: 99px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; font-family: var(--mono);
  transition: all 0.15s;
}
.lex-cat-btn.active, .lex-cat-btn:hover {
  background: rgba(74,158,255,0.12); color: var(--accent); border-color: var(--accent);
}

.lex-cat-title {
  font-size: 11px; font-family: var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin: 24px 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}

.lex-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 8px;
  cursor: pointer; transition: border-color 0.15s;
}
.lex-card:hover { border-color: var(--accent); }
.lex-card-header { display: flex; align-items: center; gap: 10px; }
.lex-card-name { font-size: 14px; font-weight: 500; color: var(--text); flex: 1; }
.lex-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 99px;
  font-family: var(--mono); flex-shrink: 0;
}
.lex-badge-general { background: rgba(107,114,128,0.2); color: var(--muted); }
.lex-badge-expo { background: rgba(74,158,255,0.15); color: var(--accent); }
.lex-badge-couleur { background: rgba(245,158,11,0.15); color: var(--accent3); }
.lex-badge-detail { background: rgba(232,121,160,0.15); color: var(--accent4); }

.lex-chevron { font-size: 11px; color: var(--muted); transition: transform 0.2s; flex-shrink: 0; }
.lex-card.open .lex-chevron { transform: rotate(180deg); }
.lex-card-short { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.lex-card-detail {
  display: none; font-size: 13px; color: var(--muted); line-height: 1.6;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border);
}
.lex-card.open .lex-card-detail { display: block; }

/* ─── Liens Modules ART ─── */
.module-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(74,158,255,0.45);
  transition: color 0.15s, border-color 0.15s;
}
.module-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Lexique — Termes cliquables ─── */
.lexique-term {
  border-bottom: 1px dashed rgba(107,114,128,0.6);
  cursor: pointer;
}

/* ─── Lexique — Popup au clic ─── */
.lexique-tooltip {
  position: fixed;
  z-index: 1000;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  max-width: 280px;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 8px 24px var(--shadow-deep);
}
.lexique-tooltip.visible { opacity: 1; }
.ltt-name { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 4px; font-family: var(--mono); }
.ltt-short { font-size: 12px; color: var(--muted); line-height: 1.5; }
.ltt-link { display: block; font-size: 11px; color: var(--accent); margin-top: 8px; font-family: var(--mono); text-decoration: none; }
.ltt-link:hover { text-decoration: underline; }

/* ─── Bouton retour en haut ─── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, border-color 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  font-family: var(--mono);
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ─── Regard du Photographe — Composants éditoriaux ─── */

/* Citation d'ouverture */
.intro-quote {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  padding: 20px 0 20px 22px;
  border-left: 3px solid var(--gold);
  margin: 20px 0 28px;
}

/* Table des matières */
.toc {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 24px 0 36px;
}
.toc-title {
  font-size: 11px; font-family: var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 14px;
}
.toc ol { list-style: none; counter-reset: toc-counter; padding: 0; margin: 0; }
.toc ol li {
  counter-increment: toc-counter;
  margin: 8px 0;
  display: flex; align-items: baseline; gap: 12px;
}
.toc ol li::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--mono); font-size: 11px; color: var(--gold); flex-shrink: 0;
}
.toc ol a {
  font-size: 13px; color: var(--muted); text-decoration: none; transition: color 0.15s;
}
.toc ol a:hover { color: var(--text); }

/* Citation éditoriale / blockquote */
.blockquote {
  border-left: 3px solid var(--gold);
  background: rgba(212,168,83,0.07);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
}
.blockquote strong { color: var(--gold); font-style: normal; }
.blockquote em { font-style: italic; }

/* Encadré "principe / règle" (distinct du .tip technique) */
.insight {
  background: rgba(74,158,255,0.06);
  border: 1px solid rgba(74,158,255,0.2);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
}
.insight-label {
  font-size: 11px; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent); margin-bottom: 6px;
}
.insight p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.insight strong { color: var(--text); }

/* Carte erreur */
.erreur-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.erreur-title {
  font-size: 14px; font-weight: 500; color: var(--red); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.erreur-title::before { content: '✕'; font-size: 11px; opacity: 0.8; }
.erreur-body { font-size: 13px; color: var(--muted); line-height: 1.6; }
.erreur-body strong { color: var(--text); }
.erreur-test {
  margin-top: 12px; padding: 10px 14px; border-radius: 6px;
  background: rgba(0,212,170,0.08); font-size: 12px; color: var(--accent2);
  line-height: 1.5;
}
.erreur-test strong { color: var(--accent2); }

/* Styles typographiques pour pages éditoriales */
.editorial h4 {
  font-size: 14px; font-weight: 500; color: var(--gold);
  margin: 20px 0 8px; font-family: var(--sans);
}
.editorial ul, .editorial ol {
  padding-left: 20px; margin: 10px 0;
}
.editorial li {
  font-size: 13px; color: var(--muted); line-height: 1.6; margin: 5px 0;
}
.editorial li strong { color: var(--text); }
.editorial p {
  font-size: 14px; line-height: 1.7; color: var(--muted); margin: 12px 0;
}
.editorial p strong { color: var(--text); }
.editorial p em { font-style: italic; color: var(--text); }

/* ─── Workflows par Genre — Index cards ─── */
.wf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 28px 0;
}
.wf-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--wf-color, var(--accent));
  border-radius: 0 0 12px 12px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.15s;
}
.wf-card:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--shadow-card);
}
.wf-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.wf-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.wf-section-tag {
  font-size: 10px; font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.wf-card h3 {
  font-size: 16px; font-weight: 600; color: var(--text); margin: 0;
  font-family: var(--serif); line-height: 1.3;
}
.wf-card p.wf-enjeu {
  font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; flex: 1;
}
.wf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-chip {
  font-size: 10px; font-family: var(--mono);
  padding: 2px 8px; border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); color: var(--muted);
}
.wf-card-cta {
  font-size: 12px; font-family: var(--mono);
  color: var(--wf-color, var(--accent));
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--border);
}
@media (max-width: 768px) { .wf-grid { grid-template-columns: 1fr; } }

/* ─── Workflows — Lien retour index ─── */
.wf-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-family: var(--mono);
  color: var(--muted); text-decoration: none;
  margin-bottom: 28px; transition: color 0.15s;
}
.wf-back:hover { color: var(--text); }

/* ─── Workflows — Carte problème / solution ─── */
.wf-problem {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid rgba(245,158,11,0.7);
  border-radius: 0 10px 10px 0;
  padding: 18px 20px; margin-bottom: 20px;
}
.wf-problem-title {
  font-size: 14px; font-weight: 500; color: var(--text);
  margin-bottom: 10px; display: flex; align-items: baseline; gap: 8px;
}
.wf-problem-title::before {
  content: '?'; font-family: var(--mono); font-size: 11px;
  color: var(--accent3); flex-shrink: 0; font-weight: 700;
}
.wf-problem-body { font-size: 13px; color: var(--muted); line-height: 1.6; }
.wf-problem-body p { margin: 8px 0; }
.wf-problem-body p:first-child { margin-top: 0; }
.wf-problem-body strong { color: var(--text); }
.wf-solution {
  background: rgba(0,212,170,0.05);
  border: 1px solid rgba(0,212,170,0.15);
  border-radius: 6px; padding: 12px 16px; margin-top: 14px;
}
.wf-solution-label {
  font-size: 10px; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent2); margin-bottom: 8px;
}
.wf-solution p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 6px 0; }
.wf-solution p:first-of-type { margin-top: 0; }
.wf-solution strong { color: var(--text); }
.wf-solution ul { padding-left: 18px; margin: 8px 0; }
.wf-solution li { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 4px 0; }
.wf-solution li strong { color: var(--text); }

/* ─── Workflows — Bloc logique / étapes ─── */
.wf-steps {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 18px 22px; margin: 20px 0;
  overflow-x: auto;
}
.wf-steps-label {
  font-size: 10px; font-family: var(--mono); text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px;
}
.wf-steps pre {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); line-height: 1.9; margin: 0; white-space: pre;
}

/* ─── Direction Artistique — Look Cards ─── */
.look-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 20px 0;
}
.look-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.look-card.look-open {
  border-color: var(--look-color, var(--border));
}
.look-toggle-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  border-left: 3px solid var(--look-color, var(--border));
  user-select: none;
  border-radius: 9px;
  transition: background 0.15s;
}
.look-card.look-open .look-toggle-btn {
  border-radius: 9px 9px 0 0;
  border-bottom: 1px solid var(--border);
}
.look-toggle-btn:hover { background: var(--surface-hover); }
.look-card-left { flex: 1; min-width: 0; }
.look-card-name { font-size: 14px; font-weight: 500; color: var(--text); display: block; margin-bottom: 2px; }
.look-card-tag { font-size: 11px; color: var(--muted); font-family: var(--mono); display: block; }
.look-chevron { font-size: 18px; color: var(--muted); transition: transform 0.2s; flex-shrink: 0; line-height: 1; }
.look-card.look-open .look-chevron { transform: rotate(90deg); }
.look-body { display: none; padding: 16px; }
.look-card.look-open .look-body { display: block; }
.look-chip-key {
  border-color: var(--look-color, var(--border)) !important;
  color: var(--text) !important;
  font-weight: 500 !important;
}
.look-avoid {
  font-size: 12px; color: var(--muted);
  margin-top: 10px; padding: 8px 12px;
  border-left: 2px solid var(--border);
  line-height: 1.5;
}
.look-avoid strong { color: var(--text); }
.look-needs {
  font-size: 12px; color: var(--muted);
  margin-top: 8px; padding: 8px 12px;
  background: var(--surface-hover);
  border-radius: 6px;
  line-height: 1.5;
}
.look-needs strong { color: var(--text); }

/* ── Histogramme illustratif SVG ─────────────────────── */
.histo-demo {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px 10px;
  margin: 20px 0;
  overflow: hidden;
}
.histo-demo svg { display: block; width: 100%; height: auto; }
.histo-label {
  display: flex;
  justify-content: space-between;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  padding: 0 2px;
}

/* ─── Bouton toggle thème ─── */
.theme-toggle {
  position: fixed;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--text); }

/* ─── Overrides thème clair ─── */
[data-theme="light"] .tip {
  background: rgba(0,168,130,0.08);
  border-color: rgba(0,168,130,0.3);
}
[data-theme="light"] .warning {
  background: rgba(217,119,6,0.08);
  border-color: rgba(217,119,6,0.3);
}
[data-theme="light"] .insight {
  background: rgba(43,125,233,0.07);
  border-color: rgba(43,125,233,0.2);
}
[data-theme="light"] .blockquote {
  background: rgba(184,145,42,0.1);
}
[data-theme="light"] .lex-cat-btn.active,
[data-theme="light"] .lex-cat-btn:hover {
  background: rgba(43,125,233,0.1);
}
[data-theme="light"] nav a:hover,
[data-theme="light"] nav a.active {
  background: rgba(43,125,233,0.08);
}
[data-theme="light"] .wf-chip {
  background: rgba(0,0,0,0.04);
}
[data-theme="light"] .wf-solution {
  background: rgba(0,168,130,0.07);
  border-color: rgba(0,168,130,0.2);
}
[data-theme="light"] .erreur-test {
  background: rgba(0,168,130,0.08);
}
[data-theme="light"] .home-card:hover {
  background: rgba(43,125,233,0.05);
}
[data-theme="light"] tr:hover td {
  background: rgba(43,125,233,0.04);
}
[data-theme="light"] .nav-overlay {
  background: rgba(0,0,0,0.35);
}
[data-theme="light"] .module-link {
  border-bottom-color: rgba(43,125,233,0.45);
}
[data-theme="light"] .lex-badge-general { background: rgba(107,114,128,0.15); }
[data-theme="light"] .lex-badge-expo    { background: rgba(43,125,233,0.12); }
[data-theme="light"] .lex-badge-couleur { background: rgba(217,119,6,0.12); }
[data-theme="light"] .lex-badge-detail  { background: rgba(219,90,142,0.12); }
