/* Page Technologie : arbre par catégorie, colonnes par palier, flèches de prérequis, fiche au clic (24 nov) */
.md-content__inner:has(.el-tt) { max-width: none; }
.el-tt__regles {
  border: 1px solid var(--el-panel-edge); border-left: 3px solid var(--el-cyan);
  background: var(--el-panel); padding: 2px 16px; margin: 0 0 1.2em; max-width: 58rem;
}
.md-typeset .el-tt__regles ul { margin: 0.6em 0 0.6em 0.4em; }
.md-typeset .el-tt__regles li { margin: 0.25em 0; }
.el-tt__legende { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.62rem; color: var(--el-text-1); margin: 0 0 8px; }
.el-tt__legende .el-tt__mode, .el-tt__legende .el-tt__avenir { margin-left: 8px; }
.el-tt__legende .el-tt__mode:first-child { margin-left: 0; }

/* Onglets */
.el-tt__onglets { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; background: var(--el-panel); border: 1px solid var(--el-panel-edge); border-bottom: 0; }
.el-tt__onglet {
  min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px;
  background: var(--el-bg-1); border: 1px solid var(--el-panel-edge); color: var(--el-text-0);
  font: inherit; font-family: var(--el-ui-font); font-size: 0.66rem; cursor: pointer;
}
.el-tt__onglet small { color: var(--el-text-2); }
.el-tt__onglet:hover { border-color: var(--el-cyan-dim); }
.el-tt__onglet.actif { border-color: var(--el-cyan); color: var(--el-cyan); }
.el-tt__onglet:focus-visible, .el-tt__noeud:focus-visible, .el-tt__lien:focus-visible { outline: 2px solid var(--el-cyan); outline-offset: 2px; }

