/* =============================
   MODAL CHAT MOBILE FIRST
   ============================= */
.modal-chat-mobile, #modal-chat {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    
}

.chat-mobile-wrapper {
    background: var(--Beige-Fond-color);
    width: 100vw;
    max-width: 480px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.12);
    margin-bottom: 0;
    /* position relative so that the decorative frame pseudo element can be absolutely placed */
    position: relative;
}

/* decorative frame overlay above the modal, not interactable */
.chat-mobile-wrapper::before {
    content: "";
    position: absolute;
    top: 60px;
    left: 0;
    
    /* 1. Définit la taille de ton cadre */

    width: 94%;
    height: calc(100% - 190px);
    
    /* 2. Retire le "background: url(...)" qui sème la pagaille */
    background: transparent; 

    /* 3. Configuration du 9-Slice */
    border-style: solid; 
    border-width: 15px; /* C'est l'épaisseur de tes coins/bordures */
    border-image-source: url(/css/assets/images/Hambergers/CadreDiscution.png);
    
    /* Les 20 correspondent aux pixels de tes bords dans ton fichier image original */
    border-image-slice: 20 20 20 20 fill; /* Le mot 'fill' garde le centre de l'image */
    
    border-image-repeat: stretch; /* Ou 'repeat' si tu veux que les bords se répètent */
    
    pointer-events: none;
    z-index: 2;
}

.chat-mobile-header {
    display: flex;
    align-items: center;
    /* On garde space-between, mais on va ruser avec les marges */
    justify-content: space-between; 
    padding: 12px 20px;
    background-color: var(--Beige-Fond-color);
    position: relative; /* Sécurité pour le positionnement */
}

.chat-close-btn {
    /* La croix reste à sa place naturelle à gauche ou à droite selon l'ordre HTML */
    order: 2; /* Force la croix à être à droite si besoin */
    background: none;
    border: none;
    img{
    height: 60px;
    width: 60px;
    
    }
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;

}

#chat-city-name {
    /* LA MAGIE EST ICI : */
    margin-left: auto;
    margin-right: auto;
    
    height: 40px;
    width: auto;
    object-fit: contain;
    order: 1; /* L'image passe au "milieu" visuel */
}

/* Astuce : Pour un centrage parfait, on ajoute un élément invisible à droite */
.chat-mobile-header::after {
    content: "";
    width: 40px; /* Doit être la même largeur que ton bouton fermer */

}

.chat-mobile-history, #chat-history {
    width: 100%;
    height: 100%;
    flex: 1;
    overflow-y: auto;
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--Beige-Fond-color);
    /* background-image: url(/css/assets/images/Hambergers/CadreDiscution.png); */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.chat-message, .bubble {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.chat-message-reponse, .bubble.player {
    flex-direction: row-reverse;
}

.chat-avatar, .bubble-avatar {
    width: 36px;
    height: 36px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #666;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.chat-bubble, .bubble-content {
    background: #fff;
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: var(--boxshadow);
    max-width: 70vw;
    font-size: 1em;
    color: #222;
}

.chat-bubble-reponse {
    background: #e6f7ff;
    color: #0077b6;
}

.chat-bubble-text {
    word-break: break-word;
}

.chat-mobile-typing, #typing-indicator {
    width: 100%;
    height: 36px;
    padding: 20px 20px 8vh 3vh;
    font-size: 0.95em;
    color: #000000;
    background: var(--Beige-Fond-color);
    img{
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

.typing-dots {
    animation: typingDots 1s infinite steps(3);
}

@keyframes typingDots {
    0% { opacity: 1; }
    33% { opacity: 0.5; }
    66% { opacity: 0.2; }
    100% { opacity: 1; }
}

.chat-mobile-footer, #chat-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background-color: var(--Beige-Fond-color);
    flex-direction: row;
    bottom: 20px;
}

.chat-input-mobile {
    flex: 1;
    color: #fff;
    padding: 10px 14px;
    border-radius: 16px;
    border: 1px solid #ddd;
    font-size: 1em;
    outline: none;
    background: var(--Or-color);
    box-shadow: var(--innerboxshadow);
}

.chat-btn-ra, #btn-chat-activate-ar {
    background:var(--Beige-Fond-color);
    height: 60px;
    width: 60px;
    display: flex ;
    align-items: center;
    justify-content: center;


        img{
        height: 80px;
        width: 80px;
        object-fit: contain;
    }
    border: none;
    border-radius: 30px;
    padding: 10px 18px;
    font-size: 1em;
    cursor: pointer;
    box-shadow: var(--boxlitghdo);
    transition: background 0.2s;
}

.chat-btn-ra:hover, #btn-chat-activate-ar:hover {
    background: #023e8a;
}

.btn-send {
visibility: hidden;
}
