/* ── Assistant Widget IAutonomy — Shared Styles ──
   Inclus via /shared/assistant-widget.css dans chaque app client.
   Tokens visuels alignés sur le design Creator (glass card dark). */

.ia-assistant-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #08C6F9 0%, #0EA5E9 100%);
  color: #fff;
  border: none;
  font-size: 22px;
  box-shadow: 0 4px 24px rgba(8, 198, 249, 0.35);
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  line-height: 1;
}
.ia-assistant-fab:hover {
  transform: scale(1.08);
}
.ia-assistant-fab.open {
  transform: scale(0.95);
  border-radius: 50%;
}

/* ── Panel ── */
.ia-assistant-panel {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  background: rgba(18, 22, 30, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  z-index: 10000;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
}
.ia-assistant-panel.visible {
  display: flex;
}

/* ── Header ── */
.ia-assistant-header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ia-assistant-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ia-assistant-context {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* ── Messages / Suggestions zone ── */
.ia-assistant-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 340px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.ia-assistant-body::-webkit-scrollbar {
  width: 5px;
}
.ia-assistant-body::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

/* ── Suggestions ── */
.ia-assistant-suggestions-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 4px;
}
.ia-assistant-suggestion {
  padding: 9px 13px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  color: #e8d4a8;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
  line-height: 1.4;
}
.ia-assistant-suggestion:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── Chat bubbles ── */
.ia-assistant-msg {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 88%;
  white-space: pre-wrap;
  word-break: break-word;
}
.ia-assistant-msg.user {
  background: #00CCF7;
  color: #0a0e14;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.ia-assistant-msg.assistant {
  background: rgba(255, 255, 255, 0.06);
  color: #e0e6ed;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Typing indicator ── */
.ia-assistant-typing {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}
.ia-assistant-typing.active {
  display: flex;
}
.ia-assistant-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00CCF7;
  animation: ia-dot-pulse 1.2s ease-in-out infinite;
}
.ia-assistant-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.ia-assistant-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes ia-dot-pulse {
  0%, 60%, 100% { opacity: 0.25; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
}

/* ── Input bar ── */
.ia-assistant-input-bar {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 8px;
}
.ia-assistant-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-family: inherit;
}
.ia-assistant-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.ia-assistant-input:focus {
  border-color: rgba(0, 204, 247, 0.4);
}
.ia-assistant-send {
  padding: 8px 16px;
  background: #00CCF7;
  color: #0a0e14;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.ia-assistant-send:disabled {
  opacity: 0.35;
  cursor: default;
}
.ia-assistant-send:not(:disabled):hover {
  background: #1ad6ff;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .ia-assistant-panel {
    width: 90vw;
    right: 5vw;
    bottom: 80px;
    max-height: 70vh;
  }
}
