/* CHBE — Assistant de discussion */
.chatbox { position: fixed; right: 24px; bottom: 94px; z-index: 95; font-family: var(--font-body, 'DM Sans', 'Segoe UI', sans-serif); }
.chat-launcher {
    display: inline-flex; align-items: center; gap: 10px;
    border: 0; background: var(--navy, #082d4e); color: #fff;
    border-radius: 999px; padding: 10px 17px 10px 10px;
    box-shadow: 0 14px 34px rgba(6,32,55,.28);
    cursor: pointer; transition: .25s; position: relative;
}
.chat-launcher:hover { transform: translateY(-2px); background: #0a3a61; }
.chat-launcher__icon {
    width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, #1d8ed6, #0f9f9a); flex: 0 0 36px; position: relative;
}
.chat-launcher__icon::after {
    content: ""; position: absolute; right: 0; top: 0; width: 9px; height: 9px;
    background: #54e0b3; border: 2px solid var(--navy, #082d4e); border-radius: 50%;
}
.chat-launcher__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.chat-launcher__text small { font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; color: #8ed5ff; }
.chat-launcher__text strong { font-size: 11.5px; font-family: var(--font-head, 'Manrope', sans-serif); }
.chat-launcher.is-hidden { opacity: 0; pointer-events: none; transform: translateY(10px); }

.chat-panel {
    position: absolute; right: 0; bottom: 64px;
    width: min(382px, calc(100vw - 32px)); height: min(590px, calc(100vh - 150px));
    background: #fff; border: 1px solid #dbe6ee; border-radius: 20px;
    box-shadow: 0 28px 70px rgba(6,32,55,.26);
    display: flex; flex-direction: column; overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(14px) scale(.98);
    transform-origin: bottom right; transition: .22s ease;
}
.chat-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.chat-head {
    display: flex; align-items: center; gap: 11px; padding: 15px 16px;
    background: linear-gradient(135deg, #082d4e, #0a4b7a); color: #fff; flex: 0 0 auto;
}
.chat-head__avatar {
    width: 39px; height: 39px; border-radius: 12px; background: rgba(255,255,255,.1);
    color: #7ed2ff; display: grid; place-items: center; flex: 0 0 39px; position: relative;
}
.chat-head__avatar::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: #54e0b3; border: 2px solid #0a4b7a; }
.chat-head__text { min-width: 0; }
.chat-head__text strong { display: block; font-family: var(--font-head, 'Manrope', sans-serif); font-size: 13.5px; }
.chat-head__text small { display: flex; align-items: center; gap: 4px; font-size: 9.5px; color: rgba(255,255,255,.58); margin-top: 2px; }
.chat-online-dot { width: 5px; height: 5px; border-radius: 50%; background: #54e0b3; display: inline-block; }
.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; }
.chat-head__close { margin-left: auto; border: 0; background: rgba(255,255,255,.1); color: #fff; width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.chat-head__close:hover { background: rgba(255,255,255,.2); }

.chat-body { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: #f5f9fc; scroll-behavior: smooth; }
.chat-day { text-align: center; font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; color: #9aabb8; margin: 2px 0 14px; }
.chat-msg { display: flex; gap: 8px; margin-bottom: 11px; align-items: flex-end; animation: chatIn .22s ease; }
.chat-msg__avatar { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: var(--navy, #082d4e); color: #8ed5ff; display: grid; place-items: center; }
.chat-bubble {
    max-width: 83%; padding: 10px 12px; border-radius: 14px 14px 14px 4px;
    background: #fff; border: 1px solid #e2ebf2; color: #354c5f;
    font-size: 11.5px; line-height: 1.55; box-shadow: 0 2px 8px rgba(8,45,78,.04);
}
.chat-bubble strong { color: #102a43; }
.chat-bubble p { margin: 0 0 5px; }
.chat-bubble p:last-child { margin: 0; }
.chat-msg--user { justify-content: flex-end; }
.chat-msg--user .chat-bubble { background: #0e6db3; color: #fff; border-color: #0e6db3; border-radius: 14px 14px 4px 14px; max-width: 85%; }
.chat-msg--user .chat-msg__avatar { display: none; }
.chat-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.chat-links a {
    display: inline-flex; align-items: center; gap: 4px; background: #e8f3fc; color: #0b5f9b;
    border-radius: 7px; padding: 5px 8px; font-size: 9.5px; font-weight: 700;
}
.chat-links a:hover { background: #d5eafa; }
.chat-call {
    display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px;
    border-radius: 8px; background: #fdecec; color: #8f3030; font-size: 10.5px; font-weight: 700;
}
.chat-call svg { color: #c33b3b; }
.chat-typing { display: inline-flex; gap: 3px; align-items: center; padding: 12px 14px; }
.chat-typing span { width: 5px; height: 5px; border-radius: 50%; background: #8fa8ba; animation: chatTyping 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
.chat-quick { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 12px 10px; background: #f5f9fc; border-top: 1px solid #e8eff4; flex: 0 0 auto; }
.chat-quick button {
    border: 1px solid #cfe1ed; background: #fff; color: #36556d; border-radius: 999px;
    padding: 5px 9px; font-size: 9.5px; cursor: pointer; transition: .2s;
}
.chat-quick button:hover { background: #e8f3fc; border-color: #8ec4e8; color: #0b5f9b; }
.chat-form { display: flex; gap: 7px; padding: 10px 12px; border-top: 1px solid #e8eff4; background: #fff; flex: 0 0 auto; }
.chat-form input {
    flex: 1; min-width: 0; border: 1px solid #d3e0e9; border-radius: 999px;
    padding: 10px 14px; font-size: 11.5px; outline: none; background: #f8fbfd;
}
.chat-form input:focus { border-color: #0e6db3; box-shadow: 0 0 0 3px rgba(14,109,179,.1); background: #fff; }
.chat-form button {
    width: 39px; height: 39px; flex: 0 0 39px; border: 0; border-radius: 50%;
    background: #0e6db3; color: #fff; display: grid; place-items: center; cursor: pointer;
}
.chat-form button:hover { background: #09558f; }
.chat-foot { text-align: center; font-size: 8px; color: #9cabb7; padding: 0 10px 9px; background: #fff; }
.chat-foot a { color: #0e6db3; font-weight: 650; }

@keyframes chatIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes chatTyping { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }

@media (max-width: 760px) {
    .chatbox { right: 14px; bottom: 82px; }
    .chat-launcher { padding: 8px; border-radius: 50%; }
    .chat-launcher__text { display: none; }
    .chat-panel { position: fixed; right: 10px; left: 10px; bottom: 80px; width: auto; height: min(620px, calc(100vh - 100px)); border-radius: 16px; }
    .chat-launcher__icon { width: 42px; height: 42px; flex-basis: 42px; }
}
