/* ============================================================
   Le glaive et le bouclier — feuille de style long-format
   Direction artistique Institut Vidocq appliquée au rapport
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper-edge);
  color: var(--ink);
  font-family: var(--font-text);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Running head (écran) ─────────────────────────────── */
.runhead {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: var(--vidocq-900);
  color: var(--paper);
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.runhead .rh-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.runhead img { width: 26px; height: 26px; filter: none; flex: none; }
.runhead .rh-title {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0.92;
}
.runhead .rh-right {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  opacity: 0.6; white-space: nowrap;
}
.runhead a { color: inherit; text-decoration: none; }

/* ── Page sheets ──────────────────────────────────────── */
.sheet {
  background: var(--paper);
  max-width: 940px;
  margin: 0 auto;
}
.sheet + .sheet { margin-top: 0; }

/* Reading measure */
.col {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Cover ────────────────────────────────────────────── */
.cover {
  background: var(--vidocq-900);
  color: var(--paper);
  min-height: 100vh;
  max-width: none;
  display: flex; flex-direction: column;
  padding: 56px clamp(28px, 6vw, 92px) 48px;
  position: relative;
}
.cover .c-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid rgba(255,255,255,0.28);
  padding-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  line-height: 1.7; opacity: 0.82;
}
.cover .c-top .right { text-align: right; }
.cover .c-mid {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 0;
}
.cover .c-seal { width: 150px; height: 150px; filter: none; margin-bottom: 56px; }
.cover .kicker {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase;
  opacity: 0.7; margin-bottom: 26px;
}
.cover h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(56px, 11vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  margin: 0;
}
.cover h1 em { font-style: italic; }
.cover .c-rule { width: 84px; border-top: 1px solid rgba(255,255,255,0.55); margin: 40px 0; }
.cover .c-sub {
  font-family: var(--font-display);
  font-style: italic; font-weight: 400;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.32; max-width: 620px; opacity: 0.92;
}
.cover .c-bot {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px;
  border-top: 1px solid rgba(255,255,255,0.28);
  padding-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.82; line-height: 1.7;
}
.cover .c-bot .right { text-align: right; }

/* ── Title / half-title page ──────────────────────────── */
.frontmatter { padding: 92px 0 72px; }
.frontmatter .col > .fm-kicker {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--vidocq-800); margin-bottom: 20px;
}
.frontmatter h2.fm-title {
  font-family: var(--font-display);
  font-weight: 600; font-size: 40px; line-height: 1.05;
  color: var(--vidocq-900); margin: 0 0 8px;
}
.frontmatter .fm-sub {
  font-family: var(--font-display);
  font-style: italic; font-size: 22px; line-height: 1.35;
  color: var(--ink-soft); margin: 0 0 36px;
}
.frontmatter p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.frontmatter .fm-meta {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute); line-height: 1.9;
  border-top: 1px solid var(--rule); margin-top: 36px; padding-top: 18px;
}

/* ── Table of contents ────────────────────────────────── */
.toc { padding: 80px 0 72px; }
.toc h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 44px; color: var(--vidocq-900);
  margin: 0 0 36px; padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.toc .toc-group { margin-bottom: 30px; }
.toc .toc-group-label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--vidocq-800); margin-bottom: 12px;
}
.toc a.toc-item {
  display: flex; align-items: baseline; gap: 14px;
  text-decoration: none; color: var(--ink);
  padding: 9px 0; border-bottom: 1px solid var(--rule-soft);
  transition: color .15s, padding-left .15s;
}
.toc a.toc-item:hover { color: var(--vidocq-800); padding-left: 6px; }
.toc a.toc-item .num {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--ink-mute); flex: none; width: 28px;
}
.toc a.toc-item .label {
  font-family: var(--font-display); font-size: 21px; line-height: 1.2;
}
.toc a.toc-item .dots { flex: 1; border-bottom: 1px dotted var(--rule); transform: translatey(-4px); }

/* ── Part divider (full-bleed) ────────────────────────── */
.part-divider {
  background: var(--vidocq-900);
  color: var(--paper);
  max-width: none;
  padding: clamp(80px, 16vh, 200px) clamp(28px, 6vw, 92px);
  display: flex; flex-direction: column; justify-content: center;
  min-height: 62vh;
  position: relative;
}
.part-divider::before {
  content: "";
  position: absolute; inset: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  pointer-events: none;
}
.part-divider .pd-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: 0.4em; text-transform: uppercase;
  opacity: 0.7; margin-bottom: 28px;
}
.part-divider h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(40px, 6.5vw, 84px); line-height: 1.0;
  letter-spacing: -0.01em; margin: 0; max-width: 16ch;
}
.part-divider h2 em { font-style: italic; }
.part-divider .pd-seal {
  width: 64px; height: 64px; filter: none;
  opacity: 0.85; margin-bottom: 40px;
}

/* ── Body text ────────────────────────────────────────── */
.body { padding: 72px 0 80px; }

