/* ============================================================
   BEE QUIZ v5 — CSS isolé
   Tout préfixé #bq ou .bq- pour ne jamais toucher au thème
   ============================================================ */

/* ── POPUP (position fixe, hors du flux de la page) ── */
#bq {
    all: initial !important;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif !important;
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 999999 !important;
    width: 350px !important;
    max-width: calc(100vw - 32px) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    background: #fff8e7 !important;
    border: 3px solid #f5a623 !important;
    box-shadow: 0 8px 36px rgba(61,32,0,.22), 0 2px 8px rgba(0,0,0,.10) !important;
    box-sizing: border-box !important;
    /* Caché par défaut */
    opacity: 0 !important;
    transform: translateY(28px) scale(.95) !important;
    pointer-events: none !important;
    transition: opacity .4s ease, transform .4s ease !important;
}

/* Visible */
#bq.bq-open {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

/* Fermeture */
#bq.bq-hiding {
    opacity: 0 !important;
    transform: translateY(28px) scale(.95) !important;
    pointer-events: none !important;
}

/* ── BOUTON FERMER ── */
#bq #bq-close {
    all: unset !important;
    position: absolute !important;
    top: 9px !important;
    right: 10px !important;
    width: 26px !important;
    height: 26px !important;
    background: rgba(61,32,0,.10) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #3d2000 !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    transition: background .2s !important;
    box-sizing: border-box !important;
}
#bq #bq-close:hover {
    background: rgba(61,32,0,.22) !important;
}

/* ── ÉCRANS ── */
#bq .bq-s {
    display: none !important;
    box-sizing: border-box !important;
}
#bq .bq-s.bq-on {
    display: block !important;
}

/* ── FOND ALVÉOLES ── */
#bq .bq-hbg {
    background:
        radial-gradient(ellipse at 65% 0%, #ffe08a44 0%, transparent 68%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48'%3E%3Cpolygon points='28,1 55,15 55,43 28,47 1,43 1,15' fill='none' stroke='%23f5a62220' stroke-width='1.5'/%3E%3C/svg%3E") repeat !important;
    background-color: #fff8e7 !important;
    padding: 30px 22px 22px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-sizing: border-box !important;
}

/* ── ABEILLE ANIMÉE ── */
#bq .bq-bee {
    font-size: 2.6rem !important;
    display: block !important;
    line-height: 1 !important;
    animation: bq-float 2.8s ease-in-out infinite !important;
    filter: drop-shadow(0 3px 6px #f5a62344) !important;
}
@keyframes bq-float {
    0%,100% { transform: translateY(0) rotate(-5deg); }
    50%      { transform: translateY(-9px) rotate(5deg); }
}

/* ── TEXTES CTA ── */
#bq .bq-cta-h {
    font-size: .98rem !important;
    font-weight: 800 !important;
    color: #3d2000 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
}
#bq .bq-cta-sub  { font-size: .75rem !important; color: #7a5a00 !important; margin: 0 !important; }
#bq .bq-cta-hint { font-size: .7rem  !important; color: #bbb     !important; margin: 0 !important; }

/* ── BOUTON HEXAGONE ── */
#bq .bq-hex {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f5a623 !important;
    color: #3d2000 !important;
    cursor: pointer !important;
    font-weight: 800 !important;
    font-size: .9rem !important;
    width: 116px !important;
    height: 40px !important;
    clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%) !important;
    transition: background .18s, transform .14s !important;
    letter-spacing: .3px !important;
    margin-top: 2px !important;
    box-sizing: border-box !important;
}
#bq .bq-hex:hover { background: #ffcf40 !important; transform: scale(1.06) !important; }

