:root{
  --bg:#ffffff;
  --surface:#ffffff;
  --surface-soft:#f7f9fc;
  --text:#1f2937;
  --muted:#6b7280;
  --border:#e5e7eb;
  --primary:#2563eb;
  --primary-soft:#eaf1ff;
  --accent-soft:#fff3d6;
  --accent-border:#ffd79a;
  --radius:14px;
  --shadow:0 8px 28px rgba(31,41,55,.06);
  /* Largeur de lecture plus confortable (reste responsive) */
  --maxw:min(1240px, 96vw);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
.topbar{
  position:sticky;top:0;z-index:1000;
  background:#fff;border-bottom:1px solid var(--border);
}
.topbar-inner{
  max-width:var(--maxw);margin:0 auto;padding:12px 18px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.lang-switch{
  display:flex;align-items:center;gap:6px;margin-left:auto;
}
.lang-btn{
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  border-radius:999px;
  padding:6px 10px;
  font-size:.82rem;
  line-height:1;
  cursor:pointer;
}
.lang-btn.active{
  background:var(--primary-soft);
  border-color:#c9dcff;
  color:#19418a;
  font-weight:700;
}
.google-translate-mount{
  width:0;height:0;overflow:hidden;opacity:0;pointer-events:none;
}
.goog-te-banner-frame.skiptranslate,
iframe.skiptranslate{
  display:none !important;
}
body{
  top:0 !important;
}
.brand{display:flex;align-items:center;gap:10px;min-width:0}
.brand-logo{
  width:40px;height:40px;border:1px solid var(--border);border-radius:10px;
  object-fit:contain;padding:4px;background:#fff;
}
.brand-text{
  font-family:Merriweather,serif;font-weight:700;font-size:1rem;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.top-links{display:flex;align-items:center;gap:8px}
.chip{
  border:1px solid #d7e3ff;background:var(--primary-soft);color:#19418a;
  border-radius:999px;padding:7px 12px;font-size:.82rem;
}
.container{max-width:var(--maxw);margin:0 auto;padding:24px 18px 70px}
.hero,.card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.hero{display:grid;grid-template-columns:1.2fr 1fr;gap:16px;overflow:hidden}
.hero-content{padding:24px}
h1,h2,h3,h4,h5{font-family:Merriweather,serif}
h1{margin:.1rem 0 .8rem;font-size:clamp(1.4rem,2.7vw,2.2rem)}
h2{margin:.1rem 0 .8rem;font-size:clamp(1.2rem,2.2vw,1.7rem)}
.hero-title-center{
  text-align:center;
}
.card h4{
  margin:10px 0 8px;
  font-size:1.05rem;
  color:var(--text);
}
.card h4.heading-highlight-violet{
  background:linear-gradient(90deg,#f3e8ff 0%,#ede9fe 100%);
  border-left:4px solid #c4b5fd;
  padding:10px 12px;
  border-radius:10px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
  margin:14px 0 10px;
}
.hero.hero-vertical{
  grid-template-columns:1fr;
  gap:0;
}
.hero.hero-vertical .cover-image{
  min-height:320px;
  border-left:0;
  border-top:1px solid var(--border);
}
.card h3{
  background:var(--accent-soft);
  border:1px solid var(--accent-border);
  padding:6px 10px;
  border-radius:10px;
  display:inline-block;
  margin:10px 0 8px;
}
.card h3.ch2-partie{
  font-weight:700;
  letter-spacing:.02em;
}
.lead{
  color:var(--muted);
  line-height:1.8;
  text-align:justify;
  text-justify:inter-word;
}
.hero img,.cover-image{
  width:100%;height:100%;min-height:270px;object-fit:cover;border-left:1px solid var(--border);
}
.cover-image.cover-image--compact{
  min-height:unset;
  max-height:min(34vh,300px);
  height:auto;
  object-fit:contain;
  border-left:0;
  border:1px solid var(--border);
  border-radius:10px;
  margin-top:12px;
  background:var(--surface-soft);
}
.btn-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.btn{
  display:inline-block;padding:10px 14px;border-radius:10px;font-weight:600;font-size:.92rem;
  border:1px solid transparent;cursor:pointer;
}
.btn-primary{background:var(--primary);color:#fff}
.btn-soft{background:#fff;color:var(--text);border-color:var(--border)}
.section{margin-top:18px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.kernel-noyau-gallery{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:0 0 16px;
  align-items:start;
}
.kernel-noyau-gallery__fig{
  margin:0;
  padding:0;
}
.kernel-noyau-gallery__img{
  display:block;
  width:100%;
  height:auto;
  object-fit:contain;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--surface-soft);
}
@media (max-width:720px){
  .kernel-noyau-gallery{
    grid-template-columns:1fr;
  }
}
.figure-grid-pair{margin:14px 0;align-items:start}
.figure-grid-pair .cover-image{
  min-height:unset;
  max-height:min(52vh,520px);
  height:auto;
  object-fit:contain;
  border-left:0;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-soft);
}
.section-divider{
  margin:22px 0 26px;
  height:30px;
  box-sizing:border-box;
  background:#fff;
  border:1px solid #93c5fd;
  border-radius:999px;
  box-shadow:
    0 2px 12px rgba(37,99,235,.09),
    inset 0 1px 0 rgba(255,255,255,.95);
  position:relative;
}
.section-divider::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:min(40%,120px);
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg,transparent,rgba(37,99,235,.35),var(--primary),rgba(37,99,235,.35),transparent);
}
.card{padding:18px}
.card p,.card li{
  color:var(--muted);
  line-height:1.75;
  text-align:justify;
  text-justify:inter-word;
}
.quote{
  background:#f4f7ff;border:1px solid #dce6ff;border-left:4px solid var(--primary);
  border-radius:10px;padding:12px 14px;color:#334155;
}
.quote.quote--closing{
  text-align:center;
  background:linear-gradient(135deg,#fffbeb 0%,#fef3c7 100%);
  border:1px solid #fcd34d;
  border-left:4px solid #f59e0b;
  color:#b45309;
  font-weight:600;
  font-size:1.02rem;
}
.quote.quote--exercise{
  margin:14px 0 18px;
  background:linear-gradient(145deg,#fffbeb 0%,#fef3c7 45%,#ffedd5 100%);
  border:1px solid #fbbf24;
  border-left:5px solid #ea580c;
  border-radius:12px;
  padding:16px 18px 18px;
  color:#78350f;
  box-shadow:0 2px 14px rgba(234,88,12,.08);
}
.quote.quote--exercise .quote--exercise__title{
  font-family:Merriweather,serif;
  font-size:1.05rem;
  margin:0 0 12px;
  color:#9a3412;
  line-height:1.35;
}
.quote.quote--exercise .lead{
  color:#92400e;
}
.quote.quote--exercise .exercise-block-title{
  display:block;
  margin:14px 0 8px;
  font-weight:700;
  color:#b45309;
  font-size:.98rem;
}
.quote.quote--exercise .exercise-block-title:first-of-type{
  margin-top:4px;
}
.quote.quote--exercise ul,.quote.quote--exercise ol{
  margin:8px 0 10px;
  padding-left:1.35rem;
  color:#92400e;
}
.quote.quote--exercise li{margin-bottom:6px;line-height:1.65;}
.quote.quote--exercise .math-display{
  margin:10px 0;
  background:rgba(255,255,255,.55);
  border:1px solid rgba(251,191,36,.45);
  border-radius:8px;
}
.quote.quote--exercise .exercise-math-note{
  display:block;
  margin-top:6px;
  font-size:.9rem;
  color:#a16207;
  line-height:1.5;
}
.book-nav{
  display:flex;justify-content:space-between;gap:10px;margin-top:16px
}
.progress-wrap{margin-top:12px}
.progress-text{font-size:.9rem;color:var(--muted);margin-bottom:6px}
.progress-bar{height:8px;background:#eef2f8;border:1px solid var(--border);border-radius:999px;overflow:hidden}
.progress{height:100%;width:0;background:linear-gradient(90deg,#2563eb,#4f8df8)}
.cover-list{margin:0;padding-left:18px}
.cover-list li{margin-bottom:7px}
.chapter-image{
  width:100%;height:220px;object-fit:cover;border:1px solid var(--border);border-radius:12px;background:#fafafa;
}
.chapter-image.contain{
  height:420px;
  object-fit:contain;
  background:var(--surface-soft);
}
.audio-player{
  margin:16px 0 18px;
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:linear-gradient(135deg,var(--primary-soft) 0%,#fff 100%);
  box-shadow:0 4px 18px rgba(31,41,55,.06);
}
.audio-player__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding:14px 16px;
  border-bottom:1px solid #c9dcff;
}
.audio-player__title{
  font-family:Merriweather,serif;
  font-weight:700;
  font-size:.92rem;
  color:#1e3a8a;
}
.audio-player__controls{
  display:flex;
  align-items:center;
  gap:10px;
}
.audio-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:12px;
  border:1px solid #c9dcff;
  background:#fff;
  color:#1e40af;
  cursor:pointer;
  transition:background .15s ease,color .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.audio-btn:hover{
  background:var(--primary-soft);
  border-color:#93b4ff;
}
.audio-btn:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:2px;
}
.audio-btn--play{
  width:auto;
  min-width:52px;
  padding:0 14px;
  gap:8px;
  font-weight:700;
  font-size:.82rem;
}
.audio-player.is-playing .audio-btn--play{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
  box-shadow:0 6px 18px rgba(37,99,235,.28);
}
.audio-player.is-playing .audio-icon--play{display:none;}
.audio-player:not(.is-playing) .audio-icon--pause{display:none;}
.audio-btn--stop{
  color:#64748b;
}
.audio-btn--stop:hover{
  color:#b91c1c;
  background:#fef2f2;
  border-color:#fecaca;
}
.audio-player__hint{
  margin:0;
  padding:10px 16px 12px;
  font-size:.8rem;
  color:var(--muted);
  background:var(--surface-soft);
}
details{
  border:1px solid var(--border);background:var(--surface-soft);border-radius:10px;padding:10px 12px;margin:8px 0;
}
summary{cursor:pointer;font-weight:600;color:#1e3a8a}
details.content-soon{
  margin:20px 0;
  padding:0;
  overflow:hidden;
  border:1px dashed #94a3b8;
  background:linear-gradient(180deg,#f8fafc 0%,#fff 100%);
  border-radius:12px;
}
details.content-soon summary{
  padding:14px 16px;
  font-family:Merriweather,serif;
  font-size:.88rem;
  line-height:1.45;
  list-style:none;
  color:#0f172a;
}
details.content-soon summary::-webkit-details-marker{display:none;}
details.content-soon summary::before{
  content:"▸";
  display:inline-block;
  margin-right:8px;
  color:var(--primary);
  transition:transform .2s ease;
}
details[open].content-soon summary::before{
  transform:rotate(90deg);
}
details.content-soon summary:hover{
  background:rgba(37,99,235,.04);
}
details.expand-panel{
  margin:18px 0;
  padding:0;
  overflow:hidden;
  border:1px solid #bfdbfe;
  background:linear-gradient(180deg,#f0f9ff 0%,#fff 100%);
  border-radius:12px;
  box-shadow:0 2px 12px rgba(37,99,235,.06);
}
details.expand-panel summary{
  padding:14px 16px;
  font-family:Merriweather,serif;
  font-size:.92rem;
  line-height:1.45;
  list-style:none;
  color:#0f172a;
}
details.expand-panel summary::-webkit-details-marker{display:none;}
details.expand-panel summary::before{
  content:"▸";
  display:inline-block;
  margin-right:8px;
  color:var(--primary);
  transition:transform .2s ease;
}
details[open].expand-panel summary::before{
  transform:rotate(90deg);
}
details.expand-panel summary:hover{
  background:rgba(37,99,235,.06);
}
.expand-panel__body{
  padding:0 16px 18px;
  border-top:1px solid #e0f2fe;
}
.expand-panel__body .lead{color:var(--muted);}
.expand-panel__body h5{
  margin:16px 0 8px;
  font-size:.95rem;
  font-family:Merriweather,serif;
  color:#1e40af;
}
.expand-panel__body h5:first-of-type{margin-top:10px;}
.expand-panel__body ul{
  margin:8px 0 12px;
  padding-left:1.25rem;
  color:var(--muted);
  line-height:1.7;
}
.expand-panel__body li{margin-bottom:6px;}
.lr-conclusion,
.logistic-conclusion,
.svm-conclusion,
.tree-conclusion,
.nn-conclusion,
.unsupervised-conclusion,
.rl-conclusion,
.chapter-conclusion{
  margin:22px 0 10px;
  padding:16px 18px 18px;
  border:1px solid var(--border);
  border-left:4px solid var(--primary);
  border-radius:12px;
  background:linear-gradient(180deg,var(--primary-soft) 0%,#fff 58%);
  box-shadow:0 2px 14px rgba(31,41,55,.05);
}
.lr-conclusion h5,
.logistic-conclusion h5,
.svm-conclusion h5,
.tree-conclusion h5,
.nn-conclusion h5,
.unsupervised-conclusion h5,
.rl-conclusion h5,
.chapter-conclusion h4{
  margin:16px 0 8px;
  font-size:.95rem;
  font-family:Merriweather,serif;
  color:#1e40af;
}
.lr-conclusion h5.lr-conclusion__title,
.logistic-conclusion h5.logistic-conclusion__title,
.svm-conclusion h5.svm-conclusion__title,
.tree-conclusion h5.tree-conclusion__title,
.nn-conclusion h5.nn-conclusion__title,
.unsupervised-conclusion h5.unsupervised-conclusion__title,
.rl-conclusion h5.rl-conclusion__title,
.chapter-conclusion h4.chapter-conclusion__title{
  margin:0 0 12px;
  font-size:1.02rem;
  color:#0f172a;
}
.lr-conclusion .lead,
.logistic-conclusion .lead,
.svm-conclusion .lead,
.tree-conclusion .lead,
.nn-conclusion .lead,
.unsupervised-conclusion .lead,
.rl-conclusion .lead,
.chapter-conclusion .lead{color:var(--muted);}
.lr-conclusion ul,
.logistic-conclusion ul,
.svm-conclusion ul,
.tree-conclusion ul,
.nn-conclusion ul,
.unsupervised-conclusion ul,
.rl-conclusion ul,
.chapter-conclusion ul{
  margin:8px 0 12px;
  padding-left:1.25rem;
  color:var(--muted);
  line-height:1.7;
}
.lr-conclusion li,
.logistic-conclusion li,
.svm-conclusion li,
.tree-conclusion li,
.nn-conclusion li,
.unsupervised-conclusion li,
.rl-conclusion li,
.chapter-conclusion li{margin-bottom:8px;}
.content-soon__body{
  padding:0 16px 16px;
  border-top:1px dashed var(--border);
}
.content-soon__lead{margin-top:12px;}
.content-soon__subtitle{
  margin:14px 0 6px;
  font-size:.88rem;
  font-family:Merriweather,serif;
  color:#1e40af;
}
.content-soon__subtitle:first-of-type{margin-top:4px;}
.content-soon__list{
  margin:8px 0 0;
  padding-left:18px;
}
.content-soon__list li{margin-bottom:6px;}
.content-soon__note{
  margin-top:14px;
  font-size:.86rem;
}
pre{border:1px solid #dbe5f5;border-radius:10px;background:#f8fbff;padding:12px;overflow:auto}
.card h5{
  margin:14px 0 8px;
  font-size:.98rem;
  font-family:Merriweather,serif;
  color:#1e40af;
  font-weight:700;
}
.table-block{
  margin:14px 0;
  border-radius:12px;
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow:0 4px 18px rgba(31,41,55,.05);
  background:var(--surface);
}
.table-block .table-caption{
  font-family:Merriweather,serif;
  font-size:.88rem;
  font-weight:700;
  text-align:left;
  padding:12px 16px;
  margin:0;
  background:linear-gradient(135deg,var(--primary-soft) 0%,#fff 100%);
  color:#1e3a8a;
  border-bottom:1px solid #c9dcff;
}
.table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  margin:0;
}
.data-table{
  width:100%;
  min-width:520px;
  border-collapse:collapse;
  font-size:.86rem;
  line-height:1.45;
}
.data-table thead th{
  background:#1e3a8a;
  color:#fff;
  font-weight:600;
  text-align:left;
  padding:11px 14px;
  white-space:nowrap;
}
.data-table tbody td{
  padding:10px 14px;
  border-bottom:1px solid var(--border);
  color:var(--text);
  vertical-align:top;
}
.data-table tbody tr:nth-child(even) td{background:var(--surface-soft);}
.data-table tbody tr:last-child td{border-bottom:none;}
.data-table .cell-num{font-variant-numeric:tabular-nums;}
.data-table .cell-highlight{background:#ecfdf5 !important;font-weight:600;color:#065f46;}
.math-inline{font-style:italic;color:#3730a3;}
.math-display{
  margin:14px 0;
  padding:12px 16px;
  text-align:center;
  font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono",monospace;
  font-size:.9rem;
  line-height:1.55;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:10px;
  overflow-x:auto;
  color:#1e293b;
}
.math-display--left{text-align:left;}
.tool-compare{
  display:grid;
  gap:16px;
  margin:18px 0 20px;
  align-items:stretch;
}
@media (min-width:900px){
  .tool-compare{
    grid-template-columns:1fr 1fr;
  }
}
.tool-panel{
  border:1px solid var(--border);
  border-radius:12px;
  overflow:hidden;
  background:var(--surface);
  box-shadow:0 4px 20px rgba(31,41,55,.06);
  display:flex;
  flex-direction:column;
  min-width:0;
}
.tool-panel--classic{border-top:4px solid #2563eb;}
.tool-panel--deep{border-top:4px solid #7c3aed;}
.tool-panel__head{
  padding:12px 14px;
  background:linear-gradient(135deg,var(--primary-soft) 0%,#fff 100%);
  border-bottom:1px solid #c9dcff;
}
.tool-panel--deep .tool-panel__head{
  background:linear-gradient(135deg,#f5f3ff 0%,#fff 100%);
  border-bottom-color:#ddd6fe;
}
.tool-panel__head-main{
  display:block;
  font-family:Merriweather,serif;
  font-weight:700;
  font-size:.95rem;
  color:#1e3a8a;
  line-height:1.35;
}
.tool-panel__head-sub{
  display:block;
  margin-top:4px;
  font-size:.78rem;
  font-weight:600;
  color:#64748b;
  letter-spacing:.02em;
}
.tool-panel__body{
  padding:14px 16px 16px;
  flex:1;
}
.tool-panel__body > .lead:first-of-type{margin-top:0;}
.tool-example-stack{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:0;
}
.tool-example-block{
  padding:12px 0;
  border-bottom:1px dashed var(--border);
}
.tool-example-block:last-child{
  border-bottom:none;
  padding-bottom:0;
}
.tool-example-block h5.tool-example-block__title{
  margin:0 0 6px;
  font-size:.84rem;
  font-family:Merriweather,serif;
  font-weight:700;
  color:#1e40af;
  line-height:1.35;
}
.tool-panel--deep .tool-example-block h5.tool-example-block__title{color:#5b21b6;}
.tool-example-block__hint{
  margin:0 0 10px;
  font-size:.78rem;
  color:var(--muted);
  line-height:1.55;
  text-align:left;
  text-justify:auto;
}
.tool-chip-list{
  margin:0;
  padding:0;
  list-style:none;
}
.tool-chip-list li{
  position:relative;
  padding:8px 12px 8px 30px;
  margin:0 0 6px;
  background:var(--surface-soft);
  border:1px solid var(--border);
  border-radius:10px;
  font-size:.84rem;
  line-height:1.45;
  color:var(--text);
  text-align:left;
  text-justify:auto;
}
.tool-chip-list li:last-child{margin-bottom:0;}
.tool-chip-list li::before{
  content:"";
  position:absolute;
  left:12px;
  top:14px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#2563eb;
}
.tool-panel--deep .tool-chip-list li::before{
  background:#7c3aed;
}
footer{
  margin-top:26px;padding-top:14px;border-top:1px dashed var(--border);
  color:var(--muted);font-size:.9rem;text-align:center;
}
@media (max-width:980px){
  .hero,.grid-2{grid-template-columns:1fr}
  .grid-3{grid-template-columns:1fr}
  .hero img,.cover-image{border-left:0;border-top:1px solid var(--border)}
  .chip{display:none}
  .lang-btn{padding:6px 8px;font-size:.78rem}
}

/* Chapitre 2+ : sommaire latéral */
.container--chapter{
  max-width:min(1400px, 96vw);
}
.chapter-layout{
  display:grid;
  grid-template-columns:minmax(220px, 270px) minmax(0, 1fr);
  gap:28px;
  align-items:start;
}
.chapter-main{
  min-width:0;
}
.chapter-toc{
  position:sticky;
  top:72px;
  z-index:50;
  align-self:start;
}
/* Défilement du sommaire : panneau (desktop), pas le bouton toggle */
.chapter-toc__panel{
  max-height:calc(100vh - 72px - 20px);
  max-height:calc(100dvh - 72px - 20px);
  overflow-y:auto;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.chapter-toc__toggle{
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  margin:0;
  padding:12px 14px;
  font-family:inherit;
  font-size:.92rem;
  font-weight:600;
  color:#0f172a;
  text-align:left;
  cursor:pointer;
  border:1px solid var(--accent-border);
  border-radius:12px;
  background:linear-gradient(180deg,var(--accent-soft) 0%,#fff 70%);
  box-shadow:0 2px 10px rgba(31,41,55,.08);
  transition:background .15s ease, box-shadow .15s ease;
}
.chapter-toc__toggle:hover{
  box-shadow:0 4px 14px rgba(31,41,55,.1);
}
.chapter-toc__toggle:focus-visible{
  outline:2px solid var(--primary);
  outline-offset:2px;
}
.chapter-toc__chevron{
  flex-shrink:0;
  transition:transform .2s ease;
  color:#1e40af;
}
.chapter-toc--open .chapter-toc__chevron{
  transform:rotate(180deg);
}
.chapter-toc__nav{
  border:1px solid var(--border);
  border-radius:12px;
  background:linear-gradient(180deg,var(--surface-soft) 0%,#fff 55%);
  padding:14px 14px 16px;
  box-shadow:0 4px 18px rgba(31,41,55,.06);
}
.chapter-toc__title{
  margin:0 0 12px;
  font-family:Merriweather,serif;
  font-weight:700;
  font-size:.92rem;
  color:#1e3a8a;
  letter-spacing:.01em;
}
.chapter-toc__list--main{
  margin:0;
  padding-left:1.15rem;
  font-size:.88rem;
  line-height:1.45;
  color:var(--text);
}
.chapter-toc__list--main > li{
  margin-bottom:12px;
  padding-bottom:10px;
  border-bottom:1px dashed #e2e8f0;
}
.chapter-toc__list--main > li:last-of-type{
  border-bottom:none;
  margin-bottom:0;
  padding-bottom:0;
}
.chapter-toc__list--main > li > a{
  font-weight:600;
  color:#0f172a;
  text-decoration:none;
  display:block;
}
.chapter-toc__list--main > li > a:hover{
  color:var(--primary);
  text-decoration:underline;
}
.chapter-toc__sub{
  list-style:none;
  margin:8px 0 0;
  padding:0 0 0 10px;
  border-left:3px solid #c7d7fe;
  font-size:.82rem;
  color:var(--muted);
}
.chapter-toc__sub li{
  margin-bottom:5px;
}
.chapter-toc__sub a{
  color:#475569;
  text-decoration:none;
}
.chapter-toc__sub a:hover{
  color:var(--primary);
  text-decoration:underline;
}
.chapter-toc__footer{
  margin:14px 0 0;
  padding-top:12px;
  border-top:1px solid var(--border);
}
.chapter-toc__fin{
  font-weight:600;
  font-size:.86rem;
  color:#1e40af;
  text-decoration:none;
}
.chapter-toc__fin:hover{
  text-decoration:underline;
}
/* Chapitre 2 : masquer Partie II, III et conclusion (HTML conservé). Retirer .chapter-parts-deferred sur les 2 blocs + .chapter-toc__item--deferred au sommaire pour republier. */
.chapter-parts-deferred,
.chapter-toc__item--deferred{
  display:none !important;
}

.chapter-main [id]{
  scroll-margin-top:5.5rem;
}
@media (min-width:1100px){
  .chapter-toc__toggle{
    display:none !important;
  }
  .chapter-toc__panel{
    display:block !important;
  }
}
@media (max-width:1099px){
  .chapter-layout{
    display:block;
  }
  .chapter-toc{
    position:sticky;
    top:56px;
    margin-bottom:16px;
    max-height:none;
    overflow:visible;
  }
  .chapter-toc__toggle{
    display:flex;
  }
  .chapter-toc__panel{
    max-height:none;
    scrollbar-gutter:auto;
  }
  /* Sommaire replié par défaut : une ligne « Sommaire » + chevron */
  .chapter-toc:not(.chapter-toc--open) .chapter-toc__panel{
    display:none;
  }
  .chapter-toc.chapter-toc--open .chapter-toc__panel{
    display:block;
    margin-top:10px;
    max-height:min(72dvh, 560px);
    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
    border-radius:12px;
  }
}

