/* Heberg-24 Chat : bulle de discussion du site */
#h24chat { position: fixed; right: 20px; bottom: 20px; z-index: 1050; font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
#h24chat .h24chat-button { position: relative; width: 58px; height: 58px; border: 0; border-radius: 50%; background: #0273d4; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 25px -5px rgba(2, 64, 130, .45); transition: transform .15s ease, background .15s ease; }
#h24chat .h24chat-button:hover { background: #0261b3; transform: translateY(-2px); }
#h24chat .h24chat-button:focus-visible { outline: 3px solid #a8d1f7; outline-offset: 2px; }
#h24chat .h24chat-badge { display: none; position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #d93c31; color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; border: 2px solid #fff; }
#h24chat .h24chat-panel { display: none; position: absolute; right: 0; bottom: 72px; width: 360px; max-width: calc(100vw - 32px); height: 500px; max-height: calc(100vh - 110px); background: #fff; border-radius: 16px; box-shadow: 0 24px 48px -12px rgba(11, 27, 51, .35); overflow: hidden; flex-direction: column; border: 1px solid #e4e9f0; }
#h24chat.is-open .h24chat-panel { display: flex; }
#h24chat .h24chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: linear-gradient(135deg, #0273d4 0%, #034f91 100%); color: #fff; }
#h24chat .h24chat-title strong { display: block; font-size: 15px; }
#h24chat .h24chat-status { font-size: 12px; opacity: .85; }
#h24chat .h24chat-status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c9d3df; margin-right: 6px; vertical-align: 0; }
#h24chat .h24chat-status.is-online::before { background: #7ed957; box-shadow: 0 0 0 3px rgba(126, 217, 87, .3); }
#h24chat .h24chat-close { border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
#h24chat .h24chat-close:hover { background: rgba(255, 255, 255, .28); }
#h24chat .h24chat-messages { flex: 1; overflow-y: auto; padding: 16px; background: #f5f8fc; }
#h24chat .h24chat-msg { display: flex; flex-direction: column; margin-bottom: 10px; max-width: 85%; }
#h24chat .h24chat-msg.is-mine { margin-left: auto; align-items: flex-end; }
#h24chat .h24chat-bubble { padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
#h24chat .is-team .h24chat-bubble { background: #fff; color: #0b1b33; border: 1px solid #e4e9f0; border-bottom-left-radius: 4px; }
#h24chat .is-mine .h24chat-bubble { background: #0273d4; color: #fff; border-bottom-right-radius: 4px; }
#h24chat .h24chat-time { font-size: 11px; color: #8592a3; margin-top: 3px; padding: 0 4px; }
#h24chat .h24chat-form { padding: 10px 12px 12px; border-top: 1px solid #e4e9f0; background: #fff; }
#h24chat .h24chat-identity { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
#h24chat input, #h24chat textarea { width: 100%; border: 1px solid #d6dee8; border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; color: #0b1b33; background: #fff; resize: none; box-sizing: border-box; }
#h24chat input:focus, #h24chat textarea:focus { outline: 0; border-color: #0273d4; box-shadow: 0 0 0 3px rgba(2, 115, 212, .15); }
#h24chat .h24chat-row { display: flex; gap: 8px; align-items: flex-end; }
#h24chat .h24chat-send { flex: 0 0 42px; height: 42px; border: 0; border-radius: 10px; background: #0273d4; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
#h24chat .h24chat-send:disabled { opacity: .6; }
#h24chat .h24chat-error { color: #b3261e; font-size: 12px; margin-top: 6px; }
#h24chat .h24chat-error:empty { display: none; }
#h24chat .h24chat-tools { display: flex; align-items: center; gap: 6px; }
#h24chat .h24chat-end { border: 0; background: rgba(255, 255, 255, .15); color: #fff; height: 32px; padding: 0 12px; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
#h24chat .h24chat-end:hover { background: rgba(255, 255, 255, .28); }
#h24chat .h24chat-status.is-ai::before { background: #ffd35c; }
#h24chat .is-ai .h24chat-bubble { background: #f3f0ff; border-color: #e0d9fb; }
#h24chat .h24chat-link { color: #0273d4; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
#h24chat .h24chat-link:hover { color: #034f91; }
#h24chat .is-pending { opacity: .6; }
#h24chat .h24chat-notice { text-align: center; font-size: 12px; color: #5b6a7f; margin: 6px 0 12px; }
#h24chat .h24chat-notice::before, #h24chat .h24chat-notice::after { content: "—"; margin: 0 6px; color: #c9d3df; }
#h24chat .h24chat-typing .h24chat-bubble { display: inline-flex; gap: 4px; padding: 12px 14px; }
#h24chat .h24chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8592a3; animation: h24chat-dot 1.2s infinite ease-in-out; }
#h24chat .h24chat-typing span:nth-child(2) { animation-delay: .15s; }
#h24chat .h24chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes h24chat-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
#h24chat .h24chat-ended { display: none; padding: 14px 16px 16px; border-top: 1px solid #e4e9f0; background: #fff; text-align: center; }
#h24chat .h24chat-ended p { margin: 0 0 10px; font-size: 13px; color: #5b6a7f; }
#h24chat .h24chat-restart { border: 0; border-radius: 10px; background: #0273d4; color: #fff; font: inherit; font-size: 14px; font-weight: 600; padding: 10px 18px; cursor: pointer; }
#h24chat .h24chat-restart:hover { background: #0261b3; }
#h24chat.is-ended .h24chat-ended { display: block; }
#h24chat.is-ended .h24chat-form { display: none; }
#h24chat input.is-invalid { border-color: #d93c31; box-shadow: 0 0 0 3px rgba(217, 60, 49, .15); }
#h24chat .h24chat-teaser { display: none; position: absolute; right: 0; bottom: 72px; width: 280px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid #e4e9f0; border-radius: 14px; padding: 12px 34px 12px 14px; box-shadow: 0 16px 36px -12px rgba(11, 27, 51, .35); cursor: pointer; font-size: 14px; color: #0b1b33; line-height: 1.45; }
#h24chat .h24chat-teaser strong { display: block; font-size: 12px; color: #0273d4; margin-bottom: 2px; }
#h24chat .h24chat-teaser.is-visible { display: block; animation: h24chat-in .25s ease-out; }
#h24chat.is-open .h24chat-teaser { display: none; }
#h24chat .h24chat-teaser-close { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; background: transparent; color: #8592a3; font-size: 18px; line-height: 1; cursor: pointer; border-radius: 50%; }
#h24chat .h24chat-teaser-close:hover { background: #f1f4f8; }
@keyframes h24chat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #h24chat .h24chat-typing span, #h24chat .h24chat-teaser.is-visible { animation: none; } }
@media (max-width: 480px) {
    #h24chat { right: 14px; bottom: 14px; }
    #h24chat.is-open { inset: 0; right: 0; bottom: 0; }
    #h24chat.is-open .h24chat-button { display: none; }
    #h24chat .h24chat-panel { position: fixed; inset: 0; width: auto; max-width: none; height: auto; max-height: none; border-radius: 0; bottom: 0; }
}
@media print { #h24chat { display: none; } }
