/* FX Terminal — style commun, identité « Plein jour ».
   Concept : un bureau blanc et calme. Fond gris bleuté très pâle, cartes blanches aux grands arrondis,
   titres en Inter Tight, texte et chiffres en Inter à chiffres tabulaires : propre et sobre.
   Une seule couleur forte, l'orange, pour ce qui est en cours ou mis en avant ;
   vert/rouge réservés aux hausses/baisses. Les noms de jetons --amber* sont gardés pour la compatibilité des pages :
   ils portent l'orange. */
:root {
  --bg: #f5f5f4;            /* fond de l'appli */
  --canvas: #f5f5f4;
  --surface: #ffffff;       /* cartes */
  --surface-2: #f5f5f4;     /* survol, champs */
  --line: #e7e5e4;
  --line-strong: #d6d3d1;
  --panel-line: rgba(20,16,12,.05);
  --fg: #111111;
  --muted: #57534e;
  --dim: #8f8a85;
  --amber: #c2410c;         /* accent orange (texte lisible sur blanc) */
  --amber-fill: #f26b1d;    /* accent orange (barres, points, courbes) */
  --amber-soft: rgba(242,107,29,.10);
  --amber-line: rgba(242,107,29,.38);
  --on-accent: #ffffff;
  --ink-fill: #1c1917;
  --gray-fill: #cfcac5;
  --gray-2: #8f8a85;
  --up: #0f9158; --down: #d13843;
  --up-soft: rgba(15,145,88,.10); --down-soft: rgba(209,56,67,.09);
  --grid: rgba(20,16,12,.055);
  --shadow: rgba(28,22,16,.07);
  --shadow-strong: rgba(28,22,16,.16);
  --veil: rgba(245,245,244,.76);
  --card-shadow: 0 1px 2px rgba(28,22,16,.04), 0 6px 20px rgba(28,22,16,.045);
  /* couleurs des courbes (s) et du texte posé dessus (t) */
  --s1: #1c1917; --t1: #ffffff; --s2: #f26b1d; --t2: #ffffff; --s3: #fdba8c; --t3: #111111; --s4: #8f8a85; --t4: #ffffff;
  --s5: #9a3412; --t5: #ffffff; --s6: #d6d3d1; --t6: #111111; --s7: #57534e; --t7: #ffffff; --s8: #e8a33d; --t8: #111111;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --r: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --canvas: #000000; --surface: #111111; --surface-2: #1a1a1a;
    --line: #262626; --line-strong: #383838; --panel-line: #1f1f1f; --fg: #f5f5f5; --muted: #a8a8a8; --dim: #707070;
    --amber: #ff9a4d; --amber-fill: #ff7a1a; --amber-soft: rgba(255,122,26,.15); --amber-line: rgba(255,122,26,.45); --on-accent: #0a0a0a;
    --ink-fill: #ededed; --gray-fill: #4a4a4a; --gray-2: #8a8a8a;
    --up: #3ccf86; --down: #f2565f; --up-soft: rgba(60,207,134,.14); --down-soft: rgba(242,86,95,.14);
    --grid: rgba(245,245,245,.07); --shadow: rgba(0,0,0,.5); --shadow-strong: rgba(0,0,0,.7); --veil: rgba(0,0,0,.76);
    --card-shadow: 0 0 0 1px rgba(255,255,255,.02);
    --s1: #f5f5f5; --t1: #0a0a0a; --s2: #ff7a1a; --t2: #0a0a0a; --s3: #ffc08f; --t3: #0a0a0a; --s4: #8a8a8a; --t4: #0a0a0a;
    --s5: #c2410c; --t5: #ffffff; --s6: #4a4a4a; --t6: #f5f5f5; --s7: #bdbdbd; --t7: #0a0a0a; --s8: #f0b45a; --t8: #0a0a0a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --canvas: #000000; --surface: #111111; --surface-2: #1a1a1a;
  --line: #262626; --line-strong: #383838; --panel-line: #1f1f1f; --fg: #f5f5f5; --muted: #a8a8a8; --dim: #707070;
  --amber: #ff9a4d; --amber-fill: #ff7a1a; --amber-soft: rgba(255,122,26,.15); --amber-line: rgba(255,122,26,.45); --on-accent: #0a0a0a;
  --ink-fill: #ededed; --gray-fill: #4a4a4a; --gray-2: #8a8a8a;
  --up: #3ccf86; --down: #f2565f; --up-soft: rgba(60,207,134,.14); --down-soft: rgba(242,86,95,.14);
  --grid: rgba(245,245,245,.07); --shadow: rgba(0,0,0,.5); --shadow-strong: rgba(0,0,0,.7); --veil: rgba(0,0,0,.76);
  --card-shadow: 0 0 0 1px rgba(255,255,255,.02);
  --s1: #f5f5f5; --t1: #0a0a0a; --s2: #ff7a1a; --t2: #0a0a0a; --s3: #ffc08f; --t3: #0a0a0a; --s4: #8a8a8a; --t4: #0a0a0a;
  --s5: #c2410c; --t5: #ffffff; --s6: #4a4a4a; --t6: #f5f5f5; --s7: #bdbdbd; --t7: #0a0a0a; --s8: #f0b45a; --t8: #0a0a0a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.jv-off { display: none !important; } /* résumé de Jarvis pas encore prêt ou IA absente (≠ bloc retiré) */
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 14px/1.45 var(--font-sans); font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11";
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber-fill); outline-offset: 2px; }
/* cases, curseurs, dates et sélection de texte en orange plutôt qu'en bleu (couleur par défaut du navigateur) */
html { accent-color: var(--amber-fill); }
::selection { background: var(--amber-line); }
.mono, .num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); } .amb { color: var(--amber); } .dim { color: var(--dim); } .muted { color: var(--muted); }

