/* tuto.nikox.fr — univers « Plan de lignes »
   La couleur ne dit que la ligne. Tout le reste est encre et blanc. */

@font-face { font-family: "Overpass"; src: url("fonts/overpass-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("fonts/atkinson-hyperlegible-next-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Atkinson Next"; src: url("fonts/atkinson-hyperlegible-next-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Overpass Mono"; src: url("fonts/overpass-mono-normal.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  color-scheme: light;
  --encre: #1A1D24;
  --encre-2: #3B404A;
  --gris-texte: #5C626C;
  --gris-trait: #C9CDD3;
  --gris-fond: #F2F3F5;
  --blanc: #FFFFFF;
  --l: #FF8C32;
  --lt: #1A1D24;
  --titre: "Overpass", "Segoe UI", system-ui, sans-serif;
  --texte: "Atkinson Next", "Segoe UI", system-ui, sans-serif;
  --mono: "Overpass Mono", ui-monospace, Consolas, monospace;
  --gouttiere: clamp(1rem, 4vw, 3rem);
  --largeur: 78rem;
  --sortie: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font: 400 1.125rem/1.65 var(--texte);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--encre); color: var(--blanc); }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; border-radius: 2px; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: .2em; }
img, svg { max-width: 100%; }
h1, h2, h3 { font-family: var(--titre); line-height: 1.05; letter-spacing: -.015em; text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
code { font: 500 .88em var(--mono); background: var(--gris-fond); padding: .1em .35em; border-radius: 4px; }
html { scrollbar-color: var(--gris-trait) var(--blanc); }

.evitement { position: absolute; left: -999px; top: .5rem; background: var(--encre); color: var(--blanc); padding: .6rem 1rem; z-index: 20; }
.evitement:focus { left: .5rem; }

/* ------------------------------------------------ Bandeau */
.bandeau {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem var(--gouttiere);
  background: var(--encre); color: var(--blanc);
}
.marque { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font: 800 1.35rem/1 var(--titre); letter-spacing: -.02em; }
.marque b { font-weight: 400; opacity: .72; }
.marque-signe { width: 2.1rem; height: 2.1rem; fill: none; stroke: #FF8C32; stroke-width: 5; }
.marque-signe path { stroke: var(--blanc); stroke-width: 6; }
.bandeau nav { display: flex; gap: clamp(.75rem, 3vw, 2rem); font: 700 1rem/1 var(--titre); }
.bandeau nav a { text-decoration: none; padding: .55rem 0; border-bottom: 3px solid transparent; }
.bandeau nav a:hover { border-bottom-color: rgba(255,255,255,.45); }
.bandeau nav a[aria-current] { border-bottom-color: var(--blanc); }

.sep { display: inline-block; width: .3em; height: .3em; border-radius: 50%; background: currentColor; margin: 0 .5em; vertical-align: .22em; opacity: .7; }

/* ------------------------------------------------ Pastilles de ligne */
.pastille {
  display: inline-grid; place-items: center; flex: none;
  width: 1.9em; height: 1.9em; border-radius: 50%;
  background: var(--l); color: var(--lt);
  font: 800 .95rem/1 var(--titre); padding-top: .12em;
}
.pastille--petite { font-size: .75rem; }
.pastille--grande { font-size: 1.35rem; }
.pastille--geante { font-size: clamp(2.6rem, 7vw, 4.5rem); }

/* ------------------------------------------------ Accueil */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { display: block; flex: 1 0 auto; }
.une {
  display: grid; grid-template-columns: minmax(18rem, 1fr) 2.1fr; gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  max-width: calc(var(--largeur) + 12rem); margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) var(--gouttiere) clamp(2rem, 4vw, 3.5rem);
}
.une-plaque h1 { font-size: clamp(3.2rem, 6.4vw, 5.6rem); font-weight: 900; line-height: .92; letter-spacing: -.035em; margin-bottom: 1.5rem; }
.une-chapo { font-size: clamp(1.15rem, 1.6vw, 1.3rem); color: var(--encre-2); max-width: 30ch; margin-bottom: 2rem; }
.bouton-depart {
  display: inline-flex; align-items: center; gap: 1rem;
  padding: .9rem 1.6rem .9rem 1rem; border-radius: 999px;
  background: var(--encre); color: var(--blanc); text-decoration: none;
  font: 800 1.15rem/1.15 var(--titre);
  box-shadow: 0 10px 24px -12px rgba(26,29,36,.55);
  transition: transform .35s var(--sortie), box-shadow .35s var(--sortie);
}
.bouton-depart .pastille { font-size: 1.15rem; }
.bouton-depart small { display: block; font: 600 .78rem/1.2 var(--titre); letter-spacing: .02em; opacity: .7; margin-bottom: .15rem; }
.bouton-depart:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(26,29,36,.6); }
.une-prerequis { margin: 1rem 0 0; max-width: 34ch; font-size: .95rem; color: var(--gris-texte); }
.une-legende { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; margin-top: 2rem; font: 600 .9rem/1 var(--titre); color: var(--gris-texte); }
.legende-ouverte, .legende-travaux { width: 1rem; height: 1rem; border-radius: 50%; border: 3.5px solid var(--encre); background: var(--blanc); }
.legende-travaux { border: 2.5px dashed #8A9099; margin-left: .6rem; }

.plan { width: 100%; height: auto; display: block; overflow: visible; }
.plan .trace { fill: none; stroke: var(--l); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.plan .station circle { fill: var(--blanc); stroke: var(--encre); stroke-width: 4; transition: r .3s var(--sortie); }
.plan .station--correspondance circle { stroke-width: 5.5; }
.plan .station text { font: 700 15px/1 var(--titre); fill: var(--encre); paint-order: stroke; stroke: var(--blanc); stroke-width: 6px; stroke-linejoin: round; }
.plan .station--travaux circle { stroke: #8A9099; stroke-dasharray: 4 3.2; stroke-width: 3; }
.plan .station--correspondance.station--travaux circle { stroke-width: 3.5; }
.plan .station--travaux text { fill: var(--gris-texte); font-weight: 600; }
.plan .station .etat { font: italic 400 13px var(--texte); }
.plan a.station { cursor: pointer; }
.plan a.station:hover circle, .plan a.station:focus-visible circle { r: 14; }
.plan a.station:hover text { text-decoration: underline; text-decoration-thickness: 2px; }
.plan a.station:focus-visible { outline: none; }
.plan a.station:focus-visible circle { stroke-width: 6; }
.plan .plaque-depart rect { fill: var(--encre); }
.plan .plaque-depart text { font: 800 13px var(--titre); fill: var(--blanc); letter-spacing: .02em; }
.plan .station--terminus circle { r: 12; stroke-width: 5; }
.plan .station--terminus.station--travaux circle { stroke-width: 4; }
.plan .terminus-coeur { fill: var(--encre); pointer-events: none; }
.plan .plaque-station rect { fill: var(--encre); }
.plan .plaque-station text, .plan .plaque-station tspan { fill: var(--blanc) !important; stroke: none !important; }
.plan .ici[hidden] { display: none; }
.plan .ici circle { fill: none; stroke: var(--encre); stroke-width: 3; }
.plan .ici text { font: 800 14px var(--titre); fill: var(--encre); paint-order: stroke; stroke: var(--blanc); stroke-width: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .plan .ici circle { animation: ici 2.4s var(--sortie) infinite; transform-box: fill-box; transform-origin: center; }
  .plan.dessin .trace { stroke-dasharray: var(--long); stroke-dashoffset: var(--long); animation: tracer 1.3s var(--sortie) forwards; animation-delay: var(--delai, 0s); }
  .plan.dessin .station { opacity: 0; animation: apparaitre .5s var(--sortie) forwards; animation-delay: var(--delai, 0s); }
}
@keyframes tracer { to { stroke-dashoffset: 0; } }
@keyframes apparaitre { to { opacity: 1; } }
@keyframes ici { 0% { transform: scale(.7); opacity: 1; } 80%, 100% { transform: scale(1.5); opacity: 0; } }

.une-replie { display: none; }

.toutes-lignes, .comment, .glossaire, .introuvable, .page-ligne-tete, .schema-ligne, .onglets-lignes {
  max-width: var(--largeur); margin-inline: auto; padding-inline: var(--gouttiere);
}
.toutes-lignes { padding-block: clamp(2.5rem, 6vw, 5rem) 1rem; }
.toutes-lignes h2, .comment h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; margin-bottom: 1.75rem; }
.liste-lignes { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--encre); }
.liste-lignes a {
  display: grid; grid-template-columns: auto minmax(10rem, 16rem) 1fr auto; align-items: center; gap: .5rem 1.5rem;
  padding: 1.15rem .5rem; text-decoration: none; border-bottom: 1px solid var(--gris-trait);
  transition: background .25s var(--sortie);
}
.liste-lignes a:hover { background: var(--gris-fond); }
.ligne-nom { font: 800 1.35rem/1.1 var(--titre); }
.ligne-resume { color: var(--encre-2); font-size: 1rem; line-height: 1.5; }
.ligne-compte { font: 600 .9rem/1 var(--titre); color: var(--gris-texte); white-space: nowrap; font-variant-numeric: tabular-nums; }

.comment { padding-block: clamp(3rem, 7vw, 5.5rem); }
.comment dl { border: 3px solid var(--encre); border-radius: 12px; padding: clamp(1.25rem, 3vw, 2rem); }
.comment dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem 2.5rem; margin: 0; }
.comment dt { margin-bottom: .75rem; }
.comment dd { margin: 0; color: var(--encre-2); font-size: 1rem; }

