/* LogiDrink · Assistant IA : fenêtre ancrée / flottante / plein écran, historique, cartes d’actions.
   Sélecteurs préfixés #ldAsstDrawer pour passer devant portal-unified.css (non layé). */

#ldAsstDrawer {
  --a-or: #fd7020; --a-or-d: #c44a0c; --a-or-s: #fff1e8; --a-ink: #0a2540; --a-mut: #697386; --a-line: #e3e8ee; --a-soft: #f6f9fc;
  --a-red: #d92d20; --a-red-s: #fef3f2; --a-grn: #12b76a; --a-blu: #2563eb;
  width: min(560px, 100vw);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: width .2s ease;
  z-index: 200;
}
#ldAsstDrawer.wide { width: min(980px, 100vw); }
#ldAsstDrawer.open { animation: ldAsstIn .2s ease-out; }
@keyframes ldAsstIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* Fenêtre détachée */
#ldAsstDrawer.floating {
  right: auto; bottom: auto; border: 1px solid var(--a-line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(10,37,64,.22), 0 4px 14px rgba(10,37,64,.08);
  transition: none;
}
#ldAsstDrawer.floating.open { animation: ldAsstPop .18s ease-out; }
@keyframes ldAsstPop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
#ldAsstDrawer.floating .ld-asst-head { cursor: grab; touch-action: none; user-select: none; }
#ldAsstDrawer.floating.moving { user-select: none; box-shadow: 0 30px 80px rgba(10,37,64,.28); }
#ldAsstDrawer.floating.moving .ld-asst-head { cursor: grabbing; }
#ldAsstDrawer.floating.maxed { left: 12px !important; top: 12px !important; width: calc(100vw - 24px) !important; height: calc(100vh - 24px) !important; }
#ldAsstDrawer.floating.maxed .ld-asst-log > *, #ldAsstDrawer.floating.maxed .ld-asst-composer > * { max-width: 820px; margin-left: auto; margin-right: auto; }
#ldAsstDrawer .ld-asst-edge, #ldAsstDrawer .ld-asst-resize { display: none; }
#ldAsstDrawer.floating:not(.maxed) .ld-asst-edge { display: block; position: absolute; z-index: 5; touch-action: none; }
#ldAsstDrawer .e-n, #ldAsstDrawer .e-s { left: 12px; right: 12px; height: 8px; cursor: ns-resize; }
#ldAsstDrawer .e-n { top: -2px; } #ldAsstDrawer .e-s { bottom: -2px; }
#ldAsstDrawer .e-e, #ldAsstDrawer .e-w { top: 12px; bottom: 12px; width: 8px; cursor: ew-resize; }
#ldAsstDrawer .e-e { right: -2px; } #ldAsstDrawer .e-w { left: -2px; }
#ldAsstDrawer .e-ne, #ldAsstDrawer .e-nw, #ldAsstDrawer .e-se, #ldAsstDrawer .e-sw { width: 16px; height: 16px; }
#ldAsstDrawer .e-ne { top: -2px; right: -2px; cursor: nesw-resize; } #ldAsstDrawer .e-sw { bottom: -2px; left: -2px; cursor: nesw-resize; }
#ldAsstDrawer .e-nw { top: -2px; left: -2px; cursor: nwse-resize; } #ldAsstDrawer .e-se { bottom: -2px; right: -2px; cursor: nwse-resize; }
#ldAsstDrawer.floating:not(.maxed) .ld-asst-resize {
  display: flex; position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; z-index: 6;
  align-items: center; justify-content: center; color: #b6c0cc; cursor: nwse-resize; touch-action: none;
}
@media (pointer: coarse) {
  #ldAsstDrawer .e-n, #ldAsstDrawer .e-s { height: 16px; } #ldAsstDrawer .e-e, #ldAsstDrawer .e-w { width: 16px; }
  #ldAsstDrawer .e-ne, #ldAsstDrawer .e-nw, #ldAsstDrawer .e-se, #ldAsstDrawer .e-sw { width: 28px; height: 28px; }
  #ldAsstDrawer.floating:not(.maxed) .ld-asst-resize { width: 28px; height: 28px; }
}

/* En-tête */
#ldAsstDrawer .ld-asst-head { gap: 2px; padding: 10px 10px 10px 16px; background: #fff; }
#ldAsstDrawer .ld-asst-head h1 { font-size: 15px; min-width: 0; }
#ldAsstDrawer .ld-asst-head button {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #425466;
}
#ldAsstDrawer .ld-asst-badge {
  font-style: normal; font-size: 10.5px; font-weight: 650; letter-spacing: .04em;
  color: var(--a-or-d); background: var(--a-or-s); border: 1px solid #ffd9c2; border-radius: 4px; padding: 1px 6px;
}
#ldAsstDrawer .ld-asst-body { flex: 1; min-height: 0; position: relative; display: flex; }

