:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-muted: #f8fafc;
  --text: #050505;
  --muted: #475569;
  --accent: #ec4899;
  --accent-soft: #fce7f3;
  --accent-strong: #be185d;
  --accent-dark: #111827;
  --accent-cyan: #a5e3ef;
  --accent-gold: #ead98b;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 64px;
  }
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f4f4f5 0%, #f8f8f8 100%);
  position: relative;
}


a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  display: grid;
  grid-template-columns: 312px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
}

.sidebar__brand h1 {
  margin: 8px 0 12px;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.sidebar__logo {
  display: block;
  width: 172px;
  max-width: 100%;
  height: auto;
  margin: 0 0 18px;
}

.sidebar__intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 8px 14px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(236, 72, 153, 0.08);
  border-radius: 999px;
}

.sidebar__nav {
  display: grid;
  gap: 8px;
  margin: 32px 0;
}

.toc {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.toc > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
  color: var(--accent-dark);
  user-select: none;
}

.toc > summary::-webkit-details-marker {
  display: none;
}

.toc > summary::after {
  content: "▾";
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.75;
  transition: transform 160ms ease;
}

.toc[open] > summary::after {
  transform: rotate(180deg);
}

.toc > summary span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.toc > summary span::before {
  content: "☰";
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(236, 72, 153, 0.08);
  color: var(--accent);
  font-weight: 900;
}

.toc .sidebar__nav {
  margin: 14px 0 0;
}

.sidebar__nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 600;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar__nav a:hover,
.sidebar__nav a:focus-visible {
  color: var(--accent-dark);
  background: var(--accent-soft);
  transform: translateX(3px);
}

.sidebar__meta {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
}

.sidebar__meta span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.sidebar__meta strong {
  font-size: 1rem;
}

.content {
  padding: 34px;
  position: relative;
}


.hero,
.section,
.accordion {
  margin-bottom: 26px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 26px;
}

.hero__copy {
  padding: 14px 8px 14px 0;
}

.panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero__copy h2 {
  margin: 18px 0 18px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.accent-text {
  color: var(--accent);
}

.hero__lead {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--accent-dark);
}

.hero__copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero__metrics {
  display: grid;
  gap: 16px;
}

.metric-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  box-shadow: var(--shadow);
}

.metric-card--highlight {
  background: var(--accent-dark);
  color: #fdfcf9;
  border-left-color: var(--accent);
}

.metric-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: inherit;
}

.metric-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1;
}

.metric-card p {
  margin: 0;
  line-height: 1.6;
  color: inherit;
  opacity: 0.9;
}

/* ─── Accordéon de section ──────────────────────────────────── */
.accordion {
  border: none;
}

.accordion > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.accordion > summary::-webkit-details-marker {
  display: none;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: background 150ms ease;
}

.section-heading:hover {
  background: var(--accent-soft);
}

.section-heading .eyebrow {
  font-size: 1rem;
  letter-spacing: 0.08em;
  padding: 10px 20px;
}

.accordion__chevron {
  font-size: 1.1rem;
  opacity: 0.6;
  transition: transform 200ms ease;
  line-height: 1;
  flex-shrink: 0;
}

.accordion[open] > summary .accordion__chevron {
  transform: rotate(180deg);
}

.accordion__body {
  padding-top: 4px;
}

