/* Parcours Git et GitLab CI/CD : feuille de style unique, sans dépendance externe */

@font-face {
  font-family: "Atkinson Next";
  src: url("../polices/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("../polices/atkinson-hyperlegible-next-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("../polices/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../polices/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../polices/jetbrains-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --fond: #f1f4f8;
  --papier: #ffffff;
  --encre: #17202c;
  --encre-douce: #4b5768;
  --trait: #d3d9e2;
  --trait-fort: #9aa5b5;

  --cobalt: #1f4fbf;
  --cobalt-clair: #e4ebfb;
  --sapin: #1b7757;
  --sapin-clair: #dff2ea;
  --ambre: #a86200;
  --ambre-clair: #fbefd9;
  --rouge: #b3261e;
  --rouge-clair: #fbe4e2;
  --violet: #6a3fb0;
  --violet-clair: #ece4f8;
  --gris: #6f7a8a;
  --gris-clair: #e6eaf0;

  --code-fond: #131a25;
  --code-encre: #e4e9f1;
  --code-discret: #8c99ad;

  --texte: "Atkinson Next", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "DejaVu Sans Mono", monospace;

  --mesure: 44rem;
  --rail: 15rem;
  --hauteur-bandeau: 3.5rem;
  --hauteur-terminal: 0px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hauteur-bandeau) + 1rem);
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: var(--hauteur-terminal);
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
}
h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--encre);
}
h3 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
}
h4 {
  font-size: 1.0625rem;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

p,
ul,
ol,
dl,
table,
pre,
figure {
  margin: 0 0 1.1rem;
}
ul,
ol {
  padding-left: 1.4rem;
}
li {
  margin-bottom: 0.3rem;
}

a {
  color: var(--cobalt);
  text-underline-offset: 0.15em;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 2px;
}

code,
kbd,
pre,
samp {
  font-family: var(--mono);
  font-size: 0.88em;
}
:not(pre) > code {
  background: var(--gris-clair);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  white-space: nowrap;
}
kbd {
  border: 1px solid var(--trait-fort);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 0.35em;
  background: var(--papier);
}

.evitement {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--encre);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.evitement:focus {
  left: 0;
}

/* Bandeau */

.bandeau {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--hauteur-bandeau);
  background: var(--encre);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1.25rem;
}
.bandeau a {
  color: #fff;
  text-decoration: none;
}
.bandeau .marque {
  font-weight: 700;
  white-space: nowrap;
}
.bandeau nav {
  display: flex;
  gap: 1.1rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.bandeau nav a {
  white-space: nowrap;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  color: #c9d2df;
}
.bandeau nav a:hover,
.bandeau nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: #fff;
}
.bandeau nav .separateur {
  color: #8f9bb0;
  padding: 0.2rem 0 0.2rem 0.6rem;
  border-left: 1px solid #44536a;
}
.bandeau nav a.numero {
  font-family: var(--mono);
  padding-left: 0.3rem;
  padding-right: 0.3rem;
}
.bandeau .avancement {
  font-size: 0.9rem;
  color: #c9d2df;
  white-space: nowrap;
}

.bouton {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--encre);
  background: var(--encre);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  line-height: 1.3;
}
.bouton:hover {
  background: #2a3748;
  border-color: #2a3748;
}
.bouton.secondaire {
  background: transparent;
  color: var(--encre);
}
.bouton.secondaire:hover {
  background: var(--gris-clair);
}
.bouton.clair {
  border-color: #fff;
  background: transparent;
  color: #fff;
  padding: 0.25rem 0.7rem;
}
.bouton.clair:hover {
  background: rgba(255, 255, 255, 0.15);
}
.bouton.petit {
  padding: 0.2rem 0.6rem;
  font-size: 0.9rem;
}
.bouton:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Structure des pages de module */