/* ── HEADER QUIZ ── */
#bq .bq-hdr {
    background: #3d2000 !important;
    padding: 11px 16px 7px !important;
    box-sizing: border-box !important;
}
#bq .bq-pbar {
    background: #6b3e00 !important;
    border-radius: 99px !important;
    height: 6px !important;
    overflow: hidden !important;
    margin-bottom: 5px !important;
}
#bq .bq-pfill {
    height: 100% !important;
    background: linear-gradient(90deg, #f5a623, #ffcf40) !important;
    border-radius: 99px !important;
    transition: width .45s !important;
    width: 0% !important;
}
#bq .bq-meta {
    display: flex !important;
    justify-content: space-between !important;
    font-size: .72rem !important;
    color: rgba(255,255,255,.82) !important;
    margin: 0 !important;
    padding: 0 !important;
}
#bq .bq-sc { font-weight: 700 !important; color: #ffcf40 !important; }

/* ── QUESTION ── */
#bq .bq-qwrap { padding: 16px 15px 4px !important; }
#bq .bq-q {
    font-size: .94rem !important;
    font-weight: 700 !important;
    color: #3d2000 !important;
    text-align: center !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* ── RÉPONSES ── */
#bq .bq-ans {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 7px !important;
    padding: 10px 14px !important;
    box-sizing: border-box !important;
}
#bq .bq-ans-btn {
    all: unset !important;
    background: #fff !important;
    border: 2px solid #f5a623 !important;
    border-radius: 11px !important;
    padding: 10px 7px !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
    color: #3d2000 !important;
    cursor: pointer !important;
    text-align: center !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.25 !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
    transition: background .15s, transform .12s, border-color .15s !important;
}
#bq .bq-ans-btn:hover:not(:disabled) {
    background: #fff3c0 !important;
    border-color: #3d2000 !important;
    transform: scale(1.04) !important;
}
#bq .bq-ans-btn:disabled { cursor: default !important; opacity: .9 !important; }
#bq .bq-ans-btn.bq-ok {
    background: #3dba6a !important;
    border-color: #1a7d40 !important;
    color: #fff !important;
    animation: bq-pop .32s ease !important;
}
#bq .bq-ans-btn.bq-ko {
    background: #e84545 !important;
    border-color: #a01515 !important;
    color: #fff !important;
    animation: bq-shake .38s ease !important;
}
@keyframes bq-pop   { 0%{transform:scale(1)} 50%{transform:scale(1.08)} 100%{transform:scale(1)} }
@keyframes bq-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

/* ── FEEDBACK ── */
#bq .bq-fb {
    min-height: 22px !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: .78rem !important;
    padding: 0 12px 2px !important;
    color: #3d2000 !important;
    box-sizing: border-box !important;
}
#bq .bq-fb-ok { color: #1a7d40 !important; }
#bq .bq-fb-ko { color: #c42020 !important; }

/* ── BOUTON SUIVANT ── */
#bq .bq-next {
    all: unset !important;
    display: block !important;
    margin: 5px auto 13px !important;
    background: #3d2000 !important;
    color: #ffcf40 !important;
    border-radius: 99px !important;
    padding: 8px 24px !important;
    font-size: .82rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background .18s, transform .14s !important;
    text-align: center !important;
    box-sizing: border-box !important;
}
#bq .bq-next:hover { background: #6b3e00 !important; transform: scale(1.04) !important; }

/* ── RÉSULTAT ── */
#bq .bq-re { font-size: 2.6rem !important; line-height: 1 !important; }
#bq .bq-rt { font-size: 1.05rem !important; font-weight: 900 !important; color: #3d2000 !important; margin: 0 !important; }
#bq .bq-rs { font-size: 1.55rem !important; font-weight: 900 !important; color: #f5a623 !important; margin: 0 !important; }
#bq .bq-rm { font-size: .78rem !important; color: #5a3a00 !important; max-width: 260px !important; text-align: center !important; margin: 0 !important; line-height: 1.4 !important; }
#bq .bq-replay { width: 138px !important; height: 44px !important; font-size: .85rem !important; }

/* ── RESPONSIVE mobile ── */
@media (max-width: 390px) {
    #bq {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
    }
    #bq .bq-ans { grid-template-columns: 1fr !important; }
}
