/* ==========================================================================
   Fiche d'information Julien Jimenez
   Direction artistique : documentation et base de connaissance
   Palette : slate, cyan, cyan clair, fond gris tres clair
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables
   -------------------------------------------------------------------------- */
:root {
  /* Couleurs de base */
  --slate: #1E293B;
  --cyan: #0891B2;
  --cyan-dark: #0E7490;
  --cyan-light: #CFFAFE;
  --bg: #F8FAFC;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --muted: #64748B;

  /* Couleurs derivees */
  --border-strong: #CBD5E1;
  --surface: #FFFFFF;
  --surface-alt: #F1F5F9;
  --cyan-soft: #ECFEFF;
  --amber-soft: #FEF9C3;
  --amber-border: #FDE68A;
  --amber-ink: #78350F;

  /* Typographie */
  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --fs-xs: 0.78rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: clamp(1.1rem, 0.4vw + 1rem, 1.25rem);
  --fs-h3: clamp(1.15rem, 0.6vw + 1rem, 1.4rem);
  --fs-h2: clamp(1.5rem, 1.4vw + 1.05rem, 2.1rem);
  --fs-h1: clamp(2.4rem, 4.2vw + 1rem, 4rem);

  /* Espacements */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 2.75rem;
  --sp-8: 3.5rem;
  --sp-9: 5rem;

  /* Rayons */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 999px;

  /* Ombres */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --sh-sm: 0 1px 3px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
  --sh-md: 0 6px 18px -6px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.05);
  --sh-lg: 0 22px 44px -22px rgba(15, 23, 42, 0.28), 0 6px 14px rgba(15, 23, 42, 0.06);

  /* Divers */
  --header-h: 64px;
  --measure: 68ch;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reinitialisation et bases
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--slate);
}

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--cyan-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.18s var(--ease);
}
a:hover { color: var(--slate); }

ul, ol { margin: 0; padding: 0; }

strong { font-weight: 650; }

::selection {
  background: var(--cyan-light);
  color: var(--slate);
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  padding-inline: var(--sp-4);
}

/* Lien d'evitement */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  background: var(--slate);
  color: var(--white);
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--sp-3); color: var(--white); }

/* --------------------------------------------------------------------------
   3. Barre de progression de lecture
   -------------------------------------------------------------------------- */
.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 120;
  background: transparent;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-dark));
  transition: width 0.08s linear;
}

/* --------------------------------------------------------------------------
   4. En tete du site
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--sh-sm); }

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--slate);
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--slate);
  color: var(--cyan-light);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.04); background: var(--cyan-dark); color: var(--white); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: var(--fs-sm); font-weight: 700; }
.brand-text small { font-size: var(--fs-xs); color: var(--muted); }

.header-nav {
  display: none;
  align-items: center;
  gap: var(--sp-1);
}
.header-nav a {
  padding: 0.45rem 0.7rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 550;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease), background 0.18s var(--ease);
}
.header-nav a:hover { color: var(--slate); background: var(--surface-alt); }
.header-nav a.header-cta {
  margin-left: var(--sp-2);
  background: var(--slate);
  color: var(--white);
  padding: 0.5rem 0.95rem;
}
.header-nav a.header-cta:hover { background: var(--cyan-dark); color: var(--white); }

.toc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--slate);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.toc-toggle:hover { border-color: var(--cyan); box-shadow: var(--sh-xs); }
.toc-toggle-bars { display: grid; gap: 3px; }
.toc-toggle-bars i {
  display: block;
  width: 14px;
  height: 2px;
  background: var(--cyan-dark);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.toc-toggle[aria-expanded="true"] .toc-toggle-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.toc-toggle[aria-expanded="true"] .toc-toggle-bars i:nth-child(2) { opacity: 0; }
.toc-toggle[aria-expanded="true"] .toc-toggle-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. En tete de fiche
   -------------------------------------------------------------------------- */