/* Journal */
#ldAsstDrawer .ld-asst-log { flex: 1; padding: 20px 20px 8px; scroll-behavior: smooth; overscroll-behavior: contain; }
#ldAsstDrawer.wide .ld-asst-log > *, #ldAsstDrawer.wide .ld-asst-composer > * { max-width: 760px; margin-left: auto; margin-right: auto; }
#ldAsstDrawer .ld-asst-msg { max-width: 100%; margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--a-ink); position: relative; }
#ldAsstDrawer .ld-asst-msg.me {
  max-width: 85%; margin-left: auto; background: var(--a-soft); border: 1px solid var(--a-line);
  border-radius: 12px 12px 4px 12px; padding: 10px 14px 6px;
}
#ldAsstDrawer.wide .ld-asst-msg.me { max-width: min(85%, 640px); margin-right: max(0px, calc((100% - 760px) / 2)); }
#ldAsstDrawer .ld-asst-msg p { margin: 0 0 8px; }
#ldAsstDrawer .ld-asst-msg p:last-of-type { margin-bottom: 0; }
#ldAsstDrawer .ld-asst-msg h4 { font-size: 14.5px; font-weight: 650; margin: 14px 0 6px; color: var(--a-ink); }
#ldAsstDrawer .ld-asst-msg h4:first-child { margin-top: 0; }
#ldAsstDrawer .ld-asst-msg ul, #ldAsstDrawer .ld-asst-msg ol { margin: 4px 0 10px; padding-left: 22px; }
#ldAsstDrawer .ld-asst-msg li { margin: 3px 0; }
#ldAsstDrawer .ld-asst-msg li.sub { margin-left: 18px; list-style: circle; }
#ldAsstDrawer .ld-asst-msg hr { border: 0; border-top: 1px solid var(--a-line); margin: 12px 0; }
#ldAsstDrawer .ld-asst-msg code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--a-soft); border: 1px solid var(--a-line); border-radius: 4px; padding: 0 4px; }
#ldAsstDrawer .ld-asst-msg pre { background: var(--a-ink); color: #e6edf5; border-radius: 8px; padding: 10px 12px; overflow: auto; margin: 6px 0 10px; }
#ldAsstDrawer .ld-asst-msg pre code { background: none; border: 0; color: inherit; padding: 0; }
#ldAsstDrawer .ld-asst-msg blockquote { margin: 6px 0; padding: 4px 12px; border-left: 3px solid #ffd9c2; color: #425466; }
#ldAsstDrawer .ld-asst-msg a { color: var(--a-or-d); text-decoration: underline; }
#ldAsstDrawer .ld-asst-tbl { overflow-x: auto; margin: 6px 0 12px; border: 1px solid var(--a-line); border-radius: 8px; }
#ldAsstDrawer .ld-asst-tbl table { border-collapse: collapse; width: 100%; font-size: 13px; }
#ldAsstDrawer .ld-asst-tbl th, #ldAsstDrawer .ld-asst-tbl td { padding: 7px 10px; text-align: left; border-bottom: 1px solid #eef1f5; white-space: nowrap; }
#ldAsstDrawer .ld-asst-tbl th { background: var(--a-soft); font-weight: 600; color: #425466; }
#ldAsstDrawer .ld-asst-tbl tr:last-child td { border-bottom: 0; }

/* Heure + copier */
#ldAsstDrawer .ld-asst-foot { display: flex; align-items: center; gap: 6px; margin-top: 4px; min-height: 22px; }
#ldAsstDrawer .ld-asst-msg.me .ld-asst-foot { justify-content: flex-end; margin-top: 2px; }
#ldAsstDrawer .ld-asst-time { font-size: 11.5px; color: #8898aa; font-variant-numeric: tabular-nums; cursor: default; }
#ldAsstDrawer .ld-asst-copy {
  display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: #8898aa; font: inherit; font-size: 12px;
  padding: 2px 6px; border-radius: 5px; cursor: pointer; opacity: 0; transition: opacity .15s;
}
#ldAsstDrawer .ld-asst-msg:hover .ld-asst-copy, #ldAsstDrawer .ld-asst-copy:focus { opacity: 1; }
#ldAsstDrawer .ld-asst-copy:hover { background: var(--a-soft); color: #425466; }
@media (hover: none) { #ldAsstDrawer .ld-asst-copy { opacity: 1; } }
#ldAsstDrawer .ld-asst-err { color: #9a2c0a; }
#ldAsstDrawer .ld-asst-hint { color: #425466; font-size: 13px; }
#ldAsstDrawer .muted { color: #8898aa; }

/* Points animés */
#ldAsstDrawer .ld-asst-typing { display: flex; align-items: center; gap: 10px; color: var(--a-mut); font-size: 13px; }
#ldAsstDrawer .ld-asst-dots { display: inline-flex; gap: 5px; align-items: center; background: var(--a-soft); border: 1px solid var(--a-line); border-radius: 14px; padding: 9px 12px; }
#ldAsstDrawer .ld-asst-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--a-or); display: block; animation: ldAsstDot 1.2s infinite ease-in-out both; }
#ldAsstDrawer .ld-asst-dots i:nth-child(2) { animation-delay: .15s; }
#ldAsstDrawer .ld-asst-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ldAsstDot { 0%, 80%, 100% { transform: translateY(0) scale(.75); opacity: .35; } 40% { transform: translateY(-4px) scale(1); opacity: 1; } }
#ldAsstDrawer .ld-asst-status { animation: ldAsstPulse 1.6s ease-in-out infinite; }
@keyframes ldAsstPulse { 50% { opacity: .55; } }
#ldAsstDrawer .ld-asst-caret { display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--a-or); border-radius: 1px; animation: ldAsstBlink .8s steps(2) infinite; }
@keyframes ldAsstBlink { 50% { opacity: 0; } }

/* Suggestions */
#ldAsstDrawer .ld-asst-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 16px; }
#ldAsstDrawer .ld-asst-opts button { text-align: left; line-height: 1.35; border-radius: 10px; padding: 10px 12px; }

/* Pièces jointes dans un message */
#ldAsstDrawer .ld-asst-att { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
#ldAsstDrawer .ld-asst-att span { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; background: #fff; border: 1px solid var(--a-line); border-radius: 8px; padding: 4px 8px 4px 4px; font-size: 12px; color: #425466; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ldAsstDrawer .ld-asst-att img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; }
#ldAsstDrawer .ld-asst-att svg { margin-left: 4px; flex: none; }

/* Historique */
#ldAsstDrawer .ld-asst-histp {
  position: absolute; inset: 0; background: #fff; z-index: 4; display: flex; flex-direction: column;
  transform: translateX(-100%); opacity: 0; visibility: hidden; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s, visibility 0s .22s;
}
#ldAsstDrawer .ld-asst-histp.open { transform: none; opacity: 1; visibility: visible; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s; }
#ldAsstDrawer .ld-asst-histp-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px 6px; font-size: 14px; color: var(--a-ink); }
#ldAsstDrawer .ld-asst-histp-head button { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: #425466; display: inline-flex; align-items: center; justify-content: center; }
#ldAsstDrawer .ld-asst-histp-head button:hover { background: var(--a-soft); }
#ldAsstDrawer .ld-asst-histp input[type=search] { margin: 4px 14px 8px; border: 1px solid var(--a-line) !important; border-radius: 8px !important; padding: 8px 10px !important; font: inherit; font-size: 13.5px; min-height: 0 !important; }
#ldAsstDrawer .ld-asst-histp-list { flex: 1; overflow: auto; padding: 0 8px 14px; }
#ldAsstDrawer .ld-asst-histp-grp { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #8898aa; padding: 12px 8px 4px; }
#ldAsstDrawer .ld-asst-histp-item { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 10px; border-radius: 8px; cursor: pointer; transition: background .12s, opacity .2s, transform .2s; }
#ldAsstDrawer .ld-asst-histp-item:hover, #ldAsstDrawer .ld-asst-histp-item:focus-visible { background: var(--a-soft); outline: none; }
#ldAsstDrawer .ld-asst-histp-item.active { background: var(--a-or-s); }
#ldAsstDrawer .ld-asst-histp-item.removing { opacity: 0; transform: translateX(-12px); }
#ldAsstDrawer .ld-asst-histp-item > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#ldAsstDrawer .ld-asst-histp-item b { font-size: 13.5px; font-weight: 550; color: var(--a-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ldAsstDrawer .ld-asst-histp-item small { font-size: 11.5px; color: #8898aa; }
#ldAsstDrawer .ld-asst-histp-item button { flex: none; width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; color: #8898aa; display: inline-flex; align-items: center; justify-content: center; opacity: 0; }
#ldAsstDrawer .ld-asst-histp-item:hover button { opacity: 1; }
#ldAsstDrawer .ld-asst-histp-item button:hover { background: var(--a-red-s); color: var(--a-red); }
@media (hover: none) { #ldAsstDrawer .ld-asst-histp-item button { opacity: 1; } }
#ldAsstDrawer .ld-asst-histp-empty { padding: 24px 12px; text-align: center; color: #8898aa; font-size: 13px; display: flex; gap: 8px; justify-content: center; align-items: center; }

/* ---------- Carte de plan d’actions ---------- */
#ldAsstDrawer .ld-asst-plan {
  position: relative; margin: 0 0 18px; border: 1px solid var(--a-line); border-radius: 14px; background: #fff;
  box-shadow: 0 1px 2px rgba(10,37,64,.04), 0 8px 24px rgba(10,37,64,.06);
  opacity: 0; transform: translateY(10px) scale(.985); transition: opacity .32s ease, transform .32s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
  overflow: hidden;
}
#ldAsstDrawer .ld-asst-plan.in { opacity: 1; transform: none; }
#ldAsstDrawer .ld-asst-plan:not(.decided)::before {
  content: ''; position: absolute; inset: 0; border-radius: 14px; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, rgba(253,112,32,.0) 20%, rgba(253,112,32,.55) 50%, rgba(85,221,255,.45) 60%, rgba(253,112,32,0) 80%) 0 0 / 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ldAsstSheen 3.2s linear infinite;
}
#ldAsstDrawer .ld-asst-plan.danger:not(.decided)::before { background: linear-gradient(120deg, transparent 20%, rgba(217,45,32,.55) 50%, transparent 80%) 0 0 / 300% 100%; }
@keyframes ldAsstSheen { to { background-position: -300% 0; } }
#ldAsstDrawer .ld-asst-plan-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px 10px; }
#ldAsstDrawer .ld-asst-plan-ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #ff8a3d, var(--a-or-d)); box-shadow: 0 4px 10px rgba(253,112,32,.3); }
#ldAsstDrawer .ld-asst-plan.danger .ld-asst-plan-ic { background: linear-gradient(135deg, #f97066, var(--a-red)); box-shadow: 0 4px 10px rgba(217,45,32,.28); }
#ldAsstDrawer .ld-asst-plan-tt { flex: 1; min-width: 0; }
#ldAsstDrawer .ld-asst-plan-tt b { display: block; font-size: 14.5px; font-weight: 650; color: var(--a-ink); line-height: 1.35; }
#ldAsstDrawer .ld-asst-plan-tt p { margin: 3px 0 0; font-size: 13px; color: #425466; line-height: 1.45; }
#ldAsstDrawer .ld-asst-plan-count { flex: none; font-size: 11.5px; font-weight: 600; color: #425466; background: var(--a-soft); border: 1px solid var(--a-line); border-radius: 20px; padding: 2px 9px; }
#ldAsstDrawer .ld-asst-plan-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0 16px 8px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.4; background: var(--a-red-s); color: #b42318; }
#ldAsstDrawer .ld-asst-plan-warn.ext { background: #eff4ff; color: #1d4ed8; }
#ldAsstDrawer .ld-asst-plan-warn svg { flex: none; margin-top: 1px; }

