/* Assistant d'importation guidé (« Démarrer sans tout ressaisir ») : fenêtre d'import des modules,
   carte du Tableau de bord, bloc de la page d'accueil. Thème sombre par défaut, thème clair par attribut. */
.pbimp-ov, .pbimp-fab, .pbimp-guide, .pbimp-open, .pbimp-home {
  --i-bg: #0f172a; --i-bg2: #1e293b; --i-tx: #f8fafc; --i-mu: #a8b5c8; --i-bd: #334155; --i-ac: #3b82f6; --i-ac2: #1d4ed8; --i-ok: #34d399; --i-ko: #fb7185; --i-acx: #93c5fd;
}
html[data-pb-theme="light"] .pbimp-ov, html[data-pb-theme="light"] .pbimp-fab, html[data-pb-theme="light"] .pbimp-guide,
html[data-pb-theme="light"] .pbimp-open, html[data-pb-theme="light"] .pbimp-home,
html:not(.dark):not([data-pb-theme]) .pbimp-ov, html:not(.dark):not([data-pb-theme]) .pbimp-fab,
html:not(.dark):not([data-pb-theme]) .pbimp-guide, html:not(.dark):not([data-pb-theme]) .pbimp-open, html:not(.dark):not([data-pb-theme]) .pbimp-home {
  --i-bg: #ffffff; --i-bg2: #eef2f7; --i-tx: #0f172a; --i-mu: #475569; --i-bd: #b6c2d2; --i-ac: #1d4ed8; --i-ac2: #1e40af; --i-ok: #047857; --i-ko: #be123c; --i-acx: #1d4ed8;
}
.pbimp-home { --i-bg: var(--pb-surface, #111a2b); --i-bg2: var(--pb-surface-2, #172236); --i-tx: var(--pb-text, #e7ecf3); --i-mu: var(--pb-muted, #a8b5c8); --i-bd: var(--pb-border, #223049); --i-acx: var(--pb-accent-text, #93c5fd); }
html[data-pb-theme="light"] .pbimp-home, html:not(.dark):not([data-pb-theme]) .pbimp-home { --i-bg: var(--pb-surface, #ffffff); --i-bg2: var(--pb-surface-2, #eef2f7); --i-tx: var(--pb-text, #0f172a); --i-mu: var(--pb-muted, #475569); --i-bd: var(--pb-border, #b6c2d2); --i-acx: var(--pb-accent-text, #1d4ed8); }

/* ----- Bouton flottant et fenêtre d'import ----- */
.pbimp-fab { position: fixed; inset-inline-start: 14px; bottom: 14px; z-index: 900; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--i-bd); background: var(--i-bg); color: var(--i-tx); font: 700 13px/1 system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.28); opacity: .92; }
.pbimp-fab:hover, .pbimp-fab:focus-visible { opacity: 1; border-color: var(--i-ac); outline: none; }
.pbimp-ov { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(2,6,23,.78); backdrop-filter: blur(6px); font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.pbimp-box { width: 100%; max-width: 640px; max-height: calc(100dvh - 24px); overflow-y: auto; border-radius: 20px; border: 1px solid var(--i-bd); background: var(--i-bg); color: var(--i-tx); padding: 20px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.pbimp-ov, .pbimp-ov * { box-sizing: border-box; }
.pbimp-box > div { overflow: visible !important; border-radius: 0 !important; }
.pbimp-head { overflow: visible; padding-inline-start: 2px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pbimp-head h3 { margin: 0; font-size: 18px; font-weight: 900; line-height: 1.25; }
.pbimp-x { flex: none; width: 44px; min-width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--i-bd); background: transparent; color: var(--i-tx); font-size: 16px; cursor: pointer; }
.pbimp-priv { margin: 6px 0 0; font-size: 12px; color: var(--i-ok); font-weight: 700; }
.pbimp-help { margin: 8px 0 0; font-size: 12.5px; color: var(--i-mu); line-height: 1.5; }
.pbimp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; min-height: 120px; padding: 16px; text-align: center; border: 2px dashed var(--i-bd); border-radius: 16px; background: var(--i-bg2); cursor: pointer; }
.pbimp-drop.is-over, .pbimp-drop:focus-visible { border-color: var(--i-ac); outline: none; }
.pbimp-drop strong { font-size: 15px; } .pbimp-drop span { font-size: 12px; color: var(--i-mu); }
.pbimp-field { display: block; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--i-mu); }
.pbimp-field select { display: block; width: 100%; margin-top: 4px; min-height: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--i-bd); background: var(--i-bg2); color: var(--i-tx); font-size: 14px; }
.pbimp-msg { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; border: 1px solid var(--i-bd); background: var(--i-bg2); }
.pbimp-msg.is-ko { border-color: var(--i-ko); color: var(--i-ko); } .pbimp-msg.is-ok { border-color: var(--i-ok); color: var(--i-ok); }
.pbimp-prev { margin-top: 12px; overflow-x: auto; border: 1px solid var(--i-bd); border-radius: 12px; }
.pbimp-prev table { width: 100%; border-collapse: collapse; font-size: 12px; }
.pbimp-prev th, .pbimp-prev td { padding: 6px 9px; text-align: start; border-bottom: 1px solid var(--i-bd); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.pbimp-prev th { color: var(--i-mu); background: var(--i-bg2); font-weight: 800; } .pbimp-prev tr:last-child td { border-bottom: 0; } .pbimp-prev td.is-num { text-align: end; font-variant-numeric: tabular-nums; }
.pbimp-count { margin: 12px 0 0; font-size: 14px; font-weight: 800; }
.pbimp-act { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pbimp-btn { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--i-bd); background: transparent; color: var(--i-tx); font-size: 14px; font-weight: 800; cursor: pointer; }
.pbimp-btn.is-main { border-color: var(--i-ac2); background: linear-gradient(135deg, var(--i-ac), var(--i-ac2)); color: #fff; }
.pbimp-btn[disabled] { opacity: .5; cursor: wait; }
.pbimp-btn:focus-visible, .pbimp-x:focus-visible, .pbimp-hide:focus-visible, .pbimp-step-go:focus-visible, .pbimp-open:focus-visible, .pbimp-home-cta:focus-visible { outline: 2px solid var(--i-ac); outline-offset: 2px; }

/* ----- Carte du Tableau de bord ----- */
.pbimp-guide[hidden] { display: none !important; }
.pbimp-guide { border-color: var(--i-ac) !important; }
.pbimp-guide-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pbimp-guide-title { margin: 0; font-size: 17px; font-weight: 900; color: var(--i-tx); }
.pbimp-guide-sub { margin: 4px 0 0; font-size: 13px; color: var(--i-mu); }
.pbimp-hide { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--i-bd); background: transparent; color: var(--i-mu); font-size: 12px; font-weight: 700; cursor: pointer; }
.pbimp-hide:hover { color: var(--i-tx); border-color: var(--i-ac); }
.pbimp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pbimp-step { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--i-bd); border-radius: 14px; background: var(--i-bg2); min-width: 0; }
.pbimp-step-ic { flex: none; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; border-radius: 11px; border: 1px solid var(--i-bd); background: var(--i-bg); }
.pbimp-step-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.pbimp-step-txt strong { font-size: 14px; color: var(--i-tx); } .pbimp-step-fmt { font-size: 12px; color: var(--i-mu); line-height: 1.4; overflow-wrap: anywhere; } .pbimp-step-priv { font-size: 11px; color: var(--i-ok); font-weight: 700; }
.pbimp-step-go { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--i-ac2); background: linear-gradient(135deg, var(--i-ac), var(--i-ac2)); color: #fff !important; font-size: 13px; font-weight: 800; text-decoration: none; }
.pbimp-open { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--i-bd); background: var(--i-bg2); color: var(--i-tx); cursor: pointer; }
.pbimp-open:hover, .pbimp-open[aria-expanded="true"] { border-color: var(--i-ac); }
#pbDashMain.pb-dash-essential > #pbImportGuide:not([hidden]) { display: block !important; }
#pbDashMain.pb-dash-simple > #pbImportGuide { order: 2; }