.fiche-head {
  position: relative;
  background:
    radial-gradient(1000px 420px at 82% -10%, var(--cyan-soft), transparent 62%),
    linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-8) 0 var(--sp-7);
  overflow: hidden;
}
.fiche-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.4;
  mask-image: radial-gradient(680px 340px at 20% 0%, #000, transparent 78%);
  pointer-events: none;
}

.fiche-head-grid {
  position: relative;
  display: grid;
  gap: var(--sp-6);
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--cyan-dark);
}
.kicker .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}

h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.035em;
  margin-bottom: var(--sp-4);
}

.lede {
  font-size: var(--fs-lg);
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: var(--sp-5);
}

.fiche-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  list-style: none;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-5);
  max-width: 560px;
}
.fiche-meta li {
  background: var(--white);
  padding: 0.7rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fiche-meta span {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.fiche-meta strong { font-size: var(--fs-sm); color: var(--slate); }

.fiche-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-primary {
  background: var(--cyan-dark);
  color: var(--white);
  box-shadow: var(--sh-sm);
}
.btn-primary:hover {
  background: var(--slate);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.btn-ghost {
  background: var(--white);
  color: var(--slate);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan-dark);
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}

/* Portrait */
.portrait-frame {
  position: relative;
  margin: 0;
  justify-self: start;
  max-width: 380px;
}
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--cyan);
  border-radius: var(--r-lg);
  z-index: 0;
  opacity: 0.5;
  transition: inset 0.4s var(--ease);
}
.portrait-frame:hover::after { inset: 10px -18px -18px 10px; }
.portrait-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--sh-lg);
  filter: saturate(1.02) contrast(1.02);
}
.portrait-frame figcaption {
  position: relative;
  z-index: 1;
  margin-top: 1.1rem;
  font-size: var(--fs-xs);
  color: var(--muted);
  border-left: 2px solid var(--cyan);
  padding-left: 0.7rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   6. Mise en page documentaire
   -------------------------------------------------------------------------- */
.layout {
  display: grid;
  gap: var(--sp-6);
  padding-top: var(--sp-7);
  padding-bottom: var(--sp-9);
  align-items: start;
}

/* Sommaire lateral */
.toc {
  display: none;
}
.toc-inner {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-4);
  box-shadow: var(--sh-xs);
}
.toc-title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}
.toc-list {
  list-style: none;
  counter-reset: none;
  display: grid;
  gap: 1px;
  border-left: 2px solid var(--border);
}
.toc-list a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.42rem 0.6rem;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: var(--fs-sm);
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease), padding-left 0.18s var(--ease);
}
.toc-list a:hover {
  color: var(--slate);
  background: var(--surface-alt);
  padding-left: 0.8rem;
}
.toc-list a.is-active {
  color: var(--cyan-dark);
  font-weight: 650;
  border-left-color: var(--cyan);
  background: var(--cyan-soft);
}
.toc-num {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--border-strong);
  flex: none;
  transition: color 0.18s var(--ease);
}
.toc-list a.is-active .toc-num { color: var(--cyan); }
.toc-note {
  margin: var(--sp-4) 0 0;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border);
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   7. Sections de contenu
   -------------------------------------------------------------------------- */
.doc { min-width: 0; }

.doc-section {
  padding-bottom: var(--sp-8);
  margin-bottom: var(--sp-7);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.doc-section:last-child { border-bottom: 0; margin-bottom: 0; }

.doc-section > h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-3);
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.doc-section > h2::before {
  content: "";
  width: 26px;
  height: 3px;
  background: var(--cyan);
  border-radius: 2px;
  flex: none;
  transform: translateY(-0.35em);
}

.anchor {
  font-family: var(--font-mono);
  font-size: 0.75em;
  color: var(--border-strong);
  text-decoration: none;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease);
  cursor: pointer;
}
h2:hover .anchor,
h2:focus-within .anchor { opacity: 1; transform: translateX(0); }
.anchor:hover { color: var(--cyan); }
.anchor:focus-visible { opacity: 1; transform: translateX(0); }

