/* ═══════════════════════════════════════════════════════════════════════════════════
   Suivi financier, campagnes, cockpit, factures QR, cautions, rentabilite, mandats, financement immobilier
   Extrait de index.html le 20.09.2026. L'ordre des fichiers compte : la cascade CSS en depend,
   ne pas les reordonner dans index.html.
   ═══════════════════════════════════════════════════════════════════════════════════ */

/* ═══ SUIVI FINANCIER · VOLUME DE PRIMES · DERNIÈRES ANALYSES (js/29-31, 19.09.2026) ═══ */
  .sfx .dbx-kpis, .vpx .dbx-kpis { margin-top: 4px; }
  .sfx-intro { font-size: var(--t-m); color: var(--text-muted); background: var(--accent-dim); border: 1px solid var(--accent-border); border-radius: 13px; padding: 12px 16px; margin-bottom: 16px; line-height: 1.5; }
  .sfx-note { margin-top: 16px; font-size: var(--t-s); color: var(--text-muted); background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; padding: 10px 14px; }
  .sfx-liste { display: flex; flex-direction: column; }
  .sfx-ligne { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
  .sfx-ligne:last-child { border-bottom: none; }
  .sfx-logo { display: flex; }
  .sfx-corps { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .sfx-corps b { font-size: var(--t-m); font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sfx-corps small { font-size: var(--t-xs); color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sfx-retard { font-size: var(--t-s); font-weight: 500; color: #EF4444; background: rgba(239,68,68,0.1); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
  .sfx-montant { font-size: var(--t-m); font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .sfx-table { display: flex; flex-direction: column; overflow-x: auto; }
  .sfx-tr { display: grid; grid-template-columns: minmax(220px, 2fr) 44px minmax(100px, 1fr) minmax(100px, 1fr) 76px minmax(190px, 1.6fr); align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--border); font-size: var(--t-s); color: var(--text); font-variant-numeric: tabular-nums; min-width: 760px; }
  .sfx-th { font-size: var(--t-xs); font-weight: 500; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.6px; padding-top: 0; }
  .sfx-nom { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .sfx-nom > span { display: flex; flex-direction: column; min-width: 0; }
  .sfx-nom small { font-size: var(--t-xs); color: var(--text-dim); }
  .sfx-ecart { font-weight: 600; border-radius: 999px; padding: 3px 9px; text-align: center; }
  .sfx-ecart.ok { color: #16A34A; background: rgba(34,197,94,0.12); } .sfx-ecart.moyen { color: #D97706; background: rgba(245,158,11,0.14); } .sfx-ecart.fort { color: #EF4444; background: rgba(239,68,68,0.12); }
  .sfx-sugg { font-size: var(--t-s); color: var(--text-muted); } .sfx-sugg b { color: var(--accent); }
  .sfx-mini { display: flex; flex-direction: column; }
  .sfx-mini > div, .sfx-mini > button { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border); background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; color: var(--text); font-family: inherit; }
  .sfx-mini > :last-child { border-bottom: none; }
  .sfx-mini span { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
  .sfx-mini b { font-size: var(--t-s); font-weight: 500; } .sfx-mini small { font-size: var(--t-xs); color: var(--text-dim); width: 100%; }
  .sfx-mini span > small { width: auto; }
  .sfx-mini em { font-style: normal; font-size: var(--t-s); font-weight: 500; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .sfx-mini em small { color: var(--text-dim); font-weight: 500; }
  .vpx-produit { cursor: pointer; } .vpx-produit:hover b { color: var(--accent); }
  .vpx-produit b em { display: inline-flex; width: 20px; color: var(--text-dim); font-size: var(--t-xs); }
  .vpx-filtre { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; margin-bottom: 16px; }
  .vpx-filtre summary { cursor: pointer; font-size: var(--t-m); font-weight: 600; color: var(--text); }
  .vpx-filtre summary span { color: var(--accent); font-weight: 500; }
  .vpx-anneau { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; color: var(--text); }
  .vpx-anneau svg { flex-shrink: 0; }
  .vpx-legende { flex: 1; min-width: 220px; display: flex; flex-direction: column; }
  .vpx-legende button { display: grid; grid-template-columns: 10px 22px minmax(0, 1fr) auto 38px; align-items: center; gap: 8px; background: none; border: none; border-radius: 9px; padding: 5px 6px; cursor: pointer; color: var(--text); font-size: var(--t-s); text-align: left; font-family: inherit; }
  .vpx-legende button:hover { background: var(--surface-alt); }
  .vpx-legende i { width: 10px; height: 10px; border-radius: 50%; }
  .vpx-legende span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vpx-legende b { font-weight: 600; font-variant-numeric: tabular-nums; } .vpx-legende small { color: var(--text-dim); text-align: right; }
  .vpx-select { width: auto; max-width: 200px; padding: 6px 10px; font-size: var(--t-s); }
  .vpx-split { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--surface-alt); margin: 6px 0 16px; }
  .vpx-split span { height: 100%; transition: width .6s cubic-bezier(.2,.8,.2,1); }
  .vpx-split-legende { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .vpx-split-legende div { display: grid; grid-template-columns: 10px 1fr; column-gap: 8px; row-gap: 2px; align-items: center; }
  .vpx-split-legende i { width: 10px; height: 10px; border-radius: 50%; grid-row: span 3; align-self: start; margin-top: 4px; }
  .vpx-split-legende span { font-size: var(--t-s); color: var(--text-muted); } .vpx-split-legende b { font-size: 18px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; } .vpx-split-legende small { font-size: var(--t-xs); color: var(--text-dim); }
  .vpx-top { display: flex; flex-direction: column; }
  .vpx-top button { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 38px; align-items: center; gap: 10px; background: none; border: none; border-bottom: 1px solid var(--border); padding: 8px 2px; cursor: pointer; color: var(--text); text-align: left; font-family: inherit; }
  .vpx-top button:last-child { border-bottom: none; }
  .vpx-top button:hover .vpx-top-nom { color: var(--accent); }
  .vpx-top em { font-style: normal; font-size: var(--t-xs); color: var(--text-dim); font-weight: 600; }
  .vpx-top-nom { display: flex; flex-direction: column; gap: 5px; font-size: var(--t-s); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vpx-top-nom .dbx-hbarre-piste { height: 5px; }
  .vpx-top b { font-size: var(--t-s); font-weight: 500; font-variant-numeric: tabular-nums; } .vpx-top small { font-size: var(--t-xs); color: var(--text-dim); text-align: right; }
  .anx { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--dbx-ombre); animation: dbx-entree .4s ease both; }
  .anx-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: var(--t-m); font-weight: 600; color: var(--text); }
  .anx-tete small { font-size: var(--t-xs); font-weight: 400; color: var(--text-dim); }
  .anx-liste { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .anx-carte { display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--border); background: var(--surface-alt); border-radius: 14px; padding: 12px 14px; cursor: pointer; color: var(--text); font-family: inherit; transition: all .15s; }
  .anx-carte:hover { border-color: var(--accent-border); transform: translateY(-2px); }
  .anx-carte b { font-size: var(--t-m); font-weight: 600; } .anx-carte small { font-size: var(--t-xs); color: var(--text-dim); }
  .anx-carte span { font-size: var(--t-xs); color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  @media (max-width: 768px) {
    .sfx-ligne { grid-template-columns: 30px minmax(0, 1fr) auto; } .sfx-montant { grid-column: 2 / -1; }
    .vpx-split-legende { grid-template-columns: 1fr; }
    .vpx-anneau { justify-content: center; }
  }

  /* ═══ CAMPAGNES (js/32-campagnes.js, 19.09.2026) ═══ */
  .cpx .dx-tete { align-items: flex-end; }
  .cpx-intro { margin: 6px 0 0; font-size: var(--t-s); color: var(--text-muted); max-width: 620px; line-height: 1.5; }
  .cpx-anim { opacity: 0; animation: dbx-entree .45s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i, 0) * 50ms); }
  .cpx-calme .cpx-anim, .cpx-calme .cpx-contact { animation: none; opacity: 1; transform: none; }

  /* Filtres en pastilles */
  .cpx-pastilles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
  .cpx-pastille { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 7px 14px; font-size: var(--t-s); font-weight: 500; cursor: pointer; font-family: inherit; transition: all .15s; white-space: nowrap; }
  .cpx-pastille:hover { color: var(--text); border-color: var(--accent-border); }
  .cpx-pastille span { font-size: var(--t-xs); font-weight: 500; color: var(--text-dim); background: var(--surface-alt); border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
  .cpx-pastille i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
  .cpx-pastille.actif { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
  .cpx-pastille.actif span { background: rgba(255,255,255,0.22); color: inherit; }

  /* Cartes de campagne */
  .cpx-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; padding-bottom: 24px; }
  .cpx-carte { --c: #00CFFF; position: relative; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; min-width: 0; padding: 18px 20px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--dbx-r, 18px);
    box-shadow: var(--dbx-ombre); color: var(--text); cursor: pointer; font-family: inherit; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
  .cpx-carte::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 20%, transparent)); }
  .cpx-carte:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, var(--border)); box-shadow: 0 16px 36px rgba(17,54,121,0.16); }
  .cpx-carte:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .cpx-carte[hidden] { display: none; }
  .cpx-carte-haut { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
  .cpx-icone { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
  .cpx-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
  .cpx-badge { font-size: var(--t-xs); font-weight: 500; border-radius: 999px; padding: 3px 9px; border: 1px solid var(--border); color: var(--text-muted); background: var(--surface-alt); white-space: nowrap; }
  .cpx-badge.vert { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.35); color: #16A34A; }
  .cpx-badge.bleu { background: rgba(0,207,255,0.12); border-color: rgba(0,207,255,0.35); color: #0284C7; }
  .cpx-badge.violet { background: rgba(167,139,250,0.14); border-color: rgba(167,139,250,0.4); color: #7C3AED; }
  .cpx-badge.gris { color: var(--text-dim); }
  html:not([data-theme="clair"]) .cpx-badge.vert { color: #4ADE80; }
  html:not([data-theme="clair"]) .cpx-badge.bleu { color: #67E8F9; }
  html:not([data-theme="clair"]) .cpx-badge.violet { color: #C4B5FD; }
  .cpx-carte-titre { font-size: var(--t-l); font-weight: 600; letter-spacing: -0.01em; color: var(--text); line-height: 1.3; }
  .cpx-carte-date { font-size: var(--t-xs); color: var(--text-muted); line-height: 1.45; }
  .cpx-carte-chiffres { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: var(--t-s); color: var(--text-muted); }
  .cpx-carte-chiffres b { color: var(--text); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
  .cpx-avancement { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; }
  .cpx-avancement-tete { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--text-muted); }
  .cpx-avancement-tete b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
  .cpx-barre { display: block; height: 8px; border-radius: 99px; background: var(--surface-alt); overflow: hidden; }
  .cpx-barre > span { display: block; height: 100%; min-width: 0; border-radius: 99px; background: linear-gradient(90deg, #113679, var(--c)); transition: width .6s cubic-bezier(.2,.8,.2,1); }
  .cpx-avancement-sous { font-size: var(--t-xs); color: var(--text-dim); }
  .cpx-carte-lien { margin-top: auto; padding-top: 4px; font-size: var(--t-s); font-weight: 500; color: var(--accent); }
  .cpx-carte-ajout { align-items: center; justify-content: center; text-align: center; min-height: 220px; background: var(--surface-alt); border: 1.5px dashed var(--border); box-shadow: none; }
  .cpx-carte-ajout::before { display: none; }
  .cpx-carte-ajout:hover { border-color: var(--accent); }
  .cpx-ajout-plus { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 300; color: #fff; background: linear-gradient(135deg, #00CFFF, #113679); box-shadow: 0 10px 24px rgba(17,54,121,0.3); }

  /* Fiche : bandeau */
  .cpx-hero .fcx-identite { align-items: center; }
  .cpx-hero-icone { width: 64px; height: 64px; flex-shrink: 0; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 32px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
  .cpx-hero .fcx-nom { margin: 4px 0 0; }
  .cpx-entonnoir { position: relative; display: flex; align-items: stretch; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.12); }
  .cpx-etape { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 5px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); border-radius: 13px; padding: 11px 14px; }
  .cpx-etape-label { font-size: var(--t-xs); color: rgba(255,255,255,0.68); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cpx-etape b { font-size: 22px; font-weight: 600; color: #fff; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
  .cpx-etape-piste { display: block; height: 5px; border-radius: 99px; background: rgba(255,255,255,0.14); overflow: hidden; }
  .cpx-etape-piste > span { display: block; height: 100%; border-radius: 99px; background: var(--c); transition: width .6s cubic-bezier(.2,.8,.2,1); }
  .cpx-etape small { font-size: var(--t-xs); color: rgba(255,255,255,0.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cpx-etape-fleche { align-self: center; color: rgba(255,255,255,0.35); font-size: 14px; }

  /* Fiche : contacts */
  .cpx-grille-fiche { padding-bottom: 24px; }
  .cpx-tete-contacts { flex-wrap: wrap; align-items: center; }
  .cpx-compte { font-size: var(--t-s); font-weight: 500; color: var(--text-dim); margin-left: 4px; }
  .cpx-tete-boutons { display: flex; gap: 6px; flex-wrap: wrap; }
  .cpx-recherche { width: 100%; margin-bottom: 10px; }
  .cpx-pastilles-statut { margin-bottom: 10px; }
  .cpx-pastilles-statut .cpx-pastille { padding: 6px 12px; font-size: var(--t-s); }
  .cpx-liste { display: flex; flex-direction: column; }
  .cpx-contact { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 0; border-bottom: 1px solid var(--border); border-radius: 0; animation: dbx-entree .35s ease both; animation-delay: calc(var(--i, 0) * 25ms); transition: background .15s; }
  .cpx-contact:last-child { border-bottom: none; }
  .cpx-contact:hover { background: var(--surface-alt); }
  .cpx-contact.retire { opacity: 0.55; }
  .cpx-coche { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; }
  .cpx-coche input { width: 18px; height: 18px; cursor: pointer; margin: 0; min-height: 0 !important; }
  .cpx-contact-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .cpx-contact-nom { background: none; border: none; padding: 0; text-align: left; font-family: inherit; font-size: var(--t-m); font-weight: 600; color: var(--text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .cpx-contact-nom:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
  .cpx-contact-corps small { font-size: var(--t-xs); color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cpx-contact-corps small em { font-style: normal; color: #D97706; }
  .cpx-statut { --c: #94A3B8; flex-shrink: 0; appearance: none; -webkit-appearance: none; font-family: inherit; font-size: var(--t-s); font-weight: 500; color: var(--text); cursor: pointer; border-radius: 999px; padding: 6px 28px 6px 12px;
    border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 12%, var(--surface)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2394A3B8' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 11px center; }
  .cpx-statut:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .cpx-retire-label { font-size: var(--t-xs); color: var(--text-dim); padding: 0 8px; }
  .cpx-contact-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
  .cpx-icone-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; font-size: 14px; transition: border-color .15s; }
  .cpx-icone-btn:hover { border-color: var(--accent-border); }
  .cpx-btn-petit { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 7px 11px; font-size: var(--t-s); font-weight: 500; cursor: pointer; font-family: inherit; white-space: nowrap; transition: all .15s; }
  .cpx-btn-petit:hover { border-color: var(--accent-border); color: var(--accent); }
  .cpx-note { margin: 10px 0 0; font-size: var(--t-xs); color: var(--text-dim); line-height: 1.5; }
  .cpx-note b { color: var(--text); font-weight: 600; }
  .cpx-note code { font-size: var(--t-xs); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; color: var(--text-muted); }

  /* Fiche : ciblage et message */
  .cpx-options { display: flex; flex-direction: column; gap: 6px; margin: 12px 0 16px; }
  .cpx-option { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-alt); cursor: pointer; transition: border-color .15s, background .15s; }
  .cpx-option:hover { border-color: var(--accent-border); }
  .cpx-option:has(input:checked) { border-color: var(--accent-border); background: var(--accent-dim); }
  .cpx-option input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); margin: 0; min-height: 0 !important; }
  .cpx-option span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
  .cpx-option b { font-size: var(--t-s); font-weight: 500; color: var(--text); }
  .cpx-option small { font-size: var(--t-xs); color: var(--text-dim); }
  .cpx-hbarres .dbx-hbarre { grid-template-columns: minmax(120px, 44%) 1fr auto; }
  .cpx-corps { min-height: 220px; font-family: inherit; resize: vertical; line-height: 1.55; }
  .cpx-boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

  @media (max-width: 1100px) {
    .cpx-grille-fiche .cpx-col-reglages { order: -1; }
  }
  @media (max-width: 768px) {
    /* marge basse (~90 px) pour la barre d'onglets : déjà fournie par .main (96 px) sur mobile */
    .cpx .dbx-carte { padding: 16px 14px; }
    .cpx .dx-tete-actions { width: 100%; }
    .cpx .dx-tete-actions .btn-save { flex: 1; min-height: 46px; }
    .cpx-pastilles { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -2px; margin-right: -2px; padding: 2px; }
    .cpx-pastilles::-webkit-scrollbar { display: none; }
    .cpx-pastille { min-height: 44px; padding: 8px 14px; }
    .cpx-grille { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .cpx-carte { padding: 16px; }
    .cpx-carte-ajout { min-height: 140px; }
    .cpx-hero .fcx-identite { align-items: flex-start; gap: 12px; }
    .cpx-hero-icone { width: 44px; height: 44px; font-size: 22px; border-radius: 14px; }
    .cpx-hero .fcx-chip { white-space: normal; }
    .cpx-hero .fcx-actions-principales > * { min-height: 46px; }
    .cpx-hero .fcx-actions-menus button { min-height: 44px; }
    .cpx-entonnoir { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .cpx-etape-fleche { display: none; }
    .cpx-etape b { font-size: var(--t-xl); }
    .cpx-tete-boutons { width: 100%; }
    .cpx-tete-boutons .cpx-btn-petit { flex: 1; }
    .cpx-btn-petit, .cpx-icone-btn { min-height: 44px; }
    .cpx-icone-btn { width: 44px; }
    .cpx-recherche { min-height: 44px; font-size: 16px; }
    .cpx-contact { flex-wrap: wrap; gap: 6px 8px; padding: 10px 0; }
    .cpx-coche { width: 44px; height: 44px; }
    .cpx-contact-corps { flex: 1 1 calc(100% - 56px); gap: 0; }
    .cpx-contact-nom { min-height: 44px; }
    .cpx-statut { flex: 1 1 auto; min-width: 0; min-height: 44px; font-size: var(--t-m); }
    .cpx-retire-label { margin-left: 44px; }
    .cpx-contact-actions { margin-left: auto; }
    .cpx-apercu { width: 44px; padding: 0; font-size: 14px; }
    .cpx-apercu span { display: none; }
    .cpx-option { min-height: 52px; }
    .cpx-hbarres .dbx-hbarre { grid-template-columns: minmax(96px, 42%) 1fr auto; gap: 8px; }
    .cpx-boutons > * { flex: 1 1 100%; min-height: 46px; }
    .cpx-fiche select.form-select, .cpx-fiche .form-input { min-height: 44px; font-size: 16px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .cpx-anim, .cpx-contact { animation: none; opacity: 1; }
    .cpx-carte, .cpx-barre > span, .cpx-etape-piste > span { transition: none; }
  }

  /* ═══ COCKPIT FINANCIER (js/34, 19.09.2026) ═══ */
  .ck-alertes { margin-bottom: 18px; }
  .ck-flux { margin-top: 0; }
  .ck-flux svg { width: 100%; height: auto; }
  .ck-ico { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-alt); font-size: 14px; font-weight: 600; color: var(--text-muted); }
  .ck-date { font-size: var(--t-s); color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ck-charge { grid-template-columns: 34px minmax(0, 1fr) auto auto; }
  .ck-mois2 { color: var(--text-muted); font-weight: 500; }
  .ck-ouvrir { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 9px; padding: 6px 12px; font-size: var(--t-s); font-weight: 500; cursor: pointer; font-family: inherit; }
  .ck-ouvrir:hover { border-color: var(--accent-border); color: var(--accent); }
  .ck-groupe { margin-bottom: 12px; padding: 0; overflow: hidden; }
  .ck-groupe > summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
  .ck-groupe > summary::-webkit-details-marker { display: none; }
  .ck-groupe > summary b { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
  .ck-groupe > summary em { font-style: normal; font-size: var(--t-s); font-weight: 500; color: var(--text-muted); white-space: nowrap; }
  .ck-groupe[open] > summary { border-bottom: 1px solid var(--border); }
  .ck-groupe .sfx-liste { padding: 4px 20px 12px; }
  .ck-groupe .sfx-ligne { grid-template-columns: 34px minmax(0, 1fr) auto auto; }
  .ck-explication { margin: 12px 20px 4px; font-size: var(--t-s); color: var(--text-muted); line-height: 1.5; }
  .ck-niveau { font-size: var(--t-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
  .ck-niveau.erreur { background: rgba(239,68,68,0.12); color: #EF4444; }
  .ck-niveau.attention { background: rgba(245,158,11,0.14); color: #D97706; }
  .ck-niveau.info { background: var(--accent-dim); color: var(--accent); }
  .ck-groupe.erreur { border-left: 3px solid #EF4444; } .ck-groupe.attention { border-left: 3px solid #F59E0B; }
  @media (max-width: 768px) {
    .ck-groupe .sfx-ligne, .ck-charge { grid-template-columns: 30px minmax(0, 1fr) auto; }
    .ck-groupe .ck-ouvrir { grid-column: 2 / -1; justify-self: start; }
    .ck-mois2 { display: none; }
  }


  /* ═══ FACTURES QR SUISSES (js/33, 19.09.2026) ═══ */
  .fqr .dbx-kpis { margin-top: 4px; }
  .fqr-bandeau { display: flex; align-items: center; gap: 14px; background: var(--accent-dim); border: 1px solid var(--accent-border); border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; }
  .fqr-bandeau-icone { font-size: 24px; }
  .fqr-bandeau > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .fqr-bandeau b { font-size: var(--t-m); color: var(--text); }
  .fqr-bandeau small { font-size: var(--t-s); color: var(--text-muted); }
  .fqr-outils { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
  .fqr-outils .dbx-onglets { margin-bottom: 0; }
  .fqr-compte { font-size: var(--t-xs); font-weight: 500; opacity: .75; }
  .fqr-recherche { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; }
  .fqr-recherche input { flex: 1; border: none; background: transparent; color: var(--text); font: inherit; font-size: var(--t-m); padding: 10px 0; outline: none; min-width: 0; }
  .fqr-recherche:focus-within { border-color: var(--accent-border); }
  .fqr-carte-liste { padding: 6px 10px; }

  /* Liste */
  .fqr-liste { display: flex; flex-direction: column; }
  .fqr-ligne { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); animation: fqr-entree .35s ease both; animation-delay: calc(var(--i, 0) * 30ms); }
  .fqr-ligne:last-child { border-bottom: none; }
  .fqr-ligne-corps { flex: 1; min-width: 0; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 6px; background: none; border: none; border-radius: 10px; cursor: pointer; text-align: left; color: var(--text); font-family: inherit; }
  .fqr-ligne-corps:hover { background: var(--surface-alt); }
  .fqr-ligne-corps:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
  .fqr-ligne-texte { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .fqr-ligne-texte b { font-size: var(--t-m); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fqr-ligne-texte small { font-size: var(--t-xs); color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fqr-ligne-montant { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .fqr-ligne-annulee .fqr-ligne-texte b, .fqr-ligne-annulee .fqr-ligne-montant { text-decoration: line-through; color: var(--text-dim); }
  .fqr-ligne-actions { display: flex; gap: 4px; flex-shrink: 0; }
  .fqr-icone { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 9px; cursor: pointer; font-size: 14px; transition: all .15s; }
  .fqr-icone:hover:not(:disabled) { color: var(--accent); border-color: var(--accent-border); background: var(--accent-dim); }
  .fqr-icone:disabled { opacity: .35; cursor: default; }
  .fqr-icone-ok:hover:not(:disabled) { color: #16A34A; border-color: rgba(34,197,94,0.4); background: rgba(34,197,94,0.1); }
  .fqr-icone-danger:hover:not(:disabled) { color: #EF4444; border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.1); }

  /* Pastilles de statut */
  .fqr-statut { display: inline-flex; justify-content: center; font-size: var(--t-xs); font-weight: 500; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
  .fqr-s-brouillon { color: var(--text-muted); background: var(--surface-alt); border: 1px dashed var(--border); }
  .fqr-s-emise { color: #2563EB; background: rgba(59,130,246,0.12); }
  .fqr-s-retard { color: #EF4444; background: rgba(239,68,68,0.12); }
  .fqr-s-payee { color: #16A34A; background: rgba(34,197,94,0.13); }
  .fqr-s-annulee { color: var(--text-dim); background: var(--surface-alt); }
  html:not([data-theme="clair"]) .fqr-s-emise { color: #7DB4FF; background: rgba(59,130,246,0.18); }
  html:not([data-theme="clair"]) .fqr-s-retard { color: #FF8A8A; }
  html:not([data-theme="clair"]) .fqr-s-payee { color: #4ADE80; }
  html:not([data-theme="clair"]) .fqr-erreurs { color: #FCA5A5; }
  html:not([data-theme="clair"]) .fqr-info-alerte { color: #FBBF24; }

  /* Modales */
  .fqr-modale { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; width: 100%; max-width: 620px; box-shadow: 0 24px 60px rgba(0,0,0,0.3); color: var(--text); margin: auto; }
  .fqr-modale-petite { max-width: 420px; }
  .fqr-modale-large { max-width: 1240px; }
  .fqr-modale-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
  .fqr-modale-tete h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
  .fqr-modale-sous { font-size: var(--t-s); color: var(--text-muted); }
  .fqr-modale-sous b { color: var(--accent); font-variant-numeric: tabular-nums; }
  .fqr-fermer { border: none; background: var(--surface-alt); color: var(--text-muted); width: 32px; height: 32px; border-radius: 10px; cursor: pointer; font-size: 14px; flex-shrink: 0; }
  .fqr-fermer:hover { color: var(--text); background: var(--surface-hover); }
  .fqr-modale-pied { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
  .fqr-espace { flex: 1; }
  .fqr-aide { font-size: var(--t-s); color: var(--text-muted); line-height: 1.5; margin: 12px 0 0; }
  .fqr-info { font-size: var(--t-s); color: var(--text-muted); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 11px; padding: 9px 12px; margin-bottom: 12px; }
  .fqr-info-alerte { color: #B45309; background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.35); }

  /* Champs */
  .fqr-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .fqr-plein { grid-column: 1 / -1; }
  .fqr-champ { display: flex; flex-direction: column; gap: 5px; font-size: var(--t-xs); font-weight: 500; color: var(--text-muted); }
  .fqr-champ small { font-weight: 500; color: var(--text-dim); }
  .fqr-champ input, .fqr-champ select, .fqr-champ textarea { width: 100%; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; color: var(--text); font: inherit; font-size: var(--t-m); font-weight: 500; outline: none; transition: border-color .15s; }
  .fqr-champ textarea { resize: vertical; line-height: 1.45; }
  .fqr-champ input:focus, .fqr-champ select:focus, .fqr-champ textarea:focus { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-dim); }
  .fqr-champ input:disabled, .fqr-champ select:disabled, .fqr-champ textarea:disabled { opacity: .7; cursor: default; }
  .fqr-mono { font-family: ui-monospace, 'SF Mono', Consolas, monospace !important; letter-spacing: .5px; }
  .fqr-case { display: flex; align-items: center; gap: 8px; font-size: var(--t-s); color: var(--text-muted); cursor: pointer; }
  .fqr-verif { font-size: var(--t-s); font-weight: 500; margin-top: -4px; min-height: 0; }
  .fqr-verif.ok { color: #16A34A; }
  .fqr-verif.ko { color: #EF4444; }

  /* Éditeur */
  .fqr-editeur { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: start; }
  .fqr-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .fqr-bloc { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
  .fqr-bloc h4 { margin: 0 0 10px; font-size: var(--t-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); }
  .fqr-bloc .fqr-champ input, .fqr-bloc .fqr-champ select, .fqr-bloc .fqr-champ textarea { background: var(--surface); }
  .fqr-client { position: relative; margin-bottom: 8px; }
  .fqr-client input { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; color: var(--text); font: inherit; font-size: var(--t-m); outline: none; }
  .fqr-client input:focus { border-color: var(--accent-border); }
  .fqr-client-res { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,0.25); overflow: hidden; }
  .fqr-client-res:empty { display: none; }
  .fqr-client-res button { display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: none; border-bottom: 1px solid var(--border); padding: 9px 12px; cursor: pointer; color: var(--text); font-family: inherit; }
  .fqr-client-res button:last-child { border-bottom: none; }
  .fqr-client-res button:hover { background: var(--accent-dim); }
  .fqr-client-res b { font-size: var(--t-m); font-weight: 600; }
  .fqr-client-res small { font-size: var(--t-xs); color: var(--text-dim); }
  .fqr-client-vide { padding: 10px 12px; font-size: var(--t-s); color: var(--text-dim); }
  .fqr-lien-client { font-size: var(--t-s); color: var(--text-muted); margin-bottom: 10px; }
  .fqr-lien-client b { color: var(--text); }
  .fqr-lignes { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
  .fqr-lignes-tete, .fqr-lignes-ligne { display: grid; grid-template-columns: minmax(0, 1fr) 64px 100px 96px 32px; gap: 6px; align-items: center; }
  .fqr-lignes-tete span { font-size: var(--t-xs); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; color: var(--text-dim); }
  .fqr-lignes-tete span:nth-child(n+2):nth-child(-n+4) { text-align: right; }
  .fqr-lignes-ligne input { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 8px 9px; color: var(--text); font: inherit; font-size: var(--t-m); outline: none; min-width: 0; }
  .fqr-lignes-ligne input:nth-child(2), .fqr-lignes-ligne input:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
  .fqr-lignes-ligne input:focus { border-color: var(--accent-border); }
  .fqr-lignes-montant { text-align: right; font-size: var(--t-m); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .fqr-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
  .fqr-total span { font-size: var(--t-s); font-weight: 500; text-transform: uppercase; letter-spacing: .6px; color: var(--text-dim); }
  .fqr-total b { font-size: 20px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
  .fqr-delais { display: flex; gap: 6px; margin-top: -4px; }
  .fqr-delais button { border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 999px; padding: 4px 11px; font-size: var(--t-xs); font-weight: 500; cursor: pointer; font-family: inherit; }
  .fqr-delais button:hover { color: var(--accent); border-color: var(--accent-border); }
  .fqr-ref { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--t-s); color: var(--text-muted); }
  .fqr-ref code { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: var(--t-s); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px 9px; letter-spacing: .4px; }
  .fqr-erreurs { font-size: var(--t-s); color: #B91C1C; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.3); border-radius: 12px; padding: 10px 14px; }
  .fqr-erreurs ul { margin: 6px 0 0; padding-left: 18px; }
  .fqr-erreurs li { margin: 2px 0; }

  /* Aperçu A4 (210 × 297 mm = 794 × 1123 px, réduit à 50 %) */
  .fqr-apercu { position: sticky; top: 0; display: flex; flex-direction: column; gap: 8px; }
  .fqr-apercu-tete { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--t-s); font-weight: 500; color: var(--text-muted); }
  .fqr-apercu-tete small { font-weight: 500; color: var(--text-dim); }
  .fqr-apercu-cadre { width: 397px; height: 562px; overflow: hidden; border-radius: 8px; border: 1px solid var(--border); background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
  .fqr-apercu-cadre iframe { width: 794px; height: 1123px; border: none; transform: scale(.5); transform-origin: 0 0; background: #fff; pointer-events: none; }

  @keyframes fqr-entree { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

  @media (max-width: 1100px) {
    .fqr-editeur { grid-template-columns: minmax(0, 1fr); }
    .fqr-apercu { position: static; align-items: center; }
  }
  @media (max-width: 700px) {
    .fqr-ligne { flex-wrap: wrap; padding-bottom: 8px; }
    .fqr-ligne-corps { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
    .fqr-ligne-corps .fqr-statut { grid-column: 1 / -1; justify-self: start; }
    .fqr-ligne-actions { width: 100%; justify-content: flex-end; }
    .fqr-grille { grid-template-columns: minmax(0, 1fr); }
    .fqr-lignes-tete { display: none; }
    .fqr-lignes-ligne { grid-template-columns: 1fr 1fr 1fr 32px; }
    .fqr-lignes-ligne input:first-child { grid-column: 1 / -1; }
    .fqr-modale { padding: 18px 16px; }
    .fqr-apercu-cadre { width: 298px; height: 421px; }
    .fqr-apercu-cadre iframe { transform: scale(.375); }
    .fqr-bandeau { flex-wrap: wrap; }
  }
  @media (prefers-reduced-motion: reduce) {
    .fqr-ligne { animation: none; }
  }

  .oz-ligne { grid-template-columns: 22px minmax(0, 1fr) auto; cursor: pointer; }
  .oz-ligne input { width: 17px; height: 17px; accent-color: var(--accent); min-height: 0 !important; }

  /* ═══ COMPTES DE CAUTION (js/35, 19.09.2026) ═══ */
  .cau-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 18px; }
  .cau-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
  .cau-chiffres > div { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 13px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
  .cau-chiffres span { font-size: var(--t-xs); color: var(--text-muted); } .cau-chiffres b { font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; } .cau-chiffres small { font-size: var(--t-xs); color: var(--text-dim); }
  .cau-ligne { grid-template-columns: minmax(0, 1fr) 90px 80px 90px auto; }
  .cau-val { display: flex; flex-direction: column; align-items: flex-end; font-size: var(--t-s); font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
  .cau-val small { font-size: 10px; font-weight: 500; color: var(--text-dim); } .cau-val em { font-style: normal; color: var(--text-dim); }
  @media (max-width: 768px) { .cau-grille { grid-template-columns: 1fr; } .cau-chiffres { grid-template-columns: 1fr 1fr; } .cau-ligne { grid-template-columns: 1fr 1fr 1fr; } .cau-ligne .sfx-corps { grid-column: 1 / -1; } }
  /* ═══ RENTABILITÉ (js/36, 19.09.2026) ═══ */
  .rt-segments { margin-bottom: 14px; }
  .rt-table .sfx-tr { grid-template-columns: minmax(200px, 2fr) 70px minmax(90px, 1fr) minmax(90px, 1fr) minmax(100px, 1fr) 80px minmax(100px, 1fr); min-width: 780px; }
  .rt-nom { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
  .rt-nom .dbx-hbarre-piste { height: 5px; }
  .rt-recurrent { color: #16A34A; font-weight: 600; } .rt-dim { color: var(--text-dim); }
  .rt-reco { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .rt-produit { font-size: var(--t-s); font-weight: 500; color: var(--accent); background: var(--accent-dim); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
  @media (max-width: 768px) { .rt-reco { grid-template-columns: 1fr auto; } .rt-reco .sfx-corps { grid-column: 1 / -1; } }
  /* ═══ MANDATS (mdx-) & FINANCEMENT IMMO (fih-) — 19.09.2026 ═══ */

/* ═══ MANDATS (mdx-) & FINANCEMENT IMMO (fih-) — 19.09.2026 ═══ */
  /* ═══ Financement immobilier — diagrammes (fih-) — 19.09.2026 ═══════════════════════════════ */
  /* SVG aux couleurs en dur (prévues pour le blanc du rapport) ; en thème sombre, textes et bleu
     marine s'éclaircissent ici. Animation d'entrée uniquement sous .fih-anime (1er affichage). */
  .fih-graphe { max-width: 440px; margin: 0 auto; }
  .fih-legende { justify-content: center; gap: 6px 16px; margin-top: 10px; }
  .fih-legende i { flex-shrink: 0; }
  .fih-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; border-radius: 10px; }
  .fih-defile:focus-visible { outline: 2px solid var(--accent-border); outline-offset: 2px; }
  .fih-maison { padding: 4px 0 0; }
  .fih-svg text { font-variant-numeric: tabular-nums; }
  .fih-svg rect { transition: opacity .15s; }
  .fih-anime .fih-monte { transform-box: fill-box; transform-origin: 50% 100%; animation: fih-monte .7s cubic-bezier(.2,.8,.2,1) both; }
  .fih-anime .fih-fondu { animation: fih-fondu .5s ease both; }
  .fih-anime .fih-trace { stroke-dasharray: 1; stroke-dashoffset: 1; animation: fih-trace 1.1s .35s ease-out forwards; }
  @keyframes fih-monte { from { transform: scaleY(0); opacity: .3; } to { transform: none; opacity: 1; } }
  @keyframes fih-fondu { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
  @keyframes fih-trace { to { stroke-dashoffset: 0; } }
  @media (prefers-reduced-motion: reduce) {
    .fih-anime .fih-monte, .fih-anime .fih-fondu { animation: none; }
    .fih-anime .fih-trace { animation: none; stroke-dashoffset: 0; }
  }
  html:not([data-theme="clair"]) .fih-svg .fih-t-fort { fill: #E7ECF4; }
  html:not([data-theme="clair"]) .fih-svg .fih-t-doux { fill: #9AA7BB; }
  html:not([data-theme="clair"]) .fih-svg .fih-navy { fill: #3D6BC7; }
  html:not([data-theme="clair"]) .fih-svg .fih-t-navy { fill: #8FB3F5; }
  html:not([data-theme="clair"]) .fih-svg .fih-t-cyan { fill: #00CFFF; }
  html:not([data-theme="clair"]) .fih-svg .fih-t-ambre { fill: #FBBF24; }
  html:not([data-theme="clair"]) .fih-svg .fih-halo { stroke: var(--surface); }
  html:not([data-theme="clair"]) .fih-svg .fih-pastille { fill: var(--surface-alt); stroke: var(--border); }
  html:not([data-theme="clair"]) .fih-svg .fih-trait { stroke: #9AA7BB; }
  html:not([data-theme="clair"]) .fih-svg .fih-sol { stroke: #2A3957; }
  html:not([data-theme="clair"]) .fih-svg .fih-ombre { fill: #000; fill-opacity: .35; }
  html:not([data-theme="clair"]) .fih-svg .fih-toit-neutre { fill: #2A3957; stroke: #2A3957; }
  html:not([data-theme="clair"]) .fih-sw-navy { background: #3D6BC7 !important; }
  @media (max-width: 700px) {
    .fih-defile { margin: 0 -8px; padding: 0 8px 6px; }
    .fih-defile svg { min-width: 640px; }
    .fih-legende { justify-content: flex-start; }
  }

  /* ═══ Mandats de courtage — modales, signature, liste de la fiche client (mdx-) ═══════════════ */
  .mdx-modale { max-width: 560px; }
  .mdx-modale-large { max-width: 680px; }
  .mdx-modale-flex { display: flex; flex-direction: column; max-height: 90vh; overflow-y: auto; }
  .mdx-modale-flex > * { flex-shrink: 0; }
  .mdx-modale-signature { max-width: 620px; }
  .mdx-tete { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
  .mdx-tete-icone { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(0,207,255,0.18), rgba(17,54,121,0.18)); border: 1px solid var(--accent-border); }
  .mdx-tete-texte { flex: 1; min-width: 0; }
  .mdx-tete-texte h3 { margin: 2px 0 2px; }
  .mdx-tete-texte .opx-modale-sous { margin-bottom: 0; }
  .mdx-fermer { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: 14px; cursor: pointer; flex-shrink: 0; font-family: inherit; transition: all .15s; }
  .mdx-fermer:hover { color: var(--text); border-color: var(--accent-border); background: var(--accent-dim); }

  .mdx-etapes { display: flex; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; counter-reset: none; }
  .mdx-etapes li { flex: 1; display: flex; align-items: center; gap: 7px; font-size: var(--t-s); font-weight: 500; color: var(--text-dim); padding: 7px 10px; border-radius: 10px; background: var(--surface-alt); border: 1px solid var(--border); }
  .mdx-etapes li span { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: var(--t-xs); font-weight: 500; background: var(--border); color: var(--text-muted); flex-shrink: 0; }
  .mdx-etapes li.actif { color: var(--text); border-color: var(--accent-border); background: var(--accent-dim); }
  .mdx-etapes li.actif span { background: var(--accent); color: var(--on-accent); }
  .mdx-etapes li.fait { color: var(--text-muted); }
  .mdx-etapes li.fait span { background: #22C55E; color: #fff; }

  .mdx-carte-info { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-alt); border: 1px solid var(--border); margin-bottom: 14px; }
  .mdx-carte-info p { margin: 0; font-size: var(--t-s); line-height: 1.5; color: var(--text-muted); }
  .mdx-optionnel { font-size: var(--t-xs); font-weight: 500; color: var(--text-dim); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
  .mdx-textarea { resize: vertical; min-height: 96px; font-family: inherit; line-height: 1.5; }
  .mdx-aide { display: block; font-size: var(--t-xs); color: var(--text-dim); margin-top: 6px; line-height: 1.45; }

  .mdx-pastille { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-xs); font-weight: 500; padding: 3px 9px; border-radius: 999px; white-space: nowrap; color: var(--text-muted); background: var(--surface-alt); border: 1px solid var(--border); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .mdx-pastille.ok { color: #16A34A; background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.35); }
  .mdx-pastille.alerte { color: #DC2626; background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.3); }
  html:not([data-theme="clair"]) .mdx-pastille.ok { color: #4ADE80; }
  html:not([data-theme="clair"]) .mdx-pastille.alerte { color: #F87171; }

  .mdx-alerte { display: flex; gap: 8px; align-items: flex-start; font-size: var(--t-s); line-height: 1.45; color: var(--text); padding: 10px 12px; border-radius: 12px; background: var(--accent-dim); border: 1px solid var(--accent-border); margin-bottom: 12px; }
  .mdx-alerte.orange { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.35); }
  .mdx-alerte b { font-weight: 600; }

  .mdx-recherche { margin-bottom: 10px; }
  .mdx-cies { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; min-height: 60px; max-height: 44vh; padding: 2px; margin: 0 -2px; }
  .mdx-cie { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-alt); cursor: pointer; transition: border-color .15s, background .15s; min-height: 48px; }
  .mdx-cie:hover { border-color: var(--accent-border); }
  .mdx-cie:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
  .mdx-cie[hidden] { display: none; }
  .mdx-cie input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; margin: 0; }
  .mdx-cie-picto { display: inline-flex; flex-shrink: 0; }
  .mdx-cie-nom { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: var(--t-m); color: var(--text); }
  .mdx-cie-nom b { font-weight: 600; } .mdx-cie-nom small { font-size: var(--t-xs); color: var(--text-muted); }
  .mdx-cie .mdx-pastille { max-width: 45%; }
  .mdx-vide { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 16px; border-radius: 14px; border: 1px dashed var(--border); color: var(--text-muted); font-size: var(--t-s); }
  .mdx-vide span { font-size: 28px; } .mdx-vide b { color: var(--text); font-weight: 600; font-size: 14px; } .mdx-vide small { font-size: var(--t-s); max-width: 420px; line-height: 1.5; }

  .mdx-actions { align-items: center; }
  .mdx-compteur { margin-right: auto; font-size: var(--t-s); color: var(--text-dim); }
  .mdx-compteur.actif { color: var(--accent); font-weight: 600; }
  .mdx-actions-envoi .mdx-a-gauche { margin-right: auto; }

  .mdx-destinataires { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
  .mdx-dest-label { font-size: var(--t-xs); font-weight: 500; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; margin-right: 2px; }
  .mdx-puce { font-size: var(--t-s); font-weight: 500; color: var(--text); background: var(--surface-alt); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mdx-puce.alerte { color: #DC2626; border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
  .mdx-modale .form-field { margin-bottom: 12px; }
  .mdx-champ-corps { display: flex; flex-direction: column; }
  .mdx-champ-corps textarea { min-height: 200px; resize: vertical; font-family: inherit; line-height: 1.55; }
  .mdx-cies { flex-shrink: 1 !important; }

  /* Signature */
  .mdx-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 14px; background: var(--surface-alt); border: 1px solid var(--border); margin-bottom: 14px; }
  .mdx-mode { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 6px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--text-muted); cursor: pointer; font-family: inherit; transition: background .15s, color .15s; min-width: 0; }
  .mdx-mode:hover { color: var(--text); background: var(--surface); }
  .mdx-mode-ic { font-size: 18px; line-height: 1.2; }
  .mdx-mode b { font-size: var(--t-s); font-weight: 500; }
  .mdx-mode small { font-size: var(--t-xs); color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .mdx-mode.actif { background: var(--surface); color: var(--text); border-color: var(--accent-border); box-shadow: 0 4px 14px rgba(6,20,44,0.12); }
  .mdx-mode.actif b { color: var(--accent); }
  .mdx-zone { min-height: 120px; }
  .mdx-btn-doc { display: block; width: 100%; margin-bottom: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--text); font-weight: 500; font-size: var(--t-s); cursor: pointer; font-family: inherit; }
  .mdx-btn-doc:hover { border-color: var(--accent-border); color: var(--accent); }
  .mdx-signature { position: relative; border-radius: 16px; background: #FFFFFF; border: 1.5px dashed #B6C2D6; overflow: hidden; }
  .mdx-canvas { position: relative; z-index: 1; display: block; width: 100%; height: 230px; touch-action: none; cursor: crosshair; background: transparent; }
  .mdx-signature-aide { position: absolute; z-index: 0; left: 0; right: 0; top: 38%; text-align: center; font-size: var(--t-m); color: #A3AEC2; pointer-events: none; transition: opacity .2s; }
  .mdx-signature.signe .mdx-signature-aide { opacity: 0; }
  .mdx-signature-ligne { position: absolute; z-index: 0; left: 22px; right: 22px; bottom: 44px; border-bottom: 1.5px solid #CBD5E1; pointer-events: none; }
  .mdx-signature-ligne span { position: absolute; left: 0; bottom: 4px; font-size: 14px; color: #94A3B8; }
  .mdx-effacer { position: absolute; z-index: 2; top: 10px; right: 10px; border: 1px solid #E2E7EF; background: rgba(255,255,255,0.92); color: #56627A; border-radius: 999px; padding: 6px 12px; font-size: var(--t-s); font-weight: 500; cursor: pointer; font-family: inherit; }
  .mdx-effacer:hover { color: #113679; border-color: #113679; }
  .mdx-btn-large { flex: 1; max-width: 360px; padding: 13px 20px; font-size: 14px; }
  .mdx-actions .mdx-btn-large { margin-left: auto; }
  .mdx-pied { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); text-align: center; }
  .mdx-lien { background: none; border: none; color: var(--text-muted); font-size: var(--t-s); cursor: pointer; font-family: inherit; padding: 6px 8px; border-radius: 8px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border); }
  .mdx-lien:hover { color: var(--accent); background: var(--accent-dim); }
  .mdx-chargement { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--text-muted); font-size: var(--t-s); }
  .mdx-chargement .loader-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }

  /* Fiche client — onglet Documents */
  .mdx-carte { margin-bottom: 16px; }
  .mdx-carte-tete { align-items: flex-start; flex-wrap: wrap; }
  .mdx-carte-tete > div:first-child { display: flex; flex-direction: column; gap: 2px; }
  .mdx-carte-boutons { display: flex; flex-wrap: wrap; gap: 8px; }
  .mdx-carte-boutons .btn-save, .mdx-carte-boutons .btn-secondary { font-size: var(--t-s); padding: 8px 14px; }
  .mdx-upload { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
  .mdx-docs { display: flex; flex-direction: column; gap: 8px; }
  .mdx-doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-alt); transition: border-color .15s, transform .15s; animation: dbx-entree .35s ease both; animation-delay: calc(var(--i, 0) * 40ms); }
  .mdx-doc:hover { border-color: var(--accent-border); }
  .mdx-doc-icone { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: var(--t-xl); background: var(--surface); border: 1px solid var(--border); flex-shrink: 0; }
  .mdx-doc-texte { flex: 1; min-width: 0; }
  .mdx-doc-titre { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: var(--t-m); color: var(--text); }
  .mdx-doc-titre b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .mdx-doc-meta { font-size: var(--t-xs); color: var(--text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mdx-doc-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .mdx-btn-voir { border: 1px solid var(--accent-border); background: var(--accent-dim); color: var(--accent); border-radius: 10px; padding: 8px 12px; font-size: var(--t-s); font-weight: 500; cursor: pointer; white-space: nowrap; font-family: inherit; min-height: 36px; }
  .mdx-btn-voir:hover { filter: brightness(1.08); }
  .mdx-btn-suppr { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--text-dim); cursor: pointer; font-size: 14px; font-family: inherit; }
  .mdx-btn-suppr:hover { color: #EF4444; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08); }

  @media (max-width: 640px) {
    .mdx-modale { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
    .mdx-modale-flex { max-height: 92vh; }
    .mdx-etapes li { justify-content: center; padding: 6px; font-size: var(--t-xs); }
    .mdx-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mdx-mode { flex-direction: row; justify-content: center; gap: 6px; padding: 10px 6px; }
    .mdx-mode small { display: none; }
    .mdx-canvas { height: min(44vh, 340px); }
    .mdx-champ-corps textarea { min-height: 170px; }
    .mdx-actions { flex-direction: column-reverse; align-items: stretch; }
    .mdx-actions > button, .mdx-actions .mdx-btn-large { width: 100%; max-width: none; margin: 0 !important; }
    .mdx-compteur { margin: 0; text-align: center; }
    .mdx-cie .mdx-pastille { display: none; }
    .mdx-cie:has(.mdx-pastille.alerte) .mdx-cie-nom::after { content: "pas d’e-mail"; font-size: var(--t-xs); color: #EF4444; }
    .mdx-carte-boutons { width: 100%; }
    .mdx-carte-boutons > * { flex: 1 1 auto; justify-content: center; text-align: center; }
    .mdx-doc { flex-wrap: wrap; }
    .mdx-doc-actions { width: 100%; }
    .mdx-btn-voir { flex: 1; }
  }

/* ── Le numéro de bordereau (20.09.2026) ──────────────────────────────────────────────────────
   Il était en 10,5 px, plus petit que tout le reste de la ligne — alors que c'est LUI qu'on
   cherche quand on compare un décompte papier à l'écran. « BRD 65 » est la clé de recherche, pas
   une mention secondaire. La place existait : la ligne n'était pleine que sur un tiers.
   Chasse fixe conservée : un numéro se lit chiffre à chiffre. */
.bd-numero {
  display: inline-flex; align-items: center; flex-shrink: 0;
  padding: 3px 10px; border-radius: var(--r-xs, 6px);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  font-family: var(--t-mono); font-size: var(--t-m); font-weight: 600;
  letter-spacing: -0.01em; white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}
@media (max-width: 620px) { .bd-numero { font-size: var(--t-s); padding: 2px 8px; } }