  @import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

  :root{
    /* fixed brand constants (DataCamp green + navy — stay the same in both themes) */
    --brand-green: #03EF62;
    --brand-green-ink: #05192D;
    --brand-navy: #05192D;
    --brand-navy-ink: #F4F8F6;

    --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

    /* adaptive surface + text */
    --paper: #F7F9FA;
    --paper-raised: #FFFFFF;
    --ink: #0B1F33;
    --muted: #5B6B7B;
    --accent: var(--brand-green);
    --accent-ink: var(--brand-green-ink);
    --accent-2: #05192D;
    --line: #E3E8EC;
    --chip-bg: #E7FBEF;
    --chip-ink: #05192D;
    --rule: #D8E4DC;
    --shadow: 0 1px 2px rgba(5,25,45,0.06), 0 10px 28px rgba(5,25,45,0.08);
  }
  @media (prefers-color-scheme: dark){
    :root{
      --paper: #05192D;
      --paper-raised: #0C2740;
      --ink: #EAF2F0;
      --muted: #9FB0BE;
      --accent-2: #6FA8DC;
      --line: #1C3A52;
      --chip-bg: rgba(3,239,98,0.14);
      --chip-ink: #7CFFB0;
      --rule: #23425C;
      --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 10px 28px rgba(0,0,0,0.45);
    }
  }

  *{ box-sizing: border-box; }
  html,body{ margin:0; padding:0; }
  body{
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  .sheet{ max-width: 920px; margin: 0 auto; padding: 56px 28px 96px; }

  /* ---------- Header (hero — always brand navy) ---------- */
  header.title-block{
    background: var(--brand-navy);
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(5,25,45,0.32);
    padding: 48px 48px 42px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
  }
  header.title-block::before{
    content: ""; position: absolute; top: -100px; right: -100px; width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(3,239,98,0.35), transparent 70%); pointer-events: none;
  }
  header.title-block::after{
    content: ""; position: absolute; bottom: -140px; left: -60px; width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(111,168,220,0.18), transparent 70%); pointer-events: none;
  }
  header.title-block > *{ position: relative; z-index: 1; }
  .eyebrow{
    display: inline-block; font-family: var(--font-sans); font-weight: 800;
    font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent); background: rgba(3,239,98,0.14);
    padding: 6px 14px; border-radius: 100px; margin: 0 0 18px;
  }
  h1{
    font-family: var(--font-sans);
    font-weight: 800; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.12;
    letter-spacing: -0.02em; text-wrap: balance; margin: 0 0 12px; color: var(--brand-navy-ink);
  }
  h1 .hl{ color: var(--accent); }
  .subtitle{ font-size: 16.5px; color: rgba(244,248,246,0.76); margin: 0 0 26px; max-width: 64ch; }
  .meta-row{ display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 22px; border-top: 1px solid rgba(244,248,246,0.14); }
  .meta-item{ display:flex; flex-direction:column; gap:4px; }
  .meta-label{
    font-family: var(--font-sans); font-weight: 700;
    font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244,248,246,0.55);
  }
  .meta-value{ font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand-navy-ink); }
  .objectif{ margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(244,248,246,0.14); font-size: 15.5px; color: rgba(244,248,246,0.88); }
  .objectif strong{ color: var(--accent); }

  /* ---------- TOC ---------- */
  .toc-wrap{ margin: 0 0 32px; }
  .toc-wrap h2, .overview h2{
    font-family: var(--font-sans);
    font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--accent-2); margin: 0 0 14px; font-weight: 800;
  }
  .toc{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap:10px; }
  .toc li a{
    display:flex; gap:12px; align-items:center; text-decoration:none; color: var(--ink);
    font-size: 14px; font-weight: 600; padding: 12px 14px; border:1px solid var(--line); border-radius: 12px;
    background: var(--paper-raised); box-shadow: var(--shadow);
    transition: border-color .15s ease, transform .15s ease;
  }
  .toc li a:hover{ border-color: var(--accent); transform: translateY(-2px); }
  .toc .n{
    display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
    width: 24px; height: 24px; border-radius: 50%;
    font-family: var(--font-sans); font-weight: 800;
    font-size: 11px; color: var(--accent-2); background: var(--chip-bg);
  }

  /* ---------- Timeline overview ---------- */
  .overview{ margin: 0 0 40px; }
  .timeline{ display: flex; overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--paper-raised); box-shadow: var(--shadow); }
  .tl-item{ flex: 1 0 118px; padding: 18px 16px; border-right: 1px solid var(--line); position: relative; }
  .tl-item:last-child{ border-right: none; }
  .tl-num{
    display:inline-flex; align-items:center; justify-content:center;
    width: 26px; height: 26px; border-radius: 50%;
    font-family: var(--font-sans); font-weight: 800; font-size: 12px;
    color: var(--accent-ink); background: var(--accent); font-variant-numeric: tabular-nums;
  }
  .tl-title{ font-family: var(--font-sans); font-size: 12.5px; font-weight: 700; margin-top: 10px; line-height: 1.3; min-height: 32px; color: var(--ink); }
  .tl-hours{ font-family: var(--font-sans); font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }

  /* ---------- Path / modules ---------- */
  .path{ position: relative; }
  .module{ display: grid; grid-template-columns: 48px 1fr; column-gap: 22px; position: relative; scroll-margin-top: 20px; }
  .rail{ position: relative; }
  .rail::before{ content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); transform: translateX(-50%); }
  .module:first-child .rail::before{ top: 30px; }
  .module:last-child .rail::before{ bottom: calc(100% - 30px); }
  .node{
    position: relative; z-index: 1; width: 48px; height: 48px; margin-top: 6px;
    border-radius: 50%; background: var(--accent); border: none; box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-sans);
    font-size: 16px; font-weight: 800; color: var(--accent-ink);
  }
  .module.intro .node{ box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--accent), var(--shadow); }

  .card{ background: var(--paper-raised); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 16px; box-shadow: var(--shadow); padding: 28px 32px 30px; margin-bottom: 30px; }
  .card h2{
    font-family: var(--font-sans);
    font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 10px; color: var(--ink); text-wrap: balance;
  }
  .card .duree{
    font-family: var(--font-sans);
    font-size: 11px; font-weight: 700; color: var(--chip-ink); letter-spacing: 0.05em; text-transform: uppercase;
    display: inline-block; margin-bottom: 18px; background: var(--chip-bg); padding: 5px 12px; border-radius: 100px;
  }
  h3.block-label{
    font-family: var(--font-sans);
    font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); margin: 24px 0 10px; font-weight: 800;
  }
  h4.sub-h{
    font-family: var(--font-sans);
    font-size: 16.5px; font-weight: 800; margin: 20px 0 8px; color: var(--ink);
  }
  .card ul{ margin: 0; padding-left: 20px; }
  .card li{ margin-bottom: 5px; font-size: 15px; }
  .card p{ font-size: 15px; margin: 0 0 8px; }

  .atelier{ border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper-raised)); border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 18px 0; }
  .atelier-tag{
    display: inline-block; font-family: var(--font-sans);
    font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--accent-ink); text-transform: uppercase;
    background: var(--accent); padding: 5px 12px; border-radius: 100px; margin-bottom: 10px;
  }
  .atelier p{ margin: 0 0 6px; font-size: 15px; }
  .atelier p:last-child{ margin-bottom: 0; }
  .flow{ font-family: var(--font-mono); font-size: 13.5px; color: var(--accent-2); }

  .final-atelier{ border-left-color: var(--brand-navy); background: color-mix(in srgb, var(--brand-navy) 10%, var(--paper-raised)); }
  .final-atelier .atelier-tag{ background: var(--brand-navy); color: var(--brand-navy-ink); }

  .concepts, .skills{ display:flex; flex-wrap:wrap; gap:8px; margin-top: 8px; }
  .concept-chip{
    font-family: var(--font-sans); font-weight: 700;
    font-size: 12px; padding: 5px 12px; border-radius: 100px; background: var(--chip-bg); color: var(--chip-ink); border: 1px solid var(--rule);
  }
  .skill-chip{ font-family: var(--font-sans); font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 100px; background: var(--chip-bg); color: var(--chip-ink); border: 1px solid var(--rule); }

  /* ---------- Steps ---------- */
  ol.steps{ margin: 10px 0; padding-left: 0; list-style: none; counter-reset: step; }
  ol.steps li{ counter-increment: step; position: relative; padding-left: 36px; margin-bottom: 12px; font-size: 15px; }
  ol.steps li::before{
    content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent); color: var(--accent-ink); font-family: var(--font-sans);
    font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800;
  }
  ol.steps code, .card p code, .card li code{
    font-family: var(--font-mono);
    background: var(--chip-bg); border: 1px solid var(--rule); border-radius: 6px; padding: 2px 7px; font-size: 13px; color: var(--chip-ink);
  }

  /* ---------- Code / example blocks ---------- */
  .example-label{
    font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 6px;
    font-family: var(--font-sans); font-weight: 700;
  }
  .code-block{
    background: var(--brand-navy); color: var(--brand-navy-ink); border-left: 3px solid var(--accent); border-radius: 10px; padding: 16px 20px;
    font-family: var(--font-mono); font-size: 13px;
    overflow-x: auto; white-space: pre; margin: 6px 0 16px; font-variant-numeric: tabular-nums;
  }

  /* ---------- Tables ---------- */
  .table-wrap{ overflow-x: auto; margin: 10px 0 18px; border: 1px solid var(--line); border-radius: 12px; }
  table.data{ width:100%; border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
  table.data th, table.data td{ padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
  table.data th{
    background: var(--brand-navy); color: var(--brand-navy-ink); font-family: var(--font-sans);
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 800;
  }
  table.data td{ font-variant-numeric: tabular-nums; }
  table.data tr:last-child td{ border-bottom: none; }

  .callout{
    border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--paper-raised)); border-radius: 0 10px 10px 0; padding: 13px 18px; margin: 16px 0;
    font-size: 13.5px; color: var(--muted);
  }
  .callout strong{ color: var(--ink); font-weight: 800; }

  /* ---------- Quiz ---------- */
  .quiz{
    border: 1px solid var(--line); background: var(--paper-raised);
    border-radius: 12px; padding: 20px 24px 22px; margin: 0 0 18px;
  }
  .quiz-title{
    font-family: var(--font-sans); font-size: 12.5px; font-weight: 800;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 16px;
  }
  .quiz-q{ margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px dashed var(--rule); }
  .quiz-q:last-of-type{ border-bottom: none; padding-bottom: 0; margin-bottom: 8px; }
  .quiz-question{ font-size: 14.5px; font-weight: 700; margin: 0 0 10px; color: var(--ink); }
  .quiz-opt{
    display: flex; align-items: flex-start; gap: 9px; font-size: 14px; color: var(--ink);
    padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
    margin-bottom: 6px; cursor: pointer; transition: border-color .15s ease, background .15s ease;
  }
  .quiz-opt:hover{ border-color: var(--accent); }
  .quiz-opt input{ margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; }
  .quiz-opt.correct{ border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--paper-raised)); }
  .quiz-opt.incorrect{ border-color: #E0554F; background: color-mix(in srgb, #E0554F 14%, var(--paper-raised)); }
  .quiz-explain{
    display: none; font-size: 13px; color: var(--muted); margin: 10px 0 0;
    padding: 11px 14px; background: var(--chip-bg); border-radius: 8px;
  }
  .quiz-explain.show{ display: block; }
  .quiz-actions{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .quiz-check, .quiz-reset{
    font-family: var(--font-sans); font-size: 13.5px; font-weight: 700;
    padding: 10px 20px; border-radius: 100px; cursor: pointer;
  }
  .quiz-check{ border: none; background: var(--accent); color: var(--accent-ink); }
  .quiz-check:hover{ opacity: 0.9; }
  .quiz-reset{ border: 1px solid var(--line); background: transparent; color: var(--muted); }
  .quiz-reset:hover{ border-color: var(--accent); color: var(--ink); }
  .quiz-score{
    display: none; font-family: var(--font-sans); font-size: 14px; font-weight: 800; margin: 0; color: var(--ink);
  }
  .quiz-score.show{ display: block; }

  /* ---------- Embedded browser ---------- */
  .browser-frame{ border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin: -52px -60px; box-shadow: var(--shadow); }
  .browser-chrome{ display: flex; align-items: center; gap: 6px; background: var(--paper); padding: 1px 4px; border-bottom: 1px solid var(--line); }
  .browser-dot{ width: 1px; height: 1px; border-radius: 20%; background: var(--line); flex: 0 0 auto; }
  .browser-url{
    margin-left: 8px; flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
    background: var(--paper-raised); border: 1px solid var(--line); border-radius: 100px;
    padding: 5px 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .browser-frame iframe{ display: block; width: 100%; height: 70vh; max-height: 1000px; border: 0; background: #fff; }
  @media (max-width: 1000px){
    .browser-frame iframe{ height: 55vh; }
  }

  footer{ margin-top: 12px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
  footer .total{ font-family: var(--font-sans); font-size: 19px; font-weight: 800; color: var(--ink); }
  footer .total span{ color: var(--accent); font-variant-numeric: tabular-nums; }
  footer .note{ font-size: 13px; color: var(--muted); max-width: 40ch; }

  @media (max-width: 600px){
    .sheet{ padding: 36px 14px 64px; }
    header.title-block{ padding: 32px 24px 28px; }
    .module{ grid-template-columns: 36px 1fr; column-gap: 14px; }
    .node{ width: 36px; height: 36px; font-size: 14px; }
    .card{ padding: 22px 18px 24px; }
  }

  @media print{
    body{ background: white; }
    header.title-block{ background: #fff; box-shadow: none; border: 1px solid #ddd; }
    header.title-block::before, header.title-block::after{ display: none; }
    header.title-block *{ color: #0B1F33 !important; }
    .eyebrow, .objectif strong{ background: none !important; color: #05192D !important; }
    .code-block, table.data th{ background: #F0F0F0 !important; color: #111 !important; }
    .card, .timeline, .toc li a{ box-shadow: none; break-inside: avoid; }
    .code-block, table.data{ break-inside: avoid; }
  }

  /* ---------- Tabs ---------- */
  .tabs-bar{
    position: sticky; top: 0; z-index: 50;
    display: flex; gap: 6px; justify-content: center; align-items: center;
    background: var(--paper-raised); border-bottom: 1px solid var(--line);
    padding: 12px 16px;
  }
  .tab-btn{
    font-family: var(--font-sans);
    font-size: 13px; font-weight: 700; letter-spacing: 0.01em;
    padding: 10px 20px; border-radius: 100px; border: 1px solid var(--line);
    background: var(--paper); color: var(--muted); cursor: pointer;
  }
  .tab-btn:hover{ border-color: var(--accent); color: var(--ink); }
  .tab-btn.active{ background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .slide-progress{ position: absolute; bottom: -1px; left: 0; height: 2px; width: 0%; background: var(--accent); display: none; transition: width .2s ease; }
  body.slides-mode .slide-progress{ display: block; }

  .view{ display: none; }
  .view.active{ display: block; }

  /* ---------- Slide deck ---------- */
  .slide-stage{ display: flex; align-items: center; justify-content: center; padding: 40px 32px 120px; min-height: calc(100vh - 49px); }
  .slide{ display: none; max-width: 1180px; width: 100%; }
  .slide.active{ display: block; }
  .slide-kicker{
    display: inline-block; font-family: var(--font-sans);
    font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink);
    background: var(--accent); padding: 7px 18px; border-radius: 100px;
    margin: 0 0 18px;
  }
  .slide-title{
    font-family: var(--font-sans);
    font-weight: 800; font-size: clamp(30px, 4.4vw, 54px); line-height: 1.14;
    margin: 0 0 28px; color: var(--ink); text-wrap: balance; letter-spacing: -0.015em;
  }
  .slide-body{
    background: var(--paper-raised); border: 1px solid var(--line); border-radius: 22px;
    box-shadow: var(--shadow); padding: 52px 60px;
    min-height: min(600px, 64vh);
    display: flex; flex-direction: column; justify-content: center;
  }
  .slide-body h4.sub-h{ font-size: 19px; margin: 22px 0 8px; }
  .slide-body h4.sub-h:first-child{ margin-top: 0; }
  .slide-body p, .slide-body li{ font-size: 18.5px; line-height: 1.52; }
  .slide-body ul{ margin: 0; padding-left: 22px; }
  .slide-body li{ margin-bottom: 9px; }
  .slide-body .example-label{ font-size: 13px; margin: 20px 0 8px; }
  .slide-body .example-label:first-child{ margin-top: 0; }
  .slide-body .flow{ font-size: 16.5px; }
  .slide-body .code-block{ font-size: 15.5px; padding: 20px 24px; }
  .slide-body table.data{ font-size: 15px; }
  .slide-body table.data th, .slide-body table.data td{ padding: 13px 18px; }
  .slide-body table.data th{ font-size: 12px; }
  .slide-body .callout{ font-size: 16px; padding: 16px 20px; }
  .slide-body .concept-chip, .slide-body .skill-chip{ font-size: 14px; padding: 7px 16px; }
  .slide-body ol.steps li{ font-size: 17.5px; padding-left: 42px; margin-bottom: 15px; }
  .slide-body ol.steps li::before{ width: 28px; height: 28px; font-size: 13px; }
  .slide-note{ font-size: 14px; color: var(--muted); margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--rule); }

  .slide-nav{
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap;
    padding: 6px 20px; background: var(--paper-raised); border-top: 1px solid var(--line);
  }
  .slide-nav-btn{
    font-family: var(--font-sans);
    font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 100px;
    border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer;
  }
  .slide-nav-btn:disabled{ opacity: 0.35; cursor: default; }
  .slide-nav-btn:not(:disabled):hover{ border-color: var(--accent); }
  .slide-counter{ font-family: var(--font-sans); font-weight: 600; font-size: 12.5px; color: var(--muted); min-width: 64px; text-align: center; }
  .slide-jump{
    font-family: var(--font-sans); font-size: 12px; padding: 8px 12px; border-radius: 8px;
    border: 1px solid var(--line); background: var(--paper); color: var(--ink); max-width: 260px;
  }

  @media (max-width: 600px){
    .slide-stage{ padding: 24px 14px 130px; align-items: flex-start; }
    .slide-body{ padding: 26px 20px; min-height: auto; justify-content: flex-start; }
    .slide-title{ margin: 0 0 18px; }
    .slide-body p, .slide-body li{ font-size: 16px; }
    .browser-frame{ margin: -26px -20px; }
  }

  @media print{
    .tabs-bar, .slide-nav{ display: none; }
  }