.section-intro {
  max-width: var(--measure);
  color: var(--muted);
  font-size: var(--fs-base);
  margin-bottom: var(--sp-5);
}

/* Prose */
.prose { max-width: var(--measure); }
.prose h3 {
  font-size: var(--fs-h3);
  margin: var(--sp-6) 0 var(--sp-3);
  color: var(--slate);
}
.prose h3:first-child { margin-top: 0; }
.prose h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-top: 0.55rem;
  background: var(--cyan-light);
  border-radius: 2px;
}
.prose p { color: #334155; }

/* --------------------------------------------------------------------------
   8. Encadres
   -------------------------------------------------------------------------- */
.callout {
  margin-top: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  border-left-width: 4px;
  background: var(--white);
  font-size: var(--fs-base);
  box-shadow: var(--sh-xs);
  max-width: 88ch;
}
.callout-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  color: var(--slate);
}
.callout p:not(.callout-title) { color: #334155; }
.callout-info { border-left-color: var(--cyan); background: var(--cyan-soft); }
.callout-info .callout-title { color: var(--cyan-dark); }
.callout-note { border-left-color: var(--muted); background: var(--surface-alt); }
.callout-tip { border-left-color: var(--amber-border); background: var(--amber-soft); }
.callout-tip .callout-title { color: var(--amber-ink); }

/* --------------------------------------------------------------------------
   9. Tableaux
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--white);
  box-shadow: var(--sh-xs);
  max-height: 620px;
  overflow-y: auto;
}
.table-wrap:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
  min-width: 560px;
}
.data-table caption { text-align: left; }
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--slate);
  color: var(--white);
  text-align: left;
  font-weight: 650;
  font-size: var(--fs-xs);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.8rem 1rem;
  white-space: nowrap;
  border-bottom: 1px solid var(--slate);
}
.data-table thead th[data-sort] {
  cursor: pointer;
  user-select: none;
  transition: background 0.18s var(--ease);
}
.data-table thead th[data-sort]:hover { background: #334155; }
.data-table thead th[data-sort]::after {
  content: "\2195";
  margin-left: 0.5rem;
  opacity: 0.4;
  font-size: 0.9em;
}
.data-table thead th[aria-sort="ascending"]::after { content: "\2191"; opacity: 1; color: var(--cyan-light); }
.data-table thead th[aria-sort="descending"]::after { content: "\2193"; opacity: 1; color: var(--cyan-light); }

.data-table tbody th,
.data-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}
.data-table tbody th {
  font-weight: 650;
  color: var(--slate);
  white-space: normal;
}
.data-table tbody td { color: #334155; }
.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background 0.15s var(--ease); }
.data-table tbody tr:nth-child(even) { background: #FBFCFE; }
.data-table tbody tr:hover { background: var(--cyan-soft); }

.table-expertise { min-width: 760px; }
.table-expertise td:last-child { color: var(--muted); font-size: var(--fs-xs); }
.table-outils { min-width: 780px; }

.chip {
  display: inline-block;
  margin: 0 0.25rem 0.3rem 0;
  padding: 0.16rem 0.55rem;
  border-radius: var(--r-full);
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-light);
  color: var(--cyan-dark);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease);
}
.chip:hover { transform: translateY(-1px); background: var(--cyan-light); }

/* --------------------------------------------------------------------------
   10. Statistiques
   -------------------------------------------------------------------------- */
.stats-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--sp-3);
}
.stat {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cyan);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s var(--ease);
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
  border-color: var(--border-strong);
}
.stat:hover::before { transform: scaleY(1); }
.stat-value {
  font-size: clamp(1.55rem, 2.2vw + 1rem, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--slate);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-label {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   11. Figures larges
   -------------------------------------------------------------------------- */
.wide-figure {
  margin: 0 0 var(--sp-6);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--sh-sm);
}
.wide-figure img {
  width: 100%;
  aspect-ratio: 3 / 1.35;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.wide-figure:hover img { transform: scale(1.025); }
.wide-figure figcaption {
  padding: 0.7rem 1rem;
  font-size: var(--fs-xs);
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

/* --------------------------------------------------------------------------
   12. Etapes de methode
   -------------------------------------------------------------------------- */
.steps { list-style: none; display: grid; gap: var(--sp-4); }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.step:hover {
  border-color: var(--cyan);
  box-shadow: var(--sh-md);
  transform: translateX(3px);
}
.step-index {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--cyan-dark);
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-light);
  border-radius: var(--r-sm);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: none;
}
.step-body { min-width: 0; }
.step-body h3 { font-size: var(--fs-h3); margin-bottom: var(--sp-2); }
.step-body p { color: #334155; font-size: var(--fs-base); max-width: 66ch; }
.step-out {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 0.6rem;
}
.step-out span {
  display: inline-block;
  margin-right: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-dark);
}

/* --------------------------------------------------------------------------
   13. Glossaire et filtres
   -------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.filter {
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s var(--ease);
}
.filter:hover { border-color: var(--cyan); color: var(--cyan-dark); transform: translateY(-1px); }
.filter.is-active {
  background: var(--slate);
  border-color: var(--slate);
  color: var(--white);
}
.filter-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--surface-alt);
  color: var(--muted);
  border-radius: var(--r-full);
  padding: 0.05rem 0.4rem;
}
.filter.is-active .filter-count { background: rgba(255, 255, 255, 0.16); color: var(--cyan-light); }

.filter-status {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: var(--sp-4);
  font-family: var(--font-mono);
}

.glossary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-3);
  margin: 0;
}
.glossary-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.glossary-item:hover { border-color: var(--cyan); box-shadow: var(--sh-sm); transform: translateY(-2px); }
.glossary-item.is-hidden { display: none; }
.glossary-item dt {
  font-weight: 700;
  color: var(--slate);
  font-size: var(--fs-base);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.glossary-item dd {
  margin: 0;
  font-size: var(--fs-sm);
  color: #334155;
  line-height: 1.6;
}
.tag {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.1rem 0.45rem;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-alt);
}
.tag-technique { color: var(--cyan-dark); background: var(--cyan-soft); border-color: var(--cyan-light); }
.tag-contenu { color: #7C2D12; background: #FFF7ED; border-color: #FED7AA; }
.tag-liens { color: #3730A3; background: #EEF2FF; border-color: #C7D2FE; }
.tag-mesure { color: #166534; background: #F0FDF4; border-color: #BBF7D0; }

.empty-state {
  margin-top: var(--sp-4);
  padding: var(--sp-5);
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   14. Chronologie
   -------------------------------------------------------------------------- */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 0;
  display: grid;
  gap: var(--sp-4);
}
.tl-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  position: relative;
  padding-left: var(--sp-6);
}
.tl-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: -1.35rem;
  width: 1px;
  background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--cyan);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.tl-item:hover::after { transform: scale(1.25); background: var(--cyan); }
