/* ============================================================================
   Build360 — S103 : menu de gauche en arborescence colorée
   Chaque rubrique a sa couleur (data-sec posé par app.js) : titre de rubrique
   avec pastille, fil d'arborescence vertical, icône dans une tuile teintée,
   menu actif mis en évidence dans la couleur de sa rubrique.
   Couche de présentation uniquement : aucune route, aucun droit modifié.
   Spécificité 0-3-0 et plus : l'emporte sur build360-theme.css (0-2-0).
   ============================================================================ */
.theme-build360-2026 .nav{--sec:#64748b;--sec-soft:#f1f5f9;--sec-line:#e2e8f0}
.theme-build360-2026 .nav [data-sec="quotidien"]{--sec:#d97706;--sec-soft:#fff7e6;--sec-line:#fde3b0}
.theme-build360-2026 .nav [data-sec="chantiers"]{--sec:#2563eb;--sec-soft:#eef4ff;--sec-line:#c9dafc}
.theme-build360-2026 .nav [data-sec="qualite"]{--sec:#059669;--sec-soft:#eafaf3;--sec-line:#bfead6}
.theme-build360-2026 .nav [data-sec="finance"]{--sec:#7c3aed;--sec-soft:#f4efff;--sec-line:#ddd0fb}
.theme-build360-2026 .nav [data-sec="pilotage"]{--sec:#0d9488;--sec-soft:#e8f8f6;--sec-line:#bde8e3}
.theme-build360-2026 .nav [data-sec="reglages"]{--sec:#475569;--sec-soft:#f1f5f9;--sec-line:#dbe2ea}

.theme-build360-2026 .sidebar{width:max(var(--b360-sidebar-w,232px),248px)}
.theme-build360-2026 .nav{padding:10px 10px 18px;overflow-x:hidden} /* S103c : plus de barre de défilement horizontale (2 px de débord) */

/* -- rubrique : bloc + titre avec pastille -------------------------------- */
.theme-build360-2026 .nav .nav__section{position:relative;margin:6px 0 10px;padding-bottom:4px}
.theme-build360-2026 .nav .nav__section + .nav__section{border-top:1px dashed #e5e7eb;padding-top:6px}
.theme-build360-2026 .nav .nav__group{
  display:flex;align-items:center;gap:8px;margin:0;
  padding:10px 8px 6px;
  color:var(--sec);font-family:inherit;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
}
.theme-build360-2026 .nav .nav__group::before{
  content:"";width:8px;height:8px;border-radius:3px;flex:none;
  background:var(--sec);box-shadow:0 0 0 3px var(--sec-soft);
}

/* -- arborescence : fil vertical + branche par menu ----------------------- */
.theme-build360-2026 .nav .nav__section > .nav__item,
.theme-build360-2026 .nav .nav__section .nav__sub-items > .nav__item{margin-left:13px}
.theme-build360-2026 .nav .nav__section::after{
  content:"";position:absolute;left:5px;top:40px;bottom:22px;width:2px;border-radius:2px;
  background:var(--sec-line);pointer-events:none;
}
.theme-build360-2026 .nav .nav__section > .nav__item::after,
.theme-build360-2026 .nav .nav__section .nav__sub-items > .nav__item::after{
  content:"";position:absolute;left:-8px;top:50%;width:8px;height:2px;border-radius:2px;
  background:var(--sec-line);
}

/* -- menu ------------------------------------------------------------------ */
.theme-build360-2026 .nav .nav__item{
  position:relative;display:flex;align-items:center;gap:10px;
  min-height:36px;margin-top:1px;margin-bottom:1px;padding:3px 10px 3px 5px;overflow:visible;
  border:1px solid transparent;border-radius:10px;
  color:#374151;font-family:inherit;font-size:13.5px;font-weight:500;line-height:1.25;
  transition:background .15s ease,border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.theme-build360-2026 .nav .nav__label{white-space:normal;overflow:visible;text-overflow:clip;flex:1;min-width:0}
.theme-build360-2026 .nav .nav__ico{
  display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:8px;
  background:var(--sec-soft);color:var(--sec);
  transition:background .15s ease,color .15s ease,transform .15s ease;
}
.theme-build360-2026 .nav .nav__ico svg{width:16px;height:16px}
.theme-build360-2026 .nav .nav__item:hover{
  background:var(--sec-soft);border-color:var(--sec-line);color:#111827;transform:translateX(2px);
}
.theme-build360-2026 .nav .nav__item:hover .nav__ico{background:#fff;color:var(--sec);transform:scale(1.06)}

/* -- menu actif : mis en évidence dans la couleur de sa rubrique ----------- */
.theme-build360-2026 .nav .nav__item.active{
  background:linear-gradient(90deg,var(--sec-soft),#fff 85%);
  border-color:var(--sec-line);color:#0f172a;font-weight:650;
  box-shadow:0 1px 2px rgba(15,23,42,.06),0 4px 12px -6px var(--sec);
  transform:none;
}
.theme-build360-2026 .nav .nav__item.active::before{
  display:block;content:"";position:absolute;left:-1px;top:7px;bottom:7px;width:4px;border-radius:0 4px 4px 0;
  background:var(--sec);
}
.theme-build360-2026 .nav .nav__item.active .nav__ico{background:var(--sec);color:#fff}
.theme-build360-2026 .nav .nav__item.active::after{background:var(--sec)}

/* -- compteurs --------------------------------------------------------------- */
.theme-build360-2026 .nav .nav__badge{
  min-width:20px;height:20px;padding:0 6px;border-radius:999px;
  display:inline-grid;place-items:center;font-size:11px;font-weight:700;
  background:var(--sec);color:#fff;border:0;
}
.theme-build360-2026 .nav .nav__item.active .nav__badge{background:var(--sec);color:#fff}

/* -- sous-groupes et bascule « Plus… / Menu réduit » ------------------------ */
.theme-build360-2026 .nav .nav__sub{margin-left:12px;font-size:12px}
.theme-build360-2026 .nav .nav__more-toggle{
  display:flex;align-items:center;justify-content:center;gap:6px;width:100%;
  margin:10px 0 4px;padding:8px 10px;
  border:1px dashed #cbd5e1;border-radius:10px;background:#f8fafc;
  color:#334155;font-family:inherit;font-size:12.5px;font-weight:700;letter-spacing:.01em;
}
.theme-build360-2026 .nav .nav__more-toggle:hover{border-style:solid;border-color:#94a3b8;background:#fff;color:#0f172a}
.theme-build360-2026 .nav > .nav__more-toggle:first-child{margin-top:2px;margin-bottom:8px}

@media (prefers-reduced-motion:reduce){
  .theme-build360-2026 .nav .nav__item,.theme-build360-2026 .nav .nav__ico{transition:none}
  .theme-build360-2026 .nav .nav__item:hover,.theme-build360-2026 .nav .nav__item:hover .nav__ico{transform:none}
}