.callout {
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 5px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.callout strong {
  display: block;
  margin-bottom: 8px;
}

.bullet-grid,
.timeline-grid,
.inclusion-grid,
.recommendation {
  display: grid;
  gap: 18px;
}

.bullet-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bullet-grid article,
.recommendation__card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.bullet-grid p,
.recommendation__card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.table-panel {
  padding: 12px;
  overflow: hidden;
}

.table-panel {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  min-width: 720px;
}

@media (max-width: 760px) {
  table {
    min-width: 0;
  }
}

.callout-panel {
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 16px;
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  color: var(--accent-dark);
  background: #f8fafc;
}

tbody td,
tfoot td {
  padding: 16px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}

tbody td:nth-child(3),
tbody td:nth-child(4),
tfoot td:nth-child(2),
tfoot td:nth-child(3),
tfoot td:nth-child(4) {
  white-space: nowrap;
}

tfoot td {
  font-weight: 800;
  background: rgba(236, 72, 153, 0.08);
}

.timeline-grid,
.inclusion-grid,
.recommendation {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.panel__title {
  margin: 0 0 18px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.clean-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.recommendation {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.recommendation__card span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.recommendation__card strong {
  display: block;
  font-size: 1.15rem;
}

.quote-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(236, 231, 221, 0.92));
}

.quote-panel p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.8;
}

/* ─── Bouton retour en haut ─────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--accent-dark);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 220ms ease, visibility 220ms ease, transform 220ms ease, background 150ms ease;
  font-family: inherit;
}

.back-to-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 760px) {
  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/* ─── Barre mobile ──────────────────────────────────────────── */
.mobile-topbar {
  display: none;
}

.mobile-overlay {
  display: none;
}

/* ─── Breakpoint tablette ───────────────────────────────────── */
@media (max-width: 1120px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .hero,
  .timeline-grid,
  .inclusion-grid,
  .recommendation {
    grid-template-columns: 1fr;
  }
}

/* ─── Breakpoint mobile ─────────────────────────────────────── */
@media (max-width: 760px) {

  /* Barre fixe en haut */
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 56px;
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
  }

  .mobile-topbar__logo {
    height: 32px;
    width: auto;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--accent-dark);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
  }

  .mobile-menu-btn:hover,
  .mobile-menu-btn:focus-visible {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
  }

  /* Overlay : couvre uniquement la zone de contenu (à droite de la sidebar, sous la topbar) */
  .mobile-overlay {
    display: block;
    position: fixed;
    top: 56px; /* sous la topbar */
    left: min(320px, 88vw); /* à droite de la sidebar */
    right: 0;
    bottom: 0;
    z-index: 290;
    background: rgba(5, 5, 5, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 260ms ease, visibility 260ms ease;
  }

  .mobile-overlay--visible {
    opacity: 1;
    visibility: visible;
  }

  /* Sidebar devient un drawer latéral */
  .page-shell {
    display: block;
    padding-top: 56px; /* hauteur topbar */
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    z-index: 300;
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid var(--border);
    border-bottom: none;
    background: #ffffff;
    transform: translateX(-105%);
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px 18px 40px;
    -webkit-font-smoothing: antialiased;
  }

  .sidebar--open {
    transform: translateX(0);
  }

  .content {
    padding: 20px 16px;
  }

  /* Sections */
  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero__copy {
    padding: 0;
  }

  .hero__copy h2 {
    font-size: 1.75rem;
    letter-spacing: -0.03em;
  }

  .hero__lead {
    font-size: 1rem;
  }

  /* Métriques : 1 colonne */
  .hero__metrics {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .metric-card {
    padding: 18px;
  }

  .metric-card strong {
    font-size: 1.7rem;
  }

  /* Panels */
  .panel {
    padding: 16px;
    border-radius: var(--radius-md);
  }

  /* Grilles */
  .bullet-grid,
  .timeline-grid,
  .inclusion-grid,
  .recommendation {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* En-têtes de section (accordéon) */
  .section-heading {
    padding: 14px 16px;
    margin-bottom: 10px;
  }

  .section-heading .eyebrow {
    font-size: 0.9rem;
    padding: 8px 14px;
  }

  /* Tables : scroll horizontal propre */
  .table-panel {
    padding: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
  }

  .table-panel table {
    min-width: 0;
    width: 100%;
  }

  /* Colonnes numériques compactes */
  thead th,
  tbody td,
  tfoot td {
    padding: 12px 10px;
    font-size: 0.88rem;
  }

  /* Wrapping sur les colonnes texte, nowrap sur montants */
  tbody td:nth-child(1),
  tbody td:nth-child(2) {
    white-space: normal;
    word-break: break-word;
  }

  tbody td:nth-child(3),
  tbody td:nth-child(4) {
    white-space: nowrap;
  }

  .sidebar__brand h1 {
    font-size: 1.5rem;
  }

  .toc {
    margin: 16px 0;
    padding: 12px;
  }

  .sidebar__nav {
    margin: 10px 0;
  }

  .sidebar__nav a {
    padding: 11px 12px;
    font-size: 0.95rem;
  }

  .sidebar__meta {
    margin-top: 0;
  }

  /* Section spacing */
  .hero,
  .section,
  .accordion {
    margin-bottom: 18px;
  }
}
