/* Assistant intégré : panneau sobre, confortable sur téléphone et tablette. */
.ai-page { max-width: 1020px; margin: 0 auto; display: grid; gap: 18px; padding-bottom: 28px; min-width: 0; }
.ai-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.ai-head h2 { margin: 5px 0 6px; font-size: clamp(1.35rem, 3vw, 2rem); color: #204d37; }
.ai-head p { margin: 0; color: #637367; line-height: 1.5; }
.ai-status { flex: none; display: inline-block; padding: 8px 12px; border-radius: 999px; color: #23583c; background: #e9f2e7; font-size: .83rem; font-weight: 650; }
.ai-intro { background: #f7f5ef; border: 1px solid #e2e5d9; border-radius: 20px; padding: 18px 20px; color: #314235; }
.ai-intro p { margin: 7px 0; line-height: 1.55; }
.ai-intro small { color: #5f6b60; }
.ai-suggestions { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-suggestion { min-height: 44px; min-width: 0; max-width: 100%; overflow-wrap: anywhere; border: 1px solid #d6e5d6; background: #fff; color: #23543a; border-radius: 999px; padding: 11px 15px; font: inherit; font-size: .93rem; cursor: pointer; }
.ai-suggestion:focus-visible,.ai-compose button:focus-visible { outline: 3px solid #579d73; outline-offset: 3px; }
.ai-suggestion:hover { background: #eff6ee; }
.ai-suggestion:disabled { opacity: .6; cursor: wait; }
.ai-conversation { min-height: 220px; max-height: 430px; overflow-y: auto; overscroll-behavior: contain; background: #fafbf8; border: 1px solid #e1e7df; border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ai-empty { color: #627063; text-align: center; margin: auto; }
.ai-message { max-width: 88%; padding: 12px 15px; border: 1px solid #dce5dd; border-radius: 17px 17px 17px 5px; background: white; overflow-wrap: anywhere; }
.ai-message.ai-you { background: #e9f2e8; border-color: #d2e5d2; align-self: end; border-radius: 17px 17px 5px 17px; }
.ai-message.ai-error { color: #813c29; border-color: #e4b7aa; background: #fff8f4; }
.ai-message p { margin: 5px 0 0; line-height: 1.55; white-space: pre-wrap; }
.ai-speaker { font-size: .8rem; font-weight: 700; color: #365a41; }
.ai-pending { color: #5d7165; font-size: .9rem; }
.ai-compose { border: 1px solid #dfe8db; background: #fff; border-radius: 20px; padding: 16px; display: grid; gap: 10px; }
.ai-compose label { font-weight: 700; color: #284633; }
.ai-compose textarea { resize: vertical; width: 100%; min-height: 100px; box-sizing: border-box; border: 1px solid #c8d9c9; background: #fff; border-radius: 12px; padding: 12px; color: #193727; font: inherit; font-size: 16px; }
.ai-compose textarea:focus-visible { outline: 2px solid #41855d; outline-offset: 1px; }
.ai-actions { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.ai-actions small,.ai-warning { color: #687668; font-size: .82rem; line-height: 1.45; }
.ai-warning { margin: 0; }
@media (max-width: 680px) {
  .ai-page { gap: 14px; }
  .ai-head { flex-direction: column; gap: 9px; }
  .ai-status { align-self: start; }
  .ai-intro { padding: 16px; }
  .ai-suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ai-suggestion { border-radius: 14px; padding: 11px 8px; font-size: .86rem; text-align: center; }
  .ai-message { max-width: 95%; }
  .ai-actions { align-items: stretch; flex-direction: column; }
  .ai-actions button { width: 100%; min-height: 44px; }
}
