/* ============================================================================
   Chatbot guide — widget flottant, arbre de décision statique (aucune IA).
   ============================================================================ */

#fynt-chat-toggle {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 950;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #1247c9, #00c4a7);
    color: #fff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(18, 71, 201, .35);
    transition: transform .15s ease, box-shadow .15s ease;
}
#fynt-chat-toggle:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(18, 71, 201, .42); }
#fynt-chat-toggle .fynt-chat-icon-open { display: block; }
#fynt-chat-toggle .fynt-chat-icon-close { display: none; }
#fynt-chat-panel.fynt-chat-open + #fynt-chat-toggle .fynt-chat-icon-open,
#fynt-chat-toggle[aria-expanded="true"] .fynt-chat-icon-open { display: none; }
#fynt-chat-toggle[aria-expanded="true"] .fynt-chat-icon-close { display: block; }

#fynt-chat-panel {
    position: fixed;
    right: 22px;
    bottom: 94px;
    z-index: 950;
    width: 340px;
    max-width: calc(100vw - 32px);
    max-height: min(70vh, 560px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(10, 22, 40, .22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(.98);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}
#fynt-chat-panel.fynt-chat-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

#fynt-chat-header {
    background: linear-gradient(135deg, #1247c9, #00c4a7);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
#fynt-chat-header-title { font-weight: 800; font-size: .95rem; display: flex; align-items: center; gap: 8px; }
#fynt-chat-close {
    background: rgba(255,255,255,.18);
    border: none;
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .95rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
#fynt-chat-close:hover { background: rgba(255,255,255,.3); }

#fynt-chat-greeting-wrap {
    padding: 12px 16px;
    background: #f0f4ff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
#fynt-chat-greeting { font-size: .82rem; color: #374151; line-height: 1.5; margin: 0; }

#fynt-chat-body {
    padding: 14px 16px 16px;
    overflow-y: auto;
    flex: 1;
}

.fynt-chat-bubble {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.fynt-chat-bubble-title {
    font-weight: 800;
    font-size: .88rem;
    color: #0c1b4a;
    margin-bottom: 4px;
}
.fynt-chat-bubble-text {
    font-size: .82rem;
    color: #4b5563;
    line-height: 1.55;
}

.fynt-chat-link {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #1247c9, #00c4a7);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: .83rem;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: opacity .15s ease;
}
.fynt-chat-link:hover { opacity: .9; }

.fynt-chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}
.fynt-chat-option {
    text-align: left;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: .83rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s ease, background .15s ease;
}
.fynt-chat-option:hover { border-color: #1247c9; background: #f0f4ff; }

.fynt-chat-nav {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}
.fynt-chat-navbtn {
    background: none;
    border: none;
    color: #1247c9;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 2px;
}
.fynt-chat-navbtn:hover { text-decoration: underline; }

@media (max-width: 480px) {
    #fynt-chat-panel { right: 12px; left: 12px; width: auto; bottom: 86px; }
    #fynt-chat-toggle { right: 14px; bottom: 14px; }
}
