/* =============================================================================
 * chart_drawing_tools.css — styles du kit de dessin overlay
 * (CHANTIER_CHART-DRAWING-TOOLS). Barre d'outils flottante + menu contextuel.
 * Couleurs alignées sur le thème sombre BigBang2 (pas de dépendance à des
 * variables CSS : valeurs en dur pour rester drop-in sur toute surface chart).
 * ========================================================================== */

/* Le canvas overlay est créé en JS (position:absolute; inset:0; pointer-events
 * géré dynamiquement). Classe .dt-overlay réservée pour debug/ciblage. */
.dt-overlay { /* géré inline en JS */ }

/* ----- Barre d'outils flottante ----- */
.dt-toolbar {
  position: absolute; top: 10px; left: 10px; z-index: 10;
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px; border-radius: 8px;
  background: rgba(20, 23, 32, 0.92);
  border: 1px solid #252a38;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}
.dt-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px;
  background: transparent; color: #8892a8;
  cursor: pointer; padding: 0;
  transition: background 0.12s, color 0.12s;
}
.dt-btn:hover { background: rgba(59, 110, 245, 0.14); color: #c9d2e3; }
.dt-btn--active { background: #3b6ef5; color: #fff; }
.dt-btn--active:hover { background: #3b6ef5; color: #fff; }
.dt-btn--danger:hover { background: rgba(232, 76, 76, 0.16); color: #e84c4c; }
.dt-sep { height: 1px; margin: 3px 2px; background: #252a38; }

/* ----- Menu contextuel (clic droit) ----- */
.dt-ctxmenu {
  position: absolute; z-index: 20; display: none;
  min-width: 168px; padding: 8px;
  background: rgba(20, 23, 32, 0.97);
  border: 1px solid #252a38; border-radius: 9px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.55);
  font-size: 12px; color: #8892a8; user-select: none;
}
.dt-ctxmenu.dt-open { display: block; }
.dt-ctx-row { display: flex; gap: 6px; align-items: center; margin-bottom: 7px; }
.dt-ctx-colors { flex-wrap: wrap; }
.dt-swatch {
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; box-sizing: border-box;
}
.dt-swatch:hover { transform: scale(1.12); }
.dt-swatch.dt-on { border-color: #fff; }
.dt-style, .dt-width {
  cursor: pointer; border: 1px solid #252a38; border-radius: 6px;
  background: transparent; color: #8892a8;
  display: flex; align-items: center; justify-content: center;
}
.dt-style { flex: 1; padding: 4px 0; }
.dt-width { width: 26px; height: 24px; font-size: 12px; }
.dt-style:hover, .dt-width:hover { color: #c9d2e3; border-color: #3b6ef5; }
.dt-style.dt-on, .dt-width.dt-on { background: #3b6ef5; color: #fff; border-color: #3b6ef5; }
.dt-ctx-sep { height: 1px; background: #252a38; margin: 8px 0; }
.dt-ctx-action {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 6px; border-radius: 6px; cursor: pointer;
}
.dt-ctx-action:hover { background: rgba(59, 110, 245, 0.14); color: #c9d2e3; }
.dt-ctx-action--danger:hover { background: rgba(232, 76, 76, 0.16); color: #e84c4c; }
.dt-ctx-action kbd {
  font-family: inherit; font-size: 11px; opacity: 0.55;
  border: 1px solid #252a38; border-radius: 4px; padding: 0 4px;
}