/* ------------------------------------------------ Schéma de ligne (vertical) */
.schema-ligne { list-style: none; margin-block: 0 clamp(3rem, 7vw, 5rem); position: relative; }
.arret { position: relative; display: grid; grid-template-columns: 3.5rem 1fr; padding-bottom: 2.25rem; }
.arret::before {
  content: ""; position: absolute; left: calc(1.75rem - 7px); top: 0; bottom: 0; width: 14px; background: var(--l);
}
.arret:first-child::before { top: 1rem; border-radius: 7px 7px 0 0; }
.arret:last-child::before { bottom: auto; height: 1rem; }
.arret-point {
  position: relative; z-index: 1; justify-self: center; margin-top: .3rem;
  width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--blanc); border: 4px solid var(--encre);
}
.arret--correspondance .arret-point { width: 1.8rem; height: 1.8rem; margin-top: .1rem; border-width: 5px; }
.arret--travaux .arret-point { border: 3px dashed #8A9099; }
.arret-texte { padding-left: .75rem; }
.plaque-depart-mini { display: inline-block; margin-right: .55rem; padding: .3rem .5rem .2rem; border-radius: 4px; background: var(--encre); color: var(--blanc); font: 800 .78rem/1 var(--titre); vertical-align: .2em; }
.arret--terminus .arret-point { width: 1.7rem; height: 1.7rem; margin-top: .15rem; border-width: 5px; background: radial-gradient(circle, var(--encre) 0 3.5px, var(--blanc) 4.5px); }
.arret--terminus.arret--travaux .arret-point { border-width: 3.5px; }
.arret h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: .35rem; }
.arret--travaux h2 { color: var(--gris-texte); font-weight: 700; }
.arret h2 a { text-decoration-color: var(--l); text-decoration-thickness: 3px; }
.arret-meta { font: 600 .92rem/1.3 var(--titre); color: var(--gris-texte); margin-bottom: .4rem; }
.arret-resume { color: var(--encre-2); max-width: 62ch; font-size: 1.02rem; }
.arret-corr { display: flex; align-items: center; gap: .4rem; font: 600 .88rem/1 var(--titre); color: var(--gris-texte); }
.arret-corr a { text-decoration: none; }
.arret.ici-memo .arret-point { background: var(--encre); }
.arret.ici-memo h2::after { content: "Vous êtes ici"; margin-left: .6rem; font: 700 .75rem/1 var(--titre); background: var(--encre); color: var(--blanc); padding: .3rem .5rem; border-radius: 4px; vertical-align: middle; }