/* ----- Bloc de la page d'accueil ----- */
.pbimp-home { padding: 0; }
.pbimp-home-in { color: var(--i-tx); }
.pbimp-home-lead { margin: .6rem 0 0; max-width: 46rem; font-size: .95rem; line-height: 1.55; color: var(--i-mu); }
.pbimp-home-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.pbimp-home-list li { display: flex; align-items: center; gap: .65rem; padding: .6rem .7rem; border: 1px solid var(--i-bd); border-radius: .9rem; background: var(--i-bg2); min-width: 0; }
.pbimp-home-priv { margin: 1rem 0 0; font-size: .85rem; font-weight: 700; color: var(--i-ok); }
.pbimp-home-cta { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin-top: .9rem; padding: 0 1.4rem; border-radius: .9rem; background: linear-gradient(135deg, var(--i-ac), var(--i-ac2)); color: #fff !important; font-weight: 800; text-decoration: none; }
html[dir="rtl"] .pbimp-step-go { direction: rtl; }
@media (max-width: 480px) { .pbimp-box { padding: 16px; border-radius: 16px; } .pbimp-act .pbimp-btn { flex: 1 1 auto; } .pbimp-fab span.pbimp-fab-t { display: none; } .pbimp-fab { padding: 0 12px; } }
@media (prefers-reduced-motion: no-preference) { .pbimp-step-go, .pbimp-btn { transition: filter .15s; } .pbimp-step-go:hover, .pbimp-btn.is-main:hover { filter: brightness(1.1); } }
