/* =====================================================================
   Chat en direct + agent IA — widget public (extension HK CMS)
   Préfixe .xchat · variables du thème du socle avec valeurs de repli
   ===================================================================== */
.xchat {
  --xc-primary: var(--c-primary, #0f766e);
  --xc-primary-dark: var(--c-primary-dark, #0b5b55);
  --xc-accent: var(--c-accent, #d4a017);
  --xc-navy: var(--c-navy, #13224f);
  --xc-surface: var(--c-surface, #ffffff);
  --xc-alt: var(--c-surface-alt, #f4f6f9);
  --xc-text: var(--c-text, #1f2937);
  --xc-muted: var(--c-muted, #6b7280);
  --xc-line: var(--c-line, #e5e7eb);
  --xc-r: var(--r, 18px);
  --xc-ok: #16a34a;
  --xc-warn: #d97706;
  --xc-danger: #e5484d;
  --xc-shadow: 0 30px 80px -24px rgba(15, 23, 42, .45), 0 12px 28px -12px rgba(15, 23, 42, .25);
  position: fixed; inset-inline-end: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 150; /* sous les dialogues modaux (lightbox : 200) */
  font-family: var(--f-body, system-ui, sans-serif); color: var(--xc-text); font-size: 15px; line-height: 1.5;
}
.xchat[dir="rtl"] { font-family: var(--f-body-ar, var(--f-body, system-ui, sans-serif)); }
.xchat *, .xchat *::before, .xchat *::after { box-sizing: border-box; }
.xchat .ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; display: inline-block; }
.xchat [hidden] { display: none !important; }
.xchat .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.xchat button { font: inherit; }

/* ------------------------------------------------------------ Lanceur */
.xchat__launcher {
  position: relative; display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 24px 0 8px;
  border: 0; border-radius: 999px; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--xc-primary) 0%, var(--xc-navy) 100%);
  box-shadow: 0 18px 40px -14px color-mix(in srgb, var(--xc-navy) 85%, transparent), inset 0 1px 0 rgba(255, 255, 255, .18);
  font-family: var(--f-head, inherit); font-weight: 700; font-size: 15.5px; letter-spacing: .01em;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.2), box-shadow .25s ease;
}
.xchat__launcher:hover { transform: translateY(-3px); box-shadow: 0 24px 46px -14px color-mix(in srgb, var(--xc-navy) 90%, transparent); }
.xchat__launcher:focus-visible { outline: 3px solid var(--xc-accent); outline-offset: 3px; }
.xchat__launcher-ic {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.xchat__launcher-ic .ic { position: absolute; width: 22px; height: 22px; transition: transform .3s ease, opacity .2s ease; }
.xchat__ic-open { color: var(--xc-accent); }
.xchat__ic-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.xchat.is-open .xchat__ic-open { opacity: 0; transform: rotate(90deg) scale(.6); }
.xchat.is-open .xchat__ic-close { opacity: 1; transform: none; }
.xchat__badge {
  position: absolute; top: -4px; inset-inline-end: -4px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  display: grid; place-items: center; background: var(--xc-danger); color: #fff; font-size: 12.5px; font-weight: 800;
  border: 2px solid #fff; animation: xc-pop .35s cubic-bezier(.2, .9, .3, 1.4);
}
.xchat__badge::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid var(--xc-danger); animation: xc-ring 1.8s ease-out infinite; }

/* ------------------------------------------------------------ Panneau */
.xchat__panel {
  position: absolute; bottom: 76px; inset-inline-end: 0; width: 392px; height: min(660px, calc(100vh - 120px)); height: min(660px, calc(100dvh - 120px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: var(--xc-surface);
  box-shadow: var(--xc-shadow); border: 1px solid color-mix(in srgb, var(--xc-navy) 10%, transparent);
  transform-origin: bottom right; animation: xc-in .32s cubic-bezier(.2, .9, .3, 1.05);
}
.xchat[dir="rtl"] .xchat__panel { transform-origin: bottom left; }
.xchat__panel.is-leaving { animation: xc-out .2s ease forwards; }

/* En-tête */
.xchat__head {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--xc-accent) 35%, transparent) 0%, transparent 45%),
              linear-gradient(135deg, var(--xc-navy) 0%, var(--xc-primary) 100%);
}
.xchat__head::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: rgba(255, 255, 255, .12); }
.xchat__avatar {
  position: relative; flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(145deg, var(--xc-accent), color-mix(in srgb, var(--xc-accent) 60%, #fff));
  color: var(--xc-navy); font-family: var(--f-head, inherit); font-weight: 800; font-size: 16px; letter-spacing: .02em;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .22);
}
.xchat__avatar.is-human { background: linear-gradient(145deg, #fff, #e8eefc); }
.xchat__presence { position: absolute; bottom: 1px; inset-inline-end: 1px; width: 12px; height: 12px; border-radius: 50%; background: #9ca3af; border: 2px solid var(--xc-navy); }
.xchat__presence.is-on { background: #22c55e; }
.xchat__presence.is-ai { background: var(--xc-accent); }
.xchat__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.xchat__who strong { font-family: var(--f-head, inherit); font-size: 16.5px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xchat__who small { font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xchat__head-actions { display: flex; gap: 4px; }
.xchat__icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s;
}
.xchat__icon-btn:hover { background: rgba(255, 255, 255, .22); }
.xchat__icon-btn:focus-visible { outline: 2px solid var(--xc-accent); outline-offset: 2px; }
.xchat__icon-btn .ic { width: 20px; height: 20px; }

/* Bandeau de transparence IA / humain */
.xchat__banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 12.8px; line-height: 1.4;
  border-bottom: 1px solid var(--xc-line); background: color-mix(in srgb, var(--xc-accent) 11%, var(--xc-surface)); color: var(--xc-navy);
}
.xchat__banner-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--xc-accent) 25%, transparent); color: color-mix(in srgb, var(--xc-accent) 70%, var(--xc-navy)); font-weight: 800; font-size: 11.5px; }
.xchat__banner-ic .ic { width: 17px; height: 17px; }
.xchat__banner-text { flex: 1; margin: 0; font-weight: 550; }
.xchat__banner-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--xc-navy) 18%, transparent); background: var(--xc-surface); color: var(--xc-navy);
  font-size: 12.3px; font-weight: 700; transition: border-color .2s, background .2s;
}
.xchat__banner-btn:hover { border-color: var(--xc-primary); background: color-mix(in srgb, var(--xc-primary) 6%, var(--xc-surface)); }
.xchat__banner-btn .ic { width: 14px; height: 14px; }
.xchat__banner[data-state="waiting"] { background: color-mix(in srgb, var(--xc-warn) 10%, var(--xc-surface)); }
.xchat__banner[data-state="waiting"] .xchat__banner-ic { background: color-mix(in srgb, var(--xc-warn) 20%, transparent); color: var(--xc-warn); }
.xchat__banner[data-state="waiting"] .xchat__banner-ic .ic { animation: xc-spin 2.4s linear infinite; }
.xchat__banner[data-state="human"] { background: color-mix(in srgb, var(--xc-ok) 9%, var(--xc-surface)); }
.xchat__banner[data-state="human"] .xchat__banner-ic { background: var(--xc-navy); color: #fff; border-radius: 50%; }
.xchat__banner[data-state="closed"] { background: var(--xc-alt); color: var(--xc-muted); }
.xchat__banner[data-state="closed"] .xchat__banner-ic { background: var(--xc-line); color: var(--xc-muted); }

/* Fil de discussion */
.xchat__body {
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--xc-navy) 6%, transparent) 1px, transparent 0) 0 0 / 22px 22px,
    var(--xc-alt);
  scroll-behavior: smooth;
}
.xchat__log { display: flex; flex-direction: column; gap: 4px; padding: 16px 14px 6px; }
.xchat__day { align-self: center; margin: 6px 0; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--xc-navy) 7%, transparent); color: var(--xc-muted); font-size: 11.5px; font-weight: 600; }