/* ------------------------------------------------ Page de ligne */
.onglets-lignes { display: flex; flex-wrap: wrap; gap: .5rem; padding-block: 1.75rem 0; }
.onglets-lignes a { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem .4rem .4rem; border-radius: 999px; border: 2px solid var(--gris-trait); text-decoration: none; font: 700 .95rem/1 var(--titre); }
.onglets-lignes a:hover { border-color: var(--encre); }
.onglets-lignes a[aria-current] { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.page-ligne-tete { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-ligne-tete h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 900; letter-spacing: -.03em; margin-bottom: .5rem; }
.page-ligne-tete p { color: var(--encre-2); max-width: 52ch; margin: 0; font-size: 1.15rem; }

/* ------------------------------------------------ Tuto */
.girouette { background: var(--encre); color: var(--blanc); padding: clamp(1.25rem, 3vw, 2rem) var(--gouttiere) clamp(1.5rem, 3.5vw, 2.4rem); border-bottom: 12px solid var(--l); }
.girouette > * { max-width: var(--largeur); margin-inline: auto; }
.girouette-ligne { display: flex; align-items: center; gap: .75rem; font: 700 1rem/1 var(--titre); color: rgba(255,255,255,.78); margin-bottom: .9rem; }
.girouette-direction { margin-bottom: 0; font: 800 clamp(1.35rem, 2.8vw, 2.1rem)/1.1 var(--titre); letter-spacing: -.025em; text-wrap: balance; }
.girouette-direction span { font-weight: 500; color: rgba(255,255,255,.66); }
.brouillon { width: min(calc(var(--largeur) - 2 * var(--gouttiere)), calc(100% - 2 * var(--gouttiere))); margin: 1.5rem auto 0; padding: .7rem 1rem; border: 2px dashed var(--encre); border-radius: 6px; font: 700 .95rem/1.3 var(--titre); }

.tuto-tete { max-width: var(--largeur); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) var(--gouttiere) 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: 0 clamp(2rem, 5vw, 4.5rem); }
.tuto-tete h1 { grid-column: 1; font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 900; letter-spacing: -.03em; margin-bottom: 1.1rem; }
.tuto-chapo { grid-column: 1; font-size: 1.22rem; color: var(--encre-2); max-width: 60ch; }
.non-refait { grid-column: 1; max-width: 60ch; margin: 0 0 1.25rem; padding: .8rem 1rem; border: 2px dashed var(--encre); border-radius: 8px; font-size: 1rem; color: var(--encre-2); }
.fiche { grid-column: 1; display: flex; flex-wrap: wrap; gap: 0; margin: 1rem 0 0; border-top: 3px solid var(--encre); }
.fiche div { padding: .8rem 1.5rem .8rem 0; margin-right: 1.5rem; }
.fiche dt { font: 600 .82rem/1 var(--titre); color: var(--gris-texte); margin-bottom: .35rem; }
.fiche dd { margin: 0; font: 800 1.15rem/1 var(--titre); font-variant-numeric: tabular-nums; }
.avant-de-partir { grid-column: 2; grid-row: 1 / span 3; align-self: start; background: var(--gris-fond); border-radius: 10px; padding: 1.4rem 1.5rem; }
.avant-de-partir h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: .6rem; }
.avant-de-partir ul { margin: 0 0 1rem; padding-left: 1.1rem; font-size: 1rem; }
.avant-de-partir li { margin-bottom: .35rem; }
.voisine { display: grid; gap: .2rem; font: 700 1.05rem/1.25 var(--titre); }
.voisine span { font-weight: 600; font-size: .82rem; color: var(--gris-texte); }
.voisine small { font-weight: 500; color: var(--gris-texte); }
.avant-de-partir .voisine { padding-top: 1rem; border-top: 1px solid var(--gris-trait); }

