/* Assistant Douda (chatbot) */
.da { position: fixed; right: 18px; bottom: 18px; z-index: 900; font-family: "Open Sans", system-ui, sans-serif; }
.da-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.da-fab {
    display: inline-flex; align-items: center; gap: 10px;
    height: 56px; padding: 0 20px 0 8px; border: 0; border-radius: 999px; cursor: pointer;
    background: linear-gradient(120deg, #0f4b86, #2a8dd8); color: #fff;
    box-shadow: 0 14px 30px rgba(10, 53, 96, .35);
    font-weight: 700; font-size: 14.5px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.da-fab:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(10, 53, 96, .4); }
.da-fab:focus-visible { outline: 3px solid #ffd166; outline-offset: 3px; }
.da-fab-icon { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.da.is-open .da-fab { display: none; }

.da-panel {
    width: min(380px, calc(100vw - 24px));
    height: min(600px, calc(100vh - 110px));
    display: flex; flex-direction: column;
    background: #fff; border-radius: 22px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(6, 30, 56, .3), 0 0 0 1px rgba(10, 53, 96, .06);
    animation: da-in .22s cubic-bezier(.2, .8, .2, 1);
}
.da-panel[hidden] { display: none; }
@keyframes da-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.da-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(120deg, #0a3560, #0f4b86 70%, #1f78c8); color: #fff; }
.da-head img { width: 46px; height: auto; background: #fff; border-radius: 10px; padding: 4px; }
.da-head h2 { margin: 0; font-size: 16px; font-weight: 800; color: #fff; }
.da-head p { margin: 2px 0 0; font-size: 12px; color: #cfe0f2; }
.da-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5bd17d; margin-right: 6px; vertical-align: 0; box-shadow: 0 0 0 3px rgba(91, 209, 125, .25); }
.da-head > div { flex: 1; min-width: 0; }
.da-reset, .da-close { flex: none; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.da-close { font-size: 24px; }
.da-reset:hover, .da-close:hover { background: rgba(255, 255, 255, .26); }

.da-log { flex: 1; overflow-y: auto; padding: 16px 14px 6px; background: #f4f8fc; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.da-msg { display: flex; flex-direction: column; max-width: 88%; }
.da-msg.is-bot { align-self: flex-start; }
.da-msg.is-me { align-self: flex-end; align-items: flex-end; }
.da-bubble { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; color: #17324d; background: #fff; box-shadow: 0 2px 8px rgba(10, 53, 96, .06); word-wrap: break-word; }
.da-msg.is-bot .da-bubble { border-bottom-left-radius: 6px; }
.da-msg.is-me .da-bubble { background: #0f4b86; color: #fff; border-bottom-right-radius: 6px; }
.da-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.da-actions a { padding: 7px 12px; border-radius: 999px; background: #fff; border: 1.5px solid #cfe0f2; color: #0f4b86 !important; font-size: 13px; font-weight: 700; text-decoration: none !important; }
.da-actions a:hover { background: #eaf4ff; border-color: #2a8dd8; }
.da-typing .da-bubble { display: inline-flex; gap: 4px; padding: 12px 14px; }
.da-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9db3c8; animation: da-blink 1s infinite ease-in-out; }
.da-typing i:nth-child(2) { animation-delay: .15s; }
.da-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes da-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.da-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; background: #f4f8fc; border-top: 1px solid #e3ecf5; scrollbar-width: none; }
.da-chips:empty { display: none; }
.da-chips::-webkit-scrollbar { display: none; }
.da-chips button { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid #cfe0f2; background: #fff; color: #17324d; font-size: 13px; font-weight: 600; cursor: pointer; }
.da-chips button:hover { background: #0f4b86; border-color: #0f4b86; color: #fff; }

.da-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e3ecf5; background: #fff; }
.da-form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1.5px solid #dce7f2; border-radius: 999px; font-size: 15px; color: #17324d; outline: none; }
.da-form input:focus { border-color: #2a8dd8; box-shadow: 0 0 0 3px rgba(42, 141, 216, .15); }
.da-form button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #0f4b86; color: #fff; display: grid; place-items: center; cursor: pointer; }
.da-form button:hover { background: #0a3560; }
.da-foot { margin: 0; padding: 0 14px 10px; background: #fff; font-size: 11px; line-height: 1.4; color: #7d93a8; }

@media (max-width: 575.98px) {
    .da { right: 12px; bottom: 12px; }
    .da-fab { height: 52px; padding: 0 8px; }
    .da-fab-label { display: none; }
    .da.is-open { left: 0; right: 0; bottom: 0; top: 0; }
    .da-panel { width: 100vw; height: 100dvh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .da-panel, .da-typing i { animation: none; }
    .da-log { scroll-behavior: auto; }
}

/* Le bouton "haut de page" se place au-dessus du bouton de l'assistant */
.site-fab-stack { bottom: 86px !important; right: 22px !important; }
@media (max-width: 575.98px) { .site-fab-stack { bottom: 74px !important; right: 16px !important; } }
