/* DébuterTirSportif.com : interface inspirée de Notion (navigation, encadrés)
   et de Medium (lecture des articles). */
:root {
  --bg: #ffffff;
  --sidebar: #f7f7f5;
  --hover: rgba(55, 53, 47, .06);
  --text: #242424;
  --muted: #6b6b6b;
  --faint: #9b9a97;
  --line: #ebebea;
  --callout: #f1f1ef;
  --link: #242424;
  --link-line: rgba(36, 36, 36, .35);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Charter, "Iowan Old Style", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919;
    --sidebar: #202020;
    --hover: rgba(255, 255, 255, .055);
    --text: #e6e6e4;
    --muted: #a3a3a0;
    --faint: #7f7f7c;
    --line: #2f2f2f;
    --callout: #252525;
    --link: #e6e6e4;
    --link-line: rgba(230, 230, 228, .4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.wrap.wide { max-width: 1160px; }

/* En-tête : fin et discret, comme Medium */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none; }
.brand img { display: block; width: auto; height: 48px; border-radius: 8px; flex: none; }
nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; }
nav a {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: background .12s, color .12s;
}
nav a:hover { background: var(--hover); color: var(--text); }
nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

main.wrap { padding-top: 56px; padding-bottom: 80px; }

/* Titres */
h1, h2, h3 { font-family: var(--sans); letter-spacing: -.02em; color: var(--text); }
h1 { font-size: clamp(32px, 5vw, 42px); line-height: 1.15; font-weight: 700; margin: 0 0 16px; }
h2 { font-size: 22px; line-height: 1.3; font-weight: 700; margin: 0 0 12px; }
.eyebrow { color: var(--faint); font-size: 14px; margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 20px; line-height: 1.5; margin: 0 0 48px; }

/* Listes de pages, façon base Notion */
.list { list-style: none; padding: 0; margin: 0; }
.list li { margin: 0; }
.list li > a, .list li.soon {
  display: block;
  padding: 14px 14px;
  margin: 0 -14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background .12s;
}
.list li > a:hover { background: var(--hover); }
.list strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.list span { display: block; color: var(--muted); font-size: 15px; margin-top: 2px; }
.list li.soon strong { color: var(--faint); font-weight: 500; }
.list li.soon span { color: var(--faint); font-size: 14px; }
.list + .list, .list li + li { border-top: 1px solid var(--line); }

footer.wrap { color: var(--faint); font-size: 13px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); }