.tuto-corps { max-width: var(--largeur); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) var(--gouttiere) 4rem; display: grid; grid-template-columns: 13.5rem minmax(0, 46rem) minmax(12rem, 1fr); gap: clamp(1.5rem, 3.5vw, 3.5rem); align-items: start; }

/* rail : chaque étape est une station de la ligne */
.rail { position: sticky; top: 6rem; }
.rail ol { list-style: none; margin: 0; padding: 0; position: relative; }
.rail ol::before { content: ""; position: absolute; left: 9px; top: .6rem; bottom: .6rem; width: 8px; border-radius: 4px; background: var(--gris-trait); }
.rail ol::after { content: ""; position: absolute; left: 9px; top: .6rem; bottom: .6rem; width: 8px; border-radius: 4px; background: var(--l); transform-origin: top; transform: scaleY(var(--avance, 0)); transition: transform .5s var(--sortie); }
.rail li { position: relative; z-index: 1; }
.rail a { display: grid; grid-template-columns: 26px 1fr; gap: .6rem; align-items: start; padding: .45rem 0; text-decoration: none; font: 600 .92rem/1.3 var(--titre); color: var(--gris-texte); }
.rail-point { width: 18px; height: 18px; margin: 1px 0 0 4px; border-radius: 50%; background: var(--blanc); border: 3.5px solid var(--gris-trait); transition: border-color .3s, transform .3s var(--sortie); }
.rail a.passee { color: var(--encre-2); }
.rail a.passee .rail-point { border-color: var(--encre); }
.rail a.actuelle { color: var(--encre); font-weight: 800; }
.rail a.actuelle .rail-point { border-color: var(--encre); background: var(--encre); transform: scale(1.2); }
.rail a:hover .rail-nom { text-decoration: underline; }
.rail .rail-nom code { background: none; padding: 0; }