/* ---------- Structure ---------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100%; }
.app.closed { grid-template-columns: 68px minmax(0, 1fr); }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 20px 12px 14px; background: var(--bg); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin;
}
.brandrow { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: -.015em; }
.brand svg { width: 18px; height: 19px; color: var(--fg); flex: none; }
.iconbtn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
}
.iconbtn:hover { background: var(--surface); color: var(--fg); }
.iconbtn svg { width: 16px; height: 16px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin-top: 16px; }
.nav-head {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 10px 6px; border: 0; background: none;
  font: 500 12px var(--font-sans); color: var(--dim); text-align: left;
}
.nav-head svg { width: 12px; height: 12px; transition: transform .18s; opacity: .7; }
.nav-group.folded .nav-head svg { transform: rotate(-90deg); }
.nav-group.folded .nav-items { display: none; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; text-decoration: none;
  color: var(--muted); font-size: 13.5px; white-space: nowrap; position: relative;
}
.nav a svg { width: 16px; height: 16px; flex: none; }
.nav a:hover { background: var(--surface); color: var(--fg); }
.nav a.dragging { opacity: .4; }
.nav a.drop-before { box-shadow: 0 -2px 0 var(--amber-fill); }
.nav a[aria-current="page"] { color: var(--fg); font-weight: 600; background: var(--surface); box-shadow: var(--card-shadow); }
.nav a[aria-current="page"] svg { color: var(--amber-fill); }
.nav a .tag { margin-left: auto; font: 600 10.5px var(--font-sans); color: var(--on-accent); background: var(--amber-fill); border-radius: 999px; padding: 1px 7px; }
.side-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.theme-seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.theme-seg button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 28px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 500 12px var(--font-sans); }
.theme-seg button:hover { color: var(--fg); }
.theme-seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px var(--shadow-strong); }
.theme-seg .tsw { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.lang-seg b { font: 600 11.5px var(--font-mono, var(--font-sans)); letter-spacing: .04em; }
.lang-seg em { font-style: normal; font-weight: 500; }
.app.closed .lang-seg em { display: none; }
.tsw-light { background: linear-gradient(135deg, #ffffff 50%, #f26b1d 50%); }
.tsw-dark { background: linear-gradient(135deg, #111111 50%, #ff7a1a 50%); }
.me-wrap { position: relative; }
.me-wrap[hidden], .me-pop[hidden] { display: none; }
.side .me { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--card-shadow); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.side .me > div { min-width: 0; }
.side .me b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 40; display: grid; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.app.closed .me-pop { right: auto; width: 240px; }
.me-k { margin: 0; font-size: 11.5px; color: var(--dim); }
.me-e { margin: 2px 0 8px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.me-it { display: block; padding: 9px 6px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--fg); font: inherit; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; }
.me-it:hover { color: var(--amber); }
.me-out { color: var(--muted); }
.me-name { display: grid; gap: 6px; margin: 0 0 8px; }
.me-name[hidden] { display: none; }
.me-row { display: flex; gap: 6px; }
.me-row input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; font-size: 13px; }
.me-row button { height: 34px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--amber); color: var(--on-accent, #fff); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.me-msg { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.me-msg:empty { display: none; }
.side .me .av {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--amber-soft); color: var(--amber); font: 600 11.5px var(--font-sans);
}
.side .free-pass .av svg { width: 13px; height: 13px; }
.side .me b { font-size: 13px; font-weight: 600; display: block; line-height: 1.2; }
.side .me span { font: 500 11.5px var(--font-sans); color: var(--dim); }
.app.closed .side { padding-inline: 10px; }
.app.closed .brand span, .app.closed .nav a span, .app.closed .nav a .tag, .app.closed .nav-head,
.app.closed .theme-seg span, .app.closed .me div { display: none; }
.app.closed .theme-seg { grid-template-columns: 1fr; }
.app.closed .brandrow { flex-direction: column; gap: 10px; padding-inline: 0; }
.app.closed .nav a, .app.closed .me { justify-content: center; padding-inline: 0; }
.app.closed .me { background: none; box-shadow: none; }
.app.closed .nav-group.folded .nav-items { display: flex; flex-direction: column; gap: 2px; }

.main { min-width: 0; padding: 14px 18px 14px 6px; }
.frame { min-height: calc(100vh - 28px); padding: 0 0 90px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Barre du marché : session, frise des sessions sur 24 h, dernière info ---------- */
.ticker {
  display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--panel-line); border-radius: var(--r);
  box-shadow: var(--card-shadow); min-height: 72px; overflow: hidden;
}
.tk { display: flex; align-items: center; gap: 12px; padding: 10px 18px; white-space: nowrap; position: relative; }
.tk + .tk::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.lbl { font: 500 11.5px var(--font-sans); color: var(--dim); }
.lbl i { display: none; }
.tk-sess { gap: 11px; }
.tk-sess .st { width: 9px; height: 9px; border-radius: 50%; background: var(--gray-fill); flex: none; }
.tk-sess .st.on { background: var(--up); box-shadow: 0 0 0 4px var(--up-soft); }
.tk-sess b { display: block; font: 600 13.5px var(--font-sans); color: var(--fg); }
.tk-sess .sub { font: 400 12px var(--font-sans); color: var(--muted); }
.tk-now { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
.tk-now .t { font: 600 21px/1 var(--font-display); letter-spacing: -.02em; }
.tk-now .t small { font: 500 11px var(--font-sans); color: var(--dim); margin-left: 3px; letter-spacing: 0; }
.tk-now .lbl { margin-top: 3px; }
.tk-clocks { flex: 1 1 auto; min-width: 300px; display: block; padding-block: 8px; }
.sess-frise { position: relative; display: grid; grid-template-columns: 58px 1fr; row-gap: 5px; column-gap: 10px; font-size: 10.5px; color: var(--dim); align-items: center; }
.sess-frise .nm { line-height: 10px; height: 10px; text-align: right; white-space: nowrap; }
.sess-frise .nm.on { color: var(--fg); font-weight: 600; }
.sess-frise .lane { position: relative; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.sess-frise .lane i { position: absolute; top: 0; bottom: 0; border-radius: 99px; background: var(--gray-fill); opacity: .55; }
.sess-frise .lane.on i { background: var(--amber-fill); opacity: 1; }
.sess-frise .now { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--fg); pointer-events: none; }
.sess-frise .ax { grid-column: 2; position: relative; height: 11px; }
.sess-frise .ax span { position: absolute; top: 1px; transform: translateX(-50%); font-size: 10px; color: var(--dim); }
.tk-squawk { flex: 0 1 380px; min-width: 240px; cursor: pointer; background: none; border: 0; text-align: left; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; white-space: normal; }
.tk-squawk .lbl { display: inline-flex; align-items: center; gap: 6px; }
.tk-squawk .lbl::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amber-fill); animation: pulse 2s infinite; }
.sq-win { width: 100%; min-width: 0; overflow: hidden; }
.sq-run { display: block; font: 500 13px/1.35 var(--font-sans); color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .3s, transform .3s; }
.sq-run.out { opacity: 0; transform: translateY(4px); }
.sq-run em { font-style: normal; color: var(--dim); font-weight: 400; margin-right: 8px; }
.tk-squawk:hover .sq-run { color: var(--amber); }

