/* Assistant de conversation (site public et espace client) */
.ch-z { --ch-b1: #223f79; --ch-b2: #4b2a8a; --ch-b3: #5a0d52; --ch-acc: #ff5a3c; --ch-bord: #e7e4f3; --ch-mut: #6b6885; font-family: inherit; color: #1d1b33; }
.ch-z [hidden] { display: none !important; }
.ch-btn { position: fixed; right: 20px; bottom: 20px; z-index: 55; display: flex; align-items: center; gap: 9px; padding: 13px 18px 13px 15px; border: 0; border-radius: 999px; background: linear-gradient(120deg, var(--ch-b1), var(--ch-b2) 55%, var(--ch-b3)); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 14px 34px -10px rgba(40, 30, 110, .6); transition: transform .18s, box-shadow .18s; }
.ch-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px rgba(40, 30, 110, .7); }
.ch-btn:focus-visible, .ch-z button:focus-visible, .ch-z a:focus-visible { outline: 3px solid var(--ch-acc); outline-offset: 2px; }
.ch-ic { font-size: 19px; line-height: 1; }
/* espace client : bouton réduit à l'icône, pour masquer le moins possible les formulaires */
.ch-z.compact .ch-btn { padding: 13px; }
.ch-z.compact .ch-lib { display: none; }
@media (max-width: 1099px) { .ch-btn { padding: 13px; } .ch-lib { display: none; } }
.ch-fen { position: fixed; right: 20px; bottom: 20px; z-index: 55; width: 390px; max-width: calc(100vw - 24px); height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ch-bord); border-radius: 20px; overflow: hidden; box-shadow: 0 26px 70px -18px rgba(30, 22, 90, .5); animation: ch-entree .2s ease-out; }
@keyframes ch-entree { from { opacity: 0; transform: translateY(14px); } }
.ch-tete { display: flex; align-items: center; gap: 10px; padding: 13px 12px 13px 16px; color: #fff; background: linear-gradient(120deg, var(--ch-b1), var(--ch-b2) 55%, var(--ch-b3)); }
.ch-tete img { width: 34px; height: 34px; border-radius: 10px; background: #fff; padding: 3px; }
.ch-tete div { flex: 1; min-width: 0; line-height: 1.25; }
.ch-tete b { display: block; font-size: 15px; }
.ch-tete small { font-size: 12px; opacity: .85; }
.ch-tete button { width: 34px; height: 34px; flex: none; padding: 0; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; }
.ch-tete button:hover { background: rgba(255, 255, 255, .28); }
.ch-fil { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px; background: #f7f6fc; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ch-m { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: 88%; }
.ch-m.moi { align-self: flex-end; align-items: flex-end; }
.ch-b { padding: 10px 13px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid var(--ch-bord); font-size: 14.5px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.ch-b a { color: var(--ch-b2); font-weight: 600; text-decoration: underline; }
.ch-m.moi .ch-b { background: var(--ch-b1); border-color: var(--ch-b1); color: #fff; border-radius: 14px 14px 4px 14px; }
.ch-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-act { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1.5px solid var(--ch-b2); color: var(--ch-b2); font-size: 13px; font-weight: 700; text-decoration: none; }
.ch-act:hover { background: var(--ch-b2); color: #fff; }
.ch-sug { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; }
.ch-sug button { padding: 8px 12px; border-radius: 999px; border: 1px solid #cfc9ea; background: #fff; color: var(--ch-b1); font: inherit; font-size: 13.5px; line-height: 1.25; text-align: left; cursor: pointer; }
.ch-sug button:hover { background: #efecfa; border-color: var(--ch-b2); }
.ch-att { display: flex; gap: 5px; padding: 14px 15px; }
.ch-att i { width: 7px; height: 7px; border-radius: 50%; background: #a19cc0; animation: ch-point 1.1s infinite; }
.ch-att i:nth-child(2) { animation-delay: .16s; }
.ch-att i:nth-child(3) { animation-delay: .32s; }
@keyframes ch-point { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.ch-pied { padding: 9px 12px 8px; border-top: 1px solid var(--ch-bord); background: #fff; }
.ch-hum { display: inline-block; margin: 0 0 7px 2px; color: var(--ch-b2); font-size: 13px; font-weight: 700; }
.ch-form { display: flex; align-items: flex-end; gap: 8px; }
.ch-form textarea { flex: 1; min-width: 0; width: auto; min-height: 42px; max-height: 110px; margin: 0; padding: 10px 12px; border: 1px solid #d6d2ea; border-radius: 12px; background: #fff; color: inherit; font: inherit; font-size: 15px; line-height: 1.35; resize: none; }
.ch-form textarea:focus { outline: 0; border-color: var(--ch-b2); box-shadow: 0 0 0 3px rgba(75, 42, 138, .14); }
.ch-form button { flex: none; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: var(--ch-acc); color: #fff; font-size: 16px; cursor: pointer; }
.ch-form button:disabled { opacity: .5; cursor: default; }
.ch-note { display: block; margin-top: 6px; color: var(--ch-mut); font-size: 11.5px; line-height: 1.35; }
.ch-note a { color: inherit; text-decoration: underline; }
@media (max-width: 767px) {
  .ch-btn { right: 14px; bottom: 14px; padding: 14px; }
  .ch-lib { display: none; }
  .ch-ic { font-size: 22px; }
  .ch-fen { inset: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border: 0; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .ch-fen, .ch-att i, .ch-btn { animation: none; transition: none; } }
@media print { .ch-z { display: none; } }
