:root {
  --paper: #f2f4f7;
  --ink: #0f1b2d;
  --muted: #56657a;
  --line: #d3dae3;
  --accent: #1f4fff;
  --accent-bg: #e6ecff;
  --orange: #b95c00;
  --orange-bg: #fbe9d6;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
}

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

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

.wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* En-tête */
header.site {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  max-width: 46rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
header.site .brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
}
header.site nav { display: flex; gap: 1.5rem; }
header.site nav a {
  color: var(--muted);
  text-decoration: none;
}
header.site nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* Titre de l'article */
.article-head {
  padding: 3.5rem 0 2rem;
  text-align: center;
}
.article-head time {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}
.article-head h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

article img.img-article {
  display: block;
  width: 100%;
  max-width: 32rem;
  margin: 1.5rem auto;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}

/* Bloc "Objectif de la lecture" */
.objectif {
  border: 1px solid var(--accent);
  background: var(--accent-bg);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin: 0 0 2.5rem;
}
.objectif .label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
.objectif p { margin: 0; }

/* Sommaire */
.sommaire {
  margin: 0 0 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}
.sommaire .label {
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.sommaire ol {
  margin: 0;
  padding-left: 1.25rem;
}
.sommaire li { margin-bottom: 0.4rem; }
.sommaire a { text-decoration: none; }
.sommaire a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Contenu de l'article */
article h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 1rem;
  scroll-margin-top: 1.5rem;
}
article h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  margin: 2rem 0 0.85rem;
  scroll-margin-top: 1.5rem;
}
article h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 1.5rem 0 0.6rem;
  scroll-margin-top: 1.5rem;
}
article p {
  margin: 0 0 1.1rem;
  text-align: justify;
}

/* Texte encadré bleu */
.encadre-bleu {
  border: 1px solid var(--accent);
  background: var(--accent-bg);
  border-radius: 0.5rem;
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
}
.encadre-bleu p:last-child { margin-bottom: 0; }

/* Tableau encadré orange */
.encadre-orange {
  border: 1px solid var(--orange);
  background: var(--orange-bg);
  border-radius: 0.5rem;
  padding: 1.1rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}
.encadre-orange table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}
.encadre-orange caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--orange);
}
.encadre-orange th,
.encadre-orange td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(185, 92, 0, 0.25);
}
.encadre-orange th {
  font-family: var(--display);
  font-weight: 600;
}
.encadre-orange tr:last-child td { border-bottom: none; }

footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  margin-top: 2rem;
}
footer a { color: var(--muted); }

/* Panneaux latéraux (grand écran seulement) */
.side-panel {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 13rem;
  display: none;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.95rem;
}
.side-panel .side-label {
  font-family: var(--display);
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--ink);
}
.side-panel ol {
  list-style: decimal;
  margin: 0;
  padding-left: 1.1rem;
}
.side-panel a,
.side-panel button {
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  padding: 0.15rem 0;
  cursor: pointer;
}
.side-panel a:hover,
.side-panel button:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.side-left,
.side-right {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.side-left.visible,
.side-right.visible {
  opacity: 1;
  pointer-events: auto;
}

.side-left { left: calc(50% - 26rem - 5rem - 13rem); }
.side-right { right: calc(50% - 26rem - 5rem - 13rem); }

@media (min-width: 90rem) {
  .side-panel { display: flex; }
}

@media (max-width: 34rem) {
  .encadre-orange { padding: 0.75rem; }
}
