/* Bulle « Une question ? » de l'assistant JaiRDV (assist.js). Préfixe asst- pour ne rien heurter. */
.asst-btn { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 60;
  display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 14px; border: 0; border-radius: 26px;
  background: linear-gradient(135deg, #1991ee, #1865e0 60%, #3b3fd8); color: #fff; font-size: 15px; font-weight: 600; line-height: 1;
  font-family: inherit; box-shadow: 0 8px 24px rgba(24, 101, 224, .35); cursor: pointer; transition: transform .15s; }
.asst-btn:hover { transform: translateY(-2px); }
.asst-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.asst-btn.on span { display: none; }
.asst-btn.on { padding: 0 14px; }

.asst-box { position: fixed; right: 18px; bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 61;
  width: 370px; max-width: calc(100vw - 24px); height: min(560px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: #fff; color: #111217; border-radius: 18px; overflow: hidden; font-family: inherit; font-size: 15px;
  box-shadow: 0 18px 50px rgba(17, 18, 23, .22), 0 0 0 1px rgba(17, 18, 23, .06); }
.asst-box[hidden] { display: none; }
.asst-head { display: flex; align-items: center; gap: 6px; padding: 14px 12px 14px 16px; color: #fff;
  background: linear-gradient(135deg, #1991ee, #1865e0 60%, #3b3fd8); }
.asst-title { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.asst-title strong { font-size: 16px; }
.asst-title small { font-size: 12px; opacity: .85; }
.asst-head button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16);
  color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.asst-head button:hover { background: rgba(255, 255, 255, .28); }
.asst-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f5f7fb; }
.asst-msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.asst-msg.ai { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(17, 18, 23, .08); }
.asst-msg.me { align-self: flex-end; background: #1865e0; color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.asst-msg.err { background: #fff4f2; color: #9b2c1c; }
.asst-msg a { color: #1865e0; font-weight: 600; }
.asst-msg.wait { display: flex; gap: 4px; padding: 14px; }
.asst-msg.wait i { width: 7px; height: 7px; border-radius: 50%; background: #9aa6bd; animation: asst-dot 1s infinite ease-in-out; }
.asst-msg.wait i:nth-child(2) { animation-delay: .15s; }
.asst-msg.wait i:nth-child(3) { animation-delay: .3s; }
@keyframes asst-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.asst-ideas { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.asst-ideas button { padding: 8px 12px; border: 1px solid #c9d8f5; border-radius: 16px; background: #fff; color: #1865e0;
  font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.asst-ideas button:hover { background: #eef4ff; }
.asst-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid #e6e9f0; }
.asst-form textarea { flex: 1; resize: none; max-height: 120px; padding: 10px 12px; border: 1px solid #d5dae4; border-radius: 12px;
  font: inherit; font-size: 16px; line-height: 1.35; color: inherit; background: #fff; }
.asst-form textarea:focus { outline: 2px solid #1865e0; outline-offset: -1px; border-color: transparent; }
.asst-send { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #1865e0; color: #fff; cursor: pointer; }
.asst-send:disabled { opacity: .5; }
.asst-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.asst-foot { margin: 0; padding: 0 12px 10px; font-size: 12px; color: #6b7385; text-align: center; }
.asst-foot a { color: #1865e0; }

@media (max-width: 760px) {
  .asst-btn { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); height: 48px; padding: 0 12px; }
  .asst-btn span { display: none; }
  /* Espace pro : le bouton rond « + » de l'agenda est déjà en bas à droite. */
  body:has(.fab) .asst-btn { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .asst-box { inset: 0; width: auto; max-width: none; height: 100%; border-radius: 0; }
  html.asst-open { overflow: hidden; }
  html.asst-open .asst-btn { display: none; }
}

/* Propositions de modification (espace pro) */
.asst-prop { align-self: stretch; padding: 12px 13px; border: 1px solid #c9d8f5; border-left: 4px solid #1865e0; border-radius: 12px; background: #fff; }
.asst-prop p { margin: 0 0 10px; line-height: 1.4; }
.asst-prop-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.asst-apply, .asst-skip { min-height: 38px; padding: 0 14px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.asst-apply { border: 0; background: #1865e0; color: #fff; }
.asst-skip { border: 1px solid #d5dae4; background: #fff; color: #4a5266; }
.asst-apply:disabled, .asst-skip:disabled { opacity: .6; }
.asst-ok { color: #157347; font-weight: 600; }
.asst-off { color: #6b7385; }
.asst-prop-act a { color: #1865e0; font-weight: 600; }