.tl-date {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--cyan-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tl-body h3 { font-size: var(--fs-base); margin-bottom: 0.2rem; }
.tl-body p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }

/* --------------------------------------------------------------------------
   15. Cartes clients
   -------------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--sp-3);
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--cyan-soft);
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--border-strong); }
.card:hover::after { opacity: 1; transform: scale(1.15); }
.card h3 {
  position: relative;
  z-index: 1;
  font-size: var(--fs-base);
  margin-bottom: var(--sp-2);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
}
.card p {
  position: relative;
  z-index: 1;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0;
}

/* --------------------------------------------------------------------------
   16. FAQ
   -------------------------------------------------------------------------- */
.faq {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--sh-xs);
}
.faq-item { border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 24px); }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { margin: 0; font-size: var(--fs-base); }
.faq-q {
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 650;
  color: var(--slate);
  background: transparent;
  border: 0;
  padding: 1.05rem 3rem 1.05rem 1.15rem;
  cursor: pointer;
  position: relative;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.faq-q:hover { background: var(--cyan-soft); color: var(--cyan-dark); }
.faq-q::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cyan);
  transform: scaleY(0);
  transition: transform 0.25s var(--ease);
}
.faq-q[aria-expanded="true"] { color: var(--cyan-dark); background: var(--cyan-soft); }
.faq-q[aria-expanded="true"]::before { transform: scaleY(1); }
.faq-q::after {
  content: "";
  display: block;
  position: absolute;
  right: 1.2rem;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease), border-color 0.2s var(--ease);
}
.faq-q[aria-expanded="true"]::after {
  transform: rotate(-135deg);
  margin-top: -2px;
  border-color: var(--cyan-dark);
}
.faq-a {
  padding: 0 1.15rem 1.15rem;
  font-size: var(--fs-base);
  color: #334155;
  max-width: 78ch;
}
.faq-a[hidden] { display: none; }
.faq-a.is-animating { animation: faqIn 0.28s var(--ease); }
@keyframes faqIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.faq-item.is-targeted { background: var(--amber-soft); }

