/* Styles dédiés à la Tech Doc (sidebar, cartes variantes, stages PixiJS).
   Importé par layouts/docs.html. Ne s'applique qu'aux pages /techdoc/**. */

/* ====================================================================
   Cartes variantes (page d'accueil techdoc)
   ==================================================================== */
.techdoc-cards { margin-top: 20px; margin-bottom: 20px; }

.techdoc-card {
  display: block;
  padding: 24px 20px;
  margin-bottom: 20px;
  background: #ffffff;
  border: 1px solid #e1e7ec;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  min-height: 220px;
}
.techdoc-card:hover,
.techdoc-card:focus {
  box-shadow: 0 6px 18px rgba(40, 60, 90, 0.10);
  border-color: #2c5d8f;
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.techdoc-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #1a2a3a;
}
.techdoc-card p {
  font-size: 14px;
  color: #4a5662;
  margin-bottom: 12px;
  line-height: 1.5;
}
.techdoc-card-icon {
  font-size: 28px;
  color: #2c5d8f;
}
.techdoc-card-cta {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #2c5d8f;
}

/* Variantes colorées */
.techdoc-card--install      .techdoc-card-icon { color: #dc2626; }
.techdoc-card--install      .techdoc-card-cta  { color: #dc2626; }
.techdoc-card--architecture .techdoc-card-icon { color: #2c5d8f; }
.techdoc-card--architecture .techdoc-card-cta  { color: #2c5d8f; }
.techdoc-card--contribute   .techdoc-card-icon { color: #16a34a; }
.techdoc-card--contribute   .techdoc-card-cta  { color: #16a34a; }
.techdoc-card--data         .techdoc-card-icon { color: #8b5cf6; }
.techdoc-card--data         .techdoc-card-cta  { color: #8b5cf6; }

/* ====================================================================
   Sidebar techdoc (col-md-3)
   ==================================================================== */
.techdoc-sidebar {
  position: sticky;
  top: 20px;
  padding: 14px 0;
  font-size: 14px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.techdoc-sidebar .techdoc-nav,
.techdoc-sidebar .techdoc-nav ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.techdoc-sidebar .techdoc-nav ul {
  margin-left: 12px;
  border-left: 2px solid #e1e7ec;
  padding-left: 10px;
  margin-top: 4px;
  margin-bottom: 4px;
}

.techdoc-sidebar .techdoc-nav li {
  margin: 2px 0;
}

.techdoc-sidebar .techdoc-nav a {
  display: block;
  padding: 6px 10px;
  color: #4a5662;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.12s ease, color 0.12s ease;
}
.techdoc-sidebar .techdoc-nav a:hover,
.techdoc-sidebar .techdoc-nav a:focus {
  background: #eef3f7;
  color: #1a2a3a;
  text-decoration: none;
}

.techdoc-sidebar .techdoc-nav .active > a {
  color: #2c5d8f;
  font-weight: 600;
}
.techdoc-sidebar .techdoc-nav .current > a {
  background: #2c5d8f;
  color: #ffffff;
}
.techdoc-sidebar .techdoc-nav .current > a:hover {
  background: #234a73;
  color: #ffffff;
}

.techdoc-sidebar .techdoc-nav .techdoc-root {
  font-size: 15px;
  margin-bottom: 8px;
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid #e1e7ec;
}

.techdoc-sidebar .techdoc-nav i.fa {
  width: 18px;
  text-align: center;
  margin-right: 4px;
  color: inherit;
  opacity: 0.75;
}

/* ====================================================================
   Stages PixiJS (conteneurs canvas)
   ==================================================================== */
.techdoc-pixi-stage {
  position: relative;
  width: 100%;
  min-height: 420px;
  margin: 24px 0;
  background: #f7f9fb;
  border: 1px solid #e1e7ec;
  border-radius: 8px;
  overflow: hidden;
}
.techdoc-pixi-stage--tall { min-height: 460px; }

.techdoc-pixi-progress {
  position: sticky;
  top: 10px;
  z-index: 20;
  width: 100%;
  min-height: 70px;
  margin: 8px 0 20px;
  background: #f7f9fb;
  border: 1px solid #e1e7ec;
  border-radius: 6px;
  overflow: hidden;
}

.techdoc-pixi-stage canvas,
.techdoc-pixi-progress canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Fallback HTML rendu en place du canvas si JS désactivé */
.techdoc-noscript {
  padding: 12px 16px;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  color: #856404;
  font-size: 14px;
  margin: 12px 0;
}

/* ====================================================================
   Responsive
   ==================================================================== */
@media (max-width: 991px) {
  .techdoc-sidebar {
    position: static;
    max-height: none;
    padding: 8px 0 20px;
    border-bottom: 1px solid #e1e7ec;
    margin-bottom: 20px;
  }
  .techdoc-card { min-height: auto; }
  .techdoc-pixi-stage { min-height: 360px; }
  .techdoc-pixi-stage--tall { min-height: 400px; }
}

@media (max-width: 480px) {
  .techdoc-pixi-stage { min-height: 320px; }
  .techdoc-pixi-progress { min-height: 80px; }
}

/* ====================================================================
   Respect du prefers-reduced-motion (UX déjà gérée côté JS, mais on
   neutralise aussi les transitions CSS pour la cohérence)
   ==================================================================== */
@media (prefers-reduced-motion: reduce) {
  .techdoc-card { transition: none; }
  .techdoc-card:hover { transform: none; }
}
