/* Styles globaux */
#center-text {          
    display: flex;
    flex: 1;
    flex-direction: column; 
    justify-content: center;
    align-items: center;  
    height: 100%;
}

/* Bouton du chat */
#chat-circle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #071965 0%, #1B3554 100%);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

#chat-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#chat-circle img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

/* Conteneur principal du chat */
.chat-box {
    display: none;
    position: fixed;
    right: 30px;
    bottom: 120px;
    width: 415px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
    transform-origin: bottom right;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* En-tête du chat */
.chat-box-header {
    background: linear-gradient(135deg, #071965 0%, #1B3554 100%);
    height: 80px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
}

.chat-box-header img.bot-avatar {
    width: 50px;
    height: 50px;
    position: relative;
    top: 10% !important;
    object-fit: cover;
}

.chat-box-header .header-text {
    flex: 1;
    margin-left: 15px;
}

.chat-box-header .header-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chat-box-header .header-text p {
    margin: 5px 0 0;
    font-size: 13px;
    opacity: 0.8;
}

.chat-box-toggle {
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.chat-box-toggle:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* Corps du chat */
.chat-box-body {
    height: calc(100% - 150px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-logs {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding-bottom: 150px; /* Espace pour la zone de saisie */
}

/* Messages */
.chat-msg {
    clear: both;
    margin-bottom: 15px;
    animation: messageIn 0.3s ease;
}

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

.cm-msg-text {
    padding: 12px 15px;
    max-width: 75%;
    word-wrap: break-word;
    line-height: 1.5;
    position: relative;
    border-radius: 18px;
    font-size: 14px;
}

.chat-msg.user > .cm-msg-text {
    background: linear-gradient(135deg, #071965 0%, #1B3554 100%);
    color: white;
    float: left;
    margin-left: 5px;
    margin-bottom: 20px;
    border-bottom-left-radius: 5px;
}

.chat-msg.self > .cm-msg-text {
    background: #f0f2f5;
    color: #333;
    float: right;
    margin-right: 5px;
    border-bottom-right-radius: 5px;
}

/* Zone de saisie */
.chat-input {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
}

#chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 12px 50px 12px 20px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

#chat-input:focus {
    border-color: #1B3554;
    box-shadow: 0 0 0 2px rgba(27, 53, 84, 0.1);
}

#chat-submit {
    position: absolute;
    right: 0px;
    width: 36px;
    bottom: 10%;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #071965 0%, #1B3554 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}



#mic-button {
    position: absolute;
    right: 50px;
    width: 36px;
    bottom: 10%;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #071965 0%, #1B3554 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

#chat-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(7, 25, 101, 0.3);
}

#chat-submit img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

/* Contrôles vocaux */
.voice-controls {
    display: flex;
    gap: 10px;
    margin-right: 15px;
}

.voice-controls svg {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-controls svg:hover {
    transform: scale(1.1);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .chat-box {
        width: 90vw;
        right: 5vw;
        bottom: 100px;
        height: 70vh;
    }
    
    #chat-circle {
        bottom: 20px;
        right: 20px;
    }
    
    .chat-logs {
        padding-bottom: 70px;
    }
}