.xchat__msg { display: flex; gap: 8px; max-width: 88%; animation: xc-msg .28s ease both; }
.xchat__msg + .xchat__msg:not(.is-cont) { margin-top: 8px; }
.xchat__msg-av {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; align-self: flex-end;
  font-size: 11px; font-weight: 800; color: var(--xc-navy); background: linear-gradient(145deg, var(--xc-accent), color-mix(in srgb, var(--xc-accent) 55%, #fff));
}
.xchat__msg--agent .xchat__msg-av { background: var(--xc-navy); color: #fff; }
.xchat__msg.is-cont .xchat__msg-av { visibility: hidden; }
.xchat__msg-main { display: flex; flex-direction: column; min-width: 0; }
.xchat__msg-meta { display: flex; align-items: center; gap: 6px; margin: 0 4px 3px; font-size: 11.5px; color: var(--xc-muted); font-weight: 600; }
.xchat__msg.is-cont .xchat__msg-meta { display: none; }
.xchat__tag { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.xchat__tag--ai { background: color-mix(in srgb, var(--xc-accent) 22%, transparent); color: color-mix(in srgb, var(--xc-accent) 55%, var(--xc-navy)); }
.xchat__tag--team { background: color-mix(in srgb, var(--xc-ok) 15%, transparent); color: #15803d; }
.xchat__tag .ic { width: 10px; height: 10px; }
.xchat__bubble {
  position: relative; padding: 10px 14px; border-radius: 18px; background: var(--xc-surface); color: var(--xc-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 14px -8px rgba(15, 23, 42, .18); border: 1px solid color-mix(in srgb, var(--xc-navy) 6%, transparent);
  overflow-wrap: anywhere; white-space: normal; font-size: 14.6px;
}
.xchat__msg:not(.xchat__msg--visitor) .xchat__bubble { border-end-start-radius: 6px; }
.xchat__msg--ai .xchat__bubble { border-inline-start: 3px solid color-mix(in srgb, var(--xc-accent) 70%, transparent); }
.xchat__bubble a { color: var(--xc-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.xchat__bubble strong { font-weight: 700; }
.xchat__time { margin: 3px 6px 0; font-size: 10.8px; color: var(--xc-muted); }
.xchat__msg--visitor { align-self: flex-end; flex-direction: row-reverse; }
.xchat__msg--visitor .xchat__msg-main { align-items: flex-end; }
.xchat__msg--visitor .xchat__bubble {
  background: linear-gradient(135deg, var(--xc-primary), color-mix(in srgb, var(--xc-primary) 70%, var(--xc-navy)));
  color: #fff; border: 0; border-end-end-radius: 6px; box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--xc-primary) 80%, transparent);
}
.xchat__msg--visitor .xchat__bubble a { color: #fff; }
.xchat__msg--visitor.is-pending .xchat__bubble { opacity: .65; }
.xchat__msg--visitor.is-failed .xchat__bubble { background: var(--xc-danger); }
.xchat__failed { display: flex; align-items: center; gap: 6px; margin: 4px 4px 0; font-size: 12px; color: var(--xc-danger); }
.xchat__failed button { border: 0; background: none; color: var(--xc-primary); font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }

.xchat__sys {
  align-self: center; max-width: 92%; margin: 10px 0 6px; padding: 8px 14px; border-radius: 14px; text-align: center;
  background: color-mix(in srgb, var(--xc-navy) 6%, var(--xc-surface)); color: var(--xc-navy); font-size: 12.8px; font-weight: 550;
  animation: xc-msg .28s ease both;
}
.xchat__sys--joined { background: color-mix(in srgb, var(--xc-ok) 12%, var(--xc-surface)); color: #166534; }
.xchat__sys--handoff { background: color-mix(in srgb, var(--xc-warn) 12%, var(--xc-surface)); color: #92400e; }
.xchat__sys .xchat__phones { justify-content: center; margin-top: 8px; }

/* Indicateur de saisie */
.xchat__typing { display: flex; align-items: center; gap: 8px; padding: 2px 18px 12px; color: var(--xc-muted); font-size: 12.5px; }
.xchat__dots { display: inline-flex; gap: 4px; padding: 9px 12px; border-radius: 14px; background: var(--xc-surface); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.xchat__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--xc-muted); animation: xc-dot 1.2s infinite ease-in-out; }
.xchat__dots i:nth-child(2) { animation-delay: .15s; }
.xchat__dots i:nth-child(3) { animation-delay: .3s; }

/* Suggestions */
.xchat__chips { display: flex; gap: 8px; padding: 10px 14px 0; overflow-x: auto; scrollbar-width: none; background: var(--xc-surface); }
.xchat__chips:empty { display: none; }
.xchat__chips::-webkit-scrollbar { display: none; }
.xchat__chip {
  flex: none; padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 650;
  border: 1.5px solid color-mix(in srgb, var(--xc-primary) 35%, transparent); background: color-mix(in srgb, var(--xc-primary) 5%, var(--xc-surface)); color: var(--xc-primary-dark);
  transition: background .2s, transform .2s, border-color .2s;
}
.xchat__chip:hover { background: color-mix(in srgb, var(--xc-primary) 12%, var(--xc-surface)); border-color: var(--xc-primary); transform: translateY(-1px); }
.xchat__chip:focus-visible { outline: 2px solid var(--xc-accent); outline-offset: 2px; }

/* Zone de saisie */
.xchat__composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--xc-surface); }
.xchat__composer textarea {
  flex: 1; min-height: 46px; max-height: 140px; resize: none; padding: 12px 16px; border-radius: 16px; outline: 0;
  border: 1.5px solid var(--xc-line); background: var(--xc-alt); color: var(--xc-text); font: inherit; font-size: 15px; line-height: 1.4;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.xchat__composer textarea:focus { border-color: var(--xc-primary); background: var(--xc-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--xc-primary) 14%, transparent); }
.xchat__composer textarea:disabled { opacity: .6; cursor: not-allowed; }
.xchat__send {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 15px; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, var(--xc-primary), var(--xc-navy)); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--xc-navy) 90%, transparent);
  transition: transform .2s, opacity .2s;
}
.xchat__send:hover:not(:disabled) { transform: scale(1.06); }
.xchat__send:disabled { opacity: .4; cursor: default; box-shadow: none; }
.xchat__send:focus-visible { outline: 3px solid var(--xc-accent); outline-offset: 2px; }
.xchat__send .ic { width: 20px; height: 20px; }
.xchat__foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0 14px 10px; background: var(--xc-surface); color: var(--xc-muted); font-size: 11px; text-align: center; }
.xchat__foot .ic { width: 12px; height: 12px; }

/* Cartes (formulaires, évaluation) */
.xchat__card {
  align-self: stretch; margin: 10px 0; padding: 16px; border-radius: 18px; background: var(--xc-surface);
  border: 1px solid var(--xc-line); box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .35); animation: xc-msg .3s ease both;
}
.xchat__card-title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-family: var(--f-head, inherit); font-size: 15px; font-weight: 700; color: var(--xc-navy); }
.xchat__card-text { margin: 0 0 12px; font-size: 13px; color: var(--xc-muted); }
.xchat__field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.xchat__field label { font-size: 12.5px; font-weight: 650; color: var(--xc-navy); }
.xchat__field input {
  height: 42px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--xc-line); background: var(--xc-alt); color: var(--xc-text); font: inherit; font-size: 14.5px; outline: 0;
}
.xchat__field input:focus { border-color: var(--xc-primary); background: var(--xc-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--xc-primary) 14%, transparent); }
.xchat__field input[aria-invalid="true"] { border-color: var(--xc-danger); }
.xchat__form-error { margin: 0 0 8px; color: var(--xc-danger); font-size: 12.5px; font-weight: 600; }
.xchat__form-error:empty { display: none; }
.xchat__form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.xchat__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--xc-primary), var(--xc-navy)); color: #fff; font-weight: 700; font-size: 14px;
}
.xchat__btn:disabled { opacity: .6; cursor: wait; }
.xchat__btn--ghost { background: var(--xc-alt); color: var(--xc-navy); border: 1px solid var(--xc-line); }
.xchat__btn .ic { width: 16px; height: 16px; }
.xchat__link { border: 0; background: none; padding: 4px; color: var(--xc-muted); font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.xchat__phones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.xchat__phones:empty { display: none; }
.xchat__phones p { width: 100%; margin: 0; font-size: 12.5px; color: var(--xc-muted); }
.xchat__tel {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; text-decoration: none;
  background: color-mix(in srgb, var(--xc-primary) 9%, var(--xc-surface)); color: var(--xc-primary-dark); font-weight: 700; font-size: 13px;
}
.xchat__tel .ic { width: 14px; height: 14px; }
.xchat__card.is-done { text-align: center; color: var(--xc-ok); font-weight: 650; font-size: 13.5px; }
.xchat__rating { text-align: center; }
.xchat__rating .xchat__card-title { justify-content: center; }
.xchat__stars { display: flex; justify-content: center; gap: 6px; margin: 8px 0 14px; direction: ltr; }
.xchat__star { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--xc-alt); color: #cbd5e1; cursor: pointer; transition: transform .15s, color .15s, background .15s; }
.xchat__star .ic { width: 22px; height: 22px; }
.xchat__star.is-on, .xchat__star:hover { color: #f59e0b; background: #fff7e6; transform: scale(1.08); }
.xchat__star.is-on .ic { fill: currentColor; }
.xchat__star:focus-visible { outline: 2px solid var(--xc-accent); outline-offset: 2px; }

/* ------------------------------------------------------------ Animations */
@keyframes xc-in { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes xc-out { to { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes xc-msg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes xc-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes xc-pop { from { transform: scale(.3); } to { transform: scale(1); } }
@keyframes xc-ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }
@keyframes xc-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Mobile : plein écran */
@media (max-width: 520px) {
  .xchat { inset-inline-end: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .xchat__launcher { width: 60px; padding: 0; justify-content: center; }
  .xchat__launcher-label { display: none; }
  .xchat.is-open .xchat__launcher { display: none; }
  .xchat__panel {
    position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0;
    padding-bottom: env(safe-area-inset-bottom); transform-origin: bottom center;
  }
  .xchat__head { padding-top: max(14px, env(safe-area-inset-top)); }
  .xchat__msg { max-width: 92%; }
  .xchat__banner { flex-wrap: wrap; }
  html.xchat-lock, html.xchat-lock body { overflow: hidden; }
}
/* RTL : les icônes directionnelles sont retournées (la règle du socle ne vise que [dir="rtl"] parent) */
.xchat[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.xchat[dir="rtl"] .xchat__composer textarea, .xchat[dir="rtl"] .xchat__bubble { text-align: right; }
@media (prefers-reduced-motion: reduce) {
  .xchat *, .xchat *::before, .xchat *::after { animation: none !important; transition: none !important; }
  .xchat__body { scroll-behavior: auto; }
}
@media print { .xchat { display: none !important; } }

/* ------------------------------------------------------------ Choix : assistant IA ou administration */
.xchat__choice { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; animation: xchat-rise .35s cubic-bezier(.2, .9, .3, 1.1); }
.xchat__choice-title { margin: 0 0 2px; text-align: center; font-family: var(--f-head, inherit); font-weight: 700; font-size: 15px; color: var(--xc-navy); }
.xchat__choice-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; text-align: start; cursor: pointer;
  border-radius: 16px; border: 1.5px solid var(--xc-line); background: var(--xc-surface); color: var(--xc-text);
  box-shadow: 0 8px 22px -16px rgba(15, 23, 42, .45); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.xchat__choice-btn:hover { transform: translateY(-2px); border-color: var(--xc-primary); box-shadow: 0 14px 28px -16px rgba(15, 23, 42, .5); }
.xchat__choice-btn:focus-visible { outline: 3px solid var(--xc-accent); outline-offset: 2px; }
.xchat__choice-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 20px; }
.xchat__choice-btn--ai .xchat__choice-ic { background: linear-gradient(135deg, var(--xc-primary), var(--xc-navy)); }
.xchat__choice-btn--admin .xchat__choice-ic { background: linear-gradient(135deg, var(--xc-accent), #b7791f); }
.xchat__choice-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.xchat__choice-txt strong { font-size: 14.5px; }
.xchat__choice-txt small { font-size: 12.5px; color: var(--xc-muted); line-height: 1.35; }
.xchat__choice-go { color: var(--xc-muted); }
@keyframes xchat-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ Sous une réponse : suggestions, actions, avis */
.xchat__sugg, .xchat__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.xchat__chip--sm { padding: 5px 11px; font-size: 12.5px; white-space: normal; text-align: start; }
.xchat__act {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 700;
  border: 0; color: #fff; background: linear-gradient(135deg, var(--xc-navy), var(--xc-primary));
}
.xchat__act--callback { background: linear-gradient(135deg, var(--xc-accent), #b7791f); }
.xchat__act:disabled { opacity: .6; cursor: default; }
.xchat__fb { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--xc-muted); }
.xchat__fb-btn { border: 1px solid var(--xc-line); background: var(--xc-surface); border-radius: 999px; padding: 1px 8px; cursor: pointer; font-size: 13px; line-height: 1.5; }
.xchat__fb-btn:hover { border-color: var(--xc-primary); }
.xchat__fb-done { font-style: italic; }

/* ------------------------------------------------------------ Invitation de l'équipe */
.xchat__teaser {
  position: absolute; inset-inline-end: 0; bottom: 74px; width: min(320px, calc(100vw - 40px)); display: flex; gap: 10px; align-items: flex-start;
  padding: 14px; border-radius: 18px; background: var(--xc-surface); box-shadow: var(--xc-shadow); animation: xchat-rise .35s cubic-bezier(.2, .9, .3, 1.1);
}
.xchat__teaser-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--xc-accent), #b7791f); }
.xchat__teaser-body { flex: 1; min-width: 0; }
.xchat__teaser-body strong { display: block; font-size: 13.5px; }
.xchat__teaser-body p { margin: 2px 0 10px; font-size: 13.5px; }
.xchat__teaser-x { border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--xc-muted); }
.xchat__locate .xchat__form-actions { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .xchat__choice, .xchat__teaser { animation: none; } }