/* ---------- Ligne de page ---------- */
.pagebar { display: flex; align-items: flex-end; gap: 10px; padding: 8px 4px 2px; flex-wrap: wrap; }
.crumb { display: flex; flex-direction: column; gap: 2px; font: 500 12px var(--font-sans); color: var(--dim); }
.crumb i { display: none; }
.crumb b { font: 650 28px/1.1 var(--font-display); color: var(--fg); letter-spacing: -.025em; }
.pagebar .sp { flex: 1; }
@media (max-width: 560px) { .pagebar .crumb { flex-basis: 100%; } .reset-btn { padding: 0 9px; } .reset-btn span { display: none; } }
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  font: 500 12.5px var(--font-sans); white-space: nowrap;
}
.btn:hover { border-color: var(--line-strong); }
.btn svg { width: 14px; height: 14px; }
.btn.primary { background: var(--amber-fill); color: var(--on-accent); border-color: var(--amber-fill); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.on { background: var(--amber-soft); border-color: transparent; color: var(--amber); }

/* ---------- Grille de cartes ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: stretch; grid-auto-flow: row dense; }
.panel {
  grid-column: span var(--w, 12); grid-row: span var(--rows, 1);
  background: var(--surface); border: 1px solid var(--panel-line); border-radius: var(--r); box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; min-width: 0; position: relative;
}
.ph {
  display: flex; align-items: baseline; gap: 4px 10px; min-height: 52px; padding: 14px 14px 4px 20px; flex-wrap: wrap; position: relative;
}
.ph h2 { margin: 0; font: 600 15.5px/1.25 var(--font-display); letter-spacing: -.01em; color: var(--fg); white-space: nowrap; }
.ph .sep { display: none; }
.ph .meta { font-size: 12.5px; color: var(--dim); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.side .mob-x { display: none; }
.ph .meta.wrap { white-space: normal; min-width: 0; max-width: 100%; flex-wrap: wrap; }
.ph .tools { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; align-self: center; }
.ph .lnk { margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: 5px; font: 500 12.5px var(--font-sans); color: var(--amber); text-decoration: none; padding: 6px 6px; white-space: nowrap; }
.ph .lnk:hover { text-decoration: underline; text-underline-offset: 3px; }
.ph .lnk svg { width: 12px; height: 12px; }
.ph .tools .lnk { margin-left: 0; }
.pb { padding: 12px 20px 18px; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.pb.flush { padding: 0; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--amber-fill); box-shadow: 0 0 0 0 var(--amber-line); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--amber-line); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* actions de carte (ajoutées par shell.js) */
.pact { position: absolute; top: -14px; right: 16px; z-index: 3; display: flex; gap: 1px; padding: 2px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 6px 16px var(--shadow); opacity: 0; pointer-events: none; transition: opacity .15s; }
.panel:hover .pact, .panel:focus-within .pact, .editing .pact { pointer-events: auto; opacity: 1; }
.pact button { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--dim); }
.pact button:hover { background: var(--surface-2); color: var(--fg); }
.pact button.pinned { color: var(--amber); }
.pact svg { width: 15px; height: 15px; }
.panel.max { position: fixed; inset: 24px; z-index: 60; box-shadow: 0 30px 80px var(--shadow-strong); height: auto !important; min-height: 0 !important; }
.panel.max .pb { overflow: auto; }
.max-veil { position: fixed; inset: 0; z-index: 55; background: var(--veil); backdrop-filter: blur(3px); }

/* mode Personnaliser : déplacer et redimensionner n'apparaissent qu'ici */
.pact .mv, .pact .sz, .pact .del { display: none !important; }
.editing .pact .mv, .editing .pact .sz, .editing .pact .del { display: grid !important; }
.editing .panel { outline: 1.5px dashed var(--amber-line); outline-offset: 3px; }
.editing .ph { cursor: grab; touch-action: none; }
.pact .mv { cursor: grab; touch-action: none; }
.grip, .edge { display: none; position: absolute; z-index: 4; touch-action: none; }
.grip { right: 4px; bottom: 4px; width: 20px; height: 20px; cursor: nwse-resize; color: var(--amber); }
.grip svg { width: 18px; height: 18px; }
.edge.er { top: 16px; bottom: 22px; right: -6px; width: 12px; cursor: ew-resize; }
.edge.eb { left: 16px; right: 22px; bottom: -6px; height: 12px; cursor: ns-resize; }
.edge::after { content: ""; position: absolute; border-radius: 3px; background: var(--amber-fill); opacity: 0; transition: opacity .15s; }
.edge.er::after { top: 50%; left: 4px; width: 4px; height: 40px; transform: translateY(-50%); }
.edge.eb::after { left: 50%; top: 4px; height: 4px; width: 40px; transform: translateX(-50%); }
.editing .grip, .editing .edge { display: block; }
.editing .panel:hover .edge::after, .panel.resizing .edge::after { opacity: .9; }
.panel.resizing { box-shadow: 0 0 0 2px var(--amber-fill), var(--card-shadow); }
.panel.lifted { position: fixed; z-index: 70; margin: 0; pointer-events: none; box-shadow: 0 24px 60px var(--shadow-strong); outline-color: var(--amber-fill); transition: transform .12s ease; will-change: left, top, transform; }
.grid.user-order > .panel { order: 0 !important; } /* ordre choisi par le visiteur (shell.js, domOrder) */
.panel-slot { grid-column: span var(--w, 12); grid-row: span var(--rows, 1); border: 2px dashed var(--amber-line); border-radius: var(--r); background: var(--amber-soft); min-width: 0; }
body.moving, body.moving * { cursor: grabbing !important; user-select: none; }
body.moving iframe, body.resizing iframe { pointer-events: none; }
body.resizing, body.resizing * { user-select: none; }
body.rs-xy, body.rs-xy * { cursor: nwse-resize !important; }
body.rs-x, body.rs-x * { cursor: ew-resize !important; }
body.rs-y, body.rs-y * { cursor: ns-resize !important; }
.sizetag { position: absolute; right: 30px; bottom: 8px; font: 600 11px var(--font-sans); color: var(--amber); display: none; z-index: 4; }
.editing .panel .sizetag { display: block; }

