﻿/* ===========================================================
   fonction_pancartes_flottantes.css
   Style commun pour toutes les pancartes flottantes/dock
   =========================================================== */
:root{
  --tileIconHit: 28px;
  --tileMaxBox: 14px;
  --tileMaxStroke: 2px;
  --tileMaxOffset: 4px;
  --tileMaxColor: rgba(0,0,0,.35); /* âœ… */

  /* âœ… Couleur ACTIF unique (chart actif + panneaux liÃ©s)
     - si ton thÃ¨me dÃ©finit --ia-menu-btn-active-bg / fg, Ã§a sera utilisÃ©
     - sinon fallback sur #DEDCDC */
  --ia-active-accent-bg: var(--ia-menu-btn-active-bg, #DEDCDC);
  --ia-active-accent-fg: var(--ia-menu-btn-active-fg, #111);
  /* âŒ Le bouton "X" ne doit PAS suivre --ia-panels-btn-* */
  --pm-close-bg: #ffffff;
  --pm-close-bg-hover: #f3f3f3;
  --pm-close-fg: #111111;

}

.pmPanel{
  background:#fff;
  border-radius:1px;
  box-shadow:none;
  border:1px solid rgba(0,0,0,.22);
  overflow:hidden;
}

.pmPanel.pmDock{
  border-radius:0;
  border:none;
  border-left:1px solid rgba(0,0,0,.22);
  box-shadow:none;
}

.pmHeader{
  user-select:none;
}

/* ==========================
   Tuiles charts flottantes
   ========================== */

.tile.pmTileFloat{
  position: fixed !important;
  z-index: 15000;
  border-radius: 1px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.22);
  box-shadow: none;
  overflow: hidden;
}

/* header (tilebar) devient poignÃ©e de drag */
.tile.pmTileFloat .tilebar{
  cursor: move;
  user-select: none;
}

/* petits boutons */
.tilebar .tileFloatBtn,
.tilebar .tileCloseBtn,
.tilebar .infoBtn,
.tilebar .linkBtn,
.tilebar .btnUT,
.tilebar .btnLegend,
.tilebar .btnDrawing,
.tilebar .btnOrderBook{
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.15);
  background: #d31818;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 14px;
}

/* optionnel : pas de halo au focus */
.tilebar .tileMaxBtn:focus{
  outline: none;
}

.tilebar .tileFloatBtn:hover{ background: rgba(0,0,0,.03); }

/* âœ… Hover du X = variables close (comme les panneaux annexes) */
.tilebar .tileCloseBtn:hover{
  background: var(--pm-close-bg-hover) !important;
}


/* ==========================
   âœ… Bouton Agrandir/RÃ©duire : style Windows/Chrome
   - Normal : 1 carrÃ© + barre haute
   - Max (restore) : 2 carrÃ©s dÃ©calÃ©s + barre haute
   ========================== */
