.legacy-crm {
  /* Surfaces */
  --bg:            oklch(98.4% 0.008 150);
  --bg-elev:       oklch(99.5% 0.004 150);
  --bg-sink:       oklch(95.2% 0.014 172);
  --bg-soft:       #F7F8FA;

  /* Inks */
  --ink:           oklch(16% 0.02 200);
  --ink-2:         oklch(32% 0.02 200);
  --ink-3:         oklch(52% 0.015 200);
  --hair:          oklch(89% 0.008 200);
  --hair-strong:   oklch(82% 0.012 200);

  /* Brand */
  --mint:          #34D399;
  --mint-50:       #ECFDF5;
  --mint-600:      oklch(72% 0.145 172);
  --mint-700:      #059669;
  --mint-wash:     oklch(94% 0.035 172);
  --cyan:          #22D3EE;
  --cyan-700:      #0891B2;
  --ocean:         #2563EB;
  --ocean-deep:    oklch(26% 0.04 210);
  --amber:         #F59E0B;

  /* Color coding nuisibles — ALIGNÉS sur le site existant */
  --pest-punaises: #FF6B35;  /* orange pompier (au lieu du corail rose) */
  --pest-cafards:  #22D3EE;  /* cyan — inchangé */
  --pest-rats:     #475569;  /* slate-700 neutre (au lieu d'indigo) */
  --pest-guepes:   #F59E0B;  /* amber/jaune — inchangé */
  --pest-fourmis:  #84CC16;  /* vert sauge */
  --pest-pigeons:  #94A3B8;  /* gris-bleu */

  /* Effets */
  --grain-opacity: 0.035;

  /* Type — Plus Jakarta Sans à la place de Geist */
  --f-display: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Motion */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Shadows */
  --shadow-card:  0 1px 2px oklch(38% 0.05 210 / 0.04),
                  0 8px 24px -8px oklch(38% 0.05 210 / 0.08);
  --shadow-xl:    0 24px 48px -12px oklch(38% 0.05 210 / 0.14),
                  0 2px 8px oklch(38% 0.05 210 / 0.04);
  --shadow-cta:   0 1px 2px oklch(38% 0.05 210 / 0.06),
                  0 12px 32px -8px oklch(78% 0.14 172 / 0.35);
}
.legacy-crm { --pro-violet: #8B5CF6; }

/* Isolated 720 x 660 canvas. The host supplies --legacy-scale on resize. */
.legacy-crm { position:relative; width:100%; max-width:720px; aspect-ratio:720 / 660; margin-inline:auto; font-family:var(--f-display); color:var(--ink); line-height:1.4; text-align:left; isolation:isolate; }
.legacy-crm .legacy-crm-canvas { position:absolute; inset:0 auto auto 0; width:720px; height:660px; transform:scale(var(--legacy-scale,1)); transform-origin:0 0; }
.legacy-crm .legacy-crm-sprite { position:absolute; width:0; height:0; overflow:hidden; }
.legacy-crm *, .legacy-crm *::before, .legacy-crm *::after { box-sizing:content-box; }
.legacy-crm :is(h2,h3,p,ul,ol,li,figure) { margin:0; padding:0; max-width:none; min-height:0; list-style:none; background:none; text-shadow:none; }
.legacy-crm :is(h2,h3,p) { font-family:var(--f-display); font-style:normal; color:inherit; opacity:1; }
.legacy-crm :is(b,strong) { font-weight:700; }
.legacy-crm :is(small,em) { font-style:normal; }
.legacy-crm svg { flex-shrink:0; }
.legacy-crm img { max-width:none; }
/* QPest Pro — scènes d'illustration des heros de /pro (toutes les solutions)
   et des 3 pages persona (syndic, établissements, conciergerie). Cadre
   identique : carte app 640 × 560 + label flottant + callout. Sous 640 px de
   largeur disponible, la scène entière est mise à l'échelle comme une image
   par /scripts/pro-scenes.js. Icônes : sprite SVG inline en tête de <body>. */
.legacy-crm .scene-stage { --ps-w: 640px; --ps-h: 560px; position: relative; width: var(--ps-w); max-width: 100%; margin-inline: auto; padding: 36px 0 0; }
.legacy-crm .scene-frame { position: relative; }
.legacy-crm .scene-stage-label { position: absolute; left: -22px; top: -36px; z-index: 3; display: flex; align-items: center; gap: 9px; padding: 15px 20px; border: 1px solid var(--hair); border-radius: 16px; background: #fff; color: var(--ink-2); font: 500 10px/1.5 var(--f-mono); letter-spacing: .06em; box-shadow: 0 14px 30px -14px rgba(15,23,42,.22); }
.legacy-crm .scene-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-700); box-shadow: 0 0 0 3px color-mix(in oklab, var(--mint) 30%, transparent); }

