/* ==============================================================================
   SOLVYTECH WHATSAPP FLOAT BUTTON & WIDGET CONVERSATIONNEL LOUNGE VIP
   Palette : Chocolat VIP (#2B1B19), Or Imperial (#D4AF37), Rouge (#9C251A), WhatsApp (#25D366)
   ============================================================================== */

.qb-wa-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99990;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

html[dir="rtl"] .qb-wa-widget {
    right: auto;
    left: 30px;
}

/* ==============================================================================
   BOUTON DECLENCHEUR / LAUNCHER PILL VIP
   ============================================================================== */
.qb-wa-trigger {
    background: #2B1B19;
    border: 1.5px solid #D4AF37;
    border-radius: 50px;
    padding: 6px 18px 6px 6px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(43, 27, 25, 0.35), 0 0 15px rgba(212, 175, 55, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    text-decoration: none;
}

.qb-wa-trigger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(43, 27, 25, 0.45), 0 0 20px rgba(212, 175, 55, 0.3);
    border-color: #F5E8C4;
}

.qb-wa-trigger.qb-wa-open {
    border-color: #25D366;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.qb-wa-trigger-icon {
    width: 44px;
    height: 44px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(37, 211, 102, 0.4);
    animation: qb-wa-pulse 2.2s infinite;
}

.qb-wa-trigger-icon svg {
    display: block;
}

.qb-wa-trigger-label {
    display: flex;
    flex-direction: column;
    text-align: left;
}

html[dir="rtl"] .qb-wa-trigger-label {
    text-align: right;
}

.qb-wa-label-top {
    color: #FAF6F0;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.qb-wa-label-sub {
    color: #25D366;
    font-size: 0.76rem;
    font-weight: 600;
    margin-top: 3px;
}

/* ==============================================================================
   FENETRE DE CHAT CONVERSATIONNELLE LOUNGE VIP
   ============================================================================== */
.qb-wa-chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: #FFFFFF;
    border-radius: 18px;
    border: 1.5px solid #D4AF37;
    box-shadow: 0 16px 45px rgba(43, 27, 25, 0.3), 0 0 25px rgba(212, 175, 55, 0.12);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.94);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 99995;
}

html[dir="rtl"] .qb-wa-chat-window {
    right: auto;
    left: 0;
}

.qb-wa-chat-window.qb-wa-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* En-tête */
.qb-wa-chat-header {
    background: #2B1B19;
    color: #FAF6F0;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.qb-wa-header-avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.qb-wa-avatar-circle {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #9C251A 0%, #2B1B19 100%);
    border: 1.5px solid #D4AF37;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #D4AF37;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.qb-wa-avatar-crown {
    position: absolute;
    top: -8px;
    left: -4px;
    font-size: 0.95rem;
    transform: rotate(-15deg);
}

.qb-wa-pulse-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #25D366;
    border: 2px solid #2B1B19;
    border-radius: 50%;
}

.qb-wa-header-info {
    flex: 1;
}

.qb-wa-salon-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #D4AF37;
    line-height: 1.2;
}

.qb-wa-status-row {
    display: flex;
    flex-direction: column;
    margin-top: 3px;
}

.qb-wa-status-online {
    color: #25D366;
    font-size: 0.75rem;
    font-weight: 600;
}

.qb-wa-advisor-role {
    color: #D4C3C0;
    font-size: 0.72rem;
}

.qb-wa-close-btn {
    background: transparent;
    border: none;
    color: #D4AF37;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.qb-wa-close-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

/* Corps du chat */
.qb-wa-chat-body {
    background: #FAF6F0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qb-wa-context-pill {
    align-self: center;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid #D4AF37;
    color: #7A180F;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.qb-wa-bubble {
    background: #FFFFFF;
    border-radius: 14px 14px 14px 4px;
    padding: 12px 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #EFEAE2;
    position: relative;
    color: #2B1B19;
}

html[dir="rtl"] .qb-wa-bubble {
    border-radius: 14px 14px 4px 14px;
}

.qb-wa-bubble-text {
    margin: 0;
    font-size: 0.88rem;
    color: #2B1B19;
    line-height: 1.45;
}

.qb-wa-bubble-time {
    display: block;
    text-align: right;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4A3B3A;
    margin-top: 6px;
}

html[dir="rtl"] .qb-wa-bubble-time {
    text-align: left;
}

/* Encadré d'aperçu du message pré-rempli */
.qb-wa-prefill-preview {
    background: rgba(212, 175, 55, 0.08);
    border: 1px dashed rgba(212, 175, 55, 0.6);
    border-radius: 10px;
    padding: 10px 12px;
}

.qb-wa-prefill-tag {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: #7A180F;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.qb-wa-prefill-text {
    margin: 0;
    font-size: 0.82rem;
    color: #2B1B19;
    font-style: italic;
    line-height: 1.35;
}

/* Pied de widget CTA */
.qb-wa-chat-footer {
    background: #FFFFFF;
    padding: 12px 18px 16px 18px;
    border-top: 1px solid #EFEAE2;
}

.qb-wa-cta-btn {
    background: #075E54;
    background: linear-gradient(135deg, #09684D 0%, #075E54 100%);
    color: #FFFFFF !important;
    text-decoration: none !important;
    border-radius: 10px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: 0 4px 15px rgba(7, 94, 84, 0.35);
    transition: all 0.25s ease;
}

.qb-wa-cta-btn:hover {
    background: #054c44;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 94, 84, 0.45);
}

.qb-wa-cta-icon {
    font-size: 1.15rem;
}

.qb-wa-cta-arrow {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.qb-wa-cta-btn:hover .qb-wa-cta-arrow {
    transform: translateX(4px);
}

html[dir="rtl"] .qb-wa-cta-btn:hover .qb-wa-cta-arrow {
    transform: translateX(-4px);
}

/* ==============================================================================
   ANIMATIONS & EFFETS VIP
   ============================================================================== */
@keyframes qb-wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ==============================================================================
   HARMONISATION MOBILE (ZERO CHEVAUCHEMENT AVEC LE FAB DU THEME)
   ============================================================================== */
@media (max-width: 768px) {
    /* Sur smartphone, masquer le launcher desktop pour laisser le FAB speed-dial du thème agir */
    .qb-wa-widget {
        display: none !important;
    }
}