/* --------------------------------------------------------------------------
   17. Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.contact-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--sp-4);
  align-items: start;
  background: var(--slate);
  color: #E2E8F0;
  border-radius: var(--r-md);
  padding: var(--sp-5);
  box-shadow: var(--sh-md);
}
.contact-card h3 { color: var(--white); font-size: var(--fs-h3); margin-bottom: var(--sp-2); }
.contact-card p { color: #CBD5E1; font-size: var(--fs-sm); }
.contact-portrait {
  width: 96px;
  height: 96px;
  border-radius: var(--r-md);
  object-fit: cover;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.18);
  transition: transform 0.3s var(--ease);
}
.contact-portrait:hover { transform: scale(1.03) rotate(-1deg); }
.contact-mail {
  margin: var(--sp-3) 0 0.3rem;
  font-size: var(--fs-lg);
  font-weight: 700;
  word-break: break-word;
}
.contact-mail a {
  color: var(--cyan-light);
  text-decoration: none;
  border-bottom: 2px solid rgba(207, 250, 254, 0.35);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.contact-mail a:hover { color: var(--white); border-color: var(--white); }
.contact-sub { font-size: var(--fs-xs); color: #94A3B8; }

.presence-list {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
.presence-list h3 { font-size: var(--fs-h3); margin-bottom: var(--sp-3); }
.presence-list ul { list-style: none; display: grid; gap: var(--sp-3); }
.presence-list li {
  font-size: var(--fs-sm);
  color: var(--muted);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.6;
}
.presence-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}
.presence-list strong { display: block; color: var(--slate); font-size: var(--fs-base); }

.og-preview {
  margin: 0 0 var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--white);
}
.og-preview img { width: 100%; }
.og-preview figcaption {
  padding: 0.7rem 1rem;
  font-size: var(--fs-xs);
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

/* --------------------------------------------------------------------------
   18. Pied de page
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--slate);
  color: #CBD5E1;
  padding: var(--sp-7) 0 var(--sp-6);
  border-top: 4px solid var(--cyan);
}
.footer-inner { display: grid; gap: var(--sp-5); }
.footer-brand { display: flex; align-items: center; gap: 0.85rem; }
.footer-brand .brand-mark { background: var(--cyan-dark); color: var(--white); }
.footer-name { margin: 0; color: var(--white); font-weight: 700; }
.footer-role { margin: 0; font-size: var(--fs-sm); color: #94A3B8; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); }
.footer-nav a {
  color: #CBD5E1;
  font-size: var(--fs-sm);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-nav a:hover { color: var(--cyan-light); border-color: var(--cyan); }
.footer-legal {
  margin: 0;
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(226, 232, 240, 0.14);
  font-size: var(--fs-xs);
  color: #94A3B8;
  max-width: 76ch;
}

/* --------------------------------------------------------------------------
   19. Retour en haut et notification
   -------------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 110;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--slate);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--sh-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s, background 0.2s var(--ease), color 0.2s var(--ease);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.back-to-top:hover { background: var(--slate); color: var(--white); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(14px);
  z-index: 130;
  background: var(--slate);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.65rem 1.1rem;
  border-radius: var(--r-full);
  box-shadow: var(--sh-lg);
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* --------------------------------------------------------------------------
   20. Animations d'apparition
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.18s; }

/* --------------------------------------------------------------------------
   21. Page 404
   -------------------------------------------------------------------------- */