/* Rubrique : barre latérale façon Notion à gauche, lecture façon Medium à droite */
.rubrique { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
.toc {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
  background: var(--sidebar);
  border-radius: 10px;
  padding: 14px 8px;
}
.toc summary { display: none; }
.toc-title { margin: 0 0 6px; padding: 0 8px; }
.toc-title a {
  display: block;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.toc-title a:hover { background: var(--hover); color: var(--text); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc li > a, .toc li.soon {
  display: flex;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
.toc li > a::before, .toc li.soon::before {
  content: counter(toc);
  flex: none;
  min-width: 14px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.toc li > a { color: var(--text); transition: background .12s; }
.toc li > a:hover { background: var(--hover); }
.toc li > a[aria-current="page"] { background: var(--hover); font-weight: 600; }
.toc li.soon { color: var(--faint); }
.toc li.soon span { display: none; }

.contenu { max-width: 700px; }
.contenu h1:focus { outline: none; }
.breadcrumb { color: var(--faint); font-size: 14px; margin: 0 0 20px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }

/* Article : typographie de lecture façon Medium */
.article { font-family: var(--serif); font-size: 20px; line-height: 1.6; }
.article h1 { font-size: clamp(32px, 5vw, 42px); margin-bottom: 14px; }
.article h2 { font-size: 24px; margin: 48px 0 8px; }
.article h3 { font-size: 19px; margin: 28px 0 4px; }
.article p { margin: 0 0 22px; }
.meta { font-family: var(--sans); color: var(--muted); font-size: 14px; margin: 0 0 32px !important; }
.article a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.article a:hover { text-decoration-color: currentColor; }
.article ol, .article ul { padding-left: 28px; margin: 0 0 24px; }
.article li { margin-bottom: 10px; padding-left: 4px; }

/* Réponse courte : encadré façon callout Notion */
.answer {
  position: relative;
  background: var(--callout);
  border-radius: 8px;
  padding: 18px 20px 18px 54px;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
.answer::before { content: "💡"; position: absolute; left: 20px; top: 18px; font-size: 20px; line-height: 1.4; }

/* Tableaux façon Notion */
.table-wrap { overflow-x: auto; margin: 8px 0 28px; }
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 9px 12px; border: 1px solid var(--line); }
th { background: var(--sidebar); color: var(--muted); font-weight: 500; }

.faq { margin-top: 8px; }
.sources { font-family: var(--sans); font-size: 15px; }
.sources li { margin-bottom: 6px; }

@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .brand img { height: 42px; }
  .brand { font-size: 16px; }
  nav ul { margin: 0 -10px; }
  main.wrap { padding-top: 28px; }
  .rubrique { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; max-height: none; padding: 4px 8px; }
  .toc summary { display: list-item; cursor: pointer; padding: 10px 8px; font-size: 15px; font-weight: 600; }
  .toc .toc-title { display: none; }
  .toc[open] ol { padding-bottom: 8px; }
  .article { font-size: 18px; }
  .answer { font-size: 16px; padding: 16px 16px 16px 48px; }
  .answer::before { left: 16px; top: 16px; }
}

.page-icon { font-size: 56px; line-height: 1; margin: 0 0 16px; }
.section-title { color: var(--faint); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 8px; }
.list strong .icon { display: inline; color: inherit; font-size: 1em; margin: 0 4px 0 0; }

/* Accueil : rubriques en blocs */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover { border-color: var(--faint); box-shadow: 0 4px 16px rgba(0, 0, 0, .06); transform: translateY(-1px); }
.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card);
  font-size: 24px;
  margin-bottom: 12px;
}
.card strong { font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.card-text { color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 18px 16px; gap: 10px; }
  .card-icon { width: 40px; height: 40px; font-size: 20px; margin-bottom: 4px; }
  .card strong { font-size: 16px; }
}
@media (max-width: 420px) { .card-text { display: none; } }

/* Recherche */
.site-header .wrap { position: relative; }
.search-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.search-btn:hover { background: var(--hover); color: var(--text); }
.search {
  width: min(640px, calc(100vw - 32px));
  max-height: min(70vh, 640px);
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
  overflow: hidden;
  font-family: var(--sans);
}
.search[open] { display: flex; flex-direction: column; }
.search::backdrop { background: rgba(15, 15, 15, .4); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--faint); }
.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 18px;
}
.search-box input::-webkit-search-cancel-button { display: none; }
.search-close { border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--faint); font: inherit; font-size: 12px; padding: 3px 7px; cursor: pointer; }
.search-suggest { padding: 14px 16px 16px; }
.search-suggest p { margin: 0 0 10px; color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sidebar);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 5px 12px;
  cursor: pointer;
}
.chip:hover { background: var(--hover); border-color: var(--faint); }
.search-results { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.search-results a:hover, .search-results a:focus { background: var(--hover); outline: none; }
.search-results strong { display: block; font-size: 16px; font-weight: 600; }
.search-rub { display: block; color: var(--faint); font-size: 12px; }
.search-ex { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 2px; }
.search-ex mark { background: #fbe7a1; color: inherit; border-radius: 2px; padding: 0 1px; }
.search-empty { padding: 14px 12px; color: var(--muted); font-size: 15px; }
@media (prefers-color-scheme: dark) { .search-ex mark { background: #6b5a1e; } }
@media (max-width: 860px) {
  .search-btn { position: absolute; top: 10px; right: 14px; }
  .search { margin-top: 16px; max-height: calc(100vh - 32px); }
}

/* Mots-clés suggérés : étiquettes pastel façon Notion */
.chip { border-color: transparent; background: var(--chip-bg); color: var(--chip-fg); font-weight: 500; transition: filter .12s, transform .12s; }
.chip:hover { background: var(--chip-bg); border-color: transparent; filter: brightness(.95); transform: translateY(-1px); }
.chip:nth-child(8n+1) { --chip-bg: #fde2e4; --chip-fg: #9b2c3a; }
.chip:nth-child(8n+2) { --chip-bg: #dbeafe; --chip-fg: #1e4f8f; }
.chip:nth-child(8n+3) { --chip-bg: #dcfce7; --chip-fg: #1f6b3a; }
.chip:nth-child(8n+4) { --chip-bg: #fef3c7; --chip-fg: #8a5a00; }
.chip:nth-child(8n+5) { --chip-bg: #ede9fe; --chip-fg: #5b3aa6; }
.chip:nth-child(8n+6) { --chip-bg: #ffe4d5; --chip-fg: #9a4313; }
.chip:nth-child(8n+7) { --chip-bg: #d5f5f6; --chip-fg: #1b6670; }
.chip:nth-child(8n+8) { --chip-bg: #fce7f6; --chip-fg: #8e2f74; }
@media (prefers-color-scheme: dark) {
  .chip:nth-child(8n+1) { --chip-bg: #4a2a2e; --chip-fg: #f5b8c0; }
  .chip:nth-child(8n+2) { --chip-bg: #24364f; --chip-fg: #a9c8f5; }
  .chip:nth-child(8n+3) { --chip-bg: #22402c; --chip-fg: #a8e3bb; }
  .chip:nth-child(8n+4) { --chip-bg: #4a3d1c; --chip-fg: #f3d58c; }
  .chip:nth-child(8n+5) { --chip-bg: #362c52; --chip-fg: #cbbcf5; }
  .chip:nth-child(8n+6) { --chip-bg: #4d3022; --chip-fg: #f5c2a3; }
  .chip:nth-child(8n+7) { --chip-bg: #1f4245; --chip-fg: #a3e0e4; }
  .chip:nth-child(8n+8) { --chip-bg: #48263f; --chip-fg: #f1b5e0; }
  .chip:hover { filter: brightness(1.15); }
}

/* Page de résultats de recherche */
.search-page-form {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 28px; padding: 10px 10px 10px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--faint);
}
.search-page-form:focus-within { border-color: var(--faint); }
.search-page-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 17px; }
.search-page-form input::-webkit-search-cancel-button { display: none; }
.search-page-form button {
  border: 0; border-radius: 8px; background: var(--text); color: var(--bg);
  font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; cursor: pointer;
}
.search-count { color: var(--muted); font-size: 15px; margin: 0 0 8px; }
.search-results-page { padding: 0; margin: 0 -12px 32px; overflow: visible; }
.search-results-page li + li { border-top: 1px solid var(--line); }
.search-results-page a { padding: 14px 12px; }
.search-results-page strong { font-size: 18px; }
.search-none { text-align: center; padding: 28px 20px 32px; margin-bottom: 8px; border-radius: 20px; background: linear-gradient(135deg, #fff4d6 0%, #ffe3e0 55%, #e3ecff 100%); }
.search-none h2 { font-size: 26px; font-weight: 800; margin: 8px 0 6px; }
.search-none .search-illu { max-width: 100%; height: auto; }
@media (prefers-color-scheme: dark) { .search-none { background: linear-gradient(135deg, #3a3220 0%, #3b2624 55%, #222b40 100%); } }
.search-none p { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.search-illu { display: block; margin: 0 auto; }
.search-page-wrap { max-width: 720px; margin: 0 auto; }
.search-none + .section-title { margin-top: 32px; }

/* Illustration d'article */
.article-illu {
  margin: 24px 0 8px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff4d6 0%, #ffe3e0 55%, #e3ecff 100%);
  text-align: center;
}
.article-illu img { display: block; width: 100%; max-width: 220px; height: auto; margin: 0 auto; }
@media (prefers-color-scheme: dark) {
  .article-illu { background: linear-gradient(135deg, #3a3220 0%, #3b2624 55%, #222b40 100%); }
}

/* Accueil : hero, parcours, FAQ */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: center; margin-bottom: 28px; }
.hero .lead { margin-bottom: 24px; }
.hero-illu { border-radius: 20px; padding: 20px; background: linear-gradient(135deg, #fff4d6 0%, #ffe3e0 55%, #e3ecff 100%); }
.hero-illu img { display: block; width: 100%; height: auto; }
.hero-search { display: flex; align-items: center; gap: 10px; max-width: 560px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--faint); box-shadow: 0 2px 10px rgba(0, 0, 0, .04); }
.hero-search:focus-within { border-color: var(--faint); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 17px; }
.hero-search input::-webkit-search-cancel-button { display: none; }
.hero-search button { border: 0; border-radius: 8px; background: var(--text); color: var(--bg); font: inherit; font-size: 14px; font-weight: 600; padding: 9px 14px; cursor: pointer; }
.home-intro { max-width: 780px; color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0 0 48px; }
.card-count { margin-top: auto; padding-top: 6px; color: var(--faint); font-size: 13px; font-weight: 500; }
.cards { margin-bottom: 48px; }
@media (min-width: 861px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.home-faq { max-width: 780px; margin-bottom: 24px; border-top: 1px solid var(--line); }
.home-faq-item { border-bottom: 1px solid var(--line); }
.home-faq-item summary { cursor: pointer; padding: 16px 4px; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.home-faq-item summary::-webkit-details-marker { display: none; }
.home-faq-item summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 22px; line-height: 1; }
.home-faq-item[open] summary::after { content: "–"; }
.home-faq-item p { margin: 0 4px 18px; color: var(--muted); line-height: 1.6; }
@media (prefers-color-scheme: dark) { .hero-illu { background: linear-gradient(135deg, #3a3220 0%, #3b2624 55%, #222b40 100%); } }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero-illu { display: none; }
}

.hero-text { min-width: 0; }

/* Accueil : feuille de route « Par où commencer ? » */
.roadmap { --c1: #3d7be0; --c2: #f2b544; --c3: #e25a45; --c4: #4caf50; position: relative; list-style: none; padding: 8px 0 0; margin: 0 0 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.roadmap::before { content: ""; position: absolute; top: 36px; left: 12.5%; right: 12.5%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--c1), var(--c2), var(--c3), var(--c4)); opacity: .9; }
.roadmap::after { content: ""; position: absolute; top: 37px; left: 12.5%; right: 12.5%; height: 2px; background: repeating-linear-gradient(90deg, var(--bg) 0 6px, transparent 6px 14px); }
.milestone { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 0 6px; text-decoration: none; color: inherit; }
.ms-dot { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; font-size: 26px; background: var(--bg); border: 4px solid var(--c1); box-shadow: 0 6px 18px rgba(0, 0, 0, .1); transition: transform .15s; margin-bottom: 6px; }
.roadmap li:nth-child(2) .ms-dot { border-color: var(--c2); }
.roadmap li:nth-child(3) .ms-dot { border-color: var(--c3); }
.roadmap li:nth-child(4) .ms-dot { border-color: var(--c4); }
.milestone:hover .ms-dot { transform: translateY(-3px) scale(1.05); }
.ms-step { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.milestone strong { font-size: 16px; line-height: 1.3; }
.milestone:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.ms-text { color: var(--muted); font-size: 14px; line-height: 1.5; max-width: 230px; }
@media (max-width: 860px) {
  .roadmap { grid-template-columns: 1fr; gap: 22px; padding-left: 0; }
  .roadmap::before { top: 30px; bottom: 30px; left: 28px; right: auto; width: 4px; height: auto; background: linear-gradient(180deg, var(--c1), var(--c2), var(--c3), var(--c4)); }
  .roadmap::after { display: none; }
  .milestone { display: grid; grid-template-columns: 60px 1fr; column-gap: 16px; row-gap: 2px; text-align: left; align-items: start; padding: 0; }
  .ms-dot { grid-row: 1 / span 3; margin: 0; }
  .ms-step { padding-top: 6px; }
  .ms-text { max-width: none; }
}

/* Curseur en forme de cartouche (pointe en haut à gauche) */
html { cursor: url("/img/cursor/cartouche.svg") 3 3, auto; }
a, button, summary, .chip, label, [role="button"] { cursor: url("/img/cursor/cartouche.svg") 3 3, pointer; }
input, textarea { cursor: text; }

/* Effet d'impact au clic / toucher (impact.js) : la balle traverse la page « en papier » */
.impact { position: fixed; z-index: 9999; width: 0; height: 0; pointer-events: none; }
.impact-flash { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 194, .95) 0 20%, rgba(242, 181, 68, .6) 40%, transparent 70%);
  animation: impact-flash .22s ease-out forwards; }
.impact-hole { position: absolute; left: -30px; top: -30px; width: 60px; height: 60px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); animation: impact-hole 1.6s ease-out forwards; }
.impact-hole svg { display: block; }
.impact-bit { position: absolute; left: -3px; top: -3px; width: 6px; height: 5px; background: #fbf7ee; border: 1px solid #b9b1a3;
  clip-path: polygon(0 20%, 60% 0, 100% 45%, 75% 100%, 10% 85%); animation: impact-bit .7s cubic-bezier(.2, .7, .4, 1) forwards; }
.impact-bit:nth-of-type(3) { --dx: -30px; --dy: -24px; --r: 220deg; }
.impact-bit:nth-of-type(4) { --dx: 26px; --dy: -30px; --r: -180deg; }
.impact-bit:nth-of-type(5) { --dx: -26px; --dy: 22px; --r: 160deg; }
.impact-bit:nth-of-type(6) { --dx: 32px; --dy: 18px; --r: -240deg; }
.impact-bit:nth-of-type(7) { --dx: 4px; --dy: -36px; --r: 300deg; width: 4px; height: 4px; }
.impact-bit:nth-of-type(8) { --dx: -6px; --dy: 34px; --r: -120deg; width: 4px; height: 4px; }
@keyframes impact-flash { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
@keyframes impact-hole { 0% { transform: scale(.6); opacity: 0; } 6% { transform: scale(1.08); opacity: 1; }
  14% { transform: scale(1); } 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes impact-bit { from { transform: translate(0, 0) rotate(0); opacity: 1; }
  to { transform: translate(var(--dx), calc(var(--dy) + 14px)) rotate(var(--r)); opacity: 0; } }

/* Jauge de lecture des articles (progress.js) */
.reading { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 14px; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 85%, transparent), transparent); }
.reading[hidden] { display: none; }
.reading-trail { position: absolute; left: 0; bottom: 6px; height: 0; border-top: 2px dotted var(--faint); }
.reading-bullet { position: absolute; left: 0; bottom: 2px; opacity: .7; will-change: transform; }
.reading.done .reading-bullet { opacity: .9; }
@media print { .reading { display: none; } }

/* Partage en fin d'article */
.share { font-family: var(--sans); margin: 40px 0 8px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--sidebar); }
.share-title { font-weight: 700; font-size: 16px; margin: 0 0 14px !important; }
.share-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-btn, .share-copy { display: inline-flex; align-items: center; justify-content: center; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); text-decoration: none; transition: transform .15s, background .15s, color .15s, border-color .15s; }
.share-btn { width: 44px; }
.share-btn svg, .share-copy svg { width: 20px; height: 20px; fill: currentColor; }
.share-btn:hover, .share-btn:focus-visible { transform: translateY(-2px); color: #fff; border-color: transparent; }
.share-facebook:hover, .share-facebook:focus-visible { background: #0866ff; }
.share-x:hover, .share-x:focus-visible { background: #000; }
.share-whatsapp:hover, .share-whatsapp:focus-visible { background: #25d366; }
.share-linkedin:hover, .share-linkedin:focus-visible { background: #0a66c2; }
.share-instagram:hover, .share-instagram:focus-visible { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.share-mail:hover, .share-mail:focus-visible { background: #37352f; }
.share-copy { gap: 8px; padding: 0 18px; font: 600 14px var(--sans); cursor: inherit; }
.share-copy:hover { border-color: var(--text); }
.share-copy.is-done { background: #4caf50; border-color: #4caf50; color: #fff; }
@media (max-width: 520px) {
  .share { padding: 18px 16px; }
  .share-copy { flex: 1 0 100%; }
}

/* Glossaire */
.glossary { max-width: 760px; margin: 0 auto; }
.glossary h1 { font-size: clamp(30px, 5vw, 40px); margin: 0 0 12px; }
.glossary .lead { margin-bottom: 28px; }
.gl-tools { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
#gl-filter { width: 100%; font: 16px var(--sans); color: var(--text); background: var(--sidebar); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; }
#gl-filter:focus { outline: 2px solid var(--text); outline-offset: 1px; }
.gl-az { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; font: 600 14px var(--sans); }
.gl-az a, .gl-az span { min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; text-decoration: none; }
.gl-az a { color: var(--text); background: var(--hover); }
.gl-az a:hover { background: var(--text); color: var(--bg); }
.gl-az span { color: var(--line); }
.gl-letter { scroll-margin-top: 130px; }
.gl-letter h2 { font-size: 26px; color: #8e6bd8; margin: 32px 0 6px; }
.gl-letter dl { margin: 0; }
.term { padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 130px; }
.term dt { font: 700 17px var(--sans); color: var(--text); margin-bottom: 4px; }
.term dd { margin: 0; font: 17px/1.6 var(--serif); color: var(--text); }
.term dd a { font-family: var(--sans); font-size: 14px; white-space: nowrap; }
.term:target { background: var(--callout); border-radius: 10px; padding-left: 12px; padding-right: 12px; }
.gl-empty { font-family: var(--sans); color: var(--muted); margin-top: 24px; }

/* Liens vers le glossaire dans le texte des articles */
.article a.gl { color: inherit; text-decoration: underline dotted; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.article a.gl:hover { color: var(--text); text-decoration-style: solid; }

/* À lire aussi */
.related { margin: 32px 0 8px; padding: 20px; border-radius: 14px; background: var(--callout); font-family: var(--sans); }
.related h2 { margin-top: 0; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.related li a { display: block; padding: 12px 14px; border-radius: 10px; background: var(--bg); color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px; border: 1px solid var(--line); }
.related li a span { display: block; font-size: 13px; font-weight: 500; opacity: .7; margin-bottom: 2px; }
.related li a:hover { background: var(--hover); }
.related-gl { margin: 14px 0 0; font-size: 15px; }

/* Infographie et code d'intégration */
.infographie { margin: 16px 0 12px; }
.infographie img { display: block; width: 100%; max-width: 540px; height: auto; margin: 0 auto; border-radius: 14px; border: 1px solid var(--line); }
.infographie figcaption { text-align: center; font-family: var(--sans); font-size: 14px; color: var(--muted); margin-top: 8px; }
.embed { font-family: var(--sans); font-size: 15px; background: var(--callout); border-radius: 14px; padding: 16px 18px; margin-bottom: 8px; }
.embed p { margin-top: 0; }
.embed pre { white-space: pre-wrap; word-break: break-all; font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 0 0 12px; }
.embed-copy { font: 600 14px var(--sans); color: var(--bg); background: var(--text); border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; }

/* Pages À propos et mentions légales */
.page-simple { max-width: 720px; margin: 0 auto; }
footer.wrap a { color: inherit; }
footer.wrap a:hover { color: var(--text); }

/* Vidéo YouTube chargée au clic */
.video { margin: 16px 0; }
.video .yt, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; overflow: hidden; }
.video .yt { position: relative; padding: 0; cursor: pointer; background: #000; }
.video .yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video .yt:hover img { opacity: 1; }
.yt-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: #e33; }
.yt-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.video figcaption { font-family: var(--sans); font-size: 14px; color: var(--muted); margin-top: 8px; }
