/* =================================================================
   assurance-chiot.fr - feuille de style principale
   ================================================================= */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------- Jetons ---------------- */

:root {
  --paper: #fcfaf6;
  --paper-raised: #ffffff;
  --paper-sunken: #f5f1e9;
  --ink: #191d1f;
  --ink-soft: #4b5257;
  --ink-muted: #71787e;
  --brand: #0e4d3f;
  --brand-deep: #0a3a30;
  --brand-soft: #e4efea;
  --accent: #b9551f;
  --accent-soft: #fbeade;
  --line: #e5dfd4;
  --line-strong: #d3cabb;
  --shadow-sm: 0 1px 2px rgba(25, 29, 31, 0.05), 0 2px 8px rgba(25, 29, 31, 0.04);
  --shadow-md: 0 2px 6px rgba(25, 29, 31, 0.06), 0 12px 32px rgba(25, 29, 31, 0.08);
  --radius: 14px;
  --radius-lg: 22px;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-text: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --shell: 1180px;
  --gutter: clamp(1rem, 4vw, 2.25rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #111416;
    --paper-raised: #181c1f;
    --paper-sunken: #1d2226;
    --ink: #eaeef0;
    --ink-soft: #b4bcc1;
    --ink-muted: #8b959b;
    --brand: #66cdae;
    --brand-deep: #8fdcc4;
    --brand-soft: #14302a;
    --accent: #ef9a68;
    --accent-soft: #33200f;
    --line: #2a3034;
    --line-strong: #3a4247;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45), 0 16px 40px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --paper: #111416;
  --paper-raised: #181c1f;
  --paper-sunken: #1d2226;
  --ink: #eaeef0;
  --ink-soft: #b4bcc1;
  --ink-muted: #8b959b;
  --brand: #66cdae;
  --brand-deep: #8fdcc4;
  --brand-soft: #14302a;
  --accent: #ef9a68;
  --accent-soft: #33200f;
  --line: #2a3034;
  --line-strong: #3a4247;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45), 0 16px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

/* ---------------- Base ---------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.68;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

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

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}

.skip:focus {
  left: 0;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell-narrow {
  max-width: 47rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

/* ---------------- En-tete ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--brand);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand .mark {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-text strong {
  font-weight: 600;
}

.brand-tld {
  color: var(--ink-muted);
  font-weight: 400;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.935rem;
  font-weight: 500;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.site-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.site-nav a[aria-current='page'] {
  background: var(--brand);
  color: #fff;
}

:root[data-theme='dark'] .site-nav a[aria-current='page'] {
  color: #0d1214;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .site-nav a[aria-current='page'] {
    color: #0d1214;
  }
}

.theme-toggle,
.nav-toggle {
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-toggle {
  width: 2.35rem;
  height: 2.35rem;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
}

.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.theme-toggle:hover,
.nav-toggle:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.nav-toggle {
  display: none;
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: auto;
}

.nav-toggle-bars {
  position: relative;
  width: 1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 1rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-toggle-bars::before {
  top: -5px;
}

.nav-toggle-bars::after {
  top: 5px;
}

@media (max-width: 1040px) {
  .nav-toggle {
    display: inline-flex;
  }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    margin: 0 0 0.85rem;
  }
  .site-nav.open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0.1rem;
  }
  .site-nav a {
    border-radius: var(--radius);
    padding: 0.62rem 0.85rem;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .theme-toggle {
    order: 2;
  }
}

/* ---------------- Fil d'Ariane ---------------- */

.breadcrumb {
  padding: 1.35rem 0 0;
  font-size: 0.86rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--ink-muted);
}

.breadcrumb li + li::before {
  content: '/';
  margin-right: 0.35rem;
  color: var(--line-strong);
}

.breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand);
  text-decoration: underline;
}

/* ---------------- Tete de page ---------------- */

.page-head {
  padding: 1.5rem 0 1.75rem;
}

.kicker {
  margin: 0 0 0.65rem;
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.05rem);
}

.lead {
  margin: 1.1rem 0 0;
  font-size: clamp(1.09rem, 1.02rem + 0.35vw, 1.28rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.page-meta {
  margin: 1.35rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.1rem;
}

.page-meta .dot {
  margin: 0 0.55rem;
  color: var(--line-strong);
}

.hero-figure {
  margin: 0 0 2.5rem;
}

.hero-figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 21 / 9;
  max-height: 27rem;
  object-fit: cover;
  object-position: center 42%;
}

@media (max-width: 640px) {
  .hero-figure img {
    aspect-ratio: 3 / 2;
    max-height: none;
  }
}

.hero-figure figcaption,
figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.83rem;
  color: var(--ink-muted);
  text-align: center;
}

/* ---------------- Corps d'article ---------------- */

.page-body {
  display: block;
  padding-bottom: 3rem;
}

.page-body.has-toc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16.5rem;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.page-body.has-toc .toc-col {
  order: 2;
  position: sticky;
  top: 5.5rem;
}

