/* Assistant Jumbo (IA) — popup. Couleurs du site (site.css : --navy #0C3D52, --teal #23B7C5, --sky #EEF5F8, --line #CFE7EC). */
.jtia { --jtia-navy: #0C3D52; --jtia-teal: #23B7C5; --jtia-sky: #EEF5F8; --jtia-line: #CFE7EC; --jtia-ink: #16202A; --jtia-grey: #5B6874;
  font-family: Manrope, system-ui, sans-serif; color: var(--jtia-ink); }
.jtia *, .jtia *::before, .jtia *::after { box-sizing: border-box; }

/* bouton flottant */
.jtia-launch { position: fixed; right: 22px; bottom: 22px; z-index: 85; width: 62px; height: 62px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #0C3D52 0%, #134D66 55%, #1A6A85 100%);
  box-shadow: 0 10px 28px rgba(12, 61, 82, .35), 0 0 0 4px rgba(35, 183, 197, .18); transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease; }
.jtia-launch:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 32px rgba(12, 61, 82, .4), 0 0 0 6px rgba(35, 183, 197, .22); }
.jtia-launch:focus-visible { outline: 3px solid var(--jtia-teal); outline-offset: 3px; }
.jtia-launch svg { width: 30px; height: 30px; }
.jtia-launch-ia { position: absolute; top: -3px; right: -3px; min-width: 24px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--jtia-teal);
  color: #fff; font: 800 11px/20px Manrope, system-ui, sans-serif; letter-spacing: .02em; border: 2px solid #fff; }
.jtia-is-open .jtia-launch { transform: scale(.92); }

/* panneau */
.jtia-panel { position: fixed; right: 22px; bottom: 96px; z-index: 85; width: 390px; max-width: calc(100vw - 32px); height: min(640px, calc(100vh - 120px));
  display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(10, 16, 22, .28), 0 0 0 1px rgba(12, 61, 82, .06); animation: jtia-in .28s cubic-bezier(.2,.7,.2,1); }
.jtia-panel[hidden] { display: none; }
@keyframes jtia-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .jtia-panel { animation: none; } .jtia-launch { transition: none; } }

.jtia-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; color: #fff;
  background: linear-gradient(135deg, #0C3D52 0%, #134D66 55%, #1A6A85 100%); }
.jtia-av { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.jtia-av svg { width: 24px; height: 24px; }
.jtia-ttl { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.jtia-ttl b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.jtia-ttl small { font-size: 12px; font-weight: 600; opacity: .8; }
.jtia-badge { display: inline-block; vertical-align: 2px; margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: var(--jtia-teal); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.jtia-x { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
  display: grid; place-items: center; }
.jtia-x:hover { background: rgba(255,255,255,.22); }
.jtia-x:focus-visible, .jtia-send:focus-visible, .jtia-chip:focus-visible, .jtia-foot a:focus-visible, .jtia-foot button:focus-visible { outline: 3px solid var(--jtia-teal); outline-offset: 2px; }

/* avis IA permanent (AI Act art. 50) + information RGPD repliable */
.jtia-notice { padding: 9px 16px 8px; background: var(--jtia-sky); border-bottom: 1px solid var(--jtia-line); font-size: 12px; line-height: 1.45; color: #34505E; }
.jtia-notice p { margin: 0; }
.jtia-notice details { margin-top: 3px; }
.jtia-notice summary { cursor: pointer; font-weight: 700; color: var(--jtia-navy); width: max-content; }
.jtia-notice details p { margin-top: 5px; }
.jtia-notice a { color: var(--jtia-navy); font-weight: 700; }

/* fil de discussion */
.jtia-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.jtia-msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.jtia-msg p { margin: 0 0 6px; } .jtia-msg p:last-child { margin-bottom: 0; }
.jtia-msg ul { margin: 4px 0 6px; padding-left: 18px; } .jtia-msg li { margin: 2px 0; }
.jtia-msg a { color: var(--jtia-navy); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.jtia-bot { align-self: flex-start; background: var(--jtia-sky); border-bottom-left-radius: 5px; }
.jtia-me { align-self: flex-end; background: var(--jtia-navy); color: #fff; border-bottom-right-radius: 5px; }
.jtia-err { background: #FFF4EC; color: #8A3A10; }
.jtia-sys { align-self: center; background: none; color: var(--jtia-grey); font-size: 12.5px; padding: 2px; }
.jtia-wait { display: flex; align-items: center; gap: 8px; color: var(--jtia-grey); font-size: 13px; }
.jtia-orbe { width: 20px; height: 20px; flex: 0 0 20px; }

.jtia-sugg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.jtia-sugg:empty { display: none; }
.jtia-chip { border: 1.5px solid var(--jtia-line); background: #fff; color: var(--jtia-navy); border-radius: 99px; padding: 6px 12px; font: 700 12.5px/1.3 Manrope, system-ui, sans-serif;
  cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.jtia-chip:hover { border-color: var(--jtia-teal); background: var(--jtia-sky); }

.jtia-form { display: flex; align-items: flex-end; gap: 8px; margin: 0; padding: 10px 12px; border-top: 1px solid var(--jtia-line); }
.jtia-form textarea { flex: 1; resize: none; overflow-y: hidden; min-height: 42px; max-height: 120px; padding: 10px 14px; border: 1.5px solid var(--jtia-line); border-radius: 14px;
  font: 500 15px/1.4 Manrope, system-ui, sans-serif; color: var(--jtia-ink); background: #fff; }
.jtia-form textarea:focus { outline: none; border-color: var(--jtia-teal); box-shadow: 0 0 0 3px rgba(35, 183, 197, .18); }
.jtia-send { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--jtia-teal); color: #fff; cursor: pointer; display: grid; place-items: center; }
.jtia-send:hover { background: #1A9FAC; }
.jtia-send:disabled { opacity: .5; cursor: default; }

.jtia-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 14px 10px; font-size: 12px; }
.jtia-foot a, .jtia-foot button { display: inline-flex; align-items: center; gap: 5px; color: var(--jtia-grey); font: 600 12px/1.3 Manrope, system-ui, sans-serif;
  background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: none; }
.jtia-foot a:hover, .jtia-foot button:hover { color: var(--jtia-navy); }
.jtia-foot button[hidden] { display: none; }

/* mobile : plein écran */
@media (max-width: 560px) {
  .jtia-launch { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .jtia-panel { inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border-radius: 0; z-index: 95; }
  .jtia-msg { font-size: 15px; }
  .jtia-is-open .jtia-launch { display: none; }
}
@media print { .jtia { display: none; } }
