export declare class TooltipBehaviorManager { private tooltip; private escHandler; private protectTooltip; private onClose; private dragHeader; private dragMouseDown; private dragMouseMove; private dragMouseUp; constructor(tooltip: HTMLElement, onClose: () => void); initialize(): void; /** * Bouton épingle : toggle la classe 'pinned' sur le tooltip. Quand épinglé, * TooltipEventManager n'arme plus le timer d'auto-fermeture au survol. */ private setupPinButton; /** * Rend le tooltip déplaçable en glissant l'en-tête. Démarrer un drag épingle * automatiquement le tooltip (sinon il se fermerait en cours de déplacement). */ private setupDrag; private createEscHandler; private createProtectionHandler; private setupCloseButton; private setupKeyboardHandlers; private setupProtection; private setupScrollBehavior; private setupFocus; cleanup(): void; } export declare const TOOLTIP_STYLES = "\n .sankey-tooltip {\n position: fixed !important;\n background: white;\n border: 2px solid #333;\n border-radius: 8px;\n box-shadow: 0 4px 20px rgba(0,0,0,0.15);\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n font-size: 12px;\n display: flex;\n flex-direction: column;\n width: max-content;\n min-width: 300px;\n max-width: 90vw;\n min-height: 120px;\n max-height: 90vh;\n z-index: 10000;\n /* overflow != visible requis pour que res:both s'applique ; d\u00E9pla\u00E7able par\n l'en-t\u00EAte + redimensionnable par la poign\u00E9e du coin bas-droit. */\n overflow: hidden;\n resize: both;\n outline: none;\n }\n .sankey-tooltip:focus {\n outline: 3px solid #4a9eff; \n outline-offset: 2px;\n box-shadow: 0 4px 20px rgba(0,0,0,0.15), inset 0 0 0 2px #4a9eff;\n }\n .tooltip-header {\n padding: 12px 16px 8px 16px;\n border-bottom: 1px solid #eee; \n background: #fafafa;\n position: sticky; \n top: 0; \n z-index: 1;\n }\n .tooltip-title { \n margin: 0 0 4px 0; \n font-size: 14px; \n font-weight: 600; \n color: #333; \n }\n .tooltip-subtitle { \n margin: 0 0 8px 0; \n color: #666; \n font-size: 11px; \n }\n .tooltip-content {\n /* flex:1 + min-height:0 => la zone scrollable occupe la place restante et\n suit la hauteur du tooltip quand on le redimensionne. */\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto !important;\n padding: 12px 0;\n position: relative;\n }\n .tooltip-table {\n width: auto; \n border-collapse: collapse; \n font-size: 11px;\n table-layout: fixed; /* un seul tableau => alignement naturel */\n }\n .tooltip-table td.value,\n .tooltip-table td.ratio,\n .tooltip-table th.value,\n .tooltip-table th.ratio {\n text-align: right !important;\n }\n .tooltip-table th {\n background: #f9f9f9; \n font-weight: 600; \n padding: 5px 5px !important;\n text-align: center; \n border-bottom: 2px solid #ddd; \n border-right: 1px solid #d0d0d0;\n position: sticky; \n top: var(--sticky-top, 0px); \n z-index: 1;\n width: 100px; \n /* \u2705 AJOUT\u00C9 : Permettre le retour \u00E0 la ligne dans les headers */\n white-space: normal;\n word-wrap: break-word;\n overflow-wrap: break-word;\n }\n .tooltip-table th:first-child {\n position: sticky; \n left: 0; \n z-index: 3; \n background: #f9f9f9;\n box-shadow: 2px 0 4px rgba(0,0,0,0.1); \n /* \u2705 MODIFI\u00C9 : Largeur fixe plus raisonnable */\n width: 140px; \n max-width: 140px;\n }\n .tooltip-table td {\n padding: 8px 18px; \n border-bottom: 1px solid #f0f0f0; \n border-right: 1px solid #e8e8e8; \n background: white;\n \n /* \u2705 AJOUT\u00C9 : Permettre le retour \u00E0 la ligne dans toutes les cellules */\n white-space: normal;\n word-wrap: break-word;\n overflow-wrap: break-word;\n }\n .tooltip-table td:first-child {\n position: sticky; \n left: 0; \n z-index: 2; \n background: white;\n box-shadow: 2px 0 4px rgba(0,0,0,0.05); \n font-weight: 500;\n /* \u2705 MODIFI\u00C9 : Largeur fixe identique au header */\n width: 140px; \n max-width: 140px;\n text-align: left !important;\n /* \u2705 AJOUT\u00C9 : Styles sp\u00E9cifiques pour la premi\u00E8re colonne */\n white-space: normal !important;\n word-wrap: break-word;\n overflow-wrap: break-word;\n line-height: 1.3;\n vertical-align: top;\n }\n .tooltip-table tr:hover td { \n background: #fafafa; \n }\n .tooltip-table tr:hover td:first-child { \n background: #f5f5f5; \n }\n .total-row td { \n font-weight: 600; \n border-top: 2px solid #ddd; \n background: #f8f8f8 !important; \n }\n .total-row td:first-child { \n background: #f0f0f0 !important; \n }\n .section-header td {\n padding: 6px 12px; \n font-weight: 600; \n color: #333;\n background: linear-gradient(90deg, #f0f8ff 0%, #e6f3ff 100%);\n border-left: 3px solid #4a9eff; \n border-right: 0; \n border-top: 0; \n border-bottom: 1px solid #e0e0e0;\n position: sticky; \n left: 0; \n z-index: 2;\n /* \u2705 AJOUT\u00C9 : Permettre le retour \u00E0 la ligne dans les headers de section */\n white-space: normal;\n word-wrap: break-word;\n overflow-wrap: break-word;\n }\n /* Scrollbar custom */\n .tooltip-content::-webkit-scrollbar { \n width: 8px; \n height: 8px; \n }\n .tooltip-content::-webkit-scrollbar-track { \n background: #f1f1f1; \n border-radius: 4px; \n }\n .tooltip-content::-webkit-scrollbar-thumb { \n background: #c1c1c1; \n border-radius: 4px; \n }\n .tooltip-content::-webkit-scrollbar-thumb:hover { \n background: #a8a8a8; \n }\n .tooltip-close {\n position: absolute;\n top: 8px;\n right: 8px;\n background: none;\n border: none;\n font-size: 18px;\n cursor: pointer;\n color: #666;\n padding: 4px;\n border-radius: 4px;\n /* \u2705 AJOUT : S'assurer que le bouton est au-dessus de tout */\n z-index: 10001;\n pointer-events: auto;\n /* \u2705 AJOUT : Styles pour am\u00E9liorer la visibilit\u00E9 */\n width: 30px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n }\n .tooltip-close:hover {\n background: #f0f0f0;\n color: #333;\n }\n /* \u2705 AJOUT : Focus pour l'accessibilit\u00E9 */\n .tooltip-close:focus {\n outline: 2px solid #4a9eff;\n outline-offset: 2px;\n }\n /* En-t\u00EAte d\u00E9pla\u00E7able : curseur move, sauf sur les boutons/onglets */\n .tooltip-header.tooltip-draggable {\n cursor: move;\n user-select: none;\n }\n .tooltip-header.tooltip-draggable .tooltip-close,\n .tooltip-header.tooltip-draggable .tooltip-pin,\n .tooltip-header.tooltip-draggable .tab-button {\n cursor: pointer;\n }\n /* Bouton \u00E9pingle (\u00E0 gauche du bouton fermer) */\n .tooltip-pin {\n position: absolute;\n top: 8px;\n right: 44px;\n background: none;\n border: none;\n cursor: pointer;\n color: #999;\n padding: 4px;\n border-radius: 4px;\n z-index: 10001;\n pointer-events: auto;\n width: 30px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 1;\n transform: rotate(45deg);\n }\n .tooltip-pin:hover {\n background: #f0f0f0;\n color: #333;\n }\n .tooltip-pin.active {\n color: #4a9eff;\n transform: rotate(0deg);\n }\n .tooltip-pin:focus {\n outline: 2px solid #4a9eff;\n outline-offset: 2px;\n }\n";