/* Assistant d'aide automatique : bulle de chat et panneau de conversation (palette bleu marine et orange de l'accueil). */
.assist{position:fixed;inset-inline-end:18px;bottom:18px;z-index:90;font-family:inherit}
.assist-launcher{display:grid;place-items:center;width:58px;height:58px;padding:0;border:0;border-radius:50%;background:#fa8a1b;color:#0e2949;box-shadow:0 8px 24px #0e294940;cursor:pointer}
.assist-launcher:hover{background:#ff9c38}
.assist-launcher:focus-visible,.assist-close:focus-visible,.assist-send:focus-visible,.assist-chip:focus-visible,.assist-link:focus-visible{outline:3px solid #0e2949;outline-offset:2px}
.assist-panel{position:absolute;inset-inline-end:0;bottom:70px;display:flex;flex-direction:column;width:min(390px,calc(100vw - 36px));height:min(580px,calc(100vh - 110px));height:min(580px,calc(100dvh - 110px));background:#fff;border:1px solid #dce4f0;border-radius:18px;box-shadow:0 18px 48px #0e294933;overflow:hidden;color:#0e2b4e}
.assist-head{display:flex;align-items:center;gap:12px;padding:14px 14px 14px 16px;background:#0e2949;color:#fff}
.assist-avatar{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:12px;background:#fa8a1b;color:#0e2949}
.assist-title{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.assist-title strong{font-size:16px;line-height:1.2}
.assist-title small{font-size:12px;line-height:1.35;color:#c4d5e9}
.assist-close{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:0;border:0;border-radius:11px;background:#193c63;color:#fff;cursor:pointer}
.assist-close:hover{background:#244c77}
.assist-log{flex:1;min-height:0;display:flex;flex-direction:column-reverse;overflow-y:auto;background:#f4f6fb;overscroll-behavior:contain}
.assist-thread{display:flex;flex-direction:column;gap:14px;margin-bottom:auto;padding:14px}
.assist-row{display:flex;flex-direction:column;gap:8px;max-width:100%}
.assist-row.is-user{align-items:flex-end}
.assist-row.is-bot{align-items:flex-start}
.assist-bubble{max-width:92%;padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}
.is-bot .assist-bubble{background:#fff;border:1px solid #dce4f0;border-end-start-radius:4px}
.is-user .assist-bubble{background:#0e2949;color:#fff;border-end-end-radius:4px}
.assist-chips{display:flex;flex-wrap:wrap;gap:8px}
.assist-chip{padding:7px 12px;border:1px solid #f3c58f;border-radius:999px;background:#fff1df;color:#8f4a00;font:inherit;font-size:13px;font-weight:500;line-height:1.35;text-align:start;cursor:pointer}
.assist-chip:hover{background:#ffe6c6}
.assist-links{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.assist-link{display:inline-flex;align-items:center;gap:4px;font-size:14px;font-weight:600;color:#15558e}
.assist-link:hover{text-decoration:underline}
.assist-related{margin:2px 0 0;font-size:12px;font-weight:600;letter-spacing:.02em;color:#607998}
.assist-form{display:flex;gap:8px;padding:10px;border-top:1px solid #dce4f0;background:#fff}
.assist-form input{flex:1;min-width:0;min-height:44px;padding:0 12px;border:1px solid #cfd9e8;border-radius:11px;background:#fff;font:inherit;font-size:14px;color:#0e2b4e}
.assist-form input:focus{outline:2px solid #e67c19;outline-offset:1px}
.assist-send{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:11px;background:#fa8a1b;color:#0e2949;cursor:pointer}
.assist-send:hover:not(:disabled){background:#ff9c38}
.assist-send:disabled{opacity:.45;cursor:not-allowed}

/* L'assistant se masque sur la messagerie, qui a sa propre zone de saisie. */
.has-chat .assist{display:none}

/* Téléphone : la bulle se place au-dessus de la barre d'onglets du bas, le panneau devient une fiche pleine largeur. */
@media(max-width:800px){
  .assist{inset-inline-end:14px;bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  .assist-launcher{width:54px;height:54px}
  .assist-panel{position:fixed;inset-inline:12px;bottom:calc(150px + env(safe-area-inset-bottom,0px));width:auto;height:calc(100vh - 210px);height:calc(100dvh - 210px);max-height:540px}
}
@media(prefers-reduced-motion:no-preference){.assist-panel{animation:assist-in .16s ease-out}}
@keyframes assist-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