.texte { min-width: 0; }
.texte > p, .texte .etape > p, .texte ul, .texte ol { max-width: 68ch; }
.etape { padding-top: 1rem; margin-bottom: 2.5rem; }
.etape h2 { display: flex; align-items: center; gap: .9rem; font-size: clamp(1.55rem, 2.6vw, 2rem); font-weight: 800; margin: 1.5rem 0 1rem; }
.etape-n { display: inline-grid; place-items: center; flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 4px solid var(--encre); font: 900 1.15rem/1 var(--titre); padding-top: .1em; background: var(--blanc); box-shadow: 0 0 0 5px var(--l); }
.texte ul, .texte ol { padding-left: 1.3rem; }
.texte li { margin-bottom: .55rem; }
.texte li::marker { color: var(--encre); }

/* termes du glossaire */
.terme { text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: .22em; text-decoration-color: var(--encre-2); cursor: help; position: relative; }
.terme:hover { text-decoration-style: solid; }
.bulle { position: absolute; z-index: 30; max-width: min(22rem, calc(100vw - 2rem)); padding: .8rem 1rem; background: var(--encre); color: var(--blanc); border-radius: 8px; font: 400 .95rem/1.45 var(--texte); box-shadow: 0 14px 30px -12px rgba(26,29,36,.5); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .25s var(--sortie); }
.bulle.visible { opacity: 1; transform: none; }
.bulle strong { display: block; font: 800 .82rem/1 var(--titre); margin-bottom: .35rem; text-transform: capitalize; color: rgba(255,255,255,.75); }

/* repères du schéma */
.repere { display: inline-grid; place-items: center; width: 1.55em; height: 1.55em; border-radius: 50%; background: var(--encre); color: var(--blanc); font: 800 .75em/1 var(--titre); text-decoration: none; vertical-align: .1em; padding-top: .1em; }
.repere:hover { box-shadow: 0 0 0 3px var(--l); }
.schema-bloc { margin: 2rem 0 2.5rem; padding: clamp(1rem, 3vw, 1.75rem); background: var(--gris-fond); border-radius: 10px; }
.schema { width: 100%; height: auto; display: block; }
.schema .sc-objet rect, .schema .sc-objet path { fill: var(--blanc); stroke: var(--encre); stroke-width: 4; stroke-linecap: round; }
.schema .sc-cadre { fill: none; stroke: var(--encre); stroke-width: 3; stroke-dasharray: 9 7; }
.schema .sc-boite { fill: var(--blanc); stroke: var(--encre); stroke-width: 4; }
.schema .sc-ligne { fill: none; stroke: var(--l); stroke-linejoin: round; stroke-width: 12; stroke-linecap: round; }
.schema .sc-station { fill: var(--blanc); stroke: var(--encre); stroke-width: 4; }
.schema .sc-nom { font: 800 19px var(--titre); fill: var(--encre); }
.schema .sc-detail { font: 600 15px var(--titre); fill: var(--encre-2); }
.schema .sc-repere circle { fill: var(--encre); stroke: var(--gris-fond); stroke-width: 4; transition: fill .2s; }
.schema .sc-repere text { font: 800 15px var(--titre); fill: var(--blanc); }
.schema .sc-repere.allume circle { fill: var(--l); }
.schema .sc-repere.allume text { fill: var(--lt); }
.schema-legende { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .6rem 1.5rem; font-size: .98rem; }
.schema-legende li { display: flex; gap: .6rem; align-items: baseline; margin: 0; }
.repere--fixe { font-size: .85rem; }