/* Plan : colonnes par palier, défilement horizontal */
.el-tt__corps { display: grid; grid-template-columns: minmax(0, 1fr) 300px; border: 1px solid var(--el-panel-edge); background: var(--el-bg-1); }
.el-tt__defile { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.el-tt__plan { position: relative; display: flex; gap: 56px; padding: 14px 24px 22px 34px; width: max-content; min-height: 220px; }
.el-tt__col { position: relative; z-index: 1; width: 210px; display: flex; flex-direction: column; gap: 10px; }
.md-typeset h2.el-tt__palier {
  margin: 0 0 2px; font-family: var(--el-title-font); font-size: 0.58rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--el-amber); border: 0; padding: 0;
}
.md-typeset h2.el-tt__palier::after { display: none; }
.el-tt__noeud {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 6px 8px; text-align: left;
  background: var(--el-glass); border: 1px solid var(--el-panel-edge); color: var(--el-text-0);
  font: inherit; font-family: var(--el-ui-font); cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.el-tt__noeud:hover { border-color: var(--el-cyan-dim); background: #0d1f25; }
.el-tt__noeud.chaine { border-color: var(--el-cyan-dim); background: #0d1f25; }
.el-tt__noeud.sel { border-color: var(--el-cyan); background: #12303a; box-shadow: 0 0 0 1px var(--el-cyan) inset; }
.el-tt__noeud.est-avenir { border-style: dashed; }
.el-tt__noeud.est-avenir .el-tt__ic, .el-tt__noeud.est-avenir .el-tt__nom { opacity: 0.72; }
.el-tt__ic { flex: 0 0 34px; width: 34px; height: 34px; object-fit: contain; }
.el-tt__sans { display: inline-flex; align-items: center; justify-content: center; color: var(--el-text-2); border: 1px solid var(--el-panel-edge); font-size: 0.8rem; }
.el-tt__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.el-tt__nom {
  font-size: 0.62rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.el-tt__info { display: flex; flex-wrap: wrap; gap: 4px; }
.el-tt__mode, .el-tt__avenir, .el-tt__livre, .el-tt__ext {
  display: inline-block; font-size: 0.52rem; line-height: 1.5; padding: 0 5px; border: 1px solid; white-space: nowrap;
  font-family: var(--el-ui-font); letter-spacing: 0.03em;
}
.el-tt__mode--connu { color: var(--el-positive); border-color: rgba(57, 255, 136, 0.45); }
.el-tt__mode--points { color: var(--el-cyan); border-color: var(--el-cyan-dim); }
.el-tt__mode--recherche { color: var(--el-amber); border-color: rgba(255, 200, 80, 0.45); }
.el-tt__mode--lie { color: var(--el-text-1); border-color: var(--el-panel-edge); }
.el-tt__avenir { color: #ff9db0; border-color: rgba(255, 77, 109, 0.5); text-transform: uppercase; }
.el-tt__livre { color: #d9b8ff; border-color: rgba(190, 140, 255, 0.5); }
.el-tt__ext { color: var(--el-text-2); border-color: var(--el-panel-edge); }

/* Flèches */
.el-tt__fleches { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; overflow: visible; }
.el-tt__fleches path { fill: none; stroke: var(--el-line); stroke-width: 1.4; }
.el-tt__fleches path.on { stroke: var(--el-cyan); stroke-width: 2; }
#el-tt-pointe path { fill: var(--el-line); }
#el-tt-pointe-on path { fill: var(--el-cyan); }

/* Fiche */
.el-tt__fiche {
  border-left: 1px solid var(--el-panel-edge); background: var(--el-panel); padding: 14px 16px; font-size: 0.7rem;
  position: sticky; top: 4.5rem; align-self: start; max-height: calc(100vh - 6rem); overflow: auto;
}
.el-tt__tete { display: flex; gap: 10px; align-items: flex-start; margin-right: 30px; }
.el-tt__grande { flex: 0 0 64px; width: 64px; height: 64px; object-fit: contain; background: var(--el-bg-1); border: 1px solid var(--el-panel-edge); }
.md-typeset .el-tt__fiche h2 { margin: 0 0 6px; font-size: 0.82rem; line-height: 1.3; color: var(--el-cyan); border: 0; padding: 0; }
.md-typeset .el-tt__fiche h2::after { display: none; }
.md-typeset .el-tt__fiche h3 { margin: 14px 0 4px; font-size: 0.6rem; color: var(--el-text-1); }
.md-typeset .el-tt__fiche ul { margin: 0 0 0 1em; }
.md-typeset .el-tt__fiche li { margin: 0; }
.md-typeset .el-tt__fiche p { margin: 0 0 4px; }
.el-tt__aide { color: var(--el-text-1); }
.el-tt__lien {
  font: inherit; color: var(--el-cyan); background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-color: var(--el-cyan-dim); text-underline-offset: 2px;
}
.el-tt__fermer {
  position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; background: none; border: 0;
  color: var(--el-text-1); font-size: 1.2rem; cursor: pointer; display: none;
}

/* Téléphone : liste par palier, cartes pleine largeur, fiche en bas d'écran */
@media (max-width: 760px) {
  .el-tt__onglets { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .el-tt__onglet { min-height: 44px; flex: 0 0 auto; }
  .el-tt__corps { grid-template-columns: 1fr; }
  .el-tt__defile { overflow: visible; }
  .el-tt__plan { flex-direction: column; gap: 16px; width: auto; padding: 10px; }
  .el-tt__col { width: auto; gap: 6px; }
  .el-tt__noeud { min-height: 52px; }
  .el-tt__nom { font-size: 0.68rem; }
  .el-tt__fleches { display: none; }
  .el-tt__fiche {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 5; max-height: 72vh; border: 0;
    border-top: 2px solid var(--el-cyan); box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.6); background: var(--el-glass);
    transform: translateY(100%); visibility: hidden; transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1), visibility 0s linear 0.22s;
  }
  .el-tt__fiche.ouverte { transform: none; visibility: visible; transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1); }
  .el-tt__fermer { display: block; }
  .el-tt__lien, .md-typeset .el-tt__fiche li a { display: inline-flex; align-items: center; min-height: 44px; }
  .md-typeset .el-tt__fiche li { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .el-tt__fiche, .el-tt__noeud { transition: none !important; } }
