/* ============================================================
   Power BI — Cours interactif
   Feuille de style partagée
   ============================================================ */

:root {
  --pbi-yellow: #F2C811;
  --pbi-yellow-dark: #d9b30d;
  --ink: #1b1b1f;
  --ink-soft: #3c3c43;
  --muted: #6b6b76;
  --bg: #f6f7f9;
  --card: #ffffff;
  --line: #e6e7eb;
  --line-strong: #d3d4da;
  --brand: #2b2b30;
  --accent: #117865;        /* vert "valider" */
  --accent-soft: #e3f4ef;
  --info: #1f6feb;
  --info-soft: #e8f1ff;
  --warn: #b54708;
  --warn-soft: #fff4e5;
  --tip: #7a3db8;
  --tip-soft: #f3ebfb;
  --code-bg: #1e2030;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.06);
  --maxw: 1180px;
  --font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ---------- Barre supérieure ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand);
  color: #fff;
  border-bottom: 3px solid var(--pbi-yellow);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 22px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: .3px; color: #fff;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--pbi-yellow); color: #1b1b1f;
  display: grid; place-items: center; font-weight: 900; font-size: 18px;
}
.topnav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topnav a {
  color: #d7d7dd; padding: 7px 12px; border-radius: 8px; font-size: 14px; font-weight: 600;
}
.topnav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.topnav a.active { background: var(--pbi-yellow); color: #1b1b1f; }

/* ---------- Layout cours (sidebar + contenu) ---------- */
.layout {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 268px 1fr; gap: 34px;
  padding: 28px 22px 80px;
}
.sidebar { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; }
.sidebar h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); margin: 0 0 10px 4px;
}
.toc { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 1px 0; }
.toc a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 9px; color: var(--ink-soft);
  font-size: 14px; font-weight: 600;
}
.toc a:hover { background: #eceef2; text-decoration: none; }
.toc a.active { background: #fff7d4; color: #1b1b1f; box-shadow: inset 3px 0 0 var(--pbi-yellow); }
.toc .num {
  flex: 0 0 22px; height: 22px; border-radius: 50%;
  background: #e6e7eb; color: var(--ink-soft);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.toc a.done .num { background: var(--accent); color: #fff; }
.toc a.done .num::after { content: "✓"; }
.toc a.done .num span { display: none; }

.content { min-width: 0; }

/* ---------- En-tête de page ---------- */
.page-head {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow);
  margin-bottom: 26px; position: relative; overflow: hidden;
}
.page-head::before {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 160px; height: 160px; background: var(--pbi-yellow); opacity: .12; border-radius: 50%;
}
.kicker {
  display: inline-block; background: #fff7d4; color: #8a6d00;
  font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.page-head h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.2; }
.page-head p { margin: 0; color: var(--ink-soft); max-width: 70ch; }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #f1f2f5; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--ink-soft);
}

/* ---------- Barre de progression ---------- */
.progress-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; box-shadow: var(--shadow); margin-bottom: 26px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.progress-wrap .label { font-weight: 700; font-size: 14px; }
.progress-bar { flex: 1; min-width: 180px; height: 12px; background: #e9eaee; border-radius: 999px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pbi-yellow), var(--accent)); transition: width .4s ease; }
.progress-pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.btn-reset {
  background: none; border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; color: var(--muted); font-weight: 600;
}
.btn-reset:hover { background: #f1f2f5; color: var(--ink); }

/* ---------- Module / section ---------- */
.module {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden; scroll-margin-top: 84px;
}
.module-head {
  display: flex; align-items: center; gap: 14px; padding: 18px 24px;
  cursor: pointer; user-select: none; border-bottom: 1px solid transparent;
}
.module-head:hover { background: #fafafb; }
.module.open .module-head { border-bottom-color: var(--line); }
.module-badge {
  flex: 0 0 38px; height: 38px; border-radius: 11px;
  background: var(--brand); color: var(--pbi-yellow);
  display: grid; place-items: center; font-weight: 900; font-size: 16px;
}
.module-head h2 { margin: 0; font-size: 19px; flex: 1; }
.module-head .obj { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.module-head .caret { transition: transform .25s; color: var(--muted); font-size: 20px; }
.module.open .module-head .caret { transform: rotate(90deg); }
.module-head .done-flag {
  font-size: 12px; font-weight: 800; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; display: none;
}
.module.completed .module-head .done-flag { display: inline-block; }

.module-body { padding: 6px 24px 22px; display: none; }
.module.open .module-body { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px);} to {opacity:1; transform:none;} }

.module-body h3 { font-size: 15px; margin: 22px 0 8px; color: var(--ink); }
.module-body p { margin: 8px 0; }
.module-body ul, .module-body ol { margin: 8px 0; padding-left: 22px; }
.module-body li { margin: 5px 0; }

/* ---------- Étapes numérotées ---------- */
.steps { list-style: none; counter-reset: step; margin: 14px 0; padding: 0; }
.steps > li {
  position: relative; padding: 4px 0 18px 50px; margin: 0;
  border-left: 2px solid var(--line); margin-left: 16px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 4px; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -17px; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--pbi-yellow); color: #1b1b1f;
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
  box-shadow: 0 0 0 4px var(--card);
}
.steps > li strong { color: var(--ink); }

/* ---------- Repères d'interface (chemins de menus) ---------- */
.path {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: #f1f2f5; border: 1px solid var(--line); border-radius: 7px;
  padding: 2px 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
}
.path .sep { color: var(--muted); }
kbd {
  background: #fff; border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; font-family: var(--font); font-size: 12.5px; font-weight: 700;
}
.ui { background: #fff7d4; border-radius: 4px; padding: 0 5px; font-weight: 700; color: #6b5500; }

/* ---------- Encadrés ---------- */
.callout {
  border-radius: 10px; padding: 13px 16px 13px 46px; margin: 14px 0;
  position: relative; font-size: 14.5px; border: 1px solid;
}
.callout::before { position: absolute; left: 14px; top: 12px; font-size: 18px; }
.callout p:first-child { margin-top: 0; } .callout p:last-child { margin-bottom: 0; }
.callout.info  { background: var(--info-soft); border-color: #cfe0ff; color: #1b3a66; }
.callout.info::before { content: "ℹ️"; }
.callout.warn  { background: var(--warn-soft); border-color: #ffd9a8; color: #7a3d00; }
.callout.warn::before { content: "⚠️"; }
.callout.tip   { background: var(--tip-soft); border-color: #e4d2f5; color: #5a2d8a; }
.callout.tip::before { content: "💡"; }
.callout.goal  { background: var(--accent-soft); border-color: #b8e3d6; color: #0c5a4a; }
.callout.goal::before { content: "🎯"; }
.callout.web   { background: #eaf6ff; border-color: #b9def7; color: #0b4f78; }
.callout.web::before { content: "🌐"; }
.callout.excel { background: #e7f4ea; border-color: #b7e0c4; color: #1e6b3a; }
.callout.excel::before { content: "📗"; }
.callout.excel code { background: rgba(30,107,58,.1); padding: 0 4px; border-radius: 4px; }
.callout.web .web-title { font-weight: 800; display:block; margin-bottom: 2px; }
.callout strong { font-weight: 800; }

/* ---------- Sélecteur Desktop / Web ---------- */
.mode-switch {
  display: inline-flex; background: #e9eaee; border-radius: 11px; padding: 4px; gap: 4px;
}
.ms-btn {
  border: none; background: none; padding: 8px 15px; border-radius: 8px;
  font-weight: 700; cursor: pointer; color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 7px;
}
.ms-btn:hover { color: var(--ink); }
.ms-btn.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
body.mode-web .ms-btn[data-mode="web"].active { background: var(--brand); color: #fff; }
body.mode-desktop .ms-btn[data-mode="desktop"].active { background: var(--brand); color: #fff; }

.mode-bar {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px; margin-bottom: 22px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.mode-bar .mb-label { font-weight: 700; font-size: 14px; }
.mode-bar .mb-hint { font-size: 13px; color: var(--muted); }

/* Affichage conditionnel selon le mode */
body.mode-web .only-desktop { display: none !important; }
body.mode-desktop .only-web { display: none !important; }

/* Blocs spécifiques à un outil */
.toolnote {
  border-radius: 10px; padding: 12px 16px 12px 44px; margin: 14px 0; position: relative;
  font-size: 14.5px; border: 1px solid;
}
.toolnote::before { position: absolute; left: 14px; top: 11px; font-size: 18px; }
.toolnote.web { background: #eaf6ff; border-color: #b9def7; color: #0b4f78; }
.toolnote.web::before { content: "🌐"; }
.toolnote.desktop { background: #f3f1fb; border-color: #ddd3f2; color: #4a3b73; }
.toolnote.desktop::before { content: "💻"; }
.toolnote .tn-title { display: block; font-weight: 800; margin-bottom: 3px; }
.toolnote p:last-child { margin-bottom: 0; }

/* ---------- Rappel « base à importer » ---------- */
.data-badge {
  display: flex; align-items: center; gap: 10px;
  background: #fff7d4; border: 1px solid #ecd98a; border-left: 4px solid var(--pbi-yellow-dark);
  border-radius: 8px; padding: 9px 14px; margin: 0 0 14px; font-size: 14px; color: #6b5500;
}
.data-badge .di { font-size: 18px; flex: 0 0 auto; }
.data-badge b { color: #4a3b00; }
.data-badge code { background: rgba(107,85,0,.12); padding: 0 5px; border-radius: 4px; font-size: 13px; }

/* ---------- Captures d'écran ---------- */
figure.shot { margin: 16px 0; }
figure.shot img {
  display: block; width: 100%; height: auto; border: 1px solid var(--line-strong);
  border-radius: 10px; box-shadow: var(--shadow); background: #fff; cursor: zoom-in;
}
figure.shot figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; text-align: center; font-style: italic; }
figure.shot.narrow img { max-width: 560px; margin-left: auto; margin-right: auto; }

/* Visionneuse plein écran (lightbox) */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(10,12,20,.86);
  display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox .close { position: absolute; top: 18px; right: 24px; color: #fff; font-size: 34px; font-weight: 700; cursor: pointer; line-height: 1; }

/* ---------- Bloc de code (DAX / M) ---------- */
.code {
  position: relative; background: var(--code-bg); color: #e6e6f0;
  border-radius: 10px; margin: 14px 0; overflow: hidden; border: 1px solid #2a2d40;
}
.code .code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; background: rgba(255,255,255,.04); border-bottom: 1px solid #2a2d40;
  font-size: 12px; font-weight: 700; color: #9aa0b5; letter-spacing: .4px;
}
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.code code {
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 13.5px; line-height: 1.65; white-space: pre; color: #e6e6f0;
}
.code .kw { color: #f2c811; font-weight: 700; }   /* fonctions DAX */
.code .str { color: #7ee787; }                      /* chaînes */
.code .num { color: #79c0ff; }                      /* nombres */
.code .com { color: #6b7280; font-style: italic; }  /* commentaires */
.btn-copy {
  background: rgba(255,255,255,.08); color: #cfd2e0; border: 1px solid #3a3d52;
  border-radius: 6px; padding: 3px 10px; font-size: 12px; cursor: pointer; font-weight: 600;
}
.btn-copy:hover { background: rgba(255,255,255,.16); }
.btn-copy.ok { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- À toi de jouer / checklist ---------- */
.task {
  background: #fffdf3; border: 1px dashed var(--pbi-yellow-dark); border-radius: 10px;
  padding: 14px 16px; margin: 16px 0;
}
.task .task-title { font-weight: 800; color: #6b5500; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; cursor: pointer; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; flex: 0 0 auto; }
.check span { font-size: 14.5px; }
.check input:checked + span { color: var(--muted); text-decoration: line-through; }

/* bouton "marquer comme terminé" */
.module-done-row { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-done {
  background: var(--accent); color: #fff; border: none; border-radius: 9px;
  padding: 9px 18px; font-size: 14px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-done:hover { filter: brightness(1.07); }
.btn-done.is-done { background: #eef6f3; color: var(--accent); border: 1px solid #bfe3d8; }

/* ---------- Cartes accueil ---------- */
.hero {
  background: linear-gradient(135deg, #2b2b30, #3a3a44);
  color: #fff; border-radius: 18px; padding: 46px 44px; margin-bottom: 30px;
  position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -60px;
  width: 260px; height: 260px; background: var(--pbi-yellow); opacity: .15; border-radius: 50%;
}
.hero h1 { font-size: 38px; margin: 0 0 12px; line-height: 1.15; max-width: 18ch; }
.hero p { font-size: 17px; color: #d7d7dd; margin: 0 0 24px; max-width: 60ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 22px; border-radius: 11px; font-weight: 700; font-size: 15px; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--pbi-yellow); color: #1b1b1f; }
.btn-primary:hover { background: var(--pbi-yellow-dark); text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.16); text-decoration: none; }

.section-title { font-size: 22px; margin: 36px 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 20px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.course-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden;
}
.course-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(16,24,40,.12); text-decoration: none; }
.course-card .cc-num {
  width: 46px; height: 46px; border-radius: 12px; background: var(--brand); color: var(--pbi-yellow);
  display: grid; place-items: center; font-weight: 900; font-size: 22px; margin-bottom: 14px;
}
.course-card h3 { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.course-card p { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; flex: 1; }
.course-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.course-card .tag { font-size: 11.5px; font-weight: 700; background: #f1f2f5; color: var(--muted); padding: 3px 9px; border-radius: 999px; }
.course-card .cc-progress { margin-top: 14px; height: 7px; background: #e9eaee; border-radius: 999px; overflow: hidden; }
.course-card .cc-progress > span { display: block; height: 100%; width: 0; background: var(--accent); }

/* grille de liens utiles / données */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 14px; }
.tile {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow);
}
.tile:hover { border-color: var(--pbi-yellow-dark); text-decoration: none; }
.tile .ico { font-size: 22px; flex: 0 0 auto; }
.tile .t-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.tile .t-sub { font-size: 12.5px; color: var(--muted); }

/* navigation bas de page (préc/suiv) */
.pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.pager a {
  flex: 1; min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; box-shadow: var(--shadow);
}
.pager a:hover { border-color: var(--pbi-yellow-dark); text-decoration: none; }
.pager .dir { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pager .ttl { font-weight: 700; color: var(--ink); }
.pager a.next { text-align: right; }

footer.site {
  border-top: 1px solid var(--line); background: var(--card);
  padding: 22px; text-align: center; color: var(--muted); font-size: 13px;
}

/* table simple pour illustrer des données */
table.demo { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13.5px; }
table.demo th, table.demo td { border: 1px solid var(--line-strong); padding: 6px 10px; text-align: left; }
table.demo th { background: #f1f2f5; font-weight: 700; }
table.demo caption { caption-side: top; text-align: left; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }

/* ---------- Responsive : tablette ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 18px; padding: 18px 16px 60px; }
  .sidebar { position: static; max-height: none; order: -1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
  .hero { padding: 32px 24px; }
  .hero h1 { font-size: 28px; }
}

/* ---------- Responsive : smartphone ---------- */
@media (max-width: 640px) {
  html { scroll-padding-top: 64px; }
  body { line-height: 1.6; }

  /* Barre du haut : nav défilante au lieu d'être masquée */
  .topbar-inner { padding: 10px 12px; gap: 10px; flex-wrap: nowrap; }
  .brand { font-size: 14px; gap: 7px; }
  .brand .logo { width: 26px; height: 26px; font-size: 15px; }
  .topnav {
    margin-left: auto; gap: 2px; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; max-width: 62vw; scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { padding: 6px 9px; font-size: 13px; white-space: nowrap; }

  /* Conteneurs principaux : padding réduit */
  main[style] { padding-left: 14px !important; padding-right: 14px !important; }
  .page-head { padding: 18px 16px; border-radius: 12px; }
  .page-head h1 { font-size: 22px; }
  .page-head p { font-size: 14.5px; }
  .kicker { font-size: 11px; }

  /* Barres d'état / sélecteur : empilage propre */
  .progress-wrap, .mode-bar { padding: 12px 14px; gap: 10px; }
  .mode-switch { width: 100%; }
  .ms-btn { flex: 1; justify-content: center; padding: 9px 8px; font-size: 13px; }
  .mb-hint { font-size: 12px; }

  /* Sommaire compact */
  .sidebar h2 { margin-bottom: 6px; }
  .toc a { padding: 9px 10px; font-size: 14px; }

  /* Modules : titres et marges adaptés */
  .module-head { padding: 14px 16px; gap: 10px; }
  .module-badge { flex-basis: 32px; height: 32px; font-size: 14px; border-radius: 9px; }
  .module-head h2 { font-size: 16.5px; }
  .module-head .obj { font-size: 12px; }
  .module-head .done-flag { display: none !important; }
  .module-body { padding: 4px 16px 18px; }
  .module-body h3 { font-size: 14.5px; }

  /* Étapes : moins de retrait à gauche */
  .steps > li { padding-left: 42px; margin-left: 12px; }
  .steps > li::before { width: 28px; height: 28px; font-size: 13px; left: -15px; }

  /* Chemins de menus : s'enroulent bien */
  .path { font-size: 13px; }

  /* Encadrés */
  .callout, .toolnote { padding-left: 42px; font-size: 14px; }

  /* Cibles tactiles plus grandes (cases à cocher) */
  .check { gap: 12px; margin: 11px 0; }
  .check input { width: 22px; height: 22px; margin-top: 2px; }
  .check span { font-size: 15px; }
  .btn-done { padding: 12px 18px; font-size: 15px; width: 100%; justify-content: center; }

  /* Tableaux : défilement horizontal sur petit écran */
  table.demo { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

  /* Code : police un peu réduite, défilement tactile */
  .code code { font-size: 12.5px; }
  .code pre { padding: 12px 14px; }

  /* Accueil */
  .hero { padding: 26px 18px; border-radius: 14px; }
  .hero h1 { font-size: 23px; }
  .hero p { font-size: 15px; }
  .hero .cta { flex-direction: column; }
  .hero .btn { width: 100%; justify-content: center; }
  .section-title { font-size: 19px; margin-top: 28px; }
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .tiles { grid-template-columns: 1fr; }
  .course-card { padding: 18px; }

  /* Pager : empilé */
  .pager { flex-direction: column; }
  .pager a, .pager a.next { text-align: left; min-width: 0; }

  /* Visionneuse plein écran : moins de marge */
  .lightbox { padding: 12px; }

  /* QCM : options confortables */
  .q-card { padding: 16px 16px; }
  .opt { padding: 12px 13px; }
  .scorebar { padding: 12px 14px; }
  .scorebar .big { font-size: 18px; }
}
