/* ═══════════════ PINE (v1.96) : l'éditeur de vos scripts Pine — la liste, le code, l'aperçu ═══════════════ */
.ht-pine { display: grid; grid-template-columns: 13.5rem minmax(0, 1.15fr) minmax(0, 1fr); gap: .9rem; height: max(36rem, calc(100vh - var(--ht-top-h) - 8.5rem)); }
.ht-pine > .card { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ── la liste : mes scripts, puis les exemples ── */
.pe-list { padding: .4rem; overflow-y: auto !important; scrollbar-width: thin; }
.pe-lh { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ht-gray-500); padding: .55rem .45rem .3rem; }
.pe-lh span { color: var(--ht-gray-600); margin-left: .15rem; }
/* v3.06 : les sections de la liste (Indicateurs, Stratégies, Bibliothèques) */
.pe-sec { font-size: .62rem; font-weight: 700; color: var(--ht-primary); padding: .5rem .45rem .2rem; border-bottom: 1px solid var(--ht-border-color); margin-bottom: .15rem; }
.pe-sec span { color: var(--ht-gray-600); font-weight: 500; margin-left: .15rem; }
.pe-items { display: flex; flex-direction: column; gap: 1px; }
.pe-items button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: .05rem; padding: .38rem .5rem; border-radius: .45rem; min-width: 0; }
.pe-items button b { font-size: .78rem; font-weight: 600; color: var(--ht-body-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-items button small { font-size: .64rem; color: var(--ht-gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-items button:hover { background: rgba(var(--ht-primary-rgb), .07); }
.pe-items button:focus-visible { outline: 2px solid var(--ht-primary); outline-offset: -2px; }
.pe-items button.on { background: rgba(var(--ht-primary-rgb), .12); }
.pe-items button.on b { color: var(--ht-primary); }
.pe-dot { font-style: normal; color: var(--ht-warning); }
.pe-on { color: var(--ht-success); }
.pe-lfoot { margin-top: auto; padding: .8rem .45rem .3rem; font-size: .7rem; }
.pe-list .hint { font-size: .7rem; color: var(--ht-gray-600); padding: .2rem .5rem; }

/* ── la barre du script et celle de l'aperçu ── */
.pe-bar, .pe-vbar { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-bottom: 1px solid var(--ht-border-color); flex-wrap: wrap; flex: none; }
.pe-bar #pe-name { flex: 1 1 8rem; min-width: 7rem; max-width: 17rem; font-weight: 600; }
.pe-state { font-size: .7rem; color: var(--ht-gray-600); white-space: nowrap; }
.pe-state.dirty { color: var(--ht-warning); font-weight: 600; }
.pe-note { flex: none; padding: .4rem .7rem; font-size: .72rem; color: var(--ht-body-color); background: rgba(var(--ht-warning-rgb), .1); border-bottom: 1px solid rgba(var(--ht-warning-rgb), .3); }
.pe-vbar #pe-coin { width: 6.2rem; font-family: var(--ht-font-monospace); }
.pe-vbar #pe-n { width: auto; padding-top: .12rem; padding-bottom: .12rem; font-size: .72rem; }
/* v2.89 : la source de l'aperçu (Hyperliquid, Coinbase, actions US) — compacte, comme le nombre de bougies */
.pe-vbar #pe-src { width: auto; max-width: 11rem; padding-top: .12rem; padding-bottom: .12rem; font-size: .72rem; text-overflow: ellipsis; }
.pe-vbar .ht-seg .btn { padding: .12rem .42rem; font-size: .72rem; }
.pe-vbar .ht-switch { white-space: nowrap; }
.pe-menu { position: fixed; z-index: 1050; }
.pe-menu kbd { margin-left: auto; padding: .08rem .3rem; border: 1px solid var(--ht-border-color); border-radius: .25rem; background: var(--ht-gray-100); color: var(--ht-gray-600); font-size: .6rem; font-weight: 500; line-height: 1.2; white-space: nowrap; box-shadow: none; }
.pe-menu button.danger { color: var(--ht-danger); }
.pe-menu button.danger:hover { background: rgba(var(--ht-danger-rgb), .1); color: var(--ht-danger); }
.pe-menu button.danger.armed { background: var(--ht-danger); color: #fff; font-weight: 700; white-space: normal; }
.pe-menu button.danger.armed:hover { background: color-mix(in srgb, var(--ht-danger) 85%, #000); color: #fff; }

/* ── le code : les couleurs (un <pre>) sous le texte tapé (un <textarea> transparent), les numéros de ligne à gauche ── */
.pe-ed { --pe-lh: 19px; position: relative; flex: 1; min-height: 12rem; display: flex; overflow: hidden; background: var(--ht-card-bg);
  font-family: var(--ht-font-monospace); font-size: 12.5px; line-height: var(--pe-lh); font-variant-ligatures: none; }
.pe-gut { flex: none; width: 3.2rem; overflow: hidden; border-right: 1px solid var(--ht-border-color); background: var(--ht-gray-100); user-select: none; }
.pe-gut pre { margin: 0; padding: 8px .6rem 8px 0; text-align: right; color: var(--ht-gray-500); font: inherit; line-height: inherit; overflow: visible; will-change: transform; }
.pe-gut b { color: var(--ht-danger); }
.pe-area { position: relative; flex: 1; min-width: 0; overflow: hidden; }
.pe-hlbox { position: absolute; left: 0; top: 0; min-width: 100%; pointer-events: none; will-change: transform; }
.pe-hl { margin: 0; padding: 8px 12px; font: inherit; line-height: inherit; white-space: pre; tab-size: 4; color: var(--ht-body-color); background: none; border: 0; overflow: visible; }
.pe-errl { position: absolute; left: 0; right: 0; height: var(--pe-lh); background: rgba(var(--ht-danger-rgb), .13); border-left: 3px solid var(--ht-danger); }
.pe-errl.warn { background: rgba(var(--ht-warning-rgb), .14); border-left-color: var(--ht-warning); }
.pe-area textarea { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 8px 12px; border: 0; outline: 0; resize: none; box-shadow: none;
  background: transparent; color: transparent; caret-color: var(--ht-body-color); font: inherit; line-height: inherit; white-space: pre; tab-size: 4; overflow: auto;
  font-variant-ligatures: none; scrollbar-width: thin; }
.pe-area textarea::selection { background: rgba(var(--ht-primary-rgb), .28); color: transparent; }
.pe-hl .kw { color: #c2185b; font-weight: 600; }       /* if, for, var… */
.pe-hl .ty { color: #00838f; }                         /* int, float, color… */
.pe-hl .fn { color: #1565c0; }                         /* un appel : ta.ema(…) */
.pe-hl .ns { color: #6a3fb5; }                         /* color.red, barstate.islast… */
.pe-hl .bv { color: #a15c00; }                         /* close, high, bar_index… */
.pe-hl .st { color: #2e7d32; }
.pe-hl .nu, .pe-hl .cn { color: #d84315; }
.pe-hl .cn { font-weight: 600; }
.pe-hl .cm { color: var(--ht-gray-500); font-style: italic; }
.pe-hl .an { color: var(--ht-gray-600); font-weight: 700; }
.pe-hl .op { color: var(--ht-gray-700); }
.pe-hl .co { border-bottom: 3px solid transparent; }   /* #ff9800 : soulignée de sa couleur */
[data-bs-theme=dark] .pe-hl .kw { color: #ff79b0; }
[data-bs-theme=dark] .pe-hl .ty { color: #4dd0e1; }
[data-bs-theme=dark] .pe-hl .fn { color: #82b1ff; }
[data-bs-theme=dark] .pe-hl .ns { color: #c3a6ff; }
[data-bs-theme=dark] .pe-hl .bv { color: #ffcc80; }
[data-bs-theme=dark] .pe-hl .st { color: #a5d6a7; }
[data-bs-theme=dark] .pe-hl .nu, [data-bs-theme=dark] .pe-hl .cn { color: #ffab91; }

/* ── ce que dit le moteur : l'erreur (un clic : sa ligne), les avertissements, le résumé ── */
.pe-con { flex: none; max-height: 9rem; overflow-y: auto; border-top: 1px solid var(--ht-border-color); padding: .35rem .45rem; display: flex; flex-direction: column; gap: .1rem;
  font-size: .74rem; scrollbar-width: thin; }
.pe-msg { all: unset; box-sizing: border-box; display: block; padding: .15rem .35rem; border-radius: .3rem; color: var(--ht-gray-700); line-height: 1.4; }
button.pe-msg { cursor: pointer; }
button.pe-msg:hover { background: rgba(var(--ht-danger-rgb), .08); }
.pe-msg.err { color: var(--ht-danger); }
.pe-msg.ok { color: var(--ht-success); }
.pe-msg.warn { color: var(--ht-warning); }
.pe-msg small { color: var(--ht-gray-600); }

/* ── l'aperçu : le graphique, puis les réglages du script (les styles du panneau des indicateurs) ── */
.pe-chart { flex: 1; min-height: 14rem; position: relative; }
.pe-ins.ht-cpanel { position: static; z-index: auto; width: auto; max-height: 46%; flex: none; box-shadow: none; border: 0; border-top: 1px solid var(--ht-border-color); border-radius: 0;
  animation: none; background: transparent; }
.pe-ins:empty { display: none; }
.pe-insh { display: flex; align-items: baseline; gap: 0 .5rem; padding: .45rem .7rem .1rem; font-size: .74rem; flex-wrap: wrap; }
.pe-insh .btn-link { font-size: .7rem; text-decoration: none; }
.pe-insh small { flex-basis: 100%; font-size: .64rem; color: var(--ht-gray-600); }
.pe-ins .pb.ind { min-height: 0; }
.pe-ins .sec > .sb { max-width: 30rem; }

/* ═══════════════ LA DOCUMENTATION PINE (v2.05) : le guide et la référence ═══════════════ */
.ht-pdoc { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: .9rem; align-items: start; }
.pd-nav { position: sticky; top: calc(var(--ht-top-h) + .8rem); max-height: calc(100vh - var(--ht-top-h) - 2rem); display: flex; flex-direction: column; padding: .55rem; overflow: hidden; }
.pd-nav #pd-q { flex: none; margin-bottom: .35rem; }
.pd-tree { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.pd-h { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ht-gray-500); padding: .6rem .4rem .25rem; }
.pd-h span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ht-gray-600); margin-left: .2rem; }
.pd-tree a { display: flex; align-items: center; gap: .4rem; padding: .2rem .45rem; border-radius: .35rem; font-size: .76rem; color: var(--ht-gray-600); text-decoration: none; min-width: 0; }
.pd-tree a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-tree a.w { color: var(--ht-body-color); font-weight: 600; }
.pd-tree a:hover { background: rgba(var(--ht-primary-rgb), .07); color: var(--ht-primary); }
.pd-tree a.on { background: rgba(var(--ht-primary-rgb), .13); color: var(--ht-primary); }
.pd-tree .k { flex: none; width: 1.05rem; text-align: center; font-size: 9.5px; font-style: normal; font-weight: 700; line-height: 1.55; border-radius: .2rem; color: #fff; background: var(--ht-gray-500); }
.pd-tree .k-f { background: #1565c0; }
.pd-tree .k-v { background: #a15c00; }
.pd-tree .k-c { background: #6a3fb5; }
.pd-tree .k-k { background: #2e7d32; }
.pd-tree a:not(.w) .k { opacity: .5; }
.pd-g summary { cursor: pointer; display: flex; align-items: baseline; gap: .35rem; padding: .3rem .4rem; border-radius: .35rem; font-size: .76rem; list-style: none; min-width: 0; }
.pd-g summary::-webkit-details-marker { display: none; }
.pd-g summary::before { content: '▸'; font-size: .65rem; color: var(--ht-gray-500); transition: transform .12s; }
.pd-g[open] > summary::before { transform: rotate(90deg); }
.pd-g summary b { font-family: var(--ht-font-monospace); font-size: .74rem; }
.pd-g summary b.pd-gt { font-family: inherit; font-size: .76rem; }
.pd-g summary em { font-style: normal; color: var(--ht-gray-600); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-g summary span { margin-left: auto; font-size: .64rem; color: var(--ht-gray-500); }
.pd-g summary:hover { background: rgba(var(--ht-primary-rgb), .05); }
.pd-g > a { margin-left: .75rem; }
.pd-f1 { flex: none; font-size: .66rem; color: var(--ht-gray-600); padding: .5rem .4rem 0; border-top: 1px solid var(--ht-border-color); margin-top: .35rem; }
.pd-main { padding: 1.2rem 1.5rem 1.6rem; min-height: 30rem; font-size: .86rem; line-height: 1.6; }
.pd-top { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .7rem; }
.pd-title { font-size: 1.35rem; margin: 0; }
.pd-title.mono { font-family: var(--ht-font-monospace); font-size: 1.25rem; }
.pd-kind { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ht-primary); background: rgba(var(--ht-primary-rgb), .1); padding: .12rem .45rem; border-radius: .3rem; }
.pd-sig { font-family: var(--ht-font-monospace); font-size: .8rem; white-space: pre-wrap; background: var(--ht-gray-100); border: 1px solid var(--ht-border-color);
  border-radius: .4rem; padding: .55rem .75rem; margin: 0 0 .9rem; }
.pd-main h4 { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ht-gray-600); margin: 1.25rem 0 .45rem; }
.pd-main code { font-size: .82em; }
.pd-params { margin-bottom: .4rem; }
.pd-params th { white-space: nowrap; width: 1%; vertical-align: top; }
.pd-params td { vertical-align: top; }
.pd-type { white-space: nowrap; width: 1%; font-family: var(--ht-font-monospace); font-size: .72rem; color: var(--ht-gray-600); }
.pd-consts { width: auto; min-width: 22rem; }
.pd-consts td { padding-left: 2rem; }
.pd-ex { border: 1px solid var(--ht-border-color); border-radius: .5rem; overflow: hidden; margin: .6rem 0 1rem; }
.pd-code.pe-hl { margin: 0; padding: .7rem .9rem; font-family: var(--ht-font-monospace); font-size: 12.5px; line-height: 1.55; background: var(--ht-card-bg); overflow-x: auto;
  border-bottom: 1px solid var(--ht-border-color); scrollbar-width: thin; }
.pd-exb { display: flex; gap: .4rem; padding: .45rem .6rem; background: var(--ht-gray-100); }
.pd-todo { padding: .6rem .8rem; border-radius: .4rem; background: rgba(var(--ht-warning-rgb), .1); border: 1px solid rgba(var(--ht-warning-rgb), .3); font-size: .8rem; margin: .4rem 0 .8rem; }
.pd-see a { display: inline-block; margin: 0 .35rem .35rem 0; padding: .12rem .5rem; border-radius: .3rem; background: rgba(var(--ht-primary-rgb), .08); font-size: .76rem; text-decoration: none; }
.pd-dl dt { margin-top: .6rem; }
.pd-dl dd { margin: .15rem 0 0 1rem; color: var(--ht-gray-700); }
.pd-next { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; padding-top: .8rem; border-top: 1px solid var(--ht-border-color); font-size: .8rem; }
.pd-sw { display: inline-block; width: .9rem; height: .9rem; border-radius: .2rem; vertical-align: middle; margin-right: .4rem; border: 1px solid var(--ht-border-color); }
@media (max-width: 991.98px) {
  .ht-pdoc { grid-template-columns: minmax(0, 1fr); }
  .pd-nav { position: static; max-height: 22rem; }
  .pd-main { padding: 1rem; }
}

/* ── la disposition (v2.02) : la liste et l'aperçu masquables, la poignée entre le code et l'aperçu, le plein écran ── */
.pe-lay { display: inline-flex; gap: .2rem; }
.pe-lay .btn { padding: .2rem .38rem; line-height: 1; display: inline-flex; align-items: center; }
.pe-lay .btn.active { color: var(--ht-primary); border-color: rgba(var(--ht-primary-rgb), .45); background: rgba(var(--ht-primary-rgb), .1); }
.pe-split, .pe-lsplit { display: none; }
.ht-pine.no-view .pe-view, .ht-pine.no-view .pe-split { display: none; }
/* la liste pliée : une bande (un clic la déplie) ; dépliée, « « » (en tête) la plie */
.pe-lh .pe-foldb { all: unset; float: right; cursor: pointer; padding: 0 .3rem; margin-top: -.15rem; font-size: .85rem; line-height: 1; color: var(--ht-gray-500); border-radius: .3rem; }
.pe-lh .pe-foldb:hover, .pe-lh .pe-foldb:focus-visible { color: var(--ht-primary); background: rgba(var(--ht-primary-rgb), .08); }
.pe-strip { display: none; }
.ht-pine.no-list .pe-list { padding: 0; }
.ht-pine.no-list .pe-list > :not(.pe-strip) { display: none; }
.ht-pine.no-list .pe-strip { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .7rem; width: 100%;
  min-height: 100%; padding: .7rem 0; color: var(--ht-gray-600); }
.pe-strip span { font-size: .95rem; line-height: 1; }
.pe-strip b { writing-mode: vertical-rl; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ht-pine.no-list .pe-strip:hover, .ht-pine.no-list .pe-strip:focus-visible { color: var(--ht-primary); background: rgba(var(--ht-primary-rgb), .06); }
.ht-pine.full { position: fixed; inset: 0; z-index: 1045; height: 100vh; height: 100dvh; margin: 0; padding: .6rem; background: var(--ht-body-bg); overflow: auto; }
body.pe-fullbody { overflow: hidden; }
.pe-fs { display: flex; align-items: center; gap: .3rem; padding: .3rem .6rem; font-size: .76rem; border-top: 1px solid var(--ht-border-color); border-bottom: 1px solid var(--ht-border-color); margin: .2rem 0; }
.pe-fs span { margin-right: auto; color: var(--ht-gray-700); }
.pe-menu .pe-fs button { width: auto; padding: .1rem .4rem; border-radius: .3rem; font-weight: 700; }
.pe-fs b { min-width: 2rem; text-align: center; font-weight: 600; }
@media (min-width: 1200px) {
  .ht-pine { column-gap: 0; grid-template-columns: var(--pe-lw, 13.5rem) .9rem minmax(0, var(--pe-a, 1.15fr)) .9rem minmax(0, var(--pe-b, 1fr)); }
  .pe-list { grid-column: 1; grid-row: 1; }
  .pe-lsplit { grid-column: 2; grid-row: 1; }
  .pe-main { grid-column: 3; grid-row: 1; }
  .pe-split { grid-column: 4; grid-row: 1; }
  .pe-view { grid-column: 5; grid-row: 1; }
  .pe-split, .pe-lsplit { display: block; position: relative; cursor: col-resize; touch-action: none; }
  .pe-split::after, .pe-lsplit::after { content: ''; position: absolute; top: 50%; left: 50%; width: 4px; height: 2.6rem; margin: -1.3rem 0 0 -2px; border-radius: 2px;
    background: var(--ht-gray-400); opacity: .5; transition: opacity .15s, background-color .15s; }
  .pe-split:hover::after, .pe-split:focus-visible::after, .pe-lsplit:hover::after, .pe-lsplit:focus-visible::after,
  .ht-pine.dragging .pe-split::after, .ht-pine.dragging .pe-lsplit::after { opacity: 1; background: var(--ht-primary); }
  .pe-split:focus-visible, .pe-lsplit:focus-visible { outline: none; }
  .ht-pine.no-list { --pe-lw: 2.4rem; }
  .ht-pine.no-view { grid-template-columns: var(--pe-lw, 13.5rem) .9rem minmax(0, 1fr) 0 0; }
  .ht-pine.dragging { cursor: col-resize; user-select: none; }
  .ht-pine.dragging .pe-chart, .ht-pine.dragging textarea { pointer-events: none; }
  .ht-pine.full { height: 100vh; height: 100dvh; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .ht-pine { --pe-lw: 12rem; }
}
@media (max-width: 1199.98px) {
  .ht-pine { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; height: auto; }
  .pe-list { grid-column: 1 / -1; max-height: 12rem; }
  .pe-main, .pe-view { height: 72vh; min-height: 30rem; }
  .ht-pine.no-view { grid-template-columns: minmax(0, 1fr); }
  .ht-pine.full .pe-main, .ht-pine.full .pe-view { height: calc(100dvh - 1.2rem); }
  .ht-pine.no-list .pe-strip { flex-direction: row; justify-content: flex-start; min-height: 0; padding: .45rem .8rem; }
  .ht-pine.no-list .pe-strip b { writing-mode: horizontal-tb; }
}
@media (max-width: 767.98px) {
  .ht-pine { grid-template-columns: minmax(0, 1fr); }
  .pe-main { height: 70vh; }
  .pe-view { height: 75vh; }
  .pe-bar #pe-name { width: 100%; max-width: none; }
}

/* ═══════════════ v1.97 : les STRATÉGIES — l'essentiel (panneau ⚙, page Pine) et le rapport complet ═══════════════ */
.ht-pkpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; margin-bottom: .5rem; }
.ht-pkpis .pk { display: flex; flex-direction: column; gap: .05rem; padding: .3rem .45rem; border: 1px solid var(--ht-border-color); border-radius: .45rem; min-width: 0; }
.ht-pkpis .pk span { font-size: .56rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ht-gray-500); line-height: 1.2; }
.ht-prep-btn { align-self: flex-start; }
.ht-pkpis .pk b { font-family: var(--ht-font-monospace); font-size: .78rem; color: var(--ht-body-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-pkpis .pk b.pos { color: var(--ht-success); }
.ht-pkpis .pk b.neg { color: var(--ht-danger); }
.ht-pkpis .pk small { font-size: .6rem; color: var(--ht-gray-600); white-space: nowrap; }
.ht-pflag { font-size: .6rem; font-weight: 700; text-transform: uppercase; padding: .05rem .35rem; border-radius: .3rem; }
.ht-ptrades .ht-flag.pos { background: rgba(var(--ht-success-rgb), .14); color: var(--ht-success); margin-left: 0; }
.ht-ptrades .ht-flag.neg { background: rgba(var(--ht-danger-rgb), .12); color: var(--ht-danger); margin-left: 0; }
/* le rapport complet (une fenêtre) */
.ht-preport .ht-pkpis { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; }
.ht-preport .ht-pkpis .pk { padding: .45rem .6rem; }
.ht-preport .ht-pkpis .pk b { font-size: .95rem; }
.ht-pcurve { margin: .7rem 0 .4rem; position: relative; }
.ht-pcsv { display: flex; justify-content: flex-end; margin: -.1rem 0 .4rem; }
.ht-pcurve .lg { display: flex; gap: .4rem 1rem; font-size: .7rem; color: var(--ht-gray-600); margin-bottom: .25rem; flex-wrap: wrap; }
.ht-pcurve .lg i { display: inline-block; width: .9rem; height: .2rem; margin-right: .3rem; vertical-align: middle; border-radius: 1px; }
.ht-pcurve .lg i.eq { background: var(--ht-primary); }
.ht-pcurve .lg i.bh { background: var(--ht-gray-500); }
.ht-pcurve .lg i.dd { background: var(--ht-danger); }
.ht-pcurve svg { display: block; width: 100%; }
.ht-pcurve svg.eqc { height: 13rem; }
.ht-pcurve svg.ddc { height: 3.6rem; margin-top: .25rem; }
.ht-pcurve path.eq { fill: none; stroke: var(--ht-primary); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.ht-pcurve path.bh { fill: none; stroke: var(--ht-gray-500); stroke-width: 1.2; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.ht-pcurve path.fillc.up { fill: rgba(var(--ht-success-rgb), .1); }
.ht-pcurve path.fillc.down { fill: rgba(var(--ht-danger-rgb), .1); }
.ht-pcurve line.cap { stroke: var(--ht-border-color); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ht-pcurve path.dd { fill: rgba(var(--ht-danger-rgb), .35); stroke: none; }
.ht-pcurve .ax { position: absolute; right: .3rem; top: 1.45rem; height: 13rem; display: flex; flex-direction: column; justify-content: space-between; font-size: .62rem;
  color: var(--ht-gray-500); pointer-events: none; text-align: right; font-family: var(--ht-font-monospace); }
.ht-pextra { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; font-size: .76rem; color: var(--ht-gray-700); margin: .7rem 0 .2rem; }
.ht-pextra b { font-family: var(--ht-font-monospace); color: var(--ht-body-color); }
.ht-pextra b.pos { color: var(--ht-success); }
.ht-pextra b.neg { color: var(--ht-danger); }
.ht-pextra small { color: var(--ht-gray-600); }
.ht-psub { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ht-gray-500); margin: 1.1rem 0 .45rem; display: flex; align-items: center; }
.ht-pperf { font-size: .78rem; }
.ht-pperf tbody th { color: var(--ht-gray-700); font-weight: 500; font-size: .76rem; white-space: nowrap; }
.ht-pperf td { font-family: var(--ht-font-monospace); text-align: right; }
.ht-pperf thead th { text-align: right; }
.ht-pperf thead th:first-child { text-align: left; }
.ht-pperf td small, .ht-ptrades td small { display: block; font-size: .66rem; color: var(--ht-gray-600); font-family: var(--ht-font-sans-serif, inherit); }
.ht-pperf td.pos { color: var(--ht-success); }
.ht-pperf td.neg { color: var(--ht-danger); }
.ht-ptrades { max-height: 26rem; overflow: auto; scrollbar-width: thin; }
.ht-ptrades table { font-size: .74rem; }
.ht-ptrades td b { font-weight: 600; }
.ht-ptrades td.num { font-family: var(--ht-font-monospace); }
.ht-ptrades td.pos { color: var(--ht-success); }
.ht-ptrades td.neg { color: var(--ht-danger); }
.ht-ptrades tr.open td { background: rgba(var(--ht-primary-rgb), .05); }
.ht-pprops { font-size: .72rem; color: var(--ht-gray-600); margin-top: .9rem; line-height: 1.6; display: flex; flex-wrap: wrap; gap: .1rem 1rem; }
.ht-pprops b { color: var(--ht-body-color); font-weight: 600; }
@media (max-width: 991.98px) { .ht-preport .ht-pkpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* v2.92 : le rapport — ses six cases montrent leur valeur entière (un très grand montant s'abrège, exact au survol), leurs noms lisibles */
.ht-preport .ht-pkpis .pk b { overflow: visible; text-overflow: clip; font-variant-numeric: tabular-nums; }
.ht-preport .ht-pkpis .pk span { color: var(--ht-gray-600); white-space: nowrap; }

/* ═══════════════ v2.92 : les RÉSULTATS d'une stratégie dans le panneau de ses réglages (page Pine, graphique de Trading) ═══════════════
   une carte : le profit net en grand (et son %), les trades fermés, la courbe d'equity ; puis quatre chiffres sur deux colonnes, des
   cases de même hauteur ; aucune valeur coupée (un montant d'un million et plus s'abrège, exact au survol) ; « Rapport complet… » en pied */
.ht-pres { --pr-bg: color-mix(in srgb, var(--ht-primary) 4%, var(--ht-card-bg)); container-type: inline-size; border: 1px solid var(--ht-border-color);
  border-radius: .6rem; background: var(--pr-bg); overflow: hidden; }
.ht-pres .pr-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .4rem .75rem; padding: .6rem .75rem .15rem; }
.ht-pres .pr-net { min-width: 0; }
.ht-pres .pr-l, .ht-pres .pr-n > span, .ht-pres .pr-k > span { display: block; font-size: .6rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ht-gray-600); white-space: nowrap; line-height: 1.4; }
.ht-pres b { font-family: var(--ht-font-monospace); font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ht-heading-color); white-space: nowrap; }
.ht-pres b.pos { color: var(--ht-success); }
.ht-pres b.neg { color: var(--ht-danger); }
.ht-pres .pr-v { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem .5rem; margin-top: .1rem; }
.ht-pres .pr-v b { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.01em; }
.ht-pres .pr-pc { font-family: var(--ht-font-monospace); font-variant-numeric: tabular-nums; font-size: .7rem; font-weight: 700; white-space: nowrap;
  padding: .1rem .45rem; border-radius: 1rem; color: var(--ht-gray-700); background: rgba(var(--ht-gray-500-rgb), .16); }
.ht-pres .pr-pc.pos { color: var(--ht-success); background: rgba(var(--ht-success-rgb), .14); }
.ht-pres .pr-pc.neg { color: var(--ht-danger); background: rgba(var(--ht-danger-rgb), .13); }
.ht-pres .pr-n { flex: none; text-align: right; }
.ht-pres .pr-n b { display: block; font-size: 1.05rem; line-height: 1.45; }
.ht-pres .pr-n small { display: block; font-size: .66rem; color: var(--ht-gray-600); white-space: nowrap; }
/* la courbe d'equity : verte si la stratégie finit au-dessus de son capital, rouge sinon ; le capital en tirets */
.ht-pres .pr-spark { display: block; width: 100%; height: 2.4rem; margin: .1rem 0 .25rem; }
.ht-pres .pr-spark .l { fill: none; stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ht-pres .pr-spark .b { stroke: var(--ht-gray-600); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: .55; }
.ht-pres .pr-spark.up .l { stroke: var(--ht-success); }
.ht-pres .pr-spark.up .a { fill: rgba(var(--ht-success-rgb), .1); }
.ht-pres .pr-spark.down .l { stroke: var(--ht-danger); }
.ht-pres .pr-spark.down .a { fill: rgba(var(--ht-danger-rgb), .09); }
/* les quatre chiffres : des cases séparées d'un trait, toutes de la même hauteur — deux colonnes, quatre si la carte est large */
.ht-pres .pr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 1px; background: var(--ht-border-color);
  border-top: 1px solid var(--ht-border-color); }
.ht-pres .pr-k { display: flex; flex-direction: column; gap: .1rem; min-width: 0; padding: .5rem .75rem .55rem; background: var(--pr-bg); }
.ht-pres .pr-k b { font-size: .95rem; line-height: 1.3; }
.ht-pres .pr-k small { font-family: var(--ht-font-monospace); font-variant-numeric: tabular-nums; font-size: .68rem; color: var(--ht-gray-600); white-space: nowrap; }
.ht-pres .pr-kv { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.ht-pres .pr-bar { flex: 1; display: flex; min-width: 1.5rem; max-width: 6rem; height: .32rem; border-radius: 1rem; overflow: hidden; background: rgba(var(--ht-gray-500-rgb), .25); }
.ht-pres .pr-bar i { display: block; height: 100%; }
.ht-pres .pr-bar .w { background: var(--ht-success); }
.ht-pres .pr-bar .x { background: var(--ht-danger); }
@container (min-width: 30rem) {
  .ht-pres .pr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ht-pres .pr-k { padding-inline: .65rem; }
  .ht-pres .pr-k b { font-size: .9rem; }
}
/* « Rapport complet… » : le pied de la carte (le bouton qui la suit, dans le panneau des réglages) */
.ht-pres:has(+ .ht-prep-btn) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.pb.ind .ht-pres + .btn.ht-prep-btn { align-self: stretch; display: flex; align-items: center; justify-content: center; gap: .45rem; width: 100%; margin: -.45rem 0 0;
  padding: .45rem .75rem; border: 1px solid var(--ht-border-color); border-top-color: transparent; border-radius: 0 0 .6rem .6rem; font-size: .76rem; font-weight: 600;
  color: var(--ht-primary); background: rgba(var(--ht-primary-rgb), .09); box-shadow: none; }
.pb.ind .ht-pres + .btn.ht-prep-btn:hover, .pb.ind .ht-pres + .btn.ht-prep-btn:focus-visible { color: var(--ht-primary); background: rgba(var(--ht-primary-rgb), .17);
  border-color: var(--ht-border-color); border-top-color: transparent; box-shadow: none; }
.pb.ind .ht-pres + .btn.ht-prep-btn:focus-visible { outline: 2px solid rgba(var(--ht-primary-rgb), .45); outline-offset: -2px; }
.pb.ind .ht-pres + .btn.ht-prep-btn::before { content: ''; flex: none; width: .95rem; height: .95rem; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 2v12h12'/%3E%3Cpath d='M4.5 10.5l3-3.5 2.2 2.2L14 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 2v12h12'/%3E%3Cpath d='M4.5 10.5l3-3.5 2.2 2.2L14 4.5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ── v2.92 : les réglages d'un script Pine (.ht-pset : page Pine, panneau ⚙ du graphique) — une typographie pour tous les noms, des
   titres de section lisibles, les propriétés en colonnes alignées (la valeur, puis son unité ou son genre) ── */
.ht-pset .sec > .sh { font-size: .63rem; letter-spacing: .07em; color: var(--ht-gray-600); padding: .7rem 0 .5rem; }
.ht-pset .sec > .sh:hover, .ht-pset .sec > .sh:focus-visible { color: var(--ht-primary); }
.ht-pset .sec > .sb { gap: .5rem; padding-bottom: .8rem; }
.ht-pset .fr, .ht-pset .cmb > .nm, .ht-pset .ht-switch, .ht-pset .clr { font-size: .75rem; font-weight: 500; color: var(--ht-gray-800); }
.ht-pset .cmb .il { font-size: .66rem; }
/* Les libellés et leur champ restent ensemble quand une ligne inline doit revenir à la ligne. */
.ht-pset .cmb { flex-wrap: wrap; align-items: flex-start; }
.ht-pset .cmb > .nm { flex: 0 1 auto; white-space: normal; overflow: visible; padding-top: .25rem; }
.ht-pset .cmb .cmb-r { flex: 1 1 12rem; min-width: 0; max-width: 100%; gap: .35rem .65rem; }
.ht-pset .ht-pine-field { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; max-width: 100%; margin: 0; font-weight: 400; }
.ht-pset .ht-pine-field .il { white-space: normal; }

.ht-pset .pr-ctl { display: inline-flex; align-items: center; gap: .4rem; flex: none; }
.ht-pset .pr-ctl input[type="number"], .ht-pset .cmb-r input[data-prop] { width: 5rem; }
.ht-pset .pu, .ht-pset .cmb-r select[data-prop] { width: 6.6rem; max-width: none; min-width: 0; }
.ht-pset .pu { font-style: normal; font-size: .7rem; color: var(--ht-gray-600); white-space: nowrap; }
.ht-pset .ht-pouts .ht-pout { font-size: .74rem; }
/* la page Pine : le panneau prend la largeur de l'aperçu (le panneau du graphique, 20,5 rem, laissait un vide à droite) */
.pe-ins.ht-cpanel:has(> .pb.ind) { width: auto; }
.pe-ins .sec > .sb { max-width: 32rem; }

/* ═══════════════ v1.98 : les ALERTES Pine — leur liste (panneau ⚙, page Pine) et la création ═══════════════ */
.pal { display: flex; align-items: center; gap: .45rem; padding: .3rem 0; border-bottom: 1px dashed var(--ht-border-color); }
.pal .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .05rem; }
.pal .t b { font-size: .74rem; font-weight: 600; color: var(--ht-body-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal .t small { font-size: .64rem; color: var(--ht-gray-600); }
.pal.off .t { opacity: .55; }
.pal .x { flex: none; white-space: nowrap; }
.pa-form { display: flex; flex-direction: column; gap: .45rem; padding: .5rem; border: 1px solid var(--ht-border-color); border-radius: .5rem; background: rgba(var(--ht-primary-rgb), .03); }
.pa-form select { max-width: 12rem; }
.pe-items button.pe-off b { opacity: .55; }
.pe-log { font-size: .64rem; color: var(--ht-gray-600); padding: .3rem .5rem; display: flex; flex-direction: column; gap: .2rem; line-height: 1.35; }
.pe-log span:first-child { color: var(--ht-gray-500); white-space: nowrap; }

/* ═══════════════ v1.99 : l'aide à l'écriture — les complétions (Ctrl+Espace) et la signature d'une fonction ; le journal log.* ═══════════════ */
.pe-ac { position: absolute; z-index: 6; min-width: 15rem; max-width: 28rem; max-height: 15rem; overflow-y: auto; scrollbar-width: thin; padding: .2rem;
  background: var(--ht-card-bg); border: 1px solid var(--ht-border-color); border-radius: .45rem; box-shadow: 0 .5rem 1.4rem rgba(0, 0, 0, .28);
  font-family: var(--ht-font-monospace); font-size: 12px; }
.pe-ac .it { display: flex; align-items: center; gap: .45rem; padding: .16rem .4rem; border-radius: .3rem; cursor: pointer; white-space: nowrap; }
.pe-ac .it.on, .pe-ac .it:hover { background: rgba(var(--ht-primary-rgb), .16); }
.pe-ac .it b { font-weight: 500; color: var(--ht-body-color); }
.pe-ac .it small { color: var(--ht-gray-500); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pe-ac .k { flex: none; width: 1.15rem; text-align: center; font-size: 10px; font-weight: 700; line-height: 1.5; border-radius: .2rem; color: #fff; background: var(--ht-gray-500); }
.pe-ac .k-f { background: #1565c0; }
.pe-ac .k-v { background: #a15c00; }
.pe-ac .k-c { background: #d84315; }
.pe-ac .k-k { background: #c2185b; }
.pe-ac .k-n { background: #6a3fb5; }
.pe-ac .k-t { background: #00838f; }
.pe-ac .k-u { background: #2e7d32; }
.pe-sig { position: absolute; z-index: 6; max-width: 90%; padding: .2rem .5rem; background: var(--ht-card-bg); border: 1px solid var(--ht-border-color); border-radius: .35rem;
  box-shadow: 0 .3rem .9rem rgba(0, 0, 0, .22); font-family: var(--ht-font-monospace); font-size: 11.5px; color: var(--ht-gray-700); pointer-events: none; }
.pe-sig b { color: var(--ht-body-color); }
.pe-sig u { text-decoration: none; color: var(--ht-primary); font-weight: 700; }
/* ── chercher / remplacer (v2.06) ── */
.pe-find { position: absolute; top: 6px; right: 14px; z-index: 7; display: flex; flex-direction: column; gap: .25rem; padding: .3rem .35rem; background: var(--ht-card-bg);
  border: 1px solid var(--ht-border-color); border-radius: .45rem; box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .22); font-family: var(--ht-body-font-family, sans-serif); font-size: .74rem; }
.pe-find .r { display: flex; align-items: center; gap: .2rem; }
.pe-find input { width: 13rem; padding: .15rem .4rem; font: 12px var(--ht-font-monospace); color: var(--ht-body-color); background: var(--ht-input-bg, transparent);
  border: 1px solid var(--ht-border-color); border-radius: .3rem; outline: 0; }
.pe-find input:focus { border-color: var(--ht-primary); }
.pe-find .n { min-width: 3.6rem; text-align: center; color: var(--ht-gray-600); font-size: .68rem; white-space: nowrap; }
.pe-find button { all: unset; box-sizing: border-box; cursor: pointer; min-width: 1.5rem; padding: .1rem .35rem; text-align: center; border-radius: .3rem; color: var(--ht-gray-700); }
.pe-find button:hover, .pe-find button:focus-visible { background: rgba(var(--ht-primary-rgb), .1); color: var(--ht-primary); }
.pe-find button.on { background: rgba(var(--ht-primary-rgb), .16); color: var(--ht-primary); font-weight: 700; }
.pe-find #pe-frow button { border: 1px solid var(--ht-border-color); }
.pe-fm i { position: absolute; border-radius: 2px; background: rgba(var(--ht-warning-rgb), .28); }
/* v2.79 : les autres endroits du nom sous le curseur — une teinte légère, sous la recherche (qui reste au-dessus) */
.pe-occ i { background: rgba(var(--ht-primary-rgb), .18); box-shadow: inset 0 -1px 0 rgba(var(--ht-primary-rgb), .55); }
.pe-fm i.on { background: rgba(var(--ht-warning-rgb), .6); box-shadow: 0 0 0 1px var(--ht-warning); }
/* la documentation dans les complétions et la signature */
.pe-ac .ft { display: flex; flex-direction: column; gap: .1rem; margin: .2rem -.2rem -.2rem; padding: .35rem .55rem; border-top: 1px solid var(--ht-border-color);
  background: var(--ht-gray-100); font-size: .7rem; color: var(--ht-gray-700); white-space: normal; }
.pe-ac .ft code { font-size: .68rem; color: var(--ht-body-color); }
.pe-ac .ft span { font-family: var(--ht-body-font-family, sans-serif); font-size: .72rem; line-height: 1.35; }
.pe-ac .ft em { font-style: normal; font-size: .62rem; color: var(--ht-gray-500); }
.pe-sig small { display: block; max-width: 34rem; font-family: var(--ht-body-font-family, sans-serif); font-size: .7rem; color: var(--ht-gray-600); white-space: normal; margin-top: .1rem; }
.pe-sig small i { font-style: normal; font-family: var(--ht-font-monospace); color: var(--ht-primary); }
/* l'aide au survol (v2.68) : la signature, puis la première phrase de la fiche */
.pe-hov code { display: block; max-width: 40rem; color: var(--ht-body-color); font-size: 11.5px; white-space: pre-wrap; }
.pe-logh { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ht-gray-500); margin: .35rem .35rem .1rem; }
.pe-msg.l-warning { color: var(--ht-warning); }
.pe-msg.l-error { color: var(--ht-danger); }
.pe-msg .lt { color: var(--ht-gray-500); font-family: var(--ht-font-monospace); font-size: .68rem; }

/* v2.38 : la liste des scripts — recherche, onglets (Mes scripts, Partagés, Exemples), genre et tri */
.pe-q { margin: 0 .3rem .4rem; width: calc(100% - .6rem); font-size: .74rem; }
.pe-tabs { display: flex; gap: 2px; margin: 0 .3rem .35rem; padding: 2px; border-radius: .5rem; background: rgba(var(--ht-primary-rgb), .06); }
.pe-tabs button { all: unset; box-sizing: border-box; flex: 1; text-align: center; cursor: pointer; font-size: .68rem; font-weight: 600; padding: .28rem .2rem; border-radius: .4rem; color: var(--ht-gray-600); white-space: nowrap; }
.pe-tabs button span { font-weight: 500; color: var(--ht-gray-500); }
.pe-tabs button:hover { color: var(--ht-primary); }
.pe-tabs button:focus-visible { outline: 2px solid var(--ht-primary); outline-offset: -2px; }
.pe-tabs button.on { background: var(--ht-card-bg); color: var(--ht-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.pe-filt { display: flex; gap: .3rem; margin: 0 .3rem .35rem; }
.pe-filt select { flex: 1; min-width: 0; font-size: .68rem; padding-top: .15rem; padding-bottom: .15rem; }
.pe-sh { color: var(--ht-info); }
/* v2.44 : un brouillon enregistré automatiquement (pas encore « Enregistrer ») */
.pe-auto { font-size: .56rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .02rem .38rem; border-radius: 1rem;
  background: rgba(var(--ht-warning-rgb), .14); color: var(--ht-warning); }
.pe-bar .pe-shared { color: var(--ht-info); border-color: rgba(var(--ht-info-rgb), .45); }
/* la fiche d'un script partagé : au-dessus de son code (ouvert, en lecture), à sa place (fermé) */
.pe-card { flex: none; padding: .55rem .75rem; border-bottom: 1px solid var(--ht-border-color); font-size: .74rem; display: flex; flex-direction: column; gap: .35rem; }
.pe-card-h { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.pe-badge { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .12rem .45rem; border-radius: 1rem; background: rgba(var(--ht-primary-rgb), .1); color: var(--ht-primary); }
.pe-badge.open { background: rgba(var(--ht-success-rgb), .12); color: var(--ht-success); }
.pe-badge.closed { background: rgba(var(--ht-warning-rgb), .14); color: var(--ht-warning); }
.pe-card-m { color: var(--ht-gray-600); }
.pe-card-m code { font-size: .72rem; }
.pe-card-d { color: var(--ht-body-color); line-height: 1.45; max-height: 9rem; overflow-y: auto; }
/* v2.40 : les versions d'un script partagé — celle gardée sur vos graphiques, leurs notes */
.pe-vsel { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0; color: var(--ht-gray-600); font-size: .74rem; font-weight: 400; }
.pe-vsel select { flex: 0 1 auto; width: auto; max-width: 100%; font-size: .74rem; }
.pe-vers { display: flex; flex-direction: column; gap: .1rem; max-height: 7.5rem; overflow-y: auto; color: var(--ht-gray-600); }
.pe-vers .on { color: var(--ht-body-color); font-weight: 600; }
.pe-main.pe-closed .pe-ed { display: none; }
.pe-main.pe-closed .pe-card { flex: 1; border-bottom: 0; }
.pe-main.pe-closed .pe-card-d { max-height: none; }
.pe-main.pe-ro #pe-ta { cursor: default; }
.pe-shname { font-weight: 600; font-size: .85rem; max-width: 17rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-pshare .form-check-label { font-size: .78rem; }
.ht-pshare .hint { font-size: .74rem; color: var(--ht-gray-600); }

/* ═══════════════ v2.41 : l'HISTORIQUE DES VERSIONS d'un script — la liste (nommer, filtrer, restaurer) et la comparaison ═══════════════ */
.ht-pver .hint { font-size: .74rem; color: var(--ht-gray-600); }
.pv-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; font-size: .76rem; color: var(--ht-gray-700); }
/* les rangées séparées d'un trait (le fond de la liste entre elles) : une rangée cachée par le filtre n'en laisse pas deux */
.pv-list { display: flex; flex-direction: column; gap: 1px; background: var(--ht-border-color); border: 1px solid var(--ht-border-color); border-radius: .5rem; overflow: hidden; }
.pv-row { display: grid; grid-template-columns: 10.5rem 4rem minmax(0, 1fr) auto; align-items: center; gap: .3rem .75rem; padding: .3rem .4rem .3rem .65rem;
  font-size: .78rem; background: var(--ht-modal-bg, var(--ht-card-bg)); }
.pv-row:hover { background: color-mix(in srgb, var(--ht-primary) 4%, var(--ht-modal-bg, var(--ht-card-bg))); }
.pv-row.named { box-shadow: inset 3px 0 0 var(--ht-info); }
.pv-row .w { white-space: nowrap; color: var(--ht-body-color); }
.pv-row .z { white-space: nowrap; text-align: right; font-size: .72rem; color: var(--ht-gray-600); font-variant-numeric: tabular-nums; }
.pv-row .l { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .5rem; }
.pv-row .l b { font-weight: 600; color: var(--ht-body-color); overflow-wrap: anywhere; }
.pv-row .l input { max-width: 28rem; height: 1.4rem; min-height: 0; padding: 0 .45rem; font-size: .76rem; }      /* la hauteur des boutons : la rangée ne bouge pas */
.pv-row.editing [data-pv="name"] { visibility: hidden; }                     /* sa place gardée : les autres boutons ne bougent pas */
.pv-cur { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 1rem; white-space: nowrap;
  background: rgba(var(--ht-success-rgb), .14); color: var(--ht-success); }
.pv-row .x { display: flex; justify-content: flex-end; gap: .1rem; }
.pv-row .x button { all: unset; box-sizing: border-box; cursor: pointer; padding: .15rem .45rem; border-radius: .35rem; font-size: .72rem; color: var(--ht-primary); white-space: nowrap; }
.pv-row .x button:hover { background: rgba(var(--ht-primary-rgb), .1); }
.pv-row .x button:focus-visible { outline: 2px solid var(--ht-primary); outline-offset: -2px; }
.pv-row .x button:disabled { opacity: .5; cursor: default; }
.pv-list.only-named .pv-row:not(.named) { display: none; }
.pv-list:empty { display: none; }
.pv-none { padding: .6rem .2rem 0; }
/* la comparaison : la version, « Comparer avec », la légende (− la plus ancienne, + la plus récente), puis les lignes — elles défilent
   dans leur cadre : le reste ne quitte pas l'écran */
.pv-cbar { display: flex; align-items: center; gap: .45rem .75rem; flex-wrap: wrap; margin-bottom: .55rem; font-size: .78rem; }
.pv-what b { font-weight: 600; }
.pv-with { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.pv-with select { width: auto; max-width: 22rem; }
.pv-leg { display: flex; align-items: baseline; gap: .3rem 1.2rem; flex-wrap: wrap; margin-bottom: .45rem; font-size: .74rem; color: var(--ht-gray-700); }
.pv-leg:empty { display: none; }
.pv-leg .del > b, .pv-sum b.del { color: var(--ht-danger); }
.pv-leg .add > b, .pv-sum b.add { color: var(--ht-success); }
.pv-sum { margin-left: auto; font-family: var(--ht-font-monospace); }
.pv-diff { max-height: max(14rem, calc(100vh - 15.5rem)); overflow: auto; border: 1px solid var(--ht-border-color); border-radius: .5rem; scrollbar-width: thin; }
.pv-diff > .hint { padding: .8rem; }
.pv-dt.pe-hl { width: 100%; padding: 0; border-collapse: collapse; white-space: normal; font-family: var(--ht-font-monospace); font-size: 12px; line-height: 1.55; }
.pv-dt td { padding: 0 .45rem; vertical-align: top; }
.pv-dt td.n { width: 1%; min-width: 2.6rem; text-align: right; white-space: nowrap; color: var(--ht-gray-500); background: var(--ht-gray-100); user-select: none; }
.pv-dt td.n + td.n { border-right: 1px solid var(--ht-border-color); }
.pv-dt td.s { width: 1%; padding: 0 .3rem; text-align: center; user-select: none; }
.pv-dt td.c { white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.pv-dt tr.add td { background: rgba(var(--ht-success-rgb), .1); }
.pv-dt tr.add td.n, .pv-dt tr.add td.s { background: rgba(var(--ht-success-rgb), .2); color: var(--ht-success); }
.pv-dt tr.del td { background: rgba(var(--ht-danger-rgb), .09); }
.pv-dt tr.del td.n, .pv-dt tr.del td.s { background: rgba(var(--ht-danger-rgb), .18); color: var(--ht-danger); }
.pv-dt tr.gap td { padding: 0; background: rgba(var(--ht-primary-rgb), .05); border-top: 1px solid var(--ht-border-color); border-bottom: 1px solid var(--ht-border-color); }
.pv-dt tr.gap button { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; padding: .18rem .9rem; font-family: var(--ht-body-font-family, sans-serif);
  font-size: .7rem; color: var(--ht-gray-600); }
.pv-dt tr.gap button:hover, .pv-dt tr.gap button:focus-visible { color: var(--ht-primary); background: rgba(var(--ht-primary-rgb), .09); }
/* la fenêtre étroite (moins de 992 px : Bootstrap la ramène à 500 px) : la date et la taille, puis le nom, puis les actions */
@media (max-width: 991.98px) {
  .pv-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pv-row .l, .pv-row .x { grid-column: 1 / -1; justify-content: flex-start; }
  .pv-row .l:empty { display: none; }
  .pv-row .x { margin-left: -.45rem; }
}

/* ═══════════════ LE SCREENER PINE : un script sur plusieurs marchés, ceux qui remplissent vos conditions ═══════════════ */
.ht-pscr { display: flex; flex-direction: column; gap: .9rem; }
.sc-form { display: flex; flex-direction: column; gap: .55rem; }
.sc-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .6rem .9rem; }
.sc-fld { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.sc-fld .ht-lbl { margin-bottom: .25rem; }
.sc-fld select { width: auto; max-width: 100%; }
.sc-script select { min-width: 13rem; max-width: 22rem; }
.sc-coins input { width: 16rem; max-width: 100%; font-family: var(--ht-font-monospace); }
.sc-fld .ht-seg .btn { padding: .12rem .45rem; font-size: .74rem; }
.sc-go { white-space: nowrap; }
.sc-hint { display: flex; flex-wrap: wrap; gap: .15rem 1.1rem; font-size: .72rem; color: var(--ht-gray-600); }
.sc-hint:empty { display: none; }
.sc-hint .warn { color: var(--ht-warning); }
.sc-res { padding-top: .75rem; }
.sc-prog { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; font-size: .74rem; color: var(--ht-gray-700); }
.sc-pbar { flex: 1; height: .45rem; border-radius: 1rem; background: var(--ht-gray-200); overflow: hidden; }
.sc-pbar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ht-primary); transition: width .25s; }
.sc-pn { font-family: var(--ht-font-monospace); white-space: nowrap; }
.sc-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; margin-bottom: .55rem; }
.sc-barsel { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-size: .74rem; color: var(--ht-gray-700); }
.sc-barsel select { width: auto; font-size: .74rem; }
.sc-cnt { margin-left: auto; font-size: .74rem; color: var(--ht-gray-600); }
.sc-cnt .warn { color: var(--ht-warning); }
.sc-flts { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .6rem; }
.sc-flts:empty { display: none; }
.sc-flt { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.sc-flt select { width: auto; max-width: 16rem; font-size: .74rem; }
.sc-flt input { width: 8rem; font-size: .74rem; }
.sc-flt.off select, .sc-flt.off input { opacity: .6; }
.sc-fdel { padding: .1rem .45rem; line-height: 1.2; }
.sc-tbl { max-height: max(20rem, calc(100vh - var(--ht-top-h) - 15rem)); overflow: auto; scrollbar-width: thin; }
.sc-t thead th { position: sticky; top: 0; z-index: 1; background: var(--ht-card-bg); }
.sc-t th .sc-ar { font-style: normal; margin-left: .2rem; }
.sc-t .sc-b { text-align: center; }
.sc-t td.sc-b.pos { font-weight: 700; }
.sc-t td.sc-no { color: var(--ht-gray-500); }
.sc-mk { all: unset; cursor: pointer; font-weight: 700; color: var(--ht-heading-color); }
.sc-mk:hover, .sc-mk:focus-visible { color: var(--ht-primary); text-decoration: underline; }
.sc-dex { margin-left: .35rem; padding: .02rem .3rem; border-radius: .3rem; font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: rgba(var(--ht-info-rgb), .14); color: var(--ht-info); }
/* la source du marché (HL, CB, AL) : l'étiquette des listes (trading.css) */
.sc-t td .ht-srcb { margin-left: .35rem; vertical-align: .08em; }
.sc-t tr.sc-err td.sc-msg { color: var(--ht-danger); white-space: normal; font-size: .76rem; }
.sc-bad { color: var(--ht-danger); text-align: left; }
@media (max-width: 767.98px) {
  .sc-fld, .sc-script select, .sc-coins input { width: 100%; max-width: none; min-width: 0; }
  .sc-cnt { margin-left: 0; flex-basis: 100%; }
}

/* v3.08 : un script jamais enregistré (« Nouveau script ») : en couleur d'avertissement */
.pe-items button.pe-unsaved b, .pe-items button.pe-unsaved small { color: var(--ht-warning); }
.pe-items button.pe-unsaved { background: color-mix(in srgb, var(--ht-warning) 10%, transparent); }

/* v3.14 : la doc — les anciens noms et leur nom d'aujourd'hui, en colonnes */
.pd-ren { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .15rem 1rem; margin: .3rem 0 1rem; font-size: .8rem; }
.pd-ren span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
