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

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  background: #eef1f7;
  color: #1e2a3a;
}

/* ── En-tête ── */

header {
  background: #0f2744;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}

header .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7db9f5;
  margin-bottom: 0.75rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ── Mise en page ── */

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Cartes de section ── */

.section-card {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid #d4dcea;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1.1rem 1.6rem;
  border-bottom: 1px solid #e6ecf5;
}

.section-header.s1 { background: #e8f1fd; }
.section-header.s2 { background: #e8f6ef; }

.section-header .num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}

.s1 .num { background: #1a5fb0; color: #fff; }
.s2 .num { background: #1a7a54; color: #fff; }

.section-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.s1 h2 { color: #0f2d6b; }
.s2 h2 { color: #0d4a30; }

.section-body { padding: 1.75rem; }

/* ── Figures images ── */

figure.doc-image {
  margin: 0 0 1.75rem;
  background: #f4f6fb;
  border: 1.5px solid #c8d5ea;
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
}

figure.doc-image img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}

figure.doc-image img.half { max-width: 50%; }

figure.doc-image figcaption {
  margin-top: 0.6rem;
  font-size: 13px;
  color: #5a6a80;
  font-style: italic;
}

/* ── Contenu texte ── */

.section-body p { margin-bottom: 1rem; }
.section-body p:last-child { margin-bottom: 0; }

.key-term {
  background: #e8f1fd;
  color: #0f2d6b;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.key-term.green {
  background: #e0f5ec;
  color: #0d4a30;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  counter-reset: step;
}

.steps-list li {
  position: relative;
  padding: 0.6rem 0.75rem 0.6rem 2.8rem;
  margin-bottom: 0.5rem;
  background: #f7f9fc;
  border-left: 3px solid #5a8fd8;
  border-radius: 0 6px 6px 0;
  counter-increment: step;
  font-size: 15px;
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 13px;
  color: #1a5fb0;
}

.info-box {
  background: #f0faf5;
  border: 1px solid #a8d9c0;
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  font-size: 14.5px;
  color: #0d4a30;
  margin-top: 1rem;
}

/* ── Animation HTTP ── */

.http-anim {
  margin: 0 0 1.75rem;
  background: #f4f6fb;
  border: 1.5px solid #c8d5ea;
  border-radius: 10px;
  overflow: hidden;
}

.ha-stage {
  display: flex;
  align-items: center;
  padding: 1.4rem 1rem 1rem;
}

.ha-node {
  width: 128px;
  flex-shrink: 0;
  background: #ffffff;
  border: 1.5px solid #c8d5ea;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  transition: border-color .35s, background .35s;
}

.ha-node.hi-req { background: #ddeeff; border-color: #1a5fb0; }
.ha-node.hi-res { background: #ddf5ea; border-color: #1a7a54; }

.ha-icon { display: block; margin: 0 auto 6px; color: #5a8fd8; }

.ha-nname { font-size: 12px; font-weight: 700; color: #1e2a3a; }
.ha-nsub  { font-size: 10px; color: #5a6a80; margin-top: 2px; line-height: 1.3; }
.ha-nrecv { font-size: 10px; font-weight: 700; color: #1a7a54; margin-top: 5px; min-height: 13px; }

.ha-track {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 8px;
}

.ha-lane {
  position: relative;
  height: 26px;
  display: flex;
  align-items: center;
}

.ha-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1.5px dashed #c8d5ea;
}

.ha-pkt {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  will-change: transform;
  white-space: nowrap;
}

.ha-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.ha-pill-req { background: #1a5fb0; color: #ffffff; }
.ha-pill-res { background: #1a7a54; color: #ffffff; }

.ha-arr-req { color: #1a5fb0; font-size: 13px; font-weight: 700; }
.ha-arr-res { color: #1a7a54; font-size: 13px; font-weight: 700; }

.ha-bar {
  background: #ffffff;
  border-top: 1px solid #e0e8f5;
  padding: 10px 14px 13px;
}

.ha-srow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.ha-badge {
  font-size: 11px;
  font-weight: 700;
  background: #e8f1fd;
  color: #1a5fb0;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: background .3s, color .3s;
}

.ha-badge.succ { background: #e0f5ec; color: #1a7a54; }

.ha-dots { display: flex; gap: 4px; }

.ha-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c8d5ea;
  transition: background .3s;
}

.ha-dot.on { background: #1a5fb0; }
.ha-dot.ok { background: #1a7a54; }

.ha-action { font-size: 14px; font-weight: 700; color: #1e2a3a; min-height: 20px; }
.ha-note   { font-size: 12.5px; color: #5a6a80; margin-top: 3px; min-height: 17px; font-style: italic; }
