/* =========================================================================
   FLEMME — assistant IA (bulle et panneau de conversation, voir assistant.js)
   ========================================================================= */
.guide-cta { margin: 6px 0 0; }
.link-btn { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 800; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.ai-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50; display: flex; align-items: center; gap: 8px; border: 2px solid var(--ink); border-radius: 99px; padding: 12px 18px; background: var(--acid); color: var(--ink); font: inherit; font-weight: 900; font-size: 15px; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; }
.ai-fab-dot { font-size: 16px; }

.ai-panel { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100dvh - 100px)); display: flex; flex-direction: column; background: #fff; border: 2px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink); overflow: hidden; text-align: left; }
.ai-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--acid); border-bottom: 2px solid var(--ink); }
.ai-head h2 { margin: 0; font-size: 17px; letter-spacing: 0; line-height: 1.2; }
.ai-close { background: none; border: 0; font-size: 28px; line-height: 1; padding: 0 4px; cursor: pointer; color: var(--ink); }
.ai-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-msg { margin: 0; padding: 10px 13px; border-radius: 16px; max-width: 88%; font-size: 15px; line-height: 1.4; white-space: pre-wrap; }
.ai-msg.bot { background: var(--soft); align-self: flex-start; border-bottom-left-radius: 4px; }
.ai-msg.user { background: var(--ink); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-msg.wait { color: var(--muted); font-style: italic; }
.ai-msg.err { background: #fde8e6; color: #8a1c12; }
.ai-recap { border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px; font-size: 14px; background: #fafaf5; }
.ai-recap p { margin: 0 0 5px; }
.ai-recap p:last-child { margin: 0; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; }
.ai-chips:not(:empty) { padding-bottom: 10px; }
.ai-chip { border: 1px solid var(--ink); background: #fff; border-radius: 99px; padding: 7px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ai-chip:hover { background: var(--soft); }
.ai-fill { width: 100%; padding: 12px 16px; }
.ai-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); }
.ai-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; }
.ai-form .primary { padding: 0 16px; font-size: 18px; }
.ai-note { margin: 0; padding: 0 14px 10px; font-size: 11px; color: var(--muted); }

@media (max-width: 520px) {
  .ai-panel { right: 0; left: 0; bottom: 0; width: 100%; height: 85dvh; border-radius: 22px 22px 0 0; border-bottom: 0; box-shadow: none; }
  .ai-fab { padding: 10px 14px; font-size: 14px; }
}
