/* ==========================================================================
   Conteneur Principal du Bot
   ========================================================================== */
#v-bot-container {
    max-width: 500px;
    margin: 20px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: visible;
    position: relative;
}

/* Bloquer toutes les images emoji WordPress */
#v-bot-container img.emoji {
    display: none !important;
}

/* ==========================================================================
   Zone de Réponse (Bulle de l'IA)
   ========================================================================== */
#v-response-box {
    position: relative;
    margin-bottom: 20px;
    min-height: 0;
}

#v-response-text {
    display: none;
    background: #f0f4f8;
    color: #2c3e50;
    padding: 15px;
    padding-bottom: 50px;
    border-radius: 12px;
    border-right: 5px solid #0073aa;
    line-height: 1.6;
    font-size: 1.05rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    animation: vFadeIn 0.3s ease-in;
    position: relative;
    z-index: 1;
}

/* Bouton Écoute (Haut-parleur) */
#v-speak {
    position: absolute !important;
    bottom: 10px !important;
    left: 10px !important;
    background: #0073aa !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 46px !important;
    height: 46px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0,115,170,0.3) !important;
    z-index: 99999 !important;
    padding: 8px !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
}

#v-speak .icon-speak {
    width: 24px !important;
    height: 24px !important;
    pointer-events: none !important;
    display: block !important;
}

#v-speak.visible {
    display: flex !important;
}

#v-speak.playing {
    background: #ff4b4b !important;
    animation: vPulseAudio 1s infinite !important;
}

/* Icône pause quand en lecture */
#v-speak.playing .icon-speak {
    display: none !important;
}

#v-speak.playing::after {
    content: "⏸" !important;
    font-size: 20px !important;
    color: white !important;
    display: block !important;
}
/* État paused (en pause) */
#v-speak.paused {
    background: #ff9800 !important; /* Orange pour indiquer la pause */
}

#v-speak.paused .icon-speak {
    display: block !important;
}

#v-speak.paused::after {
    content: "" !important;
}

#v-speak.paused:hover {
    background: #f57c00 !important;
}

#v-speak:hover {
    transform: scale(1.1) !important;
    background: #005177 !important;
}

#v-speak.playing:hover {
    background: #d32f2f !important;
}

/* ==========================================================================
   Zone de Contrôle
   ========================================================================== */
.v-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.v-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

#v-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: #fff;
}

#v-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Bouton Micro */
#v-mic {
    width: 50px !important;
    height: 50px !important;
    cursor: pointer !important;
    border: 2px solid #0073aa !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
    color: #0073aa !important;
}

#v-mic .icon-mic {
    width: 28px !important;
    height: 28px !important;
    pointer-events: none !important;
    display: block !important;
}

#v-mic:hover {
    background: #f0f7ff !important;
    transform: scale(1.05) !important;
}

#v-mic.listening {
    background: #ff4b4b !important;
    border-color: #d32f2f !important;
    color: white !important;
    animation: vPulse 1.5s infinite !important;
}

/* Bouton Envoyer */
#v-send {
    width: 100%;
    padding: 14px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s, transform 0.1s;
}

#v-send:hover {
    background: #005177;
}

#v-send:active {
    transform: scale(0.98);
}

/* Statut */
#v-status {
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    text-align: center;
    min-height: 20px;
    font-weight: 500;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes vFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes vPulse {
    0% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
}

@keyframes vPulseAudio {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==========================================================================
   Adaptation Mobile
   ========================================================================== */
@media (max-width: 480px) {
    #v-bot-container {
        margin: 10px;
        padding: 15px;
    }
    
    #v-input {
        font-size: 14px;
    }
}