#ldAsstDrawer .ld-asst-plan-ops { list-style: none; margin: 0; padding: 4px 8px 6px; counter-reset: none; }
#ldAsstDrawer .ld-asst-plan-ops li {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 8px; border-radius: 9px; margin: 0; position: relative;
  opacity: 0; transform: translateY(4px); animation: ldAsstOpIn .35s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--d, 0ms);
  transition: background .25s;
}
@keyframes ldAsstOpIn { to { opacity: 1; transform: none; } }
#ldAsstDrawer .ld-asst-plan:not(.expanded) .ld-asst-plan-ops li.more { display: none; }
#ldAsstDrawer .ld-asst-plan-ops li:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 34px; bottom: -6px; width: 1px; background: var(--a-line); }
#ldAsstDrawer .ld-asst-op-st { width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; background: #fff; border: 1px solid var(--a-line); color: #697386; transition: all .25s; }
#ldAsstDrawer .ld-asst-op-k { display: inline-flex; }
#ldAsstDrawer li.k-del .ld-asst-op-st { color: var(--a-red); border-color: #fecdca; background: var(--a-red-s); }
#ldAsstDrawer li.k-send .ld-asst-op-st { color: var(--a-blu); border-color: #c7d7fe; background: #eff4ff; }
#ldAsstDrawer li.k-add .ld-asst-op-st, #ldAsstDrawer li.k-doc .ld-asst-op-st { color: var(--a-or-d); border-color: #ffd9c2; background: var(--a-or-s); }
#ldAsstDrawer li.k-pay .ld-asst-op-st { color: #067647; border-color: #abefc6; background: #ecfdf3; }
#ldAsstDrawer .ld-asst-op-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding-top: 2px; }
#ldAsstDrawer .ld-asst-op-txt b { font-size: 13.5px; font-weight: 550; color: var(--a-ink); line-height: 1.4; }
#ldAsstDrawer .ld-asst-op-txt small { font-size: 12.5px; color: var(--a-mut); line-height: 1.4; white-space: pre-wrap; }
#ldAsstDrawer li.k-send .ld-asst-op-txt small { color: #1d4ed8; }
#ldAsstDrawer .ld-asst-op-tag { flex: none; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: #8898aa; padding-top: 5px; }
#ldAsstDrawer li.k-del .ld-asst-op-tag { color: var(--a-red); }
#ldAsstDrawer li.k-send .ld-asst-op-tag { color: var(--a-blu); }
#ldAsstDrawer .ld-asst-op-pbtn { align-self: flex-start; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 12px; color: var(--a-or-d); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
#ldAsstDrawer .ld-asst-op-prev { display: none; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--a-soft); border: 1px solid var(--a-line); font-size: 12.5px; color: #425466; overflow-x: auto; }
#ldAsstDrawer li.prev-open .ld-asst-op-prev { display: block; animation: ldAsstOpIn .25s ease forwards; }
#ldAsstDrawer .ld-asst-kv { border-collapse: collapse; width: 100%; }
#ldAsstDrawer .ld-asst-kv th { text-align: left; font-weight: 500; color: #8898aa; padding: 2px 10px 2px 0; white-space: nowrap; vertical-align: top; }
#ldAsstDrawer .ld-asst-kv td { color: var(--a-ink); padding: 2px 0; word-break: break-word; }
#ldAsstDrawer .ld-asst-prev-count { font-weight: 600; color: var(--a-ink); margin-bottom: 4px; }
#ldAsstDrawer .ld-asst-prev-item { padding: 3px 0; border-top: 1px dashed var(--a-line); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
#ldAsstDrawer .ld-asst-prev-item:first-of-type { border-top: 0; }
#ldAsstDrawer .ld-asst-diff em { font-style: normal; color: #8898aa; }
#ldAsstDrawer .ld-asst-diff s { color: #b42318; background: var(--a-red-s); border-radius: 3px; padding: 0 3px; }
#ldAsstDrawer .ld-asst-diff ins { color: #067647; background: #ecfdf3; border-radius: 3px; padding: 0 3px; text-decoration: none; }
#ldAsstDrawer .ld-asst-op-res { font-style: normal; font-size: 12.5px; line-height: 1.4; }
#ldAsstDrawer .ld-asst-op-res:empty { display: none; }
#ldAsstDrawer li.ok .ld-asst-op-res { color: #067647; }
#ldAsstDrawer li.ko .ld-asst-op-res { color: #b42318; }
#ldAsstDrawer .ld-asst-op-res a { color: inherit; font-weight: 600; }
#ldAsstDrawer .ld-asst-op-step { display: flex; gap: 6px; flex-wrap: wrap; }
#ldAsstDrawer .ld-asst-op-step:not(:empty) { margin-top: 6px; }

