:root {
  --bg-page: #f8fafc;
  --bg-dark: #0f172a;
  --bg-dark-soft: #162033;
  --surface: #ffffff;
  --border: #dbe3ee;
  --text: #0f172a;
  --muted: #475569;
  --text-inverse: #f8fafc;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.06);
  --max-width: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure { margin: 0; }
main:focus { outline: none; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 4px;
}
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 40;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: #ffffff;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.topbar-inner, .hero, .activities, .vision, .footer {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  background: rgba(15, 23, 42, 0.98);
  border-bottom: 1px solid #263247;
}
.topbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-inverse);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.brand span { color: #60a5fa; }
.topbar-links { display: flex; gap: 1.5rem; }
.topbar-links a, .footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
}
.topbar-links a:hover, .footer-links a:hover { color: #93c5fd; }
.topbar-menu { display: none; }
.topbar-menu summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.8rem;
  border: 1px solid #475569;
  border-radius: 0.6rem;
  color: var(--text-inverse);
  font-size: 0.8rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.topbar-menu summary::-webkit-details-marker { display: none; }
.topbar-menu[open] summary { background: #263247; }
.topbar-menu-panel {
  position: absolute;
  inset: calc(100% + 0.5rem) 0 auto;
  display: grid;
  padding: 0.6rem;
  border: 1px solid #475569;
  border-radius: 0.9rem;
  background: var(--bg-dark);
  box-shadow: var(--shadow-soft);
}
.topbar-menu-panel a {
  padding: 0.8rem 1rem;
  border-radius: 0.5rem;
  color: var(--text-inverse);
  font-size: 0.9rem;
}
.topbar-menu-panel a:hover { background: var(--bg-dark-soft); }
.topbar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 0.6rem;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}
.topbar-cta:hover { background: var(--accent-dark); }
.hero-shell { padding: 8rem 0 4rem; background: var(--bg-dark); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.85fr);
  align-items: center;
  gap: 3rem;
}
.hero-copy { min-width: 0; color: var(--text-inverse); }
.eyebrow, .panel-kicker, .card-type {
  color: #60a5fa;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow { margin-bottom: 1rem; }
.hero h1 {
  max-width: 16ch;
  color: #ffffff;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero-expertise { margin-top: 1.25rem; color: #bfdbfe; font-size: 1rem; }
.lead { max-width: 39rem; margin-top: 1rem; color: #cbd5e1; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.hero-audience { max-width: 35rem; margin-top: 1.25rem; color: #94a3b8; font-size: 0.88rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease;
}
.button-primary { background: var(--accent); color: #ffffff; }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border-color: #64748b; color: #bfdbfe; }
.button-secondary:hover { background: #1e293b; }
.hero-panel { padding: 1.4rem; border: 1px solid #334155; border-radius: 1.4rem; background: var(--bg-dark-soft); }
.panel-kicker { margin-bottom: 1rem; color: #93c5fd; }
.panel-links { display: grid; gap: 0.75rem; }
.panel-link { padding: 1rem; border: 1px solid #334155; border-radius: 0.9rem; background: #1e293b; }
.panel-link:hover { border-color: #60a5fa; }
.panel-link strong { display: block; color: #ffffff; font-size: 0.95rem; }
.panel-link span { display: block; margin-top: 0.35rem; color: #cbd5e1; font-size: 0.85rem; }
.activities-shell, .vision-shell { padding: 4.5rem 0; }
.section-heading { max-width: 46rem; margin-bottom: 2.5rem; }
.section-heading .eyebrow { color: var(--accent-dark); }
.section-heading h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.18; letter-spacing: -0.035em; text-wrap: balance; }
.section-intro { max-width: 43rem; margin-top: 1rem; color: var(--muted); }
.realisation-heading { margin-top: 3.5rem; margin-bottom: 1.4rem; }
.realisation-heading h3, .other-tools > h3 { font-size: 1.1rem; }
.realisation-heading p { margin-top: 0.4rem; color: var(--muted); font-size: 0.9rem; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1.35rem;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.card-type { margin-bottom: 0.5rem; color: var(--accent-dark); }
.project-heading h3 { font-size: 1.6rem; letter-spacing: -0.025em; }
.project-heading > p:last-child { margin-top: 0.4rem; color: var(--muted); }
.project-visual { margin-top: 1.5rem; }
.project-visual > a { display: block; border: 1px solid var(--border); border-radius: 0.65rem; overflow: hidden; background: #f1f5f9; }
.project-visual img { width: 100%; }
.project-visual figcaption { margin-top: 0.65rem; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.project-visual figcaption a { display: inline-block; padding-block: 0.3rem; color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.project-facts { display: grid; gap: 1rem; margin: 1.5rem 0; }
.project-facts dt { font-size: 0.82rem; font-weight: 700; }
.project-facts dd { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9rem; }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: auto; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent-dark); font-size: 0.85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { text-decoration-thickness: 2px; }
.other-tools { margin-top: 3rem; }
.other-tools > h3 { margin-bottom: 1.25rem; }
.activity-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.activity-card { display: flex; flex-direction: column; justify-content: space-between; gap: 1.4rem; padding: 1.5rem; border: 1px solid var(--border); border-radius: 1.15rem; background: var(--surface); box-shadow: var(--shadow-soft); }
.activity-card:hover { border-color: #60a5fa; }
.card-body h4 { font-size: 1.25rem; }
.card-body > p:last-child { margin-top: 0.75rem; color: var(--muted); font-size: 0.92rem; line-height: 1.7; }
.card-link { color: var(--accent-dark); font-size: 0.85rem; font-weight: 700; }
.vision-shell { background: var(--bg-dark); }
.section-heading-dark .eyebrow { color: #93c5fd; }
.section-heading-dark h2 { color: #ffffff; }
.vision-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.vision-statement { color: #cbd5e1; }
.vision-statement h3 { margin-bottom: 1rem; color: #ffffff; font-size: 1.15rem; }
.vision-statement p + p { margin-top: 1rem; }
.vision-statement .text-link { margin-top: 1rem; color: #93c5fd; }
.principles { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.principle { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.15rem; border: 1px solid #334155; border-radius: 1rem; background: var(--bg-dark-soft); }
.principle > span { color: #93c5fd; font-size: 0.8rem; font-weight: 700; }
.principle h3 { margin-bottom: 0.3rem; color: #ffffff; font-size: 0.95rem; }
.principle p { color: #cbd5e1; font-size: 0.9rem; }
.footer-shell { padding: 2.25rem 0; background: #020617; border-top: 1px solid #334155; }
.footer { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 2rem; }
.footer-author { color: #e2e8f0; font-weight: 600; font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.2rem; margin-top: 0.5rem; }
.footer > p { color: #94a3b8; font-size: 0.85rem; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero h1 { max-width: 20ch; }
  .panel-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .activity-grid { grid-template-columns: 1fr; }
  .footer { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 5.5rem; }
  .topbar-inner, .hero, .activities, .vision, .footer { width: min(calc(100% - 2rem), var(--max-width)); }
  .topbar-inner { min-height: 4.5rem; gap: 0.5rem; }
  .brand { font-size: 0.95rem; letter-spacing: 0.1em; }
  .topbar-links { display: none; }
  .topbar-menu { display: block; margin-left: auto; }
  .topbar-cta { padding-inline: 0.8rem; font-size: 0.75rem; }
  .hero-shell { padding: 6.5rem 0 2.5rem; }
  .hero h1 { font-size: clamp(2rem, 8.8vw, 2.65rem); }
  .hero .eyebrow { font-size: 0.7rem; }
  .hero-expertise { font-size: 0.95rem; }
  .lead { font-size: 0.95rem; }
  .hero-actions { gap: 0.65rem; }
  .hero-actions .button { flex: 1 1 12rem; }
  .hero-panel { padding: 1.1rem; }
  .panel-links, .project-grid, .vision-layout { grid-template-columns: 1fr; }
  .panel-link { padding: 0.85rem; }
  .activities-shell, .vision-shell { padding: 3rem 0; }
  .section-heading { margin-bottom: 2rem; }
  .section-heading h2 { font-size: 1.85rem; }
  .project-card { padding: 1.15rem; }
  .project-actions { align-items: stretch; }
  .project-actions .button { width: 100%; }
  .project-actions .text-link { width: 100%; }
}

/* Chronicles and the complete tool directory share the existing visual system. */
.chronicles-panel h2 { color: #ffffff; font-size: 1.65rem; line-height: 1.25; letter-spacing: -0.025em; }
.chronicles-panel > p:not(.panel-kicker) { margin-top: 0.85rem; color: #cbd5e1; font-size: 0.92rem; }
.chronicles-panel > .text-link { margin-top: 0.8rem; color: #93c5fd; }
.panel-feature { display: grid; gap: 0.4rem; margin-top: 1.2rem; padding: 1rem; border: 1px solid #475569; border-radius: 0.9rem; background: #1e293b; }
.panel-feature:hover { border-color: #93c5fd; }
.panel-feature strong { color: #ffffff; font-size: 1.05rem; line-height: 1.4; }
.panel-feature span { color: #cbd5e1; font-size: 0.85rem; }
.panel-feature span:first-child { color: #93c5fd; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.chronicles-shell { padding: 4rem 0; background: #ffffff; border-bottom: 1px solid var(--border); }
.chronicles-heading { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.chronicles-heading .section-heading { max-width: 43rem; margin-bottom: 0; }
.chronicles-heading > .button { flex-shrink: 0; }
.chronicles-grid, .tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.chronicle-card { display: flex; flex-direction: column; padding: 1.5rem; border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 1rem; background: var(--bg-page); }
.chronicle-card h3 { margin-top: 0.5rem; font-size: 1.2rem; line-height: 1.4; letter-spacing: -0.015em; }
.chronicle-card h3 a { display: block; }
.chronicle-card h3 a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.chronicle-card > p:not(.card-type) { margin-top: 1rem; margin-bottom: 1rem; color: var(--muted); font-size: 0.9rem; }
.chronicle-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; margin-top: auto; }
.chronicle-footer time { color: var(--muted); font-size: 0.8rem; }
.tool-card { min-width: 0; box-shadow: none; }
.tool-card .card-body h3 { font-size: 1.2rem; line-height: 1.35; overflow-wrap: anywhere; }
.tool-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.tool-site { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding-block: 0.25rem; color: var(--accent-dark); font-size: 0.9rem; font-weight: 700; }
.tool-site span { margin-top: 0.15rem; color: var(--muted); font-size: 0.75rem; font-weight: 400; overflow-wrap: anywhere; }
.tool-site:hover { text-decoration: underline; text-underline-offset: 4px; }
.tool-links .text-link { font-size: 0.82rem; }
.repository-notes { margin-top: 1.5rem; padding: 0.25rem 1.25rem; border: 1px solid var(--border); border-radius: 1rem; background: #ffffff; }
.repository-notes summary { padding-block: 1rem; color: var(--muted); font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.repository-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; padding: 0.75rem 0 1rem; }
.repository-grid h3 { font-size: 1rem; }
.repository-grid article > p { margin-top: 0.5rem; color: var(--muted); font-size: 0.85rem; }
.repository-grid article > .repository-status { color: #92400e; font-weight: 600; }
.catalog-footer { margin-top: 1rem; }
@media (max-width: 960px) {
  .chronicles-heading { align-items: flex-start; flex-direction: column; gap: 1.25rem; }
  .chronicles-grid, .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .chronicles-shell { padding: 3rem 0; }
  .chronicles-grid, .tool-grid, .repository-grid { grid-template-columns: 1fr; }
  .chronicle-card { padding: 1.2rem; }
  .chronicles-panel h2 { font-size: 1.45rem; }
  .tool-site { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Catalogue groupé par famille, aligné sur les dépôts GitHub (refonte du 2026-11-03). */
.catalog-group + .catalog-group { margin-top: 2.75rem; }
.catalog-group-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 1.1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.catalog-group-heading h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
.catalog-group-heading p { color: var(--muted); font-size: 0.88rem; }
.tool-card .card-body h4 { font-size: 1.2rem; line-height: 1.35; overflow-wrap: anywhere; }
.tool-note { color: var(--muted); font-size: 0.82rem; padding-top: 0.35rem; }
.panel-repos { display: grid; gap: 0.6rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.panel-repos a { display: grid; gap: 0.2rem; padding: 0.85rem 1rem; border: 1px solid #475569; border-radius: 0.9rem; background: #1e293b; }
.panel-repos a:hover { border-color: #93c5fd; }
.panel-repos strong { color: #ffffff; font-size: 1rem; }
.panel-repos span { color: #cbd5e1; font-size: 0.8rem; }
@media (min-width: 961px) { .tool-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 961px) { .tool-grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
