/* ============================================================
   CONTENEUR PRINCIPAL
   ============================================================ */
#vide-chat-container {
    max-width: 650px;
    margin: 40px auto;
    font-family: 'Space Mono', monospace;
    background: url("https://nervolution.com/wp-content/uploads/2026/04/ElevenLabs_image_seedream-4-5__A-majestic-._2026-04-29T14_46_19-scaled.png") no-repeat center center;
    background-size: cover;
    color: #aefcff;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    height: 700px;
}

/* ============================================================
   EN-TÊTE (TITRE ET SOUS-TITRE)
   ============================================================ */
.void-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;

}

/* TAILLE PC DU TITRE */
.void-title {
    font-size: 20px; /* MODIFIEZ ICI POUR PC */
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #cc0000;
    background: rgba(5, 5, 5, 0.83);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 5px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 5px;
}

/* TAILLE PC DU SOUS-TITRE */
.void-subtitle {
    font-size: 13px; /* MODIFIEZ ICI POUR PC */
    color: #c0c0c0;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: rgba(5, 5, 5, 0.83);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 6px;
    display: inline-block;
}

/* ============================================================
   ZONE DE CHAT
   ============================================================ */
#chat {
    flex: 1;
    overflow-y: auto;
    border: none;
    background: transparent;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* MESSAGES */
.msg {
    padding: 10px 14px;
    border-radius: 8px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 15px;
    animation: slideIn 0.3s ease-out;
}

.msg.bot {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    align-self: flex-start;
}

.msg.user {
    background: rgba(25, 25, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    align-self: flex-end;
    text-align: right;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SCROLLBAR */
#chat::-webkit-scrollbar { width: 4px; }
#chat::-webkit-scrollbar-track { background: transparent; }
#chat::-webkit-scrollbar-thumb { background: rgba(204, 0, 0, 0.3); border-radius: 2px; }

/* ============================================================
   ZONE D'ENTRÉE (INPUT ET BOUTON)
   ============================================================ */
.input-group {
    display: flex;
    gap: 8px;
    padding: 5px 0;
    margin-top: auto;
}

#user-input {
    flex: 1;
    padding: 0 12px;
    background: rgba(10, 10, 10, 0.9);
    color: #ffffff;
    border: 1px solid rgba(204, 0, 0, 0.3);
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    border-radius: 5px;
    height: 42px;
    line-height: 42px;
    box-sizing: border-box;
}

#user-input:focus { outline: none; border-color: rgba(255, 0, 0, 0.6); }
#user-input::placeholder { color: rgba(255, 50, 50, 0.3); }

#send-btn {
    padding: 0 20px;
    height: 42px;
    background: rgba(20, 0, 0, 0.85);
    color: #ff4d4d;
    border: 1px solid rgba(204, 0, 0, 0.4);
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

#send-btn:hover { background: rgba(60, 0, 0, 0.95); }
#send-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ============================================================
   RESPONSIVE (MOBILE) - CORRIGÉ
   ============================================================ */
@media (max-width: 680px) {
    #vide-chat-container { 
        margin: 10px; 
        height: 100%;
        max-height: 70vh; /* Ajusté pour laisser de la place au défilement de la page si besoin */
        padding: 10px; 
        overflow: hidden; 
        display: flex;
        flex-direction: column;
    }
    
    .void-header {
        flex-shrink: 0;
    }
    
    .void-title { font-size: 12px; }
    .void-subtitle { font-size: 8px; }
    
    #chat { 
        padding: 5px; 
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain; /* Empêche le défilement de se propager au corps de la page */
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }
    
    .msg { max-width: 90%; font-size: 10px; }
    #user-input, #send-btn { height: 40px; }
}