/* États d’exécution */
#ldAsstDrawer li.wait { opacity: .55 !important; }
#ldAsstDrawer li.run { background: linear-gradient(90deg, var(--a-or-s), #fff 70%); }
#ldAsstDrawer li.ask { background: #fffaf5; box-shadow: inset 0 0 0 1px #ffd9c2; }
#ldAsstDrawer li.run .ld-asst-op-st { border-color: var(--a-or); background: #fff; }
#ldAsstDrawer .ld-asst-op-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #ffd9c2; border-top-color: var(--a-or); animation: ldAsstSpin .7s linear infinite; }
#ldAsstDrawer li.ok .ld-asst-op-st { background: var(--a-grn); border-color: var(--a-grn); color: #fff; animation: ldAsstPopIn .35s cubic-bezier(.2,1.6,.4,1); }
#ldAsstDrawer li.ko .ld-asst-op-st { background: var(--a-red); border-color: var(--a-red); color: #fff; animation: ldAsstShake .35s ease; }
#ldAsstDrawer li.undone .ld-asst-op-txt b { text-decoration: line-through; color: #8898aa; }
#ldAsstDrawer .ld-ck { width: 15px; height: 15px; }
#ldAsstDrawer .ld-ck path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: ldAsstDraw .4s .08s ease forwards; }
@keyframes ldAsstDraw { to { stroke-dashoffset: 0; } }
@keyframes ldAsstPopIn { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
@keyframes ldAsstShake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

#ldAsstDrawer .ld-asst-plan-more { display: block; margin: 0 16px 8px 50px; border: 0; background: none; font: inherit; font-size: 12.5px; color: var(--a-or-d); cursor: pointer; padding: 2px 0; }
#ldAsstDrawer .ld-asst-plan-bar { height: 3px; margin: 2px 16px 0; background: var(--a-soft); border-radius: 3px; overflow: hidden; opacity: 0; transition: opacity .2s; }
#ldAsstDrawer .ld-asst-plan.running .ld-asst-plan-bar, #ldAsstDrawer .ld-asst-plan.decided:not(.st-cancelled):not(.st-edited) .ld-asst-plan-bar { opacity: 1; }
#ldAsstDrawer .ld-asst-plan-bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--a-or), #ffb37a); border-radius: 3px; transition: width .35s ease; }
#ldAsstDrawer .ld-asst-plan.st-done .ld-asst-plan-bar > div { background: var(--a-grn); }
#ldAsstDrawer .ld-asst-plan-act { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px 6px; }
#ldAsstDrawer .ld-asst-plan-step { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #425466; cursor: pointer; user-select: none; }
#ldAsstDrawer .ld-asst-plan-step input { width: 15px; height: 15px; accent-color: var(--a-or); margin: 0; }
#ldAsstDrawer .ld-asst-plan-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
#ldAsstDrawer .ld-asst-plan-post { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 16px; }
#ldAsstDrawer .ld-asst-plan-post:not(:empty) { padding-top: 10px; }
#ldAsstDrawer .ld-asst-plan-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px 12px; font-size: 12px; }
#ldAsstDrawer .ld-asst-plan-state { display: inline-flex; align-items: center; gap: 6px; }
#ldAsstDrawer .pill { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; border-radius: 20px; padding: 2px 9px; background: var(--a-soft); color: #425466; animation: ldAsstOpIn .3s ease forwards; }
#ldAsstDrawer .pill.done { background: #ecfdf3; color: #067647; }
#ldAsstDrawer .pill.partial, #ldAsstDrawer .pill.running { background: #fffaeb; color: #b54708; }
#ldAsstDrawer .pill.cancelled, #ldAsstDrawer .pill.edited, #ldAsstDrawer .pill.undone { background: var(--a-soft); color: #697386; }
#ldAsstDrawer .ld-asst-plan.st-cancelled, #ldAsstDrawer .ld-asst-plan.st-edited { opacity: .72; box-shadow: none; }

/* Boutons */
#ldAsstDrawer .ld-asst-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 0 14px;
  border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent; overflow: hidden;
  transition: transform .12s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
#ldAsstDrawer .ld-asst-btn:active:not(:disabled) { transform: scale(.97); }
#ldAsstDrawer .ld-asst-btn:disabled { opacity: .55; cursor: default; }
#ldAsstDrawer .ld-asst-btn.ghost { background: #fff; border-color: var(--a-line); color: var(--a-ink); }
#ldAsstDrawer .ld-asst-btn.ghost:hover:not(:disabled) { background: var(--a-soft); }
#ldAsstDrawer .ld-asst-btn.primary { color: #fff; background: linear-gradient(135deg, #ff8a3d, var(--a-or) 45%, var(--a-or-d)); box-shadow: 0 4px 12px rgba(253,112,32,.3), inset 0 1px 0 rgba(255,255,255,.25); }
#ldAsstDrawer .ld-asst-btn.primary:hover:not(:disabled) { box-shadow: 0 6px 18px rgba(253,112,32,.4), inset 0 1px 0 rgba(255,255,255,.25); }
#ldAsstDrawer .ld-asst-btn.primary::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-20deg); animation: ldAsstShine 2.8s ease-in-out infinite; }
@keyframes ldAsstShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
#ldAsstDrawer .ld-asst-plan.danger .ld-asst-btn.primary { background: linear-gradient(135deg, #f97066, var(--a-red)); box-shadow: 0 4px 12px rgba(217,45,32,.28); }
#ldAsstDrawer .ld-asst-btn.primary.armed { animation: ldAsstArm 1s ease-in-out infinite; }
@keyframes ldAsstArm { 50% { box-shadow: 0 0 0 5px rgba(217,45,32,.18); } }
#ldAsstDrawer .ld-asst-btn.sm { min-height: 30px; font-size: 12.5px; padding: 0 12px; }
#ldAsstDrawer .ld-asst-btn.xs { min-height: 28px; font-size: 12px; padding: 0 10px; }
#ldAsstDrawer .ld-asst-undo i { font-style: normal; font-variant-numeric: tabular-nums; color: #8898aa; font-weight: 500; }
#ldAsstDrawer .ld-asst-undo.gone { opacity: 0; transform: scale(.95); }

/* Zone de saisie */
#ldAsstDrawer .ld-asst-composer { padding: 10px 16px 6px; position: relative; background: #fff; }
#ldAsstDrawer .ld-asst-input { align-items: flex-end; gap: 6px; border-radius: 14px; padding: 8px 8px 8px 6px; box-shadow: 0 1px 3px rgba(50,50,93,.06); transition: border-color .15s, box-shadow .15s; }
#ldAsstDrawer .ld-asst-input:focus-within { border-color: #fdb78f; box-shadow: 0 0 0 3px rgba(253,112,32,.12); }
#ldAsstDrawer .ld-asst-input textarea { max-height: 200px; min-height: 24px !important; line-height: 1.5; font-size: 14px; outline: none !important; background: transparent !important; padding: 6px 4px !important; overflow-y: auto; }
#ldAsstDrawer .ld-asst-input textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ldAsstDrawer .ld-asst-attach { width: 34px; height: 34px; flex: none; border: 0; background: transparent; color: var(--a-mut); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
#ldAsstDrawer .ld-asst-attach:hover { background: var(--a-soft); color: var(--a-or-d); }
#ldAsstDrawer .ld-asst-send { width: 34px; height: 34px; flex: none; border-radius: 10px; transition: background .15s; }
#ldAsstDrawer .ld-asst-send:hover:not(:disabled) { background: #e5600f; }
#ldAsstDrawer .ld-asst-send.is-stop { background: var(--a-ink); }
#ldAsstDrawer .ld-asst-files { display: flex; flex-wrap: wrap; gap: 8px; }
#ldAsstDrawer .ld-asst-files:not(:empty) { margin-bottom: 8px; }
#ldAsstDrawer .ld-asst-chip { display: flex; align-items: center; gap: 8px; max-width: 240px; border: 1px solid var(--a-line); border-radius: 10px; padding: 5px 4px 5px 5px; background: #fff; animation: ldAsstOpIn .25s ease forwards; }
#ldAsstDrawer .ld-asst-chip.err { border-color: #f5c2b0; background: #fff6f2; }
#ldAsstDrawer .ld-asst-chip-ic { width: 36px; height: 36px; flex: none; border-radius: 6px; background: var(--a-soft); color: var(--a-mut); display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
#ldAsstDrawer .ld-asst-chip-ic img { width: 100%; height: 100%; object-fit: cover; }
#ldAsstDrawer .ld-asst-chip-txt { min-width: 0; display: flex; flex-direction: column; font-size: 12px; line-height: 1.3; }
#ldAsstDrawer .ld-asst-chip-txt b { font-weight: 600; color: var(--a-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ldAsstDrawer .ld-asst-chip-txt small { color: #8898aa; font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; }
#ldAsstDrawer .ld-asst-chip.err small { color: #b4400f; }
#ldAsstDrawer .ld-asst-chip button { flex: none; width: 24px; height: 24px; border: 0; background: transparent; color: #8898aa; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
#ldAsstDrawer .ld-asst-chip button svg { width: 9px; height: 9px; }
#ldAsstDrawer .ld-asst-chip button:hover { background: var(--a-soft); color: var(--a-ink); }
#ldAsstDrawer .ld-asst-spin { width: 10px; height: 10px; border: 2px solid #ffd9c2; border-top-color: var(--a-or); border-radius: 50%; display: inline-block; animation: ldAsstSpin .7s linear infinite; }
@keyframes ldAsstSpin { to { transform: rotate(360deg); } }
#ldAsstDrawer .ld-asst-drop { display: none; position: absolute; inset: 6px 12px; border: 2px dashed var(--a-or); border-radius: 14px; background: rgba(255,241,232,.94); color: var(--a-or-d); font-weight: 600; font-size: 14px; align-items: center; justify-content: center; pointer-events: none; }
#ldAsstDrawer.dragging .ld-asst-drop { display: flex; }
#ldAsstDrawer .ld-asst-disc { background: #fff; }

/* Pastille (fenêtre réduite) */
.ld-asst-pill {
  position: fixed; right: 20px; bottom: 20px; z-index: 199; display: none; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px 0 14px; border-radius: 22px; border: 1px solid #ffd9c2; background: #fff; color: #0a2540;
  font: 600 13.5px Inter, -apple-system, "Segoe UI", sans-serif; cursor: pointer;
  box-shadow: 0 10px 30px rgba(10,37,64,.18); animation: ldAsstPop .2s ease-out;
}
.ld-asst-pill.show { display: inline-flex; }
.ld-asst-pill:hover { box-shadow: 0 12px 34px rgba(10,37,64,.24); }
.ld-asst-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: #fd7020; display: none; }
.ld-asst-pill.busy .ld-asst-pill-dot { display: block; animation: ldAsstPulse 1.2s ease-in-out infinite; }
.ld-asst-pill.unread .ld-asst-pill-dot { display: block; background: #12b76a; box-shadow: 0 0 0 4px rgba(18,183,106,.18); }
.ld-asst-pill-msg { display: none; font-style: normal; font-weight: 500; color: #425466; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-asst-pill.has-msg .ld-asst-pill-msg { display: inline; }
.ld-asst-backdrop { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  #ldAsstDrawer *, #ldAsstDrawer, .ld-asst-pill { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Téléphone : panneau plein écran glissant depuis le bas */
@media (max-width: 640px) {
  #ldAsstDrawer, #ldAsstDrawer.wide, #ldAsstDrawer.floating, #ldAsstDrawer.floating.maxed {
    left: 0 !important; right: 0 !important; top: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100% !important;
    border-radius: 0; border: 0;
  }
  #ldAsstDrawer.open, #ldAsstDrawer.floating.open { animation: ldAsstUp .26s cubic-bezier(.2,.8,.2,1); }
  @keyframes ldAsstUp { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
  #ldAsstDrawer .ld-asst-desk, #ldAsstDrawer .ld-asst-edge, #ldAsstDrawer .ld-asst-resize { display: none !important; }
  #ldAsstDrawer .ld-asst-head { cursor: default !important; padding-top: max(10px, env(safe-area-inset-top)); }
  #ldAsstDrawer .ld-asst-log { padding: 16px 14px 8px; }
  #ldAsstDrawer .ld-asst-composer { padding: 8px 12px 4px; }
  #ldAsstDrawer .ld-asst-disc { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  #ldAsstDrawer .ld-asst-input textarea { font-size: 16px; }
  #ldAsstDrawer .ld-asst-opts { grid-template-columns: 1fr; }
  #ldAsstDrawer .ld-asst-plan-head { padding: 12px 12px 8px; }
  #ldAsstDrawer .ld-asst-plan-ops { padding: 4px 4px 6px; }
  #ldAsstDrawer .ld-asst-op-tag { display: none; }
  #ldAsstDrawer .ld-asst-plan-act { padding: 10px 12px 6px; }
  #ldAsstDrawer .ld-asst-plan-btns { width: 100%; }
  #ldAsstDrawer .ld-asst-plan-btns .ld-asst-btn { flex: 1; min-height: 44px; }
  #ldAsstDrawer .ld-asst-plan-btns .ld-asst-btn.primary { flex-basis: 100%; order: -1; }
  #ldAsstDrawer .ld-asst-btn.sm, #ldAsstDrawer .ld-asst-btn.xs { min-height: 40px; }
  #ldAsstDrawer .ld-asst-head button { width: 40px; height: 40px; }
  .ld-asst-pill { right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); height: 48px; }
}

/* Liens internes */
#ldAsstDrawer a.ld-ref {
  display: inline-flex; align-items: baseline; gap: 3px; color: var(--a-or-d); text-decoration: none; font-weight: 550;
  border-bottom: 1px solid rgba(196,74,12,.3); border-radius: 2px; padding: 0 1px; transition: background .15s, border-color .15s;
}
#ldAsstDrawer a.ld-ref svg { align-self: center; flex: none; opacity: .75; }
#ldAsstDrawer a.ld-ref:hover { background: var(--a-or-s); border-bottom-color: var(--a-or-d); }
#ldAsstDrawer a.ld-ref:focus-visible { outline: 2px solid var(--a-or); outline-offset: 2px; }
#ldAsstDrawer .ld-ref-del s { color: #8898aa; }
#ldAsstDrawer .ld-ref-del small { font-size: 11px; color: #8898aa; font-style: italic; }
@media (pointer: coarse) { #ldAsstDrawer a.ld-ref { padding: 3px 2px; margin: -3px 0; } }
.ld-asst-tip {
  position: fixed; z-index: 210; width: 260px; padding: 10px 12px; border-radius: 10px; background: #0a2540; color: #e6edf5;
  font: 12.5px/1.45 Inter, -apple-system, "Segoe UI", sans-serif; box-shadow: 0 12px 30px rgba(10,37,64,.3);
  opacity: 0; transform: translateY(4px); pointer-events: none; transition: opacity .12s, transform .12s;
}
.ld-asst-tip.show { opacity: 1; transform: none; }
.ld-asst-tip em { display: block; font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #ffb37a; margin-bottom: 4px; }
.ld-asst-tip div { display: flex; justify-content: space-between; gap: 10px; }
.ld-asst-tip div span { color: #9fb0c3; }
.ld-asst-tip div b { font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-asst-tip small { display: block; margin-top: 6px; color: #8aa0b8; font-size: 11px; }
tr.ld-asst-hl > td { animation: ldAsstRowHl 4s ease forwards; }
@keyframes ldAsstRowHl { 0%, 60% { background: #fff1e8; } 100% { background: transparent; } }
.ld-asst-filterbar {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 9px 12px; border-radius: 10px;
  background: #fff1e8; border: 1px solid #ffd9c2; color: #7a2e0b; font-size: 13px;
}
.ld-asst-filterbar span { flex: 1; }
.ld-asst-filterbar button { border: 1px solid #ffd9c2; background: #fff; color: #c44a0c; border-radius: 8px; padding: 5px 10px; font: inherit; font-weight: 600; cursor: pointer; min-height: 32px; }

#ldAsstDrawer .pill.auto { background: #eff4ff; color: #1d4ed8; }
#ldAsstDrawer .ld-asst-plan.auto .ld-asst-plan-act { display: none; }

/* Onglet Paramètres → Assistant IA */
.ld-as .ld-as-sub { font-size: 12.5px; margin: 0 0 12px; }
.ld-as .ld-as-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid #eef1f5; flex-wrap: wrap; }
.ld-as .ld-as-row:first-of-type { border-top: 0; }
.ld-as .ld-as-lab { display: flex; flex-direction: column; gap: 2px; min-width: 200px; flex: 1; }
.ld-as .ld-as-lab b { font-size: 13.5px; font-weight: 600; color: #0a2540; }
.ld-as .ld-as-lab span { font-size: 12.5px; color: #697386; max-width: 520px; }
.ld-as .ld-as-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: #f6f9fc; border: 1px solid #e3e8ee; border-radius: 9px; }
.ld-as .ld-as-seg button { border: 0; background: transparent; border-radius: 7px; padding: 0 12px; min-height: 34px; font: inherit; font-size: 13px; color: #425466; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.ld-as .ld-as-seg button:hover { color: #0a2540; }
.ld-as .ld-as-seg button.on { background: #fff; color: #c44a0c; font-weight: 600; box-shadow: 0 1px 3px rgba(10,37,64,.12); }
.ld-as .ld-as-seg button:focus-visible { outline: 2px solid #fd7020; outline-offset: 1px; }
.ld-as .ld-as-row select, .ld-as .ld-as-row input[type=number], .ld-as .ld-as-key { min-width: 180px; max-width: 260px; }
.ld-as .ld-as-key { text-align: center; font-weight: 600; cursor: pointer; }
.ld-as .ld-as-tog.locked { opacity: .85; }
.ld-as .ld-as-tog.locked span::before { content: 'Toujours actif'; display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; background: #f6f9fc; border: 1px solid #e3e8ee; font-size: 11px; font-weight: 600; color: #425466; }
.ld-as .ld-as-h { font-size: 13px; font-weight: 700; color: #0a2540; margin: 18px 0 8px; }
.ld-as .ld-as-tbl { overflow-x: auto; border: 1px solid #e3e8ee; border-radius: 8px; }
.ld-as .ld-as-tbl table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ld-as .ld-as-tbl th, .ld-as .ld-as-tbl td { padding: 8px 10px; border-bottom: 1px solid #eef1f5; text-align: left; white-space: nowrap; }
.ld-as .ld-as-tbl th { background: #f6f9fc; font-weight: 600; color: #425466; }
.ld-as .ld-as-tbl td input[type=checkbox] { width: 18px; height: 18px; accent-color: #fd7020; }
.ld-as .ld-as-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ld-as .ld-as-filters > input, .ld-as .ld-as-filters > select, .ld-as .ld-as-filters > .ts-wrapper { width: auto !important; flex: 0 1 170px; max-width: 170px; }
@media (max-width: 640px) { .ld-as .ld-as-seg { width: 100%; } .ld-as .ld-as-seg button { flex: 1; min-height: 44px; } .ld-as .ld-as-row select, .ld-as .ld-as-row input[type=number], .ld-as .ld-as-key { width: 100%; max-width: none; } }

/* ---------- Démo guidée (compte démo) : bandeau compact ---------- */
@layer base {
  #view section.ld-demo-card {
    display: flex !important; align-items: center !important; gap: 14px !important; margin: 0 0 16px !important; padding: 12px 14px 12px 14px !important;
    border-radius: 12px !important; border: 1px solid #ffd9c2 !important; background: linear-gradient(100deg, #fff7f1 0%, #fff 60%) !important;
    box-shadow: 0 1px 2px rgba(10,37,64,.04) !important; color: #0a2540 !important;
  }
  #view section.ld-demo-card .ld-demo-card-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff !important; background: linear-gradient(135deg, #ff8a3d, #c44a0c) !important; }
  #view section.ld-demo-card .ld-demo-card-ic svg { width: 18px; height: 18px; }
  #view section.ld-demo-card .ld-demo-card-txt { flex: 1; min-width: 0; }
  #view section.ld-demo-card h2 { margin: 0 !important; font-size: 15px !important; font-weight: 700 !important; color: #0a2540 !important; line-height: 1.35 !important; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  #view section.ld-demo-card .ld-demo-card-badge { flex: none !important; display: inline-flex !important; align-items: center; height: 20px !important; padding: 0 9px !important; line-height: 1 !important; white-space: nowrap !important; font-size: 10px !important; font-weight: 700 !important; letter-spacing: .05em; text-transform: uppercase; color: #fff !important; background: #fd7020 !important; border-radius: 999px !important; box-sizing: border-box; }
  #view section.ld-demo-card p { margin: 2px 0 0 !important; font-size: 13px !important; line-height: 1.45 !important; color: #425466 !important; }
  #view section.ld-demo-card .ld-demo-card-act { flex: none; display: flex; align-items: center; gap: 6px; }
  #view section.ld-demo-card .ld-demo-go { display: inline-flex !important; align-items: center; gap: 8px; min-height: 36px !important; padding: 0 14px !important; border: 0 !important; border-radius: 9px !important; color: #fff !important; background: #fd7020 !important; font: inherit; font-size: 13.5px !important; font-weight: 600 !important; cursor: pointer; box-shadow: 0 2px 6px rgba(253,112,32,.25) !important; }
  #view section.ld-demo-card .ld-demo-go:hover { background: #e5600f !important; }
  #view section.ld-demo-card .ld-demo-free { min-height: 36px !important; padding: 0 10px !important; border: 0 !important; background: transparent !important; color: #c44a0c !important; font: inherit; font-size: 13px !important; font-weight: 600 !important; cursor: pointer; }
  #view section.ld-demo-card .ld-demo-free:hover { text-decoration: underline; }
}
@media (max-width: 760px) { #view section.ld-demo-card { flex-wrap: wrap !important; } #view section.ld-demo-card .ld-demo-card-act { width: 100%; } #view section.ld-demo-card .ld-demo-go { flex: 1; justify-content: center; min-height: 44px !important; } }

#ldDemoLayer { position: fixed; inset: 0; z-index: 230; pointer-events: none; display: none; font-family: Inter, -apple-system, "Segoe UI", sans-serif; }
#ldDemoLayer.on { display: block; }
#ldDemoLayer .ld-demo-ring { position: fixed; border-radius: 12px; box-shadow: 0 0 0 3px #fd7020, 0 0 0 9999px rgba(10,37,64,.28); transition: all .3s cubic-bezier(.2,.8,.2,1); animation: ldDemoRing 1.8s ease-in-out infinite; }
@keyframes ldDemoRing { 50% { box-shadow: 0 0 0 5px rgba(253,112,32,.75), 0 0 0 9999px rgba(10,37,64,.28); } }
#ldDemoLayer .ld-demo-bubble {
  position: fixed; pointer-events: auto; background: #fff; color: #0a2540; border-radius: 14px; padding: 14px 16px 14px;
  box-shadow: 0 22px 60px rgba(10,37,64,.32), 0 0 0 1px rgba(10,37,64,.06); transition: left .3s cubic-bezier(.2,.8,.2,1), top .3s cubic-bezier(.2,.8,.2,1);
}
#ldDemoLayer .ld-demo-bubble.pop { animation: ldDemoPop .28s cubic-bezier(.2,1.4,.4,1); }
@keyframes ldDemoPop { from { transform: scale(.94); opacity: .3; } to { transform: none; opacity: 1; } }
#ldDemoLayer .ld-demo-bubble.is-action { box-shadow: 0 22px 60px rgba(10,37,64,.32), 0 0 0 2px #fd7020; }
#ldDemoLayer .ld-demo-b-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
#ldDemoLayer .ld-demo-b-step { font-size: 11.5px; font-weight: 700; color: #c44a0c; text-transform: uppercase; letter-spacing: .04em; }
#ldDemoLayer .ld-demo-b-quit { border: 0; background: none; color: #8898aa; font: inherit; font-size: 12px; cursor: pointer; padding: 4px; }
#ldDemoLayer .ld-demo-b-quit:hover { color: #0a2540; text-decoration: underline; }
#ldDemoLayer h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: #0a2540; }
#ldDemoLayer .ld-demo-b-body { font-size: 13.5px; line-height: 1.55; color: #425466; }
#ldDemoLayer .ld-demo-b-body p { margin: 0 0 8px; }
#ldDemoLayer .ld-demo-b-body b { color: #0a2540; }
#ldDemoLayer .ld-demo-b-body .muted { color: #8898aa; font-size: 12.5px; }
#ldDemoLayer .ld-demo-b-body blockquote { margin: 6px 0 8px; padding: 8px 10px; border-left: 3px solid #fd7020; background: #fff7f1; border-radius: 0 8px 8px 0; color: #0a2540; }
#ldDemoLayer .ld-demo-ideas { margin: 6px 0 4px; padding: 0; list-style: none; display: grid; gap: 6px; }
#ldDemoLayer .ld-demo-ideas li { padding: 8px 10px; border: 1px solid #e3e8ee; border-radius: 9px; cursor: pointer; color: #0a2540; font-size: 13px; transition: border-color .15s, background .15s; }
#ldDemoLayer .ld-demo-ideas li:hover { border-color: #fd7020; background: #fff7f1; }
#ldDemoLayer .ld-demo-b-act { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
#ldDemoLayer .ld-demo-btn { min-height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid #e3e8ee; background: #fff; color: #0a2540; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
#ldDemoLayer .ld-demo-btn.primary { border: 0; color: #fff; background: linear-gradient(135deg, #ff8a3d, #fd7020 45%, #c44a0c); box-shadow: 0 4px 12px rgba(253,112,32,.3); }
#ldDemoLayer .ld-demo-btn:focus-visible { outline: 2px solid #fd7020; outline-offset: 2px; }
#ldDemoLayer .ld-demo-b-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #c44a0c; }
#ldDemoLayer .ld-demo-b-hint i { width: 10px; height: 10px; border-radius: 50%; background: #fd7020; animation: ldAsstPulse 1s ease-in-out infinite; }
#ldDemoLayer .ld-demo-b-arrow { position: absolute; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); margin: -7px; }
#ldDemoLayer .side-left .ld-demo-b-arrow { right: 0; left: auto !important; margin-right: -7px; }
#ldDemoLayer .side-right .ld-demo-b-arrow { left: 0 !important; margin-left: -7px; }
#ldDemoLayer .side-top .ld-demo-b-arrow { bottom: 0; top: auto !important; margin-bottom: -7px; }
#ldDemoLayer .side-bottom .ld-demo-b-arrow { top: 0 !important; margin-top: -7px; }
#ldDemoLayer .center .ld-demo-b-arrow { display: none; }
body.ld-demo-running #ldAsstDrawer { z-index: 220; }
@media (prefers-reduced-motion: reduce) { #ldDemoLayer *, #view .ld-demo-card::after, #view .ld-demo-go { animation: none !important; transition: none !important; } }

/* Crédits gratuits épuisés */
#ldAsstDrawer .ld-asst-quota { margin: 0 0 18px; border: 1px solid #fde3b0; background: #fffbf2; border-radius: 14px; padding: 14px 16px; animation: ldAsstOpIn .3s ease forwards; }
#ldAsstDrawer .ld-asst-quota-head { display: flex; gap: 12px; align-items: flex-start; }
#ldAsstDrawer .ld-asst-quota-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: #fff1d6; color: #b54708; display: inline-flex; align-items: center; justify-content: center; }
#ldAsstDrawer .ld-asst-quota-head b { display: block; font-size: 14.5px; color: #0a2540; }
#ldAsstDrawer .ld-asst-quota-head p { margin: 3px 0 0; font-size: 13.5px; color: #425466; line-height: 1.5; }
#ldAsstDrawer .ld-asst-quota-head strong { color: #0a2540; }
#ldAsstDrawer .ld-asst-quota-form { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #fde3b0; }
#ldAsstDrawer .ld-asst-quota-lead { margin: 0 0 10px; font-size: 13.5px; color: #0a2540; font-weight: 500; }
#ldAsstDrawer .ld-asst-quota-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#ldAsstDrawer .ld-asst-quota-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #697386; font-weight: 500; }
#ldAsstDrawer .ld-asst-quota-grid label.full { grid-column: 1 / -1; }
#ldAsstDrawer .ld-asst-quota-grid input { min-height: 38px !important; padding: 0 10px !important; border: 1px solid #e3e8ee !important; border-radius: 9px !important; font: inherit; font-size: 14px; color: #0a2540; background: #fff !important; }
#ldAsstDrawer .ld-asst-quota-grid input:focus { outline: none; border-color: #fdb78f !important; box-shadow: 0 0 0 3px rgba(253,112,32,.12); }
#ldAsstDrawer .ld-asst-quota-act { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
#ldAsstDrawer .ld-asst-quota-msg { font-style: normal; font-size: 12.5px; color: #b42318; }
#ldAsstDrawer .ld-asst-quota-ok { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #ecfdf3; color: #067647; font-size: 13.5px; }
#ldAsstDrawer .ld-asst-quota-ok .ld-ck { width: 18px; height: 18px; flex: none; }
@media (max-width: 480px) { #ldAsstDrawer .ld-asst-quota-grid { grid-template-columns: 1fr; } #ldAsstDrawer .ld-asst-quota-grid input { font-size: 16px; } }