/* blocs de commande */
.code { margin: 1.25rem 0 1.5rem; border-radius: 10px; overflow: hidden; border: 2px solid var(--encre); background: var(--blanc); }
.code figcaption { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .45rem .5rem .45rem .5rem; background: var(--encre); }
.code-lieu { display: inline-flex; align-items: center; gap: .45rem; font: 700 .85rem/1 var(--titre); color: var(--blanc); padding: .35rem .5rem; }
.code-lieu::before { content: ""; width: .75rem; height: .75rem; border-radius: 50%; border: 2.5px solid currentColor; }
.code-lieu--hote::before { border-radius: 2px; }
.code-lieu--conteneur::before { border-radius: 2px; background: currentColor; transform: scale(.75); }
.comment .code-lieu { background: var(--encre); border-radius: 6px; padding: .5rem .7rem; }
.copier { font: 700 .82rem/1 var(--titre); color: var(--encre); background: var(--blanc); border: 0; border-radius: 6px; padding: .5rem .8rem; cursor: pointer; transition: background .2s; }
.copier:hover { background: #E1E4E8; }
.copier.copie { background: var(--l); color: var(--lt); }
.code pre { margin: 0; padding: 1rem 1.15rem; overflow-x: auto; font: 500 .95rem/1.6 var(--mono); tab-size: 2; }
.code pre code { background: none; padding: 0; font: inherit; }

/* encadrés : la hiérarchie se lit par inversion, pas par la couleur */
.encadre { margin: 1.5rem 0 2rem; padding: 1.15rem 1.35rem .35rem; border-radius: 10px; max-width: 68ch; }
.encadre-titre { font: 800 .95rem/1 var(--titre); margin-bottom: .75rem; display: inline-flex; align-items: center; gap: .5rem; }
.encadre-titre::before { content: ""; width: 1.1rem; height: 1.1rem; flex: none; background: currentColor; -webkit-mask: var(--icone) center / contain no-repeat; mask: var(--icone) center / contain no-repeat; }
.encadre--voir { background: var(--gris-fond); --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.encadre--pourquoi { border: 2px solid var(--encre); --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke='%23000' stroke-width='3'/%3E%3Cpath d='M12 11v6' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='7.3' r='1.8'/%3E%3C/svg%3E"); }
.encadre--piege { background: var(--encre); color: var(--blanc); --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3L22 20H2z' fill='none' stroke='%23000' stroke-width='2.8' stroke-linejoin='round'/%3E%3Cpath d='M12 9.5v5' stroke='%23000' stroke-width='2.8' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='17.3' r='1.6'/%3E%3C/svg%3E"); }
.encadre--piege code { background: rgba(255,255,255,.14); color: var(--blanc); }
.encadre--piege .terme { text-decoration-color: rgba(255,255,255,.7); }
.encadre--piege .code { border-color: rgba(255,255,255,.35); color: var(--encre); }
.encadre--piege .code pre code { color: var(--encre); background: none; }
.encadre--retour { border: 2px dashed var(--encre); --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5L4 10l5 5' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4 10h10a6 6 0 010 12h-3' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.encadre-mini { display: inline-block; font: 800 .9rem/1 var(--titre); padding: .55rem .75rem; border-radius: 6px; }
.encadre-mini--voir { background: var(--gris-fond); }
.encadre-mini--piege { background: var(--encre); color: var(--blanc); }

/* terminus */
.terminus { margin-top: 3rem; padding: 2rem clamp(1.25rem, 3vw, 2rem); border-radius: 12px; background: var(--encre); color: var(--blanc); }
.terminus h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; margin-bottom: .75rem; }
.terminus > p { color: rgba(255,255,255,.85); }
.terminus .voisine { padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.2); }
.terminus .voisine span, .terminus .voisine small { color: rgba(255,255,255,.65); }
.correspondances { display: grid; gap: .6rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.2); }
.correspondances > span { font: 600 .82rem/1 var(--titre); color: rgba(255,255,255,.65); }
.correspondances ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.correspondances a { display: inline-flex; align-items: center; gap: .55rem; font: 700 1.05rem/1 var(--titre); text-decoration: none; }
.correspondances a:hover span:last-child { text-decoration: underline; }

/* mots du tuto */
.mots { position: sticky; top: 6rem; font-size: .98rem; }
.mots h2 { font-size: 1rem; font-weight: 800; margin-bottom: .75rem; padding-bottom: .6rem; border-bottom: 3px solid var(--encre); }
.mots ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; }
.mots li::first-letter { text-transform: uppercase; }

/* ------------------------------------------------ Glossaire, 404 */
.glossaire { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.glossaire h1, .introuvable h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 900; letter-spacing: -.03em; margin-bottom: 1rem; }
.glossaire dl { margin: 2.5rem 0 0; border-top: 3px solid var(--encre); }
.glossaire dl div { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: .4rem 2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--gris-trait); scroll-margin-top: 6rem; }
.glossaire dl div:target { background: var(--gris-fond); }
.glossaire dt { font: 800 1.2rem/1.3 var(--titre); }
.glossaire dt::first-letter { text-transform: uppercase; }
.glossaire dd { margin: 0; max-width: 62ch; color: var(--encre-2); }
.introuvable { padding-block: clamp(3rem, 10vw, 7rem); }
.introuvable-code { font: 800 1rem/1 var(--titre); color: var(--gris-texte); }