.page-body.has-toc .prose {
  order: 1;
  max-width: 45rem;
}

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.toc h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-text);
  font-size: 0.755rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  font-size: 0.9rem;
  max-height: min(62vh, 34rem);
  overflow-y: auto;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: block;
  padding: 0.3rem 0 0.3rem 1.55rem;
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  line-height: 1.4;
  border-left: 2px solid transparent;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 0.35rem;
  color: var(--line-strong);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  top: 0.42rem;
}

.toc a:hover,
.toc a.active {
  color: var(--brand);
}

.toc a.active {
  border-left-color: var(--accent);
  font-weight: 600;
}

@media (max-width: 960px) {
  .page-body.has-toc {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-body.has-toc .toc-col {
    position: static;
    order: 1;
    margin-bottom: 2rem;
  }
  .page-body.has-toc .prose {
    order: 2;
  }
  .toc ol {
    max-height: none;
  }
}

/* ---------------- Prose ---------------- */

.prose {
  max-width: 47rem;
  margin-inline: auto;
  font-size: 1.0625rem;
}

.page-body.has-toc .prose {
  margin-inline: 0;
}

/* Flux vertical. Les regles de reinitialisation ci-dessous portent une
   specificite superieure a un selecteur universel, d'ou la reprise explicite
   des elements concernes. */
.prose > * + * {
  margin-top: 1.15rem;
}


.prose h2 {
  margin-top: 3.1rem;
  margin-bottom: 0.9rem;
  font-size: clamp(1.5rem, 1.28rem + 0.9vw, 1.95rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  position: relative;
}

.prose h3 {
  margin-top: 2.3rem;
  margin-bottom: 0.6rem;
  font-size: clamp(1.19rem, 1.1rem + 0.42vw, 1.36rem);
  font-weight: 600;
}

.prose h4 {
  margin-top: 1.7rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-text);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0;
}

.prose p {
  margin: 0;
  color: var(--ink-soft);
}

.prose strong {
  color: var(--ink);
  font-weight: 650;
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--ink-soft);
}

.prose li + li {
  margin-top: 0.42rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose ol li::marker {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Flux vertical de la prose. Place apres les reinitialisations d'element,
   qui portent la meme specificite : l'ordre source tranche. */
.prose > * + p,
.prose > * + ul,
.prose > * + ol,
.prose > * + blockquote,
.prose > * + figure,
.prose > * + .table-wrap,
.prose > * + .callout {
  margin-top: 1.15rem;
}

.anchor {
  margin-left: 0.4rem;
  color: var(--line-strong);
  text-decoration: none;
  font-size: 0.72em;
  font-family: var(--font-text);
  opacity: 0;
  transition: opacity 0.15s ease;
}

h2:hover .anchor,
h3:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}

.prose blockquote {
  margin: 1.6rem 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-soft);
  font-style: italic;
}

.prose blockquote p {
  margin: 0;
}

.prose hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.prose code {
  background: var(--paper-sunken);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.08em 0.36em;
  font-size: 0.88em;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

.prose figure {
  margin: 2rem 0;
}

.prose figure img,
.prose > img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

/* ---------------- Tableaux ---------------- */

.table-wrap {
  margin: 1.8rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
  min-width: 34rem;
}

thead th {
  background: var(--brand);
  color: #fff;
  text-align: left;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  padding: 0.75rem 0.95rem;
  white-space: nowrap;
}

:root[data-theme='dark'] thead th {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) thead th {
    background: var(--brand-soft);
    color: var(--brand-deep);
  }
}

tbody th,
tbody td {
  padding: 0.7rem 0.95rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-soft);
}

tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
}

tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--paper-sunken) 55%, transparent);
}

/* ---------------- Encarts ---------------- */

.callout {
  margin: 1.9rem 0;
  padding: 1.15rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper-raised);
  font-size: 0.975rem;
}

.callout > * + * {
  margin-top: 0.7rem;
}

.callout p {
  margin: 0;
  color: var(--ink-soft);
}

.callout-title {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 0.79rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink) !important;
}

