/* Festivalcadeau website chatbot (public/js/chatbot.js) */
.fcb { --fcb-orange: #ff5d00; --fcb-navy: #040f2b; --fcb-ink: #222b3d; --fcb-muted: #5b6478; --fcb-line: #eceef3; --fcb-surface: #f6f7fb;
    position: fixed; right: 20px; bottom: 20px; z-index: 9990; font-family: inherit; color: var(--fcb-ink); }
.fcb *, .fcb *::before, .fcb *::after { box-sizing: border-box; }
.fcb svg { width: 20px; height: 20px; fill: currentColor; flex: none; }

.fcb-launcher { display: flex; align-items: center; gap: 10px; margin-left: auto; padding: 6px 20px 6px 6px; border: 0; border-radius: 999px;
    background: var(--fcb-orange); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 30px rgba(4, 15, 43, .25); transition: transform .15s ease, box-shadow .15s ease; }
.fcb-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(4, 15, 43, .3); }
.fcb-launcher:focus-visible, .fcb button:focus-visible, .fcb a:focus-visible, .fcb textarea:focus-visible { outline: 3px solid rgba(255, 93, 0, .45); outline-offset: 2px; }
.fcb.is-open .fcb-launcher { display: none; }
.fcb-launcher__photo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: #fff; }

.fcb-panel { display: flex; flex-direction: column; width: 380px; height: min(620px, calc(100vh - 40px)); overflow: hidden;
    border-radius: 22px; background: #fff; box-shadow: 0 24px 60px rgba(4, 15, 43, .28); animation: fcb-in .18s ease-out; }
.fcb-panel[hidden] { display: none; }
@keyframes fcb-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.fcb-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 14px 16px; background: var(--fcb-navy); color: #fff; }
.fcb-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--fcb-orange); flex: none; }
.fcb-initial { display: grid; place-items: center; background: var(--fcb-orange); color: #fff; font-weight: 800; font-size: 16px; }
.fcb-head__text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.fcb-head__text strong { font-size: 16px; color: #fff; }
.fcb-head__text span { font-size: 12px; color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcb-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; opacity: .8; }
.fcb-icon:hover { background: rgba(255, 255, 255, .12); opacity: 1; }

.fcb-log { flex: 1; overflow-y: auto; padding: 16px; background: var(--fcb-surface); display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.fcb-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; word-wrap: break-word; }
.fcb-row { display: flex; align-items: flex-end; gap: 8px; align-self: flex-start; max-width: 92%; }
.fcb-row__photo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.fcb-row .fcb-msg { max-width: 100%; }
.fcb-msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--fcb-line); border-bottom-left-radius: 6px; }
.fcb-msg--user { align-self: flex-end; background: var(--fcb-navy); color: #fff; border-bottom-right-radius: 6px; }
.fcb-msg ul { margin: 4px 0; padding-left: 18px; }
.fcb-msg li { margin: 2px 0; }
.fcb-msg a { color: var(--fcb-orange); font-weight: 600; text-decoration: underline; }
.fcb-msg strong { font-weight: 700; }
.fcb-cta { display: inline-block; margin-top: 10px; padding: 8px 14px; border-radius: 999px; background: var(--fcb-orange); color: #fff !important; text-decoration: none !important; font-size: 13.5px; }
.fcb-cta:hover { filter: brightness(1.05); }

.fcb-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 36px; }
.fcb-chip { padding: 7px 12px; border: 1px solid rgba(255, 93, 0, .4); border-radius: 999px; background: #fff; color: var(--fcb-ink); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.fcb-chip:hover { background: #fff6ef; border-color: var(--fcb-orange); }

.fcb-typing { display: flex; gap: 4px; padding: 14px 16px; }
.fcb-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--fcb-muted); opacity: .4; animation: fcb-dot 1.2s infinite; }
.fcb-typing span:nth-child(2) { animation-delay: .2s; }
.fcb-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes fcb-dot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: .9; transform: translateY(-3px); } }

.fcb-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--fcb-line); background: #fff; }
.fcb-form textarea { flex: 1; min-height: 42px; max-height: 120px; padding: 10px 14px; border: 1px solid var(--fcb-line); border-radius: 21px; resize: none;
    font: inherit; font-size: 16px; line-height: 1.35; color: var(--fcb-ink); background: var(--fcb-surface); }
.fcb-form textarea:focus { outline: none; border-color: var(--fcb-orange); background: #fff; }
.fcb-send { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--fcb-orange); color: #fff; cursor: pointer; flex: none; }
.fcb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.fcb-disclaimer { margin: 0; padding: 0 14px 10px; background: #fff; font-size: 11px; line-height: 1.4; color: var(--fcb-muted); }

@media (max-width: 520px) {
    .fcb { right: 12px; bottom: 12px; }
    .fcb-launcher span { display: none; }
    .fcb-launcher { padding: 4px; }
    .fcb-launcher__photo { width: 52px; height: 52px; }
    .fcb.is-open { inset: 0; right: 0; bottom: 0; }
    .fcb-panel { width: 100%; height: 100%; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .fcb-panel, .fcb-typing span, .fcb-launcher { animation: none; transition: none; } }
@media print { .fcb { display: none !important; } }
