body { background: #f6f7f9; }
.note-systeme { color: #6c757d; font-size: .9rem; }
.note-systeme .contenu { font-style: italic; }
.ligne-retard { background: #fff3f3; }
.table-actions td, .table-actions th { vertical-align: middle; }
.gantt-container { overflow: auto; background: #fff; border: 1px solid #dee2e6; border-radius: .375rem; padding: .5rem; }

/* Couleurs des barres du Gantt selon le statut */
.gantt .bar-wrapper.statut-a_faire .bar { fill: #adb5bd; }
.gantt .bar-wrapper.statut-a_faire .bar-progress { fill: #6c757d; }
.gantt .bar-wrapper.statut-annule .bar-progress { fill: #adb5bd; }
.gantt .bar-wrapper.statut-en_cours .bar { fill: #6ea8fe; }
.gantt .bar-wrapper.statut-en_cours .bar-progress { fill: #0d6efd; }
.gantt .bar-wrapper.statut-bloque .bar { fill: #f1aeb5; }
.gantt .bar-wrapper.statut-bloque .bar-progress { fill: #dc3545; }
.gantt .bar-wrapper.statut-termine .bar { fill: #a3cfbb; }
.gantt .bar-wrapper.statut-termine .bar-progress { fill: #198754; }
.gantt .bar-wrapper.statut-annule .bar { fill: #dee2e6; }
.gantt .bar-wrapper.retard .bar { stroke: #dc3545; stroke-width: 2; }
.gantt .bar-wrapper.todo .bar { opacity: .75; }

/* Successeur qui commence avant la fin de son prédécesseur */
.gantt .bar-wrapper.conflit .bar { stroke: #dc3545; stroke-width: 2; stroke-dasharray: 5 3; }

/* Page Graphiques : hauteur fixe pour que Chart.js s'adapte à son conteneur */
.graphique { position: relative; height: 260px; }

/* Champs de recherche avec suggestions (macro typeahead, même principe que le filtre client de crm-app). */
.ta-wrap { position: relative; }
.ta-dropdown {
  display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 1050;
  max-height: 260px; overflow-y: auto; margin-top: 0.15rem; box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
.ta-dropdown.show { display: block; }
.ta-dropdown .list-group-item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }

/* Gantt en lecture seule : pas de poignées de redimensionnement ni de progression. */
.gantt .handle-group { display: none; }
.gantt .bar-wrapper { cursor: pointer; }

/* Menu contextuel de la liste d'actions (clic droit) */
#menu-ctx { position: fixed; z-index: 1080; min-width: 14rem; display: none; }
#menu-ctx .ctx-sub { position: relative; }
#menu-ctx .ctx-sous { position: absolute; top: 0; left: 100%; margin: 0; max-height: 60vh; overflow-y: auto; }
#menu-ctx.gauche .ctx-sous { left: auto; right: 100%; }
#menu-ctx .ctx-sub:hover > .ctx-sous { display: block; }
.table-actions tbody tr[data-id] { user-select: none; }

/* Cercle d'avancement (liste des actions) : se remplit selon --p (0-100) */
.cercle-avancement { display: inline-block; width: 1.3rem; height: 1.3rem; border-radius: 50%; vertical-align: middle;
  background: conic-gradient(#198754 calc(var(--p) * 1%), #dee2e6 0); }