.callout ul,
.callout ol {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.callout > * + p,
.callout > * + ul,
.callout > * + ol,
.callout > * + .table-wrap {
  margin-top: 0.7rem;
}

.callout-cle,
.callout-note {
  border-left: 4px solid var(--brand);
  background: var(--brand-soft);
}

.callout-cle .callout-title,
.callout-note .callout-title {
  color: var(--brand-deep) !important;
}

.callout-alerte,
.callout-attention {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.callout-alerte .callout-title,
.callout-attention .callout-title {
  color: var(--accent) !important;
}

.callout-chiffres {
  border-left: 4px solid var(--line-strong);
  background: var(--paper-sunken);
}

.callout-exemple {
  border-left: 4px solid var(--line-strong);
  background: var(--paper-sunken);
}

/* ---------------- Boutons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--brand-deep);
  color: #fff;
  box-shadow: var(--shadow-md);
}

:root[data-theme='dark'] .btn-primary,
:root[data-theme='dark'] .btn-primary:hover {
  color: #0d1214;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .btn-primary,
  :root:not([data-theme='light']) .btn-primary:hover {
    color: #0d1214;
  }
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--paper-raised);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------------- Accueil ---------------- */

.hero {
  padding: clamp(2.2rem, 5vw, 4.2rem) 0 clamp(2rem, 4vw, 3.4rem);
  background:
    radial-gradient(90rem 40rem at 82% -12%, var(--brand-soft) 0%, transparent 58%),
    radial-gradient(60rem 30rem at 4% 8%, var(--accent-soft) 0%, transparent 55%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-media {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.hero-kicker {
  margin: 0 0 0.9rem;
  font-size: 0.775rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.15rem, 1.35rem + 3.1vw, 3.55rem);
  letter-spacing: -0.024em;
}

.hero .lead {
  margin-top: 1.25rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  list-style: none;
  margin: 2.6rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1;
  color: var(--brand);
  font-weight: 600;
}

.hero-stats span {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink-muted);
}

.hero-media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-media {
    order: -1;
  }
}

@media (max-width: 520px) {
  .hero-stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
  }
  .hero-stats li {
    flex-direction: row;
    align-items: baseline;
    gap: 0.7rem;
  }
  .hero-stats strong {
    font-size: 1.4rem;
    min-width: 2.5rem;
  }
}

.home-prose {
  padding: clamp(2.2rem, 4vw, 3.4rem) 0 1rem;
}

.home-prose .prose {
  margin-inline: 0;
}

.home-sections,
.home-recent {
  padding: clamp(2.4rem, 4vw, 3.8rem) 0;
}

.home-sections {
  background: var(--paper-sunken);
  border-block: 1px solid var(--line);
}

.home-sections h2,
.home-recent h2,
.related h2,
.hub-section h2 {
  font-size: clamp(1.55rem, 1.3rem + 1vw, 2.05rem);
  margin: 0 0 0.6rem;
}

.section-intro {
  margin: 0 0 2.2rem;
  max-width: 46rem;
  color: var(--ink-soft);
}

.sec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 1.15rem;
}

.sec-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.45rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.sec-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.sec-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.sec-card h3 a {
  text-decoration: none;
  color: var(--ink);
}

.sec-card h3 a:hover {
  color: var(--brand);
}

.sec-card > p {
  margin: 0 0 1rem;
  font-size: 0.925rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.sec-links {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  font-size: 0.915rem;
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}

.sec-links li + li {
  margin-top: 0.38rem;
}

.sec-links a {
  color: var(--ink-soft);
  text-decoration: none;
  display: block;
  line-height: 1.4;
}

.sec-links a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.sec-all {
  margin-top: auto;
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
}

.sec-all::after {
  content: ' \2192';
}

/* ---------------- Cartes liees ---------------- */

.related {
  padding: 2.8rem 0 3.5rem;
  border-top: 1px solid var(--line);
}

.rel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}

.rel-grid a {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  padding: 1.25rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.rel-grid a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.rel-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.rel-title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.28;
  color: var(--ink);
}

.rel-desc {
  font-size: 0.87rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.rel-grid time {
  margin-top: auto;
  padding-top: 0.6rem;
  font-size: 0.76rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------------- Rubrique ---------------- */

.hub-section {
  margin-top: 3.4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.hub-card a {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  padding: 1.35rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.hub-card a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.hub-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--ink);
}

.hub-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.hub-more {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.hub-more::after {
  content: ' \2192';
}

/* ---------------- Plan du site ---------------- */

.plan-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2rem;
  padding-bottom: 3.5rem;
}

.plan-block h2 {
  font-size: 1.15rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.plan-block h2 a {
  text-decoration: none;
}

.plan-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.925rem;
}

.plan-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.34rem 0;
  align-items: baseline;
}

.plan-list a {
  color: var(--ink-soft);
  text-decoration: none;
}

.plan-list a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.plan-list time {
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------------- Page d'erreur ---------------- */

.error-page {
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.error-links {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  max-width: 28rem;
}

.error-links a {
  display: block;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-raised);
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
}

.error-links a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------------- Pied de page ---------------- */

.site-footer {
  margin-top: auto;
  background: var(--paper-sunken);
  border-top: 1px solid var(--line);
  padding: clamp(2.6rem, 5vw, 4rem) 0 2rem;
  font-size: 0.925rem;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 5vw, 4rem);
}

@media (max-width: 860px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

.footer-brand p {
  margin: 1rem 0 0;
  color: var(--ink-muted);
  max-width: 30rem;
  line-height: 1.6;
}

.footer-note {
  font-size: 0.86rem;
}

.footer-nav h2 {
  font-family: var(--font-text);
  font-size: 0.755rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.85rem 1.5rem;
}

.footer-nav a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.f-label {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.93rem;
}

.f-desc {
  color: var(--ink-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.footer-nav a:hover .f-label {
  color: var(--brand);
}

.footer-bottom {
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.87rem;
}

.footer-legal a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.copyright {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.disclaimer {
  margin: 1.6rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.775rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---------------- Impression ---------------- */

@media print {
  .site-header,
  .site-footer,
  .toc-col,
  .related,
  .breadcrumb,
  .skip {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  .prose a::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #555;
  }
}