/* The app card: light rail + mint ground + white cards, like the portal. */
.legacy-crm .scene-app { position: relative; width: var(--ps-w); height: var(--ps-h); display: grid; grid-template-columns: 56px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--hair); border-radius: 24px; background: #F3F8F6; box-shadow: 0 16px 40px -12px rgba(15,23,42,.18), 0 4px 8px -4px rgba(15,23,42,.06); font-size: 11px; line-height: 1.4; color: var(--ink); }
.legacy-crm .scene-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0 14px; background: #fff; border-right: 1px solid var(--hair); }
.legacy-crm .scene-rail-logo { width: 30px; height: 30px; margin-bottom: 4px; }
.legacy-crm .scene-rail-pro { margin-bottom: 10px; padding: 3px 6px; border-radius: 999px; border: 1px solid #E4D9FB; background: #F3EDFE; color: #7C3AED; font: 600 7px/1 var(--f-mono); letter-spacing: .06em; }
.legacy-crm .scene-rail-item { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-3); }
.legacy-crm .scene-rail-item svg { width: 17px; height: 17px; }
.legacy-crm .scene-rail-item.is-active { background: var(--mint-50); color: var(--mint-700); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--mint) 35%, transparent); }
.legacy-crm .scene-rail-avatar { margin-top: auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ocean-deep); color: #fff; font: 700 9px/1 var(--f-display); }