/* ---------- Petits composants ---------- */
.sel {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; height: 32px; min-width: 110px;
  padding: 0 10px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: 500 12.5px var(--font-sans); white-space: nowrap;
}
.sel:hover { border-color: var(--line-strong); }
.sel svg { width: 12px; height: 12px; color: var(--dim); }
.menu {
  position: fixed; z-index: 80; min-width: 190px; max-height: 340px; overflow: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px var(--shadow-strong);
}
.menu .mh { padding: 6px 8px 8px; font: 500 11.5px var(--font-sans); color: var(--dim); }
.menu input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 0 10px; margin-bottom: 6px; outline: none; }
.menu button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 7px 9px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13px; }
.menu button:hover, .menu button.cur { background: var(--surface-2); }
.menu button .ck { width: 15px; height: 15px; border: 1px solid var(--line-strong); border-radius: 5px; display: grid; place-items: center; }
.menu button.on .ck { background: var(--amber-fill); border-color: var(--amber-fill); color: var(--on-accent); }
.menu button .ck svg { width: 10px; height: 10px; }
.menu button:not(.on) .ck svg { visibility: hidden; } /* case vide quand l'élément n'est pas choisi */
.menu .mb { display: flex; gap: 6px; padding: 0 2px 6px; }
.menu .mb button { flex: 1; width: auto; justify-content: center; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font: 500 12px var(--font-sans); color: var(--muted); }
.menu .mb button:hover { color: var(--fg); border-color: var(--line-strong); }
.seg { display: inline-flex; border-radius: 999px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { height: 26px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 500 12.5px var(--font-sans); }
.seg button:hover { color: var(--fg); }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px var(--shadow-strong); }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 13px; width: 15px; height: 15px; color: var(--dim); pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 14px 0 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); outline: none; }
.search input:focus { border-color: var(--amber-line); background: var(--surface); box-shadow: 0 0 0 4px var(--amber-soft); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; border: 0; background: var(--amber-soft); color: var(--amber); font: 600 11.5px var(--font-sans); }
.chip.gray { background: var(--surface-2); color: var(--muted); }
.kpi { font: 600 27px/1.05 var(--font-display); letter-spacing: -.025em; }
.tiny { font: 500 11.5px var(--font-sans); color: var(--dim); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--ink-fill); }
.bar > i.a { background: var(--amber-fill); }
.bar > i.g { background: var(--gray-fill); }
.empty { padding: 26px; text-align: center; color: var(--dim); font-size: 13px; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 90;
  padding: 10px 16px; border-radius: 999px; background: var(--fg); color: var(--bg); font-size: 13px; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.lnk.on { pointer-events: auto; }
.toast a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; margin-left: 4px; }
.toast button { font: inherit; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; margin-left: 4px; background: none; border: 0; padding: 2px 4px; cursor: pointer; }
.panel.shooting { cursor: progress; }
.pact .shot:disabled { opacity: .4; }
.fx-shot-off .pact .shot { display: none !important; }