.page {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 2.5rem;
  max-width: 78rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
.page.sans-rail {
  grid-template-columns: minmax(0, 1fr);
  max-width: 64rem;
}

.contenu > * {
  max-width: var(--mesure);
}
.contenu > .large,
.contenu > h2,
.contenu > .entete-module {
  max-width: none;
}

.entete-module {
  margin-bottom: 2.5rem;
}
.entete-module .situation {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--encre-douce);
  margin-bottom: 0.75rem;
}
.entete-module .chapeau {
  font-size: 1.25rem;
  max-width: var(--mesure);
  margin-top: 1rem;
  color: var(--encre-douce);
}
.objectifs {
  background: var(--papier);
  border: 1px solid var(--trait);
  border-left: 6px solid var(--cobalt);
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  max-width: var(--mesure);
}
.objectifs p {
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.objectifs ul {
  margin: 0;
}

/* Rail : le sommaire dessiné comme une branche */

.rail {
  position: sticky;
  top: calc(var(--hauteur-bandeau) + 1.5rem);
  align-self: start;
  max-height: calc(100vh - var(--hauteur-bandeau) - var(--hauteur-terminal) - 3rem);
  overflow-y: auto;
  font-size: 0.95rem;
}
.rail .titre-rail {
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.rail ol::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  background: var(--trait-fort);
}
.rail li {
  margin: 0;
  position: relative;
}
.rail li a {
  display: block;
  padding: 0.3rem 0 0.3rem 1.6rem;
  color: var(--encre-douce);
  text-decoration: none;
  line-height: 1.3;
}
.rail li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--fond);
  border: 2px solid var(--trait-fort);
}
.rail li a:hover {
  color: var(--encre);
}
.rail li a.actif {
  color: var(--encre);
  font-weight: 700;
}
.rail li a.actif::before {
  background: var(--cobalt);
  border-color: var(--cobalt);
}
.rail li.type-atelier a::before {
  border-radius: 3px;
}
.rail li.type-qcm a::before {
  border-radius: 3px;
  transform: rotate(45deg);
}

/* Encadrés */

.encadre {
  border-left: 6px solid var(--trait-fort);
  background: var(--papier);
  padding: 0.85rem 1.1rem;
  margin: 1.5rem 0;
}
.encadre > :last-child {
  margin-bottom: 0;
}
.encadre .etiquette {
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}
.encadre.retenir {
  border-left-color: var(--sapin);
}
.encadre.retenir .etiquette {
  color: var(--sapin);
}
.encadre.attention {
  border-left-color: var(--rouge);
}
.encadre.attention .etiquette {
  color: var(--rouge);
}
.encadre.astuce {
  border-left-color: var(--ambre);
}
.encadre.astuce .etiquette {
  color: var(--ambre);
}
.encadre.analogie {
  border-left-color: var(--violet);
}
.encadre.analogie .etiquette {
  color: var(--violet);
}

/* Code */

.bloc-code {
  position: relative;
  margin: 0 0 1.1rem;
}
.bloc-code pre {
  margin: 0;
}
pre {
  background: var(--code-fond);
  color: var(--code-encre);
  padding: 0.9rem 1.1rem;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.55;
  tab-size: 2;
}
pre code {
  font-size: 0.9rem;
}
pre .com {
  color: var(--code-discret);
}
pre .cle {
  color: #9cc4ff;
}
pre .invite {
  color: #7fd6b0;
  user-select: none;
}
pre .sortie {
  color: #b9c3d3;
}
.bloc-code .copier {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  font: inherit;
  font-size: 0.8rem;
  background: #263246;
  color: #dbe2ec;
  border: 1px solid #3a4a63;
  border-radius: 3px;
  padding: 0.1rem 0.5rem;
  cursor: pointer;
  opacity: 0;
}
.bloc-code:hover .copier,
.bloc-code .copier:focus-visible {
  opacity: 1;
}
.nom-fichier {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: #263246;
  color: #dbe2ec;
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 4px 4px 0 0;
  margin-bottom: -1px;
}
.nom-fichier + .bloc-code pre,
.nom-fichier + pre {
  border-top-left-radius: 0;
}

dt {
  margin-top: 0.75rem;
}
dd {
  margin: 0.15rem 0 0 1.4rem;
}

/* Tableaux */

.tableau-defilant {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  background: var(--papier);
  font-size: 0.98rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--trait);
}
thead th {
  border-bottom: 2px solid var(--encre);
  font-weight: 700;
}