.legacy-crm .scene-main { min-width: 0; display: flex; flex-direction: column; gap: 11px; padding: 16px 18px 18px; }
.legacy-crm .scene-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.legacy-crm .scene-overline { margin-bottom: 4px; color: var(--ink-3); font: 500 8.5px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.legacy-crm .scene-head h2 { font-size: 17px; line-height: 1.15; letter-spacing: -.035em; font-weight: 800; }
.legacy-crm .scene-head p { margin-top: 3px; color: var(--ink-3); font-size: 10.5px; }
.legacy-crm .scene-mini-label { color: var(--ink-3); font: 500 7.5px/1.4 var(--f-mono); letter-spacing: .08em; }
.legacy-crm .scene-cta { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border-radius: 999px; background: linear-gradient(135deg, #34D399 0%, #22D3EE 50%, #2563EB 100%); color: #fff; font: 700 10.5px/1 var(--f-display); letter-spacing: -.01em; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(37,99,235,.55); }
.legacy-crm .scene-cta svg { width: 12px; height: 12px; }
.legacy-crm .scene-ghost { display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--hair-strong); background: #fff; color: var(--ink); font: 600 10px/1 var(--f-display); white-space: nowrap; }
.legacy-crm .scene-ghost svg { width: 11px; height: 11px; }

.legacy-crm .scene-cols { display: grid; grid-template-columns: minmax(0, 1fr) 198px; gap: 12px; align-items: start; }
.legacy-crm .scene-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.legacy-crm .scene-card { min-width: 0; background: #fff; border: 1px solid var(--hair); border-radius: 14px; padding: 11px 13px; box-shadow: 0 1px 2px rgba(15,23,42,.03); }
.legacy-crm .scene-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.legacy-crm .scene-card-head h3 { font-size: 12px; font-weight: 700; letter-spacing: -.02em; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.legacy-crm .scene-card-head small { color: var(--ink-3); font-size: 9.5px; white-space: nowrap; }
.legacy-crm .scene-count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding-inline: 5px; border-radius: 999px; background: #FDF2E7; color: #B45309; font: 700 9.5px/1 var(--f-display); }
.legacy-crm .scene-link { color: var(--ocean); font-weight: 600; font-size: 10px; white-space: nowrap; }

/* Chips & pills */
.legacy-crm .scene-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; font: 600 9px/1.2 var(--f-display); white-space: nowrap; }
.legacy-crm .scene-pill svg { width: 9px; height: 9px; }
.legacy-crm .scene-pill--mint { background: var(--mint-50); color: var(--mint-700); }
.legacy-crm .scene-pill--cyan { background: #E0F4FB; color: #0E7490; }
.legacy-crm .scene-pill--amber { background: #FDF2E7; color: #B45309; }
.legacy-crm .scene-pill--rust { background: #FEE9E7; color: #B42318; }
.legacy-crm .scene-pill--grey { background: #F1F4F3; color: var(--ink-3); }
.legacy-crm .scene-pill--ocean { background: #E7EEFD; color: #1D4ED8; }
.legacy-crm .scene-pill--violet { background: #F3EDFE; color: #7C3AED; }
.legacy-crm .scene-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 9px; }
.legacy-crm .scene-chip { padding: 4px 8px; border-radius: 999px; border: 1px solid var(--hair); color: var(--ink-2); font: 600 9px/1.2 var(--f-display); }
.legacy-crm .scene-chip.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Task rows (« À traiter ») */
.legacy-crm .scene-tasks { display: grid; gap: 6px; }
.legacy-crm .scene-task { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 8px 10px; border-radius: 10px; background: #FBFCFC; border: 1px solid var(--hair); }
.legacy-crm .scene-task i { width: 8px; height: 8px; border-radius: 50%; }
.legacy-crm .scene-task b { display: block; font-size: 10.5px; font-weight: 700; }
.legacy-crm .scene-task span { display: block; color: var(--ink-3); font-size: 9.5px; margin-top: 1px; }
.legacy-crm .scene-task b, .legacy-crm .scene-task span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Parc table */
.legacy-crm .scene-table { display: grid; }
.legacy-crm .scene-tr { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .95fr) minmax(0, 1.05fr); gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--hair); }
.legacy-crm .scene-tr.scene-th { padding: 0 0 5px; border-top: 0; color: var(--ink-3); font: 500 8px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }
.legacy-crm .scene-tr b { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: -.01em; }
.legacy-crm .scene-tr small { display: block; color: var(--ink-3); font-size: 9px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy-crm .scene-tr .scene-pill { margin-bottom: 2px; }

/* Agenda */
.legacy-crm .scene-agenda { display: grid; gap: 7px; }
.legacy-crm .scene-ag { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: center; }
.legacy-crm .scene-day { height: 32px; display: grid; place-items: center; align-content: center; border-radius: 8px; background: #F3F8F6; color: var(--ink-2); line-height: 1; }
.legacy-crm .scene-day em { font: 500 7px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.legacy-crm .scene-day b { font-size: 13px; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.legacy-crm .scene-day.is-cyan { background: #E0F4FB; color: #0E7490; } .legacy-crm .scene-day.is-cyan em { color: #0E7490; }
.legacy-crm .scene-ag b { display: block; font-size: 10.5px; font-weight: 700; }
.legacy-crm .scene-ag small { display: block; color: var(--ink-3); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy-crm .scene-ag-month { margin: 2px 0 -2px; color: var(--ink-3); font: 500 7.5px/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; }

/* Budget */
.legacy-crm .scene-amount { font-size: 19px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.legacy-crm .scene-amount small { font-size: 9.5px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.legacy-crm .scene-sub { color: var(--ink-3); font-size: 9.5px; margin-top: 2px; }
.legacy-crm .scene-bar { height: 6px; border-radius: 999px; background: #EEF3F1; margin: 9px 0 5px; overflow: hidden; }
.legacy-crm .scene-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #34D399, #22D3EE); }
.legacy-crm .scene-kv { display: flex; justify-content: space-between; gap: 8px; font-size: 9.5px; color: var(--ink-2); padding: 4px 0; border-top: 1px solid var(--hair); }
.legacy-crm .scene-kv:first-of-type { border-top: 0; }
.legacy-crm .scene-kv b { font-weight: 700; color: var(--ink); white-space: nowrap; }

/* Tabs (site page) */
.legacy-crm .scene-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: #E9F0ED; }
.legacy-crm .scene-tab { padding: 5px 10px; border-radius: 8px; color: var(--ink-3); font: 600 9.5px/1.2 var(--f-display); white-space: nowrap; }
.legacy-crm .scene-tab.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,42,.08); }

/* Building plan */
.legacy-crm .scene-plan { position: relative; border-radius: 10px; border: 1px solid var(--hair); background: #fff; overflow: hidden; }
.legacy-crm .scene-plan img { display: block; width: 100%; height: auto; }
.legacy-crm .scene-pin { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; display: grid; place-items: center; border-radius: 50%; border: 2px solid #fff; color: #fff; font: 700 8.5px/1 var(--f-display); box-shadow: 0 2px 4px rgba(15,23,42,.3); }
.legacy-crm .scene-pin.mint { background: #059669; } .legacy-crm .scene-pin.amber { background: #D97706; }
.legacy-crm .scene-pin.rust { background: #DC2626; box-shadow: 0 2px 4px rgba(15,23,42,.3), 0 0 0 6px rgba(220,38,38,.18); }
.legacy-crm .scene-legend { display: flex; gap: 10px; align-items: center; margin-top: 8px; color: var(--ink-3); font-size: 9px; }
.legacy-crm .scene-legend span { display: inline-flex; align-items: center; gap: 4px; }
.legacy-crm .scene-legend i { width: 7px; height: 7px; border-radius: 50%; }

/* Key figures strip (D50 tiles) + parc site rows — « Toutes les solutions » */
.legacy-crm .scene-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.legacy-crm .scene-figure { background: #fff; border: 1px solid var(--hair); border-radius: 12px; padding: 9px 11px; min-width: 0; }
.legacy-crm .scene-figure b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.legacy-crm .scene-figure span { display: block; font-size: 9.5px; font-weight: 600; color: var(--ink-2); margin-top: 2px; }
.legacy-crm .scene-figure small { display: block; font-size: 8.5px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy-crm .scene-figure.is-accent b { color: var(--mint-700); }
.legacy-crm .scene-sites { display: grid; gap: 6px; }
.legacy-crm .scene-site { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--hair); background: #FBFCFC; }
.legacy-crm .scene-site-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.legacy-crm .scene-site-name b { font-size: 10.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy-crm .scene-site small { display: block; color: var(--ink-3); font-size: 9px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy-crm .scene-site-status { display: block; margin-top: 3px; font-size: 9.5px; color: var(--ink-2); }
.legacy-crm .scene-site-status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.legacy-crm .scene-site-side { display: inline-flex; align-items: center; gap: 4px; color: var(--mint-700); font: 600 9px/1.2 var(--f-display); white-space: nowrap; }
.legacy-crm .scene-site-side svg { width: 11px; height: 11px; }
.legacy-crm .scene-site-side.is-muted { color: var(--ink-3); font-weight: 500; }

/* Site documents */
.legacy-crm .scene-docs { display: grid; gap: 5px; }
.legacy-crm .scene-doc { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: 9px; border: 1px solid var(--hair); background: #FBFCFC; }
.legacy-crm .scene-doc i { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: #E0F4FB; color: #0E7490; }
.legacy-crm .scene-doc i svg { width: 13px; height: 13px; }
.legacy-crm .scene-doc b { display: block; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy-crm .scene-doc--compact { grid-template-columns: 24px minmax(0, 1fr); }
.legacy-crm .scene-doc small em { font-style: normal; font-weight: 700; color: #0E7490; }
.legacy-crm .scene-doc small { display: block; color: var(--ink-3); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy-crm .scene-doc-size { color: var(--ink-3); font: 500 8px/1 var(--f-mono); letter-spacing: .06em; }

/* Stations */
.legacy-crm .scene-stations { display: grid; gap: 6px; }
.legacy-crm .scene-station { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--hair); background: #FBFCFC; }
.legacy-crm .scene-station i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; font: 700 9px/1 var(--f-display); }
.legacy-crm .scene-station b { display: block; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legacy-crm .scene-station-meta { display: flex; align-items: center; gap: 5px; margin-top: 2px; min-width: 0; }
.legacy-crm .scene-station-meta .scene-pill { padding: 2px 6px; font-size: 8.5px; }
.legacy-crm .scene-station small { display: block; color: var(--ink-3); font-size: 8.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Next passage */
.legacy-crm .scene-next { display: grid; gap: 5px; }
.legacy-crm .scene-next-date { display: grid; gap: 1px; }
.legacy-crm .scene-next-date b { font-size: 17px; font-weight: 800; letter-spacing: -.035em; }
.legacy-crm .scene-next-date span { font-size: 10px; color: var(--ink-2); font-weight: 600; }
.legacy-crm .scene-person { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.legacy-crm .scene-person i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #E0F4FB; color: #0E7490; font: 700 8px/1 var(--f-display); }
.legacy-crm .scene-person small { display: block; color: var(--ink-3); font-size: 8.5px; }
.legacy-crm .scene-remind { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 9px; background: var(--mint-50); color: var(--mint-700); font-size: 9.5px; font-weight: 600; }
.legacy-crm .scene-remind svg { width: 12px; height: 12px; flex: none; }

/* Stepper + order lines */
.legacy-crm .scene-steps { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; margin-top: -3px; }
.legacy-crm .scene-step { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font: 600 8.5px/1 var(--f-display); }
.legacy-crm .scene-step i { width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; background: var(--mint-50); color: var(--mint-700); }
.legacy-crm .scene-step i svg { width: 8px; height: 8px; }
.legacy-crm .scene-step.is-on { color: var(--ink); } .legacy-crm .scene-step.is-on i { background: var(--ink); color: #fff; font: 700 7.5px/1 var(--f-display); }
.legacy-crm .scene-step + .scene-step::before { content: ""; width: 10px; height: 1px; background: var(--hair-strong); margin-right: 2px; }
.legacy-crm .scene-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 10px 11px; border-radius: 11px; border: 1px solid var(--hair); background: #FBFCFC; }
.legacy-crm .scene-line + .scene-line { margin-top: 7px; }
.legacy-crm .scene-line b { display: block; font-size: 11px; font-weight: 700; letter-spacing: -.015em; margin: 4px 0 2px; }
.legacy-crm .scene-line p { color: var(--ink-2); font-size: 9.5px; }
.legacy-crm .scene-line p + p { color: var(--ink-3); }
.legacy-crm .scene-line .scene-price { text-align: right; }
.legacy-crm .scene-price b { font-size: 12px; margin: 4px 0 2px; }
.legacy-crm .scene-price small { display: block; color: var(--ink-3); font-size: 8.5px; }
.legacy-crm .scene-add { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 7px; padding: 7px; border-radius: 10px; border: 1px dashed var(--hair-strong); color: var(--ink-2); font: 600 9.5px/1 var(--f-display); }
.legacy-crm .scene-add svg { width: 11px; height: 11px; }
.legacy-crm .scene-totals { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--hair); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.legacy-crm .scene-totals .scene-kv { border: 0; padding: 2px 0; }
.legacy-crm .scene-totals .scene-kv.scene-total b { font-size: 12.5px; }

/* Month calendar */
.legacy-crm .scene-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.legacy-crm .scene-cal em { font: 500 7px/1.6 var(--f-mono); color: var(--ink-3); text-transform: uppercase; }
.legacy-crm .scene-cal span { position: relative; height: 21px; display: grid; place-items: center; border-radius: 6px; font-size: 9px; color: var(--ink-2); }
.legacy-crm .scene-cal span.mute { color: var(--hair-strong); }
.legacy-crm .scene-cal span.today { box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; color: var(--ink); }
.legacy-crm .scene-cal span.dot::after { content: ""; position: absolute; bottom: 1px; width: 4px; height: 4px; border-radius: 50%; background: var(--dot, var(--mint-700)); }
.legacy-crm .scene-cal span.ev { background: #E0F4FB; color: #0E7490; font-weight: 700; }
.legacy-crm .scene-cal span.ev2 { background: var(--mint-50); color: var(--mint-700); font-weight: 700; }

/* Floating callout, bottom-right */
.legacy-crm .scene-callout { position: absolute; right: -26px; bottom: -34px; z-index: 3; width: min(330px, 84%); display: flex; align-items: center; gap: 11px; padding: 14px 16px; border: 1px solid var(--hair); border-radius: 16px; background: #fff; color: var(--pro-violet); box-shadow: 0 14px 30px -14px rgba(15,23,42,.22); }
.legacy-crm .scene-callout > svg { width: 22px; height: 22px; flex: none; }
.legacy-crm .scene-callout b { display: block; font-size: 12px; line-height: 1.45; color: var(--ink); }
.legacy-crm .scene-callout small { display: block; margin-top: 2px; font-size: 11px; line-height: 1.45; color: var(--ink-3); }
.legacy-crm .scene-callout.is-cyan { color: var(--cyan-700); }
.legacy-crm .scene-callout.is-mint { color: var(--mint-700); }
.legacy-crm .scene-preview { margin: 54px 0 0; text-align: center; color: var(--ink-3); font-size: 11px; line-height: 1.6; }

/* Intégration vitrine : la scène vit dans .scene-slot, l'enfant de grille. */
.legacy-crm .scene-slot { min-width: 0; contain: inline-size; } /* la scène ne dicte jamais la largeur de sa colonne */
.legacy-crm .scene-stage :is(h2, h3, p) { margin: 0; }
.legacy-crm .scene-stage :is(svg, img) { display: block; }
.legacy-crm .scene-stage a { color: inherit; }
@media (max-width: 1023px) {
  .legacy-crm .scene-slot { width: min(100%, 640px); justify-self: center; } /* largeur explicite : avec contain, une marge auto la réduirait à 0 */
}


/* Keep every panel, rail and calendar; only the complete canvas is scaled. */
.legacy-crm .scene-stage { position:absolute; left:40px; top:36px; width:640px; max-width:none; margin:0; padding:0; }
.legacy-crm .scene-frame { transform:rotate(-3deg); transform-origin:center; }
/* The host presents one visible illustration caption outside the artwork. */
.legacy-crm .scene-preview { display:none; }
.legacy-crm .scene-callout { right:-20px; bottom:-26px; }
.legacy-crm .scene-rail-logo { object-fit:contain; }
.legacy-crm .scene-head h2 { font-size:17px; line-height:1.15; letter-spacing:-.035em; font-weight:800; }
.legacy-crm .scene-head p { font-size:10.5px; line-height:1.4; }
.legacy-crm .scene-head p.scene-overline { font:500 8.5px/1.4 var(--f-mono); letter-spacing:.08em; }
.legacy-crm .scene-card-head h3 { font-size:12px; line-height:1.4; letter-spacing:-.02em; font-weight:700; }
.legacy-crm .scene-line p { font-size:9.5px; line-height:1.4; }
.legacy-crm :is(.scene-cta,.scene-ghost,.scene-link,.scene-add,.scene-tab,.scene-rail-item) { cursor:default; pointer-events:none; }
@media (prefers-reduced-motion:reduce) { .legacy-crm .scene-frame { transform:none; } }