/* graphiques SVG */
.chart { width: 100%; height: 100%; display: block; overflow: visible; }
.chart text { font: 500 11px var(--font-sans); fill: var(--dim); }
.chart .gl { stroke: var(--grid); }
.chart .zero { stroke: var(--line-strong); stroke-dasharray: 3 4; }
.endtag rect { stroke: none; rx: 9px; ry: 9px; }
.endtag text { font: 600 11px var(--font-sans); }
.chart-tip {
  position: fixed; z-index: 100; pointer-events: none; padding: 9px 12px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 10px 30px var(--shadow-strong); font: 500 12px var(--font-sans); white-space: nowrap;
}
.chart-tip .d { color: var(--dim); font-size: 11px; margin-bottom: 4px; }
/* barre de zoom des graphiques (visible au survol, toujours au doigt) */
.ch-tb {
  position: absolute; left: 50%; bottom: 32px; z-index: 3; display: inline-flex; gap: 2px; padding: 3px; transform: translateX(-50%);
  border: 1px solid var(--line); border-radius: var(--r-pill, 999px); background: var(--surface); box-shadow: 0 4px 14px var(--shadow);
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
:hover > .ch-tb, .ch-tb:focus-within, .ch-boxing > .ch-tb { opacity: 1; pointer-events: auto; }
@media (hover: none) { .ch-tb { opacity: .92; pointer-events: auto; } }
.ch-tb button { width: 28px; height: 26px; display: grid; place-items: center; border: 0; border-radius: var(--r-pill, 999px); background: none; color: var(--muted); cursor: pointer; padding: 0; }
.ch-tb button:hover { background: var(--surface-2); color: var(--fg); }
.ch-tb button:focus-visible { outline: 2px solid var(--amber-fill); outline-offset: 1px; }
.ch-tb button.on { color: var(--amber); background: var(--amber-soft); }
.ch-tb svg { width: 16px; height: 16px; }
.ch-tb.narrow [data-k="left"], .ch-tb.narrow [data-k="right"] { display: none; }
.ch-boxing, .ch-boxing .hit { cursor: crosshair !important; }
.ch-zbox { position: absolute; z-index: 2; pointer-events: none; border: 1px dashed var(--amber-fill); background: var(--amber-soft); border-radius: 2px; }
.chart .ch-man { font-size: 10px; font-weight: 600; fill: var(--amber); cursor: pointer; text-decoration: underline; }
/* réticule : étiquettes sur les axes (valeur à droite, date en bas), comme sur TradingView */
.chart .ch-ax { pointer-events: none; }
.chart .ch-ax rect { fill: var(--fg); }
.chart .ch-ax text { fill: var(--bg); font: 600 10.5px var(--font-mono, var(--font-sans)); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .ch-tb { transition: none; } }

/* ---------- Jarvis ---------- */
.jv-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 70; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--surface); box-shadow: 0 10px 30px var(--shadow-strong), 0 0 0 1px var(--line);
  display: grid; place-items: center; padding: 0;
}
.jv-btn svg { width: 30px; height: 30px; animation: bob 3.2s ease-in-out infinite; }
.jv-btn .dot { position: absolute; top: 4px; right: 4px; width: 11px; height: 11px; border-radius: 50%; background: var(--amber-fill); border: 2px solid var(--surface); }
.jv-btn .bot-body { fill: var(--fg); } .jv-btn .bot-face { fill: var(--surface); } .jv-btn .bot-eye { fill: var(--amber-fill); animation: blink 4.5s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
/* écran étroit (contrôle du 2026-11-22 : à 500 px, le rond du robot cachait le taux directeur de la fiche devise) : languette collée
   au bord droit, dans la marge de la page, qui ne recouvre plus les chiffres des blocs (24 × 56 px, cible tactile suffisante) */
@media (max-width: 700px) {
  .jv-btn { right: 0; bottom: 96px; width: 24px; height: 56px; border-radius: 12px 0 0 12px; box-shadow: 0 6px 18px var(--shadow-strong), 0 0 0 1px var(--line); }
  .jv-btn svg { width: 18px; height: 18px; animation: none; }
  .jv-btn .dot { top: 3px; right: 3px; width: 7px; height: 7px; border-width: 1px; }
  .jv-btn .v2 { display: none; }
  .jv-soon { bottom: 160px; }
}
/* Jarvis hors service jusqu'à la V.2 (demande de goat, 2026-10-12) : robot gris et immobile, bulle « Disponible à la V.2 » */
.jv-btn.off { cursor: default; }
.jv-btn.off svg { animation: none; opacity: .45; }
.jv-btn.off .bot-body { fill: var(--dim); } .jv-btn.off .bot-eye { fill: var(--dim); animation: none; }
.jv-btn.off .dot { display: none; }
.jv-btn .v2 { position: absolute; top: -4px; right: -6px; padding: 1px 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font: 600 9.5px/1.4 var(--font-sans); }
.jv-soon { position: fixed; right: 18px; bottom: 76px; z-index: 71; max-width: 240px; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 30px var(--shadow-strong); font-size: 12.5px; color: var(--muted); opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .18s, transform .18s; }
.jv-soon b { display: block; color: var(--fg); font-size: 13px; margin-bottom: 2px; }
.jv-soon.on, .jv-btn.off:hover + .jv-soon, .jv-btn.off:focus-visible + .jv-soon { opacity: 1; transform: none; }
html.embed .jv-soon { display: none !important; }
@media (prefers-reduced-motion: reduce) { .jv-soon { transition: none; } }
/* résumé de Jarvis dans le panneau du petit robot (goat, 2026-10-22) : pas de questions, le bloc de la page sans son cadre */
.jv-h .bot-body { fill: var(--fg); } .jv-h .bot-face { fill: var(--surface); } .jv-h .bot-eye { fill: var(--amber-fill); }
.jv.jv-bot .jv-q, .jv.jv-bot .jv-f { display: none; }
/* questions au robot (2026-11-04) : champ sous le résumé, fil des questions, questions restantes */
.jv.jv-bot.jv-ask .jv-f { display: flex; }
.jv-thr { display: flex; flex-direction: column; gap: 12px; }
.jv-thr:empty { display: none; }
.jv-thr .msg.ai { max-width: 100%; }
.jv-left { margin: 0; padding: 2px 16px 12px; font-size: 11.5px; color: var(--dim); }
.jv-qbar { display: block; height: 3px; border-radius: var(--r-pill, 999px); background: var(--line); overflow: hidden; }
.jv-qbar i { display: block; height: 100%; width: 0; background: var(--amber-fill); border-radius: inherit; transition: width .4s ease; }
@media (prefers-reduced-motion: reduce) { .jv-qbar i { transition: none; } }
.jv-qtxt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jv.jv-none .jv-qtxt { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: block; margin-top: 6px; }
.jv:not(.jv-ask) .jv-left { display: none; }
.jv-go { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.jv-go a { color: var(--accent); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.jv-go a:hover, .jv-go a:focus-visible { text-decoration: underline; }
.jv.jv-asking .jv-f button, .jv.jv-none .jv-f button { opacity: .45; cursor: default; }
.jv-f input:disabled, .jv-f button:disabled { opacity: .55; cursor: not-allowed; }
.jv.jv-bot .panel { border: 0; box-shadow: none; background: none; padding: 0; margin: 0; min-height: 0; border-radius: 0; }
.jv.jv-bot .panel .ph { display: none; }
.jv.jv-bot .panel .pb { padding: 0; }
/* robot actif partout (2026-11-03) : copie du bloc de résumé gardé dans la page, sans son cadre */
.jv.jv-bot .jv-mirror { padding: 0; flex: none; }
.jv.jv-bot .jv-wait { display: none; margin: 0; font-size: 13.5px; }
.jv.jv-bot .panel.jv-off + .jv-wait { display: block; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.jv {
  position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 75; width: min(400px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px var(--shadow-strong);
  display: flex; flex-direction: column; transform: translateX(calc(100% + 30px)); transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.jv.on { transform: none; }
.jv-h { display: flex; align-items: center; gap: 10px; padding: 16px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.jv-h .who b { display: block; font: 600 16px/1.2 var(--font-display); }
.jv-h .who span { font: 500 11.5px var(--font-sans); color: var(--dim); }
.jv-h .iconbtn { margin-left: auto; }
.jv-body { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }
.msg.ai { background: var(--surface-2); border-top-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--amber-fill); color: var(--on-accent); border-top-right-radius: 6px; }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.jv-q { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.jv-q button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 11px; font-size: 12.5px; color: var(--muted); }
.jv-q button:hover { color: var(--amber); border-color: var(--amber-line); }
.jv-f { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.jv-f input { flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; background: var(--surface-2); outline: none; min-width: 0; }
.jv-f button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--amber-fill); color: var(--on-accent); display: grid; place-items: center; }
.jv-f button svg { width: 16px; height: 16px; }

/* ---------- Petit écran ---------- */
.mob-top { display: none; }
@media (max-width: 1300px) { .tk-now { display: none; } }
@media (max-width: 1100px) { .tk-squawk { flex-basis: 260px; } }
@media (max-width: 980px) {
  .grid > .panel[data-w="2"], .grid > .panel[data-w="3"], .grid > .panel[data-w="4"], .grid > .panel[data-w="5"] { grid-column: span 6; }
  .grid > .panel[data-w="7"], .grid > .panel[data-w="8"], .grid > .panel[data-w="9"], .grid > .panel[data-w="10"], .grid > .panel[data-w="11"] { grid-column: span 12; }
}
@media (max-width: 860px) {
  .app, .app.closed { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; z-index: 78; inset: 0 auto 0 0; width: 264px; height: 100%; transform: translateX(-102%);
    transition: transform .24s; box-shadow: 0 20px 60px var(--shadow-strong);
  }
  .app.mob-open .side { transform: none; }
  .side .collapse { display: none; }
  .side .mob-x { display: grid; }
  html.mob-lock, html.mob-lock body { overflow: hidden; }
  .ph .meta { white-space: normal; min-width: 0; max-width: 100%; flex-wrap: wrap; }
  .main { padding: 0; }
  .frame { min-height: 100vh; padding: 10px 16px 90px; gap: 12px; }
  .mob-top { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
  .mob-top .brand span { font-size: 15px; }
  .ticker { flex-wrap: wrap; }
  .tk { padding: 10px 14px; }
  .tk + .tk::before { display: none; }
  .tk-clocks { flex-basis: 100%; order: 3; border-top: 1px solid var(--line); min-width: 0; }
  .tk-squawk { flex: 1 1 200px; min-width: 0; }
  .crumb b { font-size: 24px; }
  .grid > .panel { grid-column: 1 / -1 !important; grid-row: auto !important; min-height: 0 !important; }
  .grid > .panel.sized { height: auto !important; overflow: visible; }
  .grid > .panel.sized > * { overflow: visible; }
  .grip, .edge { display: none !important; }
  .pact { right: 12px; }
  .fx-shot-off .pact { display: none; }
  .pact > button:not(.shot) { display: none !important; } /* sur mobile, seul le bouton d'image du bloc reste (toucher le bloc l'affiche) */
  .editing .pact .sz { display: none !important; } /* téléphone : tous les blocs font la largeur de l'écran, le menu Taille ne changeait rien (audit du 2026-11-20) */
  .panel.max { inset: 8px; }
  .ph { padding-left: 16px; } .pb { padding-inline: 16px; }
}
/* lecteur du squawk, posé au-dessus du petit robot */
@media (max-width: 520px) { .tk-squawk { flex-basis: 100%; border-top: 1px solid var(--line); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.sl { color: var(--line-strong); }
@media (max-width: 600px) { .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; } .seg button { flex: none; } }

/* ---------- Blocs épinglés : affichés en vrai dans le tableau de bord ---------- */
.pinned-blk .ph .src { font-weight: 500; }
.pin-body { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 160px; padding: 0 6px 6px; }
.pin-body iframe { width: 100%; height: 200px; border: 0; display: block; background: transparent; opacity: 0; transition: opacity .25s; }
.pinned-blk.ready .pin-body iframe { opacity: 1; }
.pin-wait { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; color: var(--dim); pointer-events: none; }
.pinned-blk.ready .pin-wait { display: none; }
.pin-off { padding: 14px 20px 18px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.pin-off a { color: var(--amber); }
/* page affichée « bloc seul » dans le tableau de bord */
html.embed, html.embed body { background: transparent; }
html.embed body { margin: 0; padding: 0; height: auto; }
html.embed { height: auto; }
html.embed .embed-off { display: none !important; }
html.embed #page { padding: 0; margin: 0; }
html.embed .grid { display: block; }
html.embed .panel { border: 0; box-shadow: none; background: transparent; border-radius: 0; }
html.embed .ph { min-height: 0; padding-top: 2px; }
html.embed .ph h2 { display: none; }
html.embed .ph:not(:has(.tools, .meta, .lnk, .seg, button, input)) { display: none; }
html.embed .jv-btn, html.embed .jv { display: none !important; }

/* ---------- Graphique avec outils de tracé (chart-tools.js) ---------- */
.pcx { /* racine du graphique à outils (nom distinct du .pc des tableaux) */  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; }
.pc-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-tools { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.pc-tools button, .pc-b { width: 32px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; }
.pc-tools button:hover, .pc-b:hover { background: var(--surface); color: var(--fg); }
.pc-tools button.on { background: var(--surface); color: var(--amber); box-shadow: 0 1px 3px var(--shadow); }
.pc-tools svg, .pc-b svg { width: 17px; height: 17px; }
.pc-ind { height: 36px; }
.pc-ind svg { width: 16px; height: 16px; }
.pc-sp { flex: 1; }
.pc-main { flex: 1; min-height: 200px; position: relative; }
.pc-c, .pc-ov { position: absolute; inset: 0; }
.pc-ov { pointer-events: none; cursor: crosshair; touch-action: none; }
.pcx.drawing .pc-ov { pointer-events: auto; }
.pc-rsi { height: 92px; flex: none; border-top: 1px solid var(--line); }
.pc-leg { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); min-height: 16px; }
.pc-leg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.pc-dr text { font: 11px var(--font-sans); }
.pc-gd { pointer-events: none; }
.pc-gd text { font: 11px var(--font-sans); }
.pc-b.on { background: var(--surface); color: var(--amber); box-shadow: 0 1px 3px var(--shadow); }
.pc-dels { height: 36px; }
.pc-dels svg { width: 16px; height: 16px; }
/* survol d'un tracé au curseur : la forme dit ce que le glisser va faire (le graphique pose son propre curseur en ligne) */
.pcx[data-hov="move"] .pc-c, .pcx[data-hov="move"] .pc-c * { cursor: move !important; }
.pcx[data-hov="ns"] .pc-c, .pcx[data-hov="ns"] .pc-c * { cursor: ns-resize !important; }
.pcx[data-hov="ew"] .pc-c, .pcx[data-hov="ew"] .pc-c * { cursor: ew-resize !important; }
.pcx[data-hov="pt"] .pc-c, .pcx[data-hov="pt"] .pc-c * { cursor: pointer !important; }

/* Bloc replié : seul le titre reste, le bloc ne prend plus que sa hauteur */
.ph .fold { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--dim); cursor: pointer; margin-left: -4px; }
.ph .fold:hover { background: var(--surface-2); color: var(--fg); }
.ph .fold svg { width: 16px; height: 16px; transition: transform .18s ease; }
.panel.folded .ph .fold svg { transform: rotate(-90deg); }
.panel.folded { min-height: 0 !important; height: auto !important; align-self: start; }
/* bloc dont l'utilisateur a choisi la hauteur : elle est gardée, le contenu défile dedans */
.panel.sized { overflow: hidden; }
.panel.sized > :not(.ph):not(.grip):not(.edge):not(.sizetag) { min-height: 0; overflow: auto; }
.panel.folded > :not(.ph) { display: none !important; }
.panel.folded .ph { margin-bottom: 0; }
.panel.folded .ph > :not(h2):not(.fold):not(.meta):not(.pact) { display: none !important; }
@media (prefers-reduced-motion: reduce) { .ph .fold svg { transition: none; } }

/* bloc montré par Jarvis */
.panel.jv-flash { animation: jvflash 2.1s ease; }
@keyframes jvflash { 0%, 30% { box-shadow: 0 0 0 2px var(--amber-fill), var(--card-shadow); } 100% { box-shadow: var(--card-shadow); } }
@media (prefers-reduced-motion: reduce) { .panel.jv-flash { animation: none; outline: 2px solid var(--amber-fill); } }

/* « Mon écosystème » : annonce de la version 2.0 (tendance en bougies qui se dessine) */
.nav a[data-id="ecosysteme"] .tag { color: var(--amber); background: var(--amber-soft); }
.eco-v2 { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(12,10,8,.42); opacity: 0; transition: opacity .2s ease; }
.eco-v2.in { opacity: 1; } .eco-v2.out { opacity: 0; }
.eco-card { position: relative; width: min(520px, 100%); background: var(--surface); color: var(--fg); border-radius: 20px; padding: 26px 26px 22px; box-shadow: 0 20px 60px var(--shadow-strong); text-align: center; transform: translateY(10px) scale(.98); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.eco-v2.in .eco-card { transform: none; }
.eco-x { position: absolute; top: 12px; right: 12px; }
.eco-k { font: 600 11.5px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.eco-ch { display: block; width: 100%; height: auto; margin: 14px 0 8px; overflow: visible; }
.eco-grid line { stroke: var(--grid); stroke-width: 1; }
.eco-c line { stroke-width: 1.4; }
.eco-c.up line, .eco-c.up rect { stroke: var(--up); fill: var(--up); }
.eco-c.dn line, .eco-c.dn rect { stroke: var(--down); fill: var(--down); }
.eco-c { opacity: 0; transform-box: fill-box; transform-origin: 50% 100%; animation: eco-c .34s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.25s + var(--i) * 70ms); }
@keyframes eco-c { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: none; } }
.eco-tr { fill: none; stroke: var(--amber-fill); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: eco-tr 1.75s .45s linear forwards; }
@keyframes eco-tr { to { stroke-dashoffset: 0; } }
.eco-dot { fill: var(--amber-fill); opacity: 0; animation: eco-in .3s 2.2s forwards; }
.eco-h { margin: 6px 0 4px; font: 700 34px/1.1 var(--font-display); letter-spacing: -.02em; opacity: 0; animation: eco-up .45s 1.9s cubic-bezier(.2,.8,.2,1) forwards; }
.eco-p { margin: 0 auto 16px; max-width: 34ch; color: var(--muted); font-size: 14px; opacity: 0; animation: eco-up .45s 2.05s cubic-bezier(.2,.8,.2,1) forwards; }
.eco-ok { opacity: 0; animation: eco-in .3s 2.2s forwards; }
@keyframes eco-in { to { opacity: 1; } }
@keyframes eco-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .eco-c, .eco-tr, .eco-dot, .eco-h, .eco-p, .eco-ok { animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
  .eco-v2, .eco-card { transition: none; }
}

/* ---------- nom de l'IA (2026-11-03) : bouton en bas du menu et carte d'accueil ---------- */
.ai-name { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px 0 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--muted); font: 500 12px var(--font-sans); text-align: left; }
.ai-name:hover { color: var(--fg); border-color: var(--line-strong); }
.ai-name .ai-ic { width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.ai-ic svg { width: 100%; height: 100%; }
.ai-ic .bot-body { fill: currentColor; } .ai-ic .bot-face { fill: var(--surface); } .ai-ic .bot-eye { fill: var(--amber-fill); }
.ai-name .ai-k { font: 600 11px var(--font-sans); letter-spacing: .06em; color: var(--dim); }
.ai-name .ai-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); font-weight: 600; }
.ai-name .ai-e { font-size: 11.5px; color: var(--dim); }
.app.closed .ai-name { justify-content: center; padding: 0; }
.app.closed .ai-name .ai-k, .app.closed .ai-name .ai-v, .app.closed .ai-name .ai-e { display: none; }
.ai-card {
  position: fixed; right: 80px; bottom: 18px; z-index: 95; width: min(380px, calc(100vw - 32px)); padding: 16px 16px 14px;
  border-radius: 20px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); box-shadow: 0 18px 50px var(--shadow-strong);
  opacity: 0; transform: translateY(10px); transition: opacity .22s ease, transform .3s cubic-bezier(.2,.8,.2,1);
}
.ai-card.in { opacity: 1; transform: none; }
.ai-card-hd { display: flex; align-items: center; gap: 10px; }
.ai-card-hd .ai-ic { width: 30px; height: 30px; flex: none; color: var(--fg); }
.ai-card h2 { margin: 0; font: 650 16px/1.25 var(--font-display); letter-spacing: -.01em; }
.ai-card-hd .ai-x { margin-left: auto; }
.ai-card p { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.ai-card label { display: block; margin-bottom: 6px; font: 600 11.5px var(--font-sans); color: var(--dim); }
.ai-row { display: flex; gap: 8px; }
.ai-row input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--fg); font: 500 14px var(--font-sans); outline: none; }
.ai-row input:focus { border-color: var(--amber-line); background: var(--surface); box-shadow: 0 0 0 4px var(--amber-soft); }
.ai-row input[aria-invalid="true"] { border-color: var(--down); }
.ai-row .btn { height: 36px; }
.ai-card .ai-err { margin: 8px 0 0; color: var(--down); font-size: 12px; }
.ai-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; }
.ai-link { padding: 0; border: 0; background: none; color: var(--amber); font: 600 12.5px var(--font-sans); cursor: pointer; }
.ai-link:hover { text-decoration: underline; }
.ai-link.ai-cancel { color: var(--muted); }
@media (max-width: 560px) { .ai-card { left: 16px; right: 16px; bottom: 78px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .ai-card { transition: none; } }
@media (forced-colors: active) { .ai-card { border: 1px solid CanvasText; } }

/* ---------- Version gratuite : outils de FXOS Pro floutés (shell.js, proGate) ---------- */
.pro-lock #page { filter: blur(7px) saturate(.85); pointer-events: none; user-select: none; }
.pro-lock .reset-btn, .pro-lock .cust-btn, .pro-lock .edit-btn, .pro-lock .jv-btn { visibility: hidden; }
.pro-wall { position: sticky; top: 96px; z-index: 30; height: 0; display: flex; justify-content: center; align-items: flex-start; }
.pro-wall .pw-card { margin-top: 80px; }
.pw-card { position: relative; width: min(440px, calc(100vw - 32px)); padding: 28px 26px 24px; border: 1px solid var(--line); border-radius: var(--r-lg, 20px); background: var(--surface); box-shadow: 0 24px 70px rgba(0, 0, 0, .18); text-align: center; }
.pw-k { margin: 0 0 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.pw-h { margin: 0 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; color: var(--fg); }
.pw-p { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.pw-al { margin: 14px 0 0; font-size: 13px; } .pw-al a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; } .pw-al a:hover { color: var(--fg); }
.pw-card .pw-go { display: inline-flex; justify-content: center; text-decoration: none; }
.pw-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(6px); }
.pw-x { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--dim); font-size: 22px; cursor: pointer; }
.pw-x:hover { color: var(--fg); background: var(--surface-2, var(--line)); }
html.embed .pro-wall { top: 8px; }
html.embed .pro-wall .pw-card { margin-top: 12px; padding: 16px; box-shadow: none; }
html.embed .pro-wall .pw-h { font-size: 16px; }
html.embed .pro-wall .pw-p { display: none; }
/* fil : recherche des banques floutée */
.af-it.pw-lock .h, .af-it.pw-lock .ex, .af-it.pw-lock .meta-row { filter: blur(5px); user-select: none; }
.af-it.pw-lock .ty.rs::after { content: ' · Pro'; color: var(--accent); }
@media (max-width: 700px) { .pro-wall { top: 70px; } .pro-wall .pw-card { margin-top: 40px; } }
/* page Pro servie sans contenu (functions/app/_middleware.js) : capture déjà floutée, selon le thème */
.pro-shot { position: relative; min-height: 70vh; overflow: hidden; border-radius: var(--r-lg, 20px); }
.pro-shot img { display: block; width: 100%; height: auto; min-height: 70vh; object-fit: cover; object-position: top left; opacity: .9; }
.pro-shot .pro-shot-d { display: none; }
html[data-theme="dark"] .pro-shot .pro-shot-l { display: none; }
html[data-theme="dark"] .pro-shot .pro-shot-d { display: block; }
html[data-pro-locked] #page { filter: none; }
/* verrou partiel (Géopolitique) : le globe reste net et utilisable, le reste est flouté */
.pro-lock.pro-part #page { filter: none; pointer-events: auto; user-select: auto; }
.pro-part .pro-gl { margin-bottom: 14px; }
/* le globe garde la moitié haute de l'écran : le flou et la carte « Passer à Pro » sont visibles dès l'arrivée, comme sur les autres
   outils Pro (goat, 2026-11-04, 14 h 23 : « pour l'aspect flou, mets-le aussi dans Géopolitique ») ; la carte chevauche le bas du globe */
@media (min-width: 701px) { .pro-part .pro-gl .globe-stage { min-height: min(460px, 48vh); } }
.pro-part .pro-wall { top: 120px; }
.pro-part .pro-wall .pw-card { margin-top: -70px; }
.pro-part .pro-shot { min-height: 70vh; }
@media (max-width: 700px) { .pro-part .pro-wall { top: 70px; } .pro-part .pro-wall .pw-card { margin-top: 24px; } }
/* grand écran : globe à gauche, flou et carte « Passer à Pro » à droite, tout dans le premier écran */
@media (min-width: 1100px) {
  .pro-lock.pro-part #page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  .pro-part .pro-gl { grid-area: 1 / 1; margin: 0; }
  .pro-part .pro-gl .globe-stage { min-height: min(640px, 70vh); }
  .pro-part .pro-shot { grid-area: 1 / 2; min-height: 0; }
  .pro-part .pro-shot img { position: absolute; inset: 0; height: 100%; min-height: 0; }
  .pro-part .pro-wall { grid-area: 1 / 2; position: relative; top: auto; height: auto; align-self: center; padding: 16px; }
  .pro-part .pro-wall .pw-card { margin-top: 0; }
}
.pro-part .pw-blur { filter: blur(7px) saturate(.85); pointer-events: none; user-select: none; }
.pro-part .pro-wall.pw-in { grid-column: 1 / -1; }
/* compte Pro ouvert ailleurs : bandeau en bas de l'écran */
.pw-else { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 14px; width: min(640px, calc(100% - 32px));
  padding: 12px 14px 12px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 18px 50px rgba(0,0,0,.22); color: var(--fg); }
.pw-else p { margin: 0; flex: 1; font-size: 13px; line-height: 1.45; }
.pw-else .btn { flex: none; }
@media (max-width: 560px) { .pw-else { flex-direction: column; align-items: stretch; } }
/* photo du compte */
.side .me .av.has-pic { background-size: cover; background-position: center; }
.me-photo { position: relative; }
.me-photo input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.me-photo:focus-within { outline: 2px solid var(--amber); outline-offset: -2px; border-radius: 8px; }

/* ---------- Écran partagé (goat, 2026-11-30, comptes de goat et Thomas) : Écran 1 = la page, Écran 2 = un cadre ---------- */
.nav a[data-id="split"] .tag { color: var(--dim); background: none; box-shadow: inset 0 0 0 1px var(--line-strong); }
.nav a[data-id="split"].sp-on .tag { color: var(--on-accent); background: var(--amber-fill); box-shadow: none; }
.nav a .sp-n { margin-left: auto; font: 700 10.5px var(--font-sans); color: var(--amber); }
.nav a .tag + .sp-n { margin-left: 6px; }
.app.split-on .main { display: flex; height: 100vh; position: sticky; top: 0; padding-right: 10px; }
.app.split-on .frame { flex: 0 0 55%; min-width: 0; min-height: 0; overflow: auto; padding-bottom: 40px; }
.sp-head { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); flex: none; }
.app.split-on .frame > .sp-head { position: sticky; top: 0; z-index: 30; }
.sp-num { font: 700 10.5px var(--font-sans); background: var(--amber-fill); color: var(--on-accent); border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.sp-head select { font: 600 11.5px var(--font-sans); color: var(--fg); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 4px; max-width: 170px; }
.sp-x { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--dim); cursor: pointer; }
.sp-x svg { width: 13px; height: 13px; }
.sp-x:hover { background: var(--surface-2, var(--line)); color: var(--fg); }
.sp-bar { flex: 0 0 10px; cursor: col-resize; display: grid; place-items: center; touch-action: none; }
.sp-bar span { width: 4px; height: 44px; border-radius: 4px; background: var(--amber-line, var(--line-strong)); }
.sp-bar:hover span, .app.sp-drag .sp-bar span, .sp-bar:focus-visible span { background: var(--amber-fill); }
.app.sp-drag iframe { pointer-events: none; }
.app.sp-drag { user-select: none; cursor: col-resize; }
.sp-pane { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sp-pane iframe { flex: 1; width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.sp-tabs { display: none; }
.sp-pop { position: fixed; z-index: 90; width: 196px; padding: 8px; border: 1px solid var(--amber-line, var(--line-strong)); border-radius: 10px; background: var(--surface); box-shadow: 0 10px 30px var(--shadow-strong, rgba(0,0,0,.2)); }
.sp-pop::before { content: ''; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; background: var(--surface); border-left: 1px solid var(--amber-line, var(--line-strong)); border-bottom: 1px solid var(--amber-line, var(--line-strong)); transform: rotate(45deg); }
.sp-pop.sp-pop-m::before { display: none; }
.sp-pop p { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.sp-pop p b { color: var(--fg); }
.sp-pop div { display: flex; gap: 6px; }
.sp-pop button { flex: 1; font: 700 12.5px var(--font-sans); padding: 7px 4px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--fg); cursor: pointer; }
.sp-pop button:hover, .sp-pop button:focus-visible { background: var(--amber-fill); border-color: var(--amber-fill); color: var(--on-accent); }
html.split-child .side, html.split-child .ticker, html.split-child .mob-top, html.split-child .jv-btn, html.split-child .jv { display: none !important; }
html.split-child .app, html.split-child .app.closed { grid-template-columns: minmax(0, 1fr); }
html.split-child .main { padding: 6px 10px; }
html.split-child .frame { min-height: 0; padding-bottom: 30px; }
@media (max-width: 860px) {
  .app.split-on .main { display: block; height: auto; position: static; padding-right: 0; }
  .app.split-on .frame { overflow: visible; }
  .app.split-on .sp-bar { display: none; }
  .app.split-on .sp-tabs { display: flex; gap: 4px; padding: 3px; margin: 0 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .sp-tabs button { flex: 1; font: 600 12.5px var(--font-sans); padding: 6px; border: 0; border-radius: 7px; background: none; color: var(--muted); }
  .sp-tabs button[aria-pressed="true"] { background: var(--amber-fill); color: var(--on-accent); }
  .app.split-on .sp-pane { display: none; }
  .app.split-on.sp-show2 .frame { display: none; }
  .app.split-on.sp-show2 .sp-pane { display: flex; height: calc(100vh - 110px); }
}