.error-page {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: var(--sp-9) 0;
  text-align: center;
}
.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 14vw, 8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--slate);
  letter-spacing: -0.05em;
}
.error-code span { color: var(--cyan); }
.error-page h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: var(--sp-4) 0 var(--sp-3); }
.error-page p { color: var(--muted); max-width: 52ch; margin-inline: auto; }
.error-actions { margin-top: var(--sp-5); display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }
.error-links {
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  justify-content: center;
}
.error-links a { font-size: var(--fs-sm); color: var(--muted); text-decoration: none; }
.error-links a:hover { color: var(--cyan-dark); }

/* --------------------------------------------------------------------------
   22. Points de rupture
   -------------------------------------------------------------------------- */
@media (min-width: 640px) {
  .wrap { padding-inline: var(--sp-5); }
  .fiche-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: 1fr; }
  .steps { gap: var(--sp-5); }
}

@media (min-width: 900px) {
  .header-nav { display: flex; }
  .toc-toggle { display: none; }
  .fiche-head { padding: var(--sp-9) 0 var(--sp-8); }
  .fiche-head-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: var(--sp-8);
  }
  .portrait-frame { justify-self: end; }
  .layout { grid-template-columns: 232px minmax(0, 1fr); gap: var(--sp-7); }
  .toc { display: block; }
  .contact-grid { grid-template-columns: 1.15fr 0.85fr; }
  .tl-item { grid-template-columns: 140px 1fr; gap: var(--sp-4); align-items: start; padding-left: var(--sp-6); }
  .tl-date { padding-top: 0.15rem; text-align: right; }
  .tl-item::before { left: 7px; }
  .doc-section { padding-bottom: var(--sp-9); }
}

@media (min-width: 1200px) {
  .layout { grid-template-columns: 264px minmax(0, 1fr); gap: var(--sp-8); }
  .doc-section > h2 { font-size: var(--fs-h2); }
  .glossary { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Sommaire en panneau sur mobile */
@media (max-width: 899px) {
  .toc {
    display: none;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--sh-sm);
  }
  .toc.is-open { display: block; animation: panelIn 0.25s var(--ease); }
  .toc-inner { position: static; box-shadow: none; border: 0; }
  @keyframes panelIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
  }
  .table-wrap { max-height: none; }
  .contact-card { grid-template-columns: 1fr; }
  .contact-portrait { width: 88px; height: 88px; }
}

/* --------------------------------------------------------------------------
   23. Impression
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .toc,
  .back-to-top,
  .reading-progress,
  .toast,
  .filters { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .doc-section { page-break-inside: avoid; border-bottom: 1px solid #ccc; }
  .faq-a[hidden] { display: block !important; }
  a { color: #000; }
}

/* --------------------------------------------------------------------------
   24. Preferences de mouvement reduit
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .wide-figure:hover img { transform: none; }
  .stat:hover,
  .card:hover,
  .step:hover,
  .glossary-item:hover { transform: none; }
}