.body h2.section {
  font-family: var(--font-display); font-weight: 600;
  font-size: 30px; line-height: 1.12; color: var(--vidocq-900);
  margin: 56px 0 6px;
  padding-top: 26px; border-top: 1px solid var(--rule);
}
.body h2.section.first { border-top: none; padding-top: 0; margin-top: 0; }
.body h2.section + .meta-eyebrow { margin-top: 0; }

.body h3.case {
  font-family: var(--font-display); font-weight: 500;
  font-size: 25px; line-height: 1.18; color: var(--vidocq-900);
  margin: 46px 0 4px;
}
.body h3.case .case-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sepia-700); margin-bottom: 10px; font-weight: 500;
}

.body h3.subsec {
  font-family: var(--font-display); font-weight: 600;
  font-size: 24px; color: var(--vidocq-900);
  margin: 40px 0 4px;
}

.body h3.reco {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 14px; letter-spacing: 0.08em; line-height: 1.5;
  color: var(--vidocq-800); text-transform: uppercase;
  margin: 44px 0 10px; padding: 16px 20px;
  background: var(--paper-warm); border-left: 3px solid var(--vidocq-800);
}
.body h3.reco .reco-n { color: var(--sepia-700); }

.body p {
  font-size: 17.5px; line-height: 1.66; margin: 0 0 18px;
  color: var(--ink); hyphens: auto; text-wrap: pretty;
}
.body p.lead-first { }
.body h2.section + p, .body h3.case + p, .body h3.subsec + p, .body p.dropcap-host {
  /* first paragraph after a heading */
}

/* Drop cap on the first paragraph following a case-study or part opening */
.body p.dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  float: left;
  font-size: 4.4em;
  line-height: 0.78;
  padding: 6px 10px 0 0;
  color: var(--vidocq-800);
}

/* Footnote reference markers */
sup.fn {
  font-family: var(--font-mono);
  font-size: 0.62em; font-weight: 500;
  color: var(--sepia-700);
  padding-left: 1px; vertical-align: super; line-height: 0;
}

/* Pull-quote (used sparingly, applied to flagged paragraphs) */
.body blockquote.pull {
  margin: 34px 0; padding: 24px 0 24px 28px;
  border-left: 3px solid var(--vidocq-800);
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 27px; line-height: 1.3; color: var(--vidocq-900);
}

/* Eyebrow above preamble section blocks */
.meta-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--sepia-700); margin: 0 0 10px;
}

/* ── Comparative table ────────────────────────────────── */
.tablewrap { margin: 36px 0 8px; overflow-x: auto; }
table.compare {
  width: 100%; border-collapse: collapse;
  font-size: 13px; line-height: 1.4;
}
table.compare caption {
  text-align: left;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 14px;
}
table.compare th {
  text-align: left; vertical-align: bottom;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--paper); background: var(--vidocq-800);
  padding: 10px 12px;
}
table.compare td {
  vertical-align: top; padding: 12px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-text);
}
table.compare tr:nth-child(even) td { background: var(--paper-warm); }
table.compare td.year {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--vidocq-800); white-space: nowrap;
}
table.compare td.target { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--vidocq-900); line-height: 1.1; }

/* ── Sources / bibliography ───────────────────────────── */
.sources { padding: 72px 0 90px; }
.sources ol { list-style: none; counter-reset: src; margin: 0; padding: 0; }
.sources li {
  counter-increment: src;
  display: grid; grid-template-columns: 40px 1fr; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--rule-soft);
}
.sources li::before {
  content: counter(src);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--sepia-700); letter-spacing: 0.04em;
  text-align: right;
}
.sources .src-text { font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.sources .src-url {
  display: block; margin-top: 4px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--vidocq-700); word-break: break-all;
  text-decoration: none; letter-spacing: 0.01em;
}
.sources .src-url:hover { text-decoration: underline; }

/* ── Colophon ─────────────────────────────────────────── */
.colophon {
  background: var(--vidocq-900); color: var(--paper);
  max-width: none; text-align: center;
  padding: 80px 32px;
}
.colophon img { width: 84px; height: 84px; filter: none; margin-bottom: 26px; }
.colophon .co-line {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.28em; text-transform: uppercase; opacity: 0.75;
  line-height: 2;
}
.colophon .co-rule { width: 60px; border-top: 1px solid rgba(255,255,255,0.4); margin: 24px auto; }

/* ── Section anchor offset for sticky header ──────────── */
.anchor { scroll-margin-top: 64px; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 720px) {
  .col { padding: 0 22px; }
  .body p { font-size: 16.5px; }
  .runhead .rh-right { display: none; }
  .body h2.section { font-size: 26px; }
}

/* ── Print ────────────────────────────────────────────── */
@media print {
  body { background: #fff; }
  .runhead { display: none; }
  .sheet { max-width: none; box-shadow: none; }
  .cover, .part-divider, .colophon { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cover { min-height: 100vh; page-break-after: always; }
  .part-divider { page-break-before: always; min-height: auto; padding: 120px 60px; }
  .toc, .frontmatter { page-break-after: always; }
  .body p, .body h3.case, .body h2.section { page-break-inside: avoid; }
  .sources li { page-break-inside: avoid; }
  .col { max-width: none; padding: 0 18mm; }
  a { color: inherit; text-decoration: none; }
}