/* Figures interactives */

.figure {
  background: var(--papier);
  border: 1px solid var(--trait);
  margin: 1.75rem 0;
}
.figure > .titre-figure {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--trait);
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
}
.figure > .titre-figure small {
  font-weight: 400;
  color: var(--encre-douce);
  font-size: 0.9rem;
}
.figure > .corps-figure {
  padding: 1rem;
}
.figure > .legende {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--trait);
  color: var(--encre-douce);
  font-size: 0.95rem;
}
.commandes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.commandes .bouton {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.88rem;
}
.commandes .bouton.texte {
  font-family: var(--texte);
  font-weight: 700;
  font-size: 0.95rem;
}
.explication {
  min-height: 3.2rem;
  border-left: 4px solid var(--cobalt);
  padding: 0.4rem 0.9rem;
  background: var(--cobalt-clair);
  margin-top: 0.9rem;
}
.explication.erreur {
  border-left-color: var(--rouge);
  background: var(--rouge-clair);
}
.journal {
  background: var(--code-fond);
  color: var(--code-encre);
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  min-height: 6rem;
  max-height: 14rem;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}
.journal .cmd {
  color: #7fd6b0;
}
.journal .err {
  color: #ff9d94;
}
.journal .info {
  color: var(--code-discret);
}

/* Les trois zones */