/* ------------------------------------------------ Pied */
.pied { background: var(--encre); color: rgba(255,255,255,.8); padding: 2.5rem var(--gouttiere) calc(2.5rem + env(safe-area-inset-bottom, 0px)); font-size: .95rem; }
.pied > * { max-width: var(--largeur); margin-inline: auto; }
.pied-lignes { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.18); }
.pied-lignes a { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--blanc); font: 700 .95rem/1 var(--titre); }
.pied-lignes a:hover span:last-child { text-decoration: underline; }
.pied p { margin-block: 0; line-height: 1.6; }

/* ------------------------------------------------ Adaptation */
@media (max-width: 1180px) {
  .tuto-corps { grid-template-columns: 12rem minmax(0, 1fr); }
  .mots { grid-column: 2; position: static; }
}
@media (max-width: 960px) {
  .une { grid-template-columns: 1fr; }
  .une-chapo { max-width: 40ch; }
  .tuto-tete { grid-template-columns: 1fr; }
  .avant-de-partir { grid-column: 1; grid-row: auto; margin-top: 1.75rem; }
  .tuto-corps { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .mots { grid-column: 1; }
  .liste-lignes a { grid-template-columns: auto 1fr; }
  .ligne-resume { grid-column: 2; }
  .ligne-compte { grid-column: 2; }
}
@media (max-width: 680px) {
  body { font-size: 1.06rem; }
  .une-plan { display: none; }
  .une-replie { display: block; }
  .une-replie .schema-ligne { padding: 0; margin-bottom: 0; }
  .une-replie .arret { padding-bottom: 1.4rem; }
  .une-replie .arret h2 { font-size: 1.12rem; }
  .bandeau nav a:first-child { display: none; }
  .glossaire dl div { grid-template-columns: 1fr; }
  .schema-ligne { padding-left: 0; }
  .code pre { font-size: .85rem; }
  .etape h2 { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