/* bouton */
.tilebar .tileMaxBtn{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: var(--tileIconHit);
  height: var(--tileIconHit);
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;

  color: inherit !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.tilebar .tileMaxBtn:hover{ background: rgba(0,0,0,.03); }

/* âœ… FIX : le bouton Agrandir ne doit afficher QUE les pseudo-Ã©lÃ©ments (::before/::after)
   (supprime tout contenu interne qui crÃ©e un carrÃ© en trop) */
.tilebar .tileMaxBtn > *{
  display: none !important;
}


/* carrÃ© principal (mode normal = juste Ã§a) */
.tilebar .tileMaxBtn::before{
  content:"";
  position:absolute;
  width: var(--tileMaxBox);
  height: var(--tileMaxBox);
  box-sizing: border-box;
  border: var(--tileMaxStroke) solid var(--tileMaxColor);
  background: none;                 /* âœ… pas de â€œbarreâ€ => look Windows/Chrome */
  transform: translate(0,0);
  opacity: 1;
}

/* 2e carrÃ© (cachÃ© en mode normal) */
.tilebar .tileMaxBtn::after{
  content:"";
  position:absolute;
  width: var(--tileMaxBox);
  height: var(--tileMaxBox);
  box-sizing: border-box;
  border: var(--tileMaxStroke) solid var(--tileMaxColor);
  background:none;

  opacity: 0;                       /* âœ… cachÃ© */
  transform: translate(0,0);        /* carrÃ© â€œau fondâ€ centrÃ© */
}

/* âœ… Ã©tat maximisÃ© = restore : on affiche 2 carrÃ©s */
.tile.pmTileMaxed .tilebar .tileMaxBtn::after,
.tilebar .tileMaxBtn.isMaxed::after{
  opacity: 1;                       /* montre le carrÃ© â€œau fondâ€ */
}

/* âœ… et on dÃ©cale le carrÃ© â€œdevantâ€ */
.tile.pmTileMaxed .tilebar .tileMaxBtn::before,
.tilebar .tileMaxBtn.isMaxed::before{
  transform: translate(var(--tileMaxOffset), calc(-1 * var(--tileMaxOffset)));
}

.tilebar .tileMaxBtn:focus{ outline:none; }

.tile.pmTileFloat .tileFloatBtn{
  transform: rotate(-25deg);
  opacity: .75;
}

/* âœ… CHART NON ACTIF = couleur "panneaux passifs" */
.tile.pmTileFloat:not(.pmTileActive) .tilebar{
  background: var(--ia-panels-passive-bg, #f2f2f2) !important;
  color: var(--ia-panels-passive-fg, #111) !important;
  border-bottom: 1px solid rgba(0,0,0,.15) !important; /* neutre */
}


/* âœ… CHART ACTIF = bandeau */
.tile.pmTileFloat.pmTileActive .tilebar{
  background: var(--ia-active-accent-bg) !important;
  color: var(--ia-active-accent-fg) !important;
}

/* ===========================================================
   âœ… FIX CIBLÃ‰:
   - Le texte "simple" du bandeau suit actif/passif
   - MAIS les champs, boutons et croix restent comme avant
   =========================================================== */

/* Texte du bandeau (hÃ©rite bien) */
.tile.pmTileFloat .tilebar{
  color: inherit !important;
}

/* âœ… On applique la couleur du bandeau seulement aux textes "simples"
   (PAS aux badges READY/OUVERT, PAS aux boutons, PAS aux champs) */
.tile.pmTileFloat .tilebar .tileLeft,
.tile.pmTileFloat .tilebar .muted,
.tile.pmTileFloat .tilebar .countdown,
.tile.pmTileFloat .tilebar .marketMeta,
.tile.pmTileFloat .tilebar label{
  color: inherit !important;
}
/* âœ… Force countdown + heure symbole Ã  suivre actif/passif (float ou pas) */
.tile .tilebar .countdown,
.tile .tilebar .marketMeta,
.tile .tilebar .muted{
  color: inherit !important;
}

/* âœ… BADGES READY / OUVERT / FERMÃ‰ : ils gardent TOUJOURS leur style charts.css */
.tile.pmTileFloat .tilebar .badge.marketBadge{
  width: 10px !important;
  height: 10px !important;
  min-width: 10px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(0,0,0,0.40) !important;
  --led-light: #fbbf24;
  --led-core: #f59e0b;
  --led-edge: #a35707;
  --led-glow: rgba(245, 158, 11, 0.68);
  --led-glow-soft: rgba(245, 158, 11, 0.34);
  --led-spark: #ffdba3;
  background: radial-gradient(
    circle at 32% 28%,
    var(--led-spark) 0%,
    var(--led-light) 22%,
    var(--led-core) 54%,
    var(--led-edge) 100%
  ) !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  text-indent: -9999px !important;
  overflow: visible !important;
  position: relative !important;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.16),
    inset 0 1px 1px rgba(255,255,255,0.36),
    inset 0 -1px 1px rgba(0,0,0,0.42),
    0 0 4px var(--led-glow),
    0 0 8px var(--led-glow-soft) !important;
  cursor: help !important;
}
.tile.pmTileFloat .tilebar .badge.marketBadge::before{
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  border-radius: 50% !important;
  background: radial-gradient(
    circle at 72% 74%,
    rgba(0,0,0,0.22) 0%,
    rgba(0,0,0,0) 58%
  ) !important;
  pointer-events: none !important;
}
.tile.pmTileFloat .tilebar .badge.marketBadge::after{
  content: "" !important;
  position: absolute !important;
  top: 1px !important;
  left: 1px !important;
  width: 4px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: radial-gradient(
    ellipse at center,
    var(--led-spark) 0%,
    rgba(255,255,255,0) 78%
  ) !important;
  opacity: 0.95 !important;
  pointer-events: none !important;
}

/* Ã©tats (copiÃ© de charts.css, verrouillÃ© ici pour ne jamais Ãªtre Ã©crasÃ©) */
.tile.pmTileFloat .tilebar .badge.marketBadge.open{
  border-color:#0e7a37 !important;
  --led-light: #6ee7a1;
  --led-core: #22c55e;
  --led-edge: #0f7a3f;
  --led-glow: rgba(34, 197, 94, 0.70);
  --led-glow-soft: rgba(34, 197, 94, 0.34);
  --led-spark: #b7f7cf;
}
.tile.pmTileFloat .tilebar .badge.marketBadge.closed{
  border-color:#b91c1c !important;
  --led-light: #ff8a8a;
  --led-core: #ef4444;
  --led-edge: #9f1f1f;
  --led-glow: rgba(239, 68, 68, 0.70);
  --led-glow-soft: rgba(239, 68, 68, 0.34);
  --led-spark: #ffbcbc;
}
.tile.pmTileFloat .tilebar .badge.marketBadge.indicative,
.tile.pmTileFloat .tilebar .badge.marketBadge.unknown{
  border-color:#c27a06 !important;
  --led-light: #fbbf24;
  --led-core: #f59e0b;
  --led-edge: #a35707;
  --led-glow: rgba(245, 158, 11, 0.68);
  --led-glow-soft: rgba(245, 158, 11, 0.34);
  --led-spark: #ffdba3;
}


/* âœ… SVG seulement pour les icÃ´nes qui doivent suivre le texte du bandeau
   (si certaines icÃ´nes sont dans des boutons, elles resteront "comme avant") */
.tile.pmTileFloat .tilebar .tileLeft svg,
.tile.pmTileFloat .tilebar .muted svg,
.tile.pmTileFloat .tilebar .countdown svg{
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* âœ… IMPORTANT : on remet les champs en blanc + texte gris (comme avant) */
.tile.pmTileFloat .tilebar select,
.tile.pmTileFloat .tilebar input{
  background: #fff !important;
  color: #666 !important;
  border: 1px solid rgba(0,0,0,.15) !important;
}

/* âœ… FIX : pas de rectangle noir (focus) sur les selects/inputs */
.tile.pmTileFloat .tilebar select:focus,
.tile.pmTileFloat .tilebar select:focus-visible,
.tile.pmTileFloat .tilebar input:focus,
.tile.pmTileFloat .tilebar input:focus-visible{
  outline: none !important;
  box-shadow: none !important;
}

/* âœ… Firefox : supprime le contour interne */
.tile.pmTileFloat .tilebar select::-moz-focus-inner,
.tile.pmTileFloat .tilebar button::-moz-focus-inner{
  border: 0 !important;
}

/* âœ… Chrome/Edge : supprime le focus ring â€œpar dÃ©fautâ€ */
.tile.pmTileFloat .tilebar select:focus-visible,
.tile.pmTileFloat .tilebar button:focus-visible{
  outline: none !important;
}

/* âœ… Exception : bouton Agrandir (carrÃ©) = PAS de fond blanc */
.tile.pmTileFloat .tilebar .tileMaxBtn{
  background: transparent !important;
  border: none !important;
  color: inherit !important; /* il suit le texte du bandeau */
}

/* âœ… Le carrÃ© (icÃ´ne) suit la couleur du texte du bandeau */
.tile.pmTileFloat .tilebar .tileMaxBtn::before,
.tile.pmTileFloat .tilebar .tileMaxBtn::after{
  border-color: currentColor !important;
}

/* âœ… Placeholder anti-glissement : garde la place dans la grille */
.pmTilePlaceholder{
  /* il doit prendre la place, mais Ãªtre invisible */
  visibility: hidden;
  pointer-events: none;
}

/* ==========================
   âœ… TILEBAR charts - version unique (non responsive)
   ========================== */

.tilebar{
  display:flex;
  align-items:center;
  flex-wrap:nowrap !important;
  gap:6px !important;
  height:auto !important;
  min-height:34px;
  overflow:visible;

  font-size:12px;      /* âœ… texte plus petit */
  line-height:1.1;
}

.tilebar button{ flex: 0 0 auto; }
.tilebar select{ max-width:100%; }
.tilebar select{
  height: 28px;
  padding: 2px 8px;
  font-size: 12px;
}

/* ===========================================================
   âœ… TILEBAR (charts) : boutons "pancartes" UNIQUEMENT
   - normal / hover / actif
   - NE TOUCHE PAS :
     - .tileCloseBtn (X)
     - .tileMaxBtn (rÃ©duire/agrandir)
   =========================================================== */

/* Base : uniquement les boutons concernÃ©s */
.tile .tilebar :is(.linkBtn, .infoBtn, .btnUT, .btnLegend, .btnDrawing, .btnOrderBook){
  background: var(--pm-btn-bg) !important;
  color: var(--ia-panels-btn-fg, #111) !important;
  border: 1px solid var(--pm-ui-border) !important;
  border-radius: var(--pm-btn-radius, 8px) !important;
}

/* Hover : uniquement ces boutons */
.tile .tilebar :is(.linkBtn, .infoBtn, .btnUT, .btnLegend, .btnDrawing, .btnOrderBook):hover{
  background: var(--pm-btn-bg-hover) !important;
  color: var(--ia-panels-btn-hover-fg, var(--ia-panels-btn-fg, #111)) !important;
}

/* Actif : uniquement ces boutons (plusieurs conventions possibles) */
.tile .tilebar :is(.linkBtn, .infoBtn, .btnUT, .btnLegend, .btnDrawing, .btnOrderBook).active,
.tile .tilebar :is(.linkBtn, .infoBtn, .btnUT, .btnLegend, .btnDrawing, .btnOrderBook)[aria-pressed="true"],
.tile .tilebar :is(.linkBtn, .infoBtn, .btnUT, .btnLegend, .btnDrawing, .btnOrderBook).isActive,
.tile .tilebar :is(.linkBtn, .infoBtn, .btnUT, .btnLegend, .btnDrawing, .btnOrderBook).on{
  background: var(--ia-panels-btn-active-bg, var(--pm-btn-bg)) !important;
  color: var(--ia-panels-btn-active-fg, var(--ia-panels-btn-fg, #111)) !important;
}

/* SVG dans ces boutons : suit currentColor */
.tile .tilebar :is(.linkBtn, .infoBtn, .btnUT, .btnLegend, .btnDrawing, .btnOrderBook) svg,
.tile .tilebar :is(.linkBtn, .infoBtn, .btnUT, .btnLegend, .btnDrawing, .btnOrderBook) svg *{
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* ===========================================================
   âœ… PANNEAUX
   - pmPanelActive = panel au-dessus (focus UI / z-index)
   - pmLinkedActive = panneau liÃ© au CHART ACTIF (mÃ©tier)
   =========================================================== */

/* âœ… PANNEAU LIÃ‰ AU CHART ACTIF = mÃªme accent que la tile active */
.pmPanel.pmFloat.pmLinkedActive .pmHeader{
  background: var(--ia-active-accent-bg) !important;
  color: var(--ia-active-accent-fg) !important;
  border-bottom: 1px solid rgba(0,0,0,.18) !important; /* neutre */
}

/* âœ… Le panel "au-dessus" ne doit PLUS piloter la couleur mÃ©tier */
.pmPanel.pmFloat.pmPanelActive:not(.pmLinkedActive) .pmHeader{
  background: var(--ia-panels-active-bg, var(--ia-active-accent-bg, #dedcdc)) !important;
  color: var(--ia-panels-active-fg, var(--ia-active-accent-fg, #111)) !important;
  border-bottom: 1px solid rgba(0,0,0,.18) !important;
}

/* âœ… (Optionnel) Focus UI visible sans changer les couleurs mÃ©tier */
.pmPanel.pmFloat.pmPanelActive{
  outline: 2px solid rgba(0,0,0,0.12);
  outline-offset: -2px;
}

/* Optionnel : boutons un peu mieux lisibles quand header accentuÃ© */
.pmPanel.pmFloat.pmLinkedActive .pmBtn{
  background:#fff;
}

/* âœ… FLOAT-ONLY : on enlÃ¨ve la punaise des tiles charts */
.tilebar .tileFloatBtn{
  display:none !important;
}
/* âœ… panels toujours au-dessus des charts par dÃ©faut */
.pmPanel.pmFloat{
  z-index: 25000; /* base */
}
.pmPanel.pmFloat[style*="z-index"]{
  z-index: auto; /* laisse l'inline dÃ©cider */
}

/* âœ… force l'affichage du bouton i mÃªme si compact */
.tilebar .infoBtn{
  display:inline-flex !important;
}
/* âœ… FIX: le header + la croix doivent Ãªtre AU-DESSUS des zones de resize invisibles */
.pmPanel .pmHeader{
  position: relative;
  z-index: 40000;
}

.pmPanel .pmHeaderBtns,
.pmPanel .pmCloseBtn{
  position: relative;
  z-index: 40001;
}

/* ==========================
   âœ… FIX fermeture panels :
   Les zones de resize ne doivent PAS recouvrir le header (et la croix âœ•)
   ========================== */

/* Hauteur approximative du header panel (ajuste si besoin: 44, 48, 52) */
:root { --pmHeaderH: 48px; }

/* On force le header au-dessus */
.pmPanel .pmHeader{
  position: relative;
  z-index: 10;
}

/* âœ… on descend les zones de resize verticales (droite/gauche) sous le header */
.pmPanel .pmEdgeResizerR,
.pmPanel .pmEdgeResizerL{
  top: var(--pmHeaderH) !important;
  height: calc(100% - var(--pmHeaderH)) !important;
}

/* zone de resize haut : au-dessus du panel, sans recouvrir la croix */
.pmPanel .pmEdgeResizerT{
  left: 0;
  right: 44px;        /* laisse la zone des boutons Ã  droite */
  height: 12px;
  cursor: ns-resize;
  z-index: 50000;     /* au-dessus du header */
}

/* âœ… la croix reste cliquable */
.pmPanel .pmCloseBtn{
  position: relative;
  z-index: 20;
}

/* âœ… FIX DEFINITIF : resize haut des panneaux (pas coupÃ© par overflow) */
.pmPanel .pmEdgeResizerT{
  height: 10px !important;
  left: 0 !important;
  right: 44px !important;
  width: auto !important;
  pointer-events: auto !important;
}

.pmPanel .pmHeader{ z-index: 40; }
.pmPanel .pmHeaderBtns, .pmPanel .pmCloseBtn{ z-index: 41; }

.pmPanel,
.tile.pmTileFloat { box-sizing: border-box; }

/* âœ… Tilebar seulement : muted/marketMeta/countdown suivent actif/passif */
.tile .tilebar .muted,
.tile .tilebar .marketMeta,
.tile .tilebar .countdown{
  color: inherit !important;
}
/* âœ… Si ton JS met pmTileActive mÃªme en mode non-float */
.tile.pmTileActive .tilebar{
  color: var(--ia-active-accent-fg, #111) !important;
}
.tile:not(.pmTileActive) .tilebar{
  color: var(--ia-panels-passive-fg, #111) !important;
}

/* ===========================================================
   âœ… Bouton fermer X (charts) = couleurs fixes
   - garde le sursaut
   - NE suit PAS --ia-panels-btn-*
   =========================================================== */
.tile .tilebar .tileCloseBtn{
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 24px !important;
  background: var(--pm-close-bg) !important;
  color: var(--pm-close-fg) !important;
  border: 1px solid rgba(0,0,0,.15) !important;
  border-radius: 0 !important;
}

.tile .tilebar .tileCloseBtn:hover{
  background: var(--pm-close-bg-hover) !important;
}

/* ===========================================================
   âœ… SURSAUT ROBUSTE (ne casse pas)
   - marche sur <button> + faux boutons (.linkBtn/.pmBtn/...)
   - puis on le coupe dans le menu du haut
   =========================================================== */

/* 1) Appliquer le sursaut (global) */
button,
.linkBtn,
.debugBtn,
.pmBtn,
.calMainTab,
.calSubTab,
.ecoCloseBtn,
.tileCloseBtn,
.tileFloatBtn,
.infoBtn,
.btnUT,
.btnLegend,
.btnDrawing,
.btnOrderBook{
  transition: transform 120ms ease;
}

button:hover,
.linkBtn:hover,
.debugBtn:hover,
.pmBtn:hover,
.calMainTab:hover,
.calSubTab:hover,
.ecoCloseBtn:hover,
.tileCloseBtn:hover,
.tileFloatBtn:hover,
.infoBtn:hover,
.btnUT:hover,
.btnLegend:hover,
.btnDrawing:hover,
.btnOrderBook:hover{
  transform: translateY(-1px) !important;
}

/* 2) DÃ©sactivÃ© quand disabled */
button:disabled:hover{
  transform: none !important;
}

/* 3) Couper le sursaut UNIQUEMENT sur les menus (pas sur les contrÃ´les dockÃ©s Ã  droite) */
#topMenu .menuItem,
#topMenu .menuRow,
.appMenuBar .menuItem,
.appMenuBar .menuRow{
  transition: none !important;
}

#topMenu .menuItem:hover,
#topMenu .menuRow:hover,
.appMenuBar .menuItem:hover,
.appMenuBar .menuRow:hover{
  transform: none !important;
  box-shadow: none !important;
}

/* âœ… Laisse la scrollbar visible/cliquable : le resizer sort du panneau */
.pmPanel .pmEdgeResizerR{
  right: -6px !important;   /* sort du panel */
  width: 12px !important;   /* zone de prise confortable */
  background: transparent !important;
  z-index: 5 !important;
}

/* âœ… un peu d'air Ã  droite pour Ã©viter que le contenu touche la scrollbar */
#legendList, #settingsBody, #infoBody, #calendarBody, #appearanceBody{
  padding-right: 14px !important;
}

/* ============ CHART MODE (par dÃ©faut) ============ */
/* Chart actif => bandeau actif */
body:not(.iaPanelMode) .tile.pmTileFloat.pmTileActive .tilebar{
  background: var(--ia-menu-btn-active-bg, #d9d9d9);
  color: var(--ia-menu-btn-active-fg, #111);
}

/* En panelMode : chart actif revient normal */
body.iaPanelMode .tile.pmTileFloat.pmTileActive .tilebar{
  background: var(--ia-tilebar-bg, #f2f2f2);
  color: var(--ia-tilebar-fg, #111);
}

/* ===========================================================
   âœ… RÃˆGLE MÃ‰TIER:
   Quand une pancarte annexe (non liÃ©e) est sÃ©lectionnÃ©e => panelMode
   -> Le chart actif doit REPASSER en PASSIF
   -> pour Ã©viter la confusion visuelle
   =========================================================== */

/* En panelMode : mÃªme si le chart est "pmTileActive" en JS,
   on le force visuellement en PASSIF */
body.iaPanelMode .tile.pmTileFloat.pmTileActive .tilebar{
  background: var(--ia-panels-passive-bg, #f2f2f2) !important;
  color: var(--ia-panels-passive-fg, #111) !important;
  border-bottom: 1px solid rgba(0,0,0,.15) !important;
}

/* (Optionnel mais recommandÃ©) : si jamais tu as des tiles non-float
   et que pmTileActive existe aussi, mÃªme logique */
body.iaPanelMode .tile.pmTileActive .tilebar{
  background: var(--ia-panels-passive-bg, #f2f2f2) !important;
  color: var(--ia-panels-passive-fg, #111) !important;
}

/* ✅ Mode indépendante global :
   quand une pancarte indépendante est active, aucun chart ne doit rester en couleur active. */
body.iaIndependentPanelMode .tile.pmTileActive .tilebar{
  background: var(--ia-panels-passive-bg, #f2f2f2) !important;
  color: var(--ia-panels-passive-fg, #111) !important;
  border-bottom: 1px solid rgba(0,0,0,.15) !important;
}

/* ===========================================================
   âœ… Anti-grÃ©sillement : couper transitions/hover pendant drag/resize
   =========================================================== */
body.pmNoAnim *,
body.pmNoAnim *::before,
body.pmNoAnim *::after{
  transition: none !important;
  animation: none !important;
}

/* coupe ton â€œsursautâ€ pendant lâ€™action */
body.pmNoAnim button:hover,
body.pmNoAnim .linkBtn:hover,
body.pmNoAnim .debugBtn:hover,
body.pmNoAnim .pmBtn:hover,
body.pmNoAnim .calMainTab:hover,
body.pmNoAnim .calSubTab:hover,
body.pmNoAnim .ecoCloseBtn:hover,
body.pmNoAnim .tileCloseBtn:hover,
body.pmNoAnim .tileFloatBtn:hover,
body.pmNoAnim .infoBtn:hover,
body.pmNoAnim .btnUT:hover,
body.pmNoAnim .btnLegend:hover,
body.pmNoAnim .btnDrawing:hover,
body.pmNoAnim .btnOrderBook:hover{
  transform: none !important;
  box-shadow: none !important;
}

/* Taskbar: conserve le rebond, sans ombre pour eviter l'effet de tremblement */
#iaTaskbar button{
  will-change: auto;
  transition: transform 120ms ease, box-shadow 120ms ease !important;
}
#iaTaskbar button:hover{
  transform: translateY(-1px) !important;
  box-shadow: 0 1px 6px rgba(0,0,0,0.14) !important;
}
#iaTaskbar button:active{
  transform: translateY(1px) !important;
  box-shadow: 0 0 0 rgba(0,0,0,0.0) !important;
}

/* ===========================================================
   Bouton maximize (charts) - icone SVG utilisateur
   =========================================================== */
.tile .tilebar{
  justify-content: flex-start !important;
}

.tile .tilebar .tileMaxBtn{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  margin-left: auto !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  color: inherit !important;
  line-height: 1 !important;
  align-self: center !important;
}

.tile .tilebar .tileMaxBtn > *{
  display: block !important;
}

.tile .tilebar .tileMaxBtn::before,
.tile .tilebar .tileMaxBtn::after{
  content: none !important;
  display: none !important;
}

.tile .tilebar .tileMaxBtn .window-maximize-icon,
.tile .tilebar .tileMaxBtn .window-maximize-icon *{
  width: 19px !important;
  height: 19px !important;
  fill: currentColor !important;
  stroke: none !important;
  opacity: 1 !important;
}

.tile .tilebar .tileMaxBtn .window-restore-icon,
.tile .tilebar .tileMaxBtn .window-restore-icon *{
  width: 19px !important;
  height: 19px !important;
  fill: currentColor !important;
  stroke: none !important;
  opacity: 1 !important;
}

.tile .tilebar .tileMaxBtn{
  color: inherit !important;
  opacity: 1 !important;
}

.tile .tilebar .tileMaxBtn .window-restore-icon{
  display: none !important;
}

.tile.pmTileMaxed .tilebar .tileMaxBtn .window-maximize-icon,
.tile .tilebar .tileMaxBtn.isMaxed .window-maximize-icon{
  display: none !important;
}

.tile.pmTileMaxed .tilebar .tileMaxBtn .window-restore-icon,
.tile .tilebar .tileMaxBtn.isMaxed .window-restore-icon{
  display: block !important;
}

.tile .tilebar .tileMaxBtn:hover{
  background: transparent !important;
  color: inherit !important;
}

/* Espace visuel 6px entre maximize et X */
.tile .tilebar .tileMaxBtn + .tileCloseBtn{
  margin-left: 6px !important;
}