.zones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}
.zone {
  border: 2px solid var(--trait-fort);
  border-radius: 4px;
  min-height: 9.5rem;
  padding: 0.5rem;
  background: var(--fond);
}
.zone h4 {
  margin: 0 0 0.1rem;
  font-size: 0.98rem;
}
.zone .sous-titre {
  font-size: 0.8rem;
  color: var(--encre-douce);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.zone.distant {
  border-style: dashed;
}
.fichier {
  font-family: var(--mono);
  font-size: 0.8rem;
  display: block;
  width: 100%;
  text-align: left;
  border: 2px solid var(--trait-fort);
  background: var(--papier);
  border-radius: 3px;
  padding: 0.25rem 0.45rem;
  margin-bottom: 0.35rem;
  cursor: pointer;
  color: var(--encre);
  animation: arrivee 0.35s ease-out;
}
.fichier[aria-pressed="true"] {
  outline: 3px solid var(--violet);
  outline-offset: 1px;
}
.fichier .etat {
  display: block;
  font-family: var(--texte);
  font-size: 0.75rem;
}
.fichier.non-suivi {
  border-color: var(--gris);
}
.fichier.non-suivi .etat {
  color: var(--gris);
}
.fichier.modifie {
  border-color: var(--ambre);
  background: var(--ambre-clair);
}
.fichier.indexe {
  border-color: var(--sapin);
  background: var(--sapin-clair);
}
.fichier.inchange {
  border-color: var(--cobalt);
  background: var(--cobalt-clair);
}
.commit-pastille {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  background: var(--cobalt);
  color: #fff;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  margin: 0 0.25rem 0.3rem 0;
  animation: arrivee 0.35s ease-out;
}
@keyframes arrivee {
  from {
    transform: translateX(-18px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

/* Graphe de commits */

.graphe-cadre {
  overflow-x: auto;
  background: var(--fond);
  border: 1px solid var(--trait);
  border-radius: 4px;
}
.graphe-cadre svg {
  display: block;
}
.graphe .arete {
  fill: none;
  stroke: var(--trait-fort);
  stroke-width: 3;
  transition: opacity 0.4s;
}
.graphe .noeud {
  transition: transform 0.45s ease, opacity 0.4s;
}
.graphe .noeud circle {
  stroke: var(--papier);
  stroke-width: 3;
}
.graphe .noeud text {
  font-family: var(--mono);
  font-size: 11px;
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.graphe .noeud.fantome,
.graphe .arete.fantome {
  opacity: 0.28;
}
.graphe .noeud.fantome circle {
  stroke-dasharray: 3 3;
  stroke: var(--gris);
}
.graphe .noeud.nouveau {
  animation: apparition 0.5s ease-out;
}
@keyframes apparition {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.graphe .etiquette-branche {
  transition: transform 0.45s ease;
}
.graphe .etiquette-branche rect {
  rx: 3;
}
.graphe .etiquette-branche text {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  fill: #fff;
  dominant-baseline: central;
}
.graphe .etiquette-branche .tete {
  fill: var(--encre);
}
.graphe .noeud text.message {
  font-family: var(--texte);
  font-size: 10.5px;
  fill: var(--encre-douce);
  dominant-baseline: auto;
}
.console-git {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.console-git label {
  font-family: var(--mono);
  align-self: center;
  color: var(--sapin);
  font-weight: 700;
}
.console-git input {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 0.45rem 0.6rem;
  border: 2px solid var(--encre);
  border-radius: 4px;
  background: var(--papier);
  color: var(--encre);
}

/* Local et distant */

.depots {
  display: grid;
  gap: 0.6rem;
}
.depot {
  border: 2px solid var(--trait-fort);
  border-radius: 4px;
  padding: 0.5rem 0.75rem;
  background: var(--fond);
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.75rem;
  align-items: center;
}
.depot .nom {
  font-weight: 700;
  line-height: 1.25;
}
.depot .nom small {
  display: block;
  font-weight: 400;
  color: var(--encre-douce);
}
.depot.distant {
  border-style: dashed;
}
.suite-commits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  min-height: 2rem;
}
.suite-commits .c {
  font-family: var(--mono);
  font-size: 0.75rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--gris);
  animation: arrivee 0.35s ease-out;
}
.suite-commits .c.moi {
  background: var(--sapin);
}
.suite-commits .c.collegue {
  background: var(--ambre);
}
.suite-commits .c.fusion {
  background: var(--violet);
}
.suite-commits .pointeur {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid var(--encre);
  border-radius: 3px;
  padding: 0 0.35rem;
  background: var(--papier);
}

/* Séquences pas à pas */

.sequence svg {
  display: block;
  width: 100%;
  height: auto;
}
.sequence .acteur rect {
  fill: var(--papier);
  stroke: var(--encre);
  stroke-width: 2;
}
.sequence .acteur text {
  font-family: var(--texte);
  font-size: 14px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--encre);
}
.sequence .ligne-vie {
  stroke: var(--trait-fort);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}
.sequence .message-seq {
  opacity: 0.16;
  transition: opacity 0.35s;
}
.sequence .message-seq.passe {
  opacity: 0.55;
}
.sequence .message-seq.courant {
  opacity: 1;
}
.sequence .message-seq line,
.sequence .message-seq path {
  stroke: var(--cobalt);
  stroke-width: 2.5;
  fill: none;
}
.sequence .message-seq polygon {
  fill: var(--cobalt);
}
.sequence .message-seq text {
  font-family: var(--texte);
  font-size: 13px;
  fill: var(--encre);
  text-anchor: middle;
}
.sequence .message-seq.courant text {
  font-weight: 700;
}
.navigation-pas {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.navigation-pas .compteur {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--encre-douce);
}

/* Stratégies de déploiement */

.parc {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.parc.simple {
  grid-template-columns: 1fr;
}
.groupe-instances {
  border: 2px solid var(--trait-fort);
  border-radius: 4px;
  padding: 0.6rem;
  background: var(--fond);
  transition: border-color 0.3s, opacity 0.3s;
}
.groupe-instances.actif {
  border-color: var(--encre);
}
.groupe-instances.eteint {
  opacity: 0.45;
}
.groupe-instances h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.groupe-instances h4 span {
  font-weight: 400;
  color: var(--encre-douce);
}
.instances {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}
.instance {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  padding: 0.6rem 0;
  border-radius: 3px;
  color: #fff;
  background: var(--cobalt);
  transition: background-color 0.4s, opacity 0.4s;
}
.instance.v2 {
  background: var(--sapin);
}
.instance.arret {
  background: var(--gris);
  opacity: 0.5;
}
.repartition {
  display: flex;
  height: 1.75rem;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}
.repartition div {
  display: grid;
  place-items: center;
  transition: width 0.5s ease;
  overflow: hidden;
  white-space: nowrap;
}
.repartition .p1 {
  background: var(--cobalt);
}
.repartition .p2 {
  background: var(--sapin);
}

/* Schémas statiques en HTML */

.chaine {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: var(--papier);
  border: 1px solid var(--trait);
}
.chaine .maillon {
  padding: 1rem;
  border-right: 1px solid var(--trait);
}
.chaine .maillon:last-child {
  border-right: 0;
}
.chaine .maillon h4 {
  margin-top: 0;
}
.chaine .maillon .sigle {
  font-family: var(--mono);
  font-weight: 700;
  color: #fff;
  background: var(--cobalt);
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.chaine .maillon:nth-child(2) .sigle {
  background: var(--violet);
}
.chaine .maillon:nth-child(3) .sigle {
  background: var(--sapin);
}
.chaine .maillon p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.chaine .maillon .declencheur {
  font-size: 0.85rem;
  color: var(--encre-douce);
  border-top: 1px dashed var(--trait-fort);
  padding-top: 0.5rem;
  margin: 0;
}

.silos {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  background: var(--papier);
  border: 1px solid var(--trait);
}
.silos .camp {
  padding: 1rem;
}
.silos .camp h4 {
  margin-top: 0;
}
.silos .camp p {
  margin: 0;
  font-size: 0.95rem;
}
.silos .mur {
  writing-mode: vertical-rl;
  text-align: center;
  background: var(--encre);
  color: #fff;
  font-weight: 700;
  padding: 0.5rem 0.35rem;
  font-size: 0.85rem;
}

/* Simulateur de pipeline */

.simulateur {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1rem;
}
.simulateur textarea {
  width: 100%;
  min-height: 24rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.5;
  background: var(--code-fond);
  color: var(--code-encre);
  border: 0;
  border-radius: 4px;
  padding: 0.8rem;
  resize: vertical;
  tab-size: 2;
}
.simulateur .reglages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.figure select,
.simulateur select,
.reglages select {
  font: inherit;
  padding: 0.25rem 0.4rem;
  border: 2px solid var(--encre);
  border-radius: 4px;
  background: var(--papier);
  color: var(--encre);
}
.pipeline {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 0.75rem;
  min-height: 9rem;
}
.etage {
  min-width: 9.5rem;
  flex: 1;
}
.etage h4 {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  border-bottom: 2px solid var(--encre);
  padding-bottom: 0.25rem;
}
.job {
  border: 2px solid var(--gris);
  border-left-width: 8px;
  border-radius: 3px;
  background: var(--papier);
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  transition: border-color 0.3s, background-color 0.3s;
}
.job .statut {
  display: block;
  font-family: var(--texte);
  font-size: 0.78rem;
  color: var(--encre-douce);
}
.job .besoin {
  display: block;
  font-size: 0.72rem;
  color: var(--encre-douce);
}
.job.en-cours {
  border-color: var(--cobalt);
  background: var(--cobalt-clair);
}
.job.en-cours .statut::after {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0.4rem;
  border-radius: 50%;
  background: var(--cobalt);
  animation: pouls 0.9s ease-in-out infinite;
}
@keyframes pouls {
  50% {
    opacity: 0.2;
  }
}
.job.reussi {
  border-color: var(--sapin);
  background: var(--sapin-clair);
}
.job.echoue {
  border-color: var(--rouge);
  background: var(--rouge-clair);
}
.job.tolere {
  border-color: var(--ambre);
  background: var(--ambre-clair);
}
.job.manuel {
  border-color: var(--ambre);
}
.job.ignore {
  border-style: dashed;
  border-left-style: solid;
  opacity: 0.6;
}
.job button {
  margin-top: 0.25rem;
}
.verdict {
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  display: inline-block;
  margin-top: 0.5rem;
}
.verdict.reussi {
  background: var(--sapin-clair);
  color: var(--sapin);
}
.verdict.echoue {
  background: var(--rouge-clair);
  color: var(--rouge);
}
.verdict.attente {
  background: var(--ambre-clair);
  color: var(--ambre);
}
.erreurs-yaml {
  background: var(--rouge-clair);
  border-left: 6px solid var(--rouge);
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.75rem;
}
.erreurs-yaml ul {
  margin: 0.25rem 0 0;
}

/* Ateliers */

.atelier {
  background: var(--papier);
  border: 2px solid var(--encre);
  margin: 2rem 0;
  max-width: 52rem;
}
.atelier > header {
  background: var(--encre);
  color: #fff;
  padding: 0.9rem 1.25rem;
}
.atelier > header h3 {
  margin: 0;
  font-size: 1.3rem;
}
.atelier > header p {
  margin: 0.3rem 0 0;
  color: #c9d2df;
  font-size: 0.95rem;
}
.atelier .jauge {
  height: 6px;
  background: var(--gris-clair);
}
.atelier .jauge div {
  height: 100%;
  width: 0;
  background: var(--sapin);
  transition: width 0.3s;
}
.atelier .corps-atelier {
  padding: 1rem 1.25rem 0.5rem;
}
.atelier .prerequis {
  font-size: 0.95rem;
  color: var(--encre-douce);
}
.etapes {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: etape;
}
.etape {
  counter-increment: etape;
  border-top: 1px solid var(--trait);
  padding: 1rem 0 0.4rem 3rem;
  position: relative;
  margin: 0;
}
.etape::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--encre);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--papier);
}
.etape.faite::before {
  background: var(--sapin);
  border-color: var(--sapin);
  color: #fff;
}
.etape h4 {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
}
.etape .fait {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.92rem;
  margin: 0 0 0.7rem;
  cursor: pointer;
  color: var(--encre-douce);
}
.etape .fait input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--sapin);
}

details {
  border: 1px solid var(--trait);
  border-radius: 4px;
  margin: 0 0 1rem;
  background: var(--fond);
}
details > summary {
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  font-weight: 700;
  font-size: 0.95rem;
}
details > .dans-details {
  padding: 0.25rem 0.8rem 0.1rem;
}
details[open] > summary {
  border-bottom: 1px solid var(--trait);
}

/* QCM */

.qcm {
  max-width: 52rem;
}
.question {
  background: var(--papier);
  border: 1px solid var(--trait);
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
}
.question legend {
  font-weight: 700;
  padding: 0;
  float: left;
  width: 100%;
  margin-bottom: 0.6rem;
}
.question legend small {
  font-weight: 400;
  color: var(--encre-douce);
}
.question .choix {
  clear: both;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.4rem 0.6rem;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}
.question .choix:hover {
  background: var(--fond);
}
.question .choix input {
  margin-top: 0.35rem;
  accent-color: var(--cobalt);
  flex: none;
}
.question .choix.bonne {
  border-color: var(--sapin);
  background: var(--sapin-clair);
}
.question .choix.mauvaise {
  border-color: var(--rouge);
  background: var(--rouge-clair);
}
.question .correction {
  margin: 0.75rem 0 0;
  padding: 0.5rem 0.8rem;
  border-left: 4px solid var(--trait-fort);
  background: var(--fond);
  font-size: 0.98rem;
}
.question .correction.juste {
  border-left-color: var(--sapin);
}
.question .correction.faux {
  border-left-color: var(--rouge);
}
.resultat-qcm {
  background: var(--papier);
  border: 2px solid var(--encre);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.resultat-qcm .note {
  font-size: 1.5rem;
  font-weight: 700;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* Accueil */

.accueil-tete {
  max-width: 78rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 0;
}
.accueil-tete h1 {
  max-width: 18ch;
}
.accueil-tete .chapeau {
  font-size: 1.25rem;
  max-width: 40rem;
  color: var(--encre-douce);
  margin: 1.25rem 0 1.5rem;
}
.historique {
  max-width: 78rem;
  margin: 2rem auto 0;
  padding: 0 1.5rem;
}
.historique .cadre {
  background: var(--papier);
  border: 1px solid var(--trait);
  overflow-x: auto;
}
.historique svg {
  display: block;
  min-width: 56rem;
  width: 100%;
  height: auto;
}
.historique .trace {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: tracer 1.6s ease-out forwards;
}
.historique .trace.t2 {
  animation-delay: 0.7s;
}
@keyframes tracer {
  to {
    stroke-dashoffset: 0;
  }
}
.historique .jalon {
  opacity: 0;
  animation: apparition 0.4s ease-out forwards;
}
.historique .jalon circle {
  stroke-width: 4;
  fill: var(--papier);
}
.historique .jalon.valide circle {
  fill: currentColor;
}
.historique .jalon text {
  font-family: var(--texte);
  fill: var(--encre);
}
.historique .jalon .num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}
.historique .jalon.valide .num {
  fill: #fff;
}
.historique .jalon .nom {
  font-size: 15px;
  font-weight: 700;
  text-anchor: middle;
}
.historique .jalon .detail {
  font-size: 12.5px;
  fill: var(--encre-douce);
  text-anchor: middle;
}
.historique .jalon a:hover .nom,
.historique .jalon a:focus .nom {
  text-decoration: underline;
}
.historique .branche-nom {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.modules {
  max-width: 78rem;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}
.liste-modules {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 2px solid var(--encre);
}
.liste-modules li {
  margin: 0;
  border-bottom: 1px solid var(--trait-fort);
}
.liste-modules a {
  display: grid;
  grid-template-columns: 4rem minmax(0, 2fr) minmax(0, 3fr) 9rem;
  gap: 1rem;
  padding: 1.1rem 0.5rem;
  color: var(--encre);
  text-decoration: none;
  align-items: baseline;
}
.liste-modules a:hover {
  background: var(--papier);
}
.liste-modules .num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.4rem;
}
.liste-modules .nom {
  font-weight: 700;
  font-size: 1.2rem;
}
.liste-modules .resume {
  color: var(--encre-douce);
}
.liste-modules .etat {
  font-size: 0.9rem;
  text-align: right;
  color: var(--encre-douce);
}
.liste-modules .etat.valide {
  color: var(--sapin);
  font-weight: 700;
}
.deux-colonnes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

/* Pied et navigation entre modules */

.pied {
  border-top: 2px solid var(--encre);
  max-width: 78rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.pied a {
  font-weight: 700;
}
.pied small {
  display: block;
  color: var(--encre-douce);
  font-weight: 400;
}

/* Terminal intégré */

.terminal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  height: var(--hauteur-terminal);
  background: var(--code-fond);
  display: none;
  flex-direction: column;
  border-top: 3px solid var(--sapin);
}
.terminal.ouvert {
  display: flex;
}
.terminal .barre {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem 0.75rem;
  color: #dbe2ec;
  font-size: 0.9rem;
}
.terminal .barre strong {
  flex: 1;
}
.terminal .barre a {
  color: #dbe2ec;
}
.terminal iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #000;
}
.terminal .absent {
  flex: 1;
  color: #dbe2ec;
  padding: 1rem 1.25rem;
  overflow-y: auto;
}
.terminal .absent code {
  background: #263246;
  color: #dbe2ec;
}

.valeur-conf {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--violet-clair);
  padding: 0.05em 0.35em;
  border-radius: 3px;
}

@media (max-width: 60rem) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding-top: 1.5rem;
  }
  .rail {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--trait);
    padding-bottom: 1rem;
  }
  .simulateur,
  .deux-colonnes,
  .parc {
    grid-template-columns: minmax(0, 1fr);
  }
  .zones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .chaine,
  .silos {
    grid-template-columns: 1fr;
  }
  .chaine .maillon {
    border-right: 0;
    border-bottom: 1px solid var(--trait);
  }
  .silos .mur {
    writing-mode: horizontal-tb;
  }
  .liste-modules a {
    grid-template-columns: 3rem minmax(0, 1fr);
  }
  .liste-modules .resume,
  .liste-modules .etat {
    grid-column: 2;
    text-align: left;
  }
  .depot {
    grid-template-columns: 1fr;
  }
  .bandeau .avancement {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .bandeau,
  .rail,
  .terminal,
  .copier {
    display: none !important;
  }
  .page {
    display: block;
  }
  body {
    background: #fff;
  }
}
