/* Reset de base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #25282C; /* Couleur de fond similaire à ChatGPT */
    color: white; /* Texte en blanc pour le contraste */
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.3rem;
    background-color: #202225; /* Fond du header */
}

#header-container { 
    display: flex;
    align-items: center;
}

header img {
    max-height: 60px; /* Limiter la taille du logo */;
}

#logo { 
    margin-right: 20px; /* Ajustez la marge selon vos besoins */ 
}

#chatbot-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Assure que l'input-area reste en bas */
    max-width: 800px;
    height: 80vh;
    margin: 2rem auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 1rem 0 rgba(0, 0, 0, .2);
}

#chatbot {
    display: flex;
    flex-direction: column;
    height: 100%; /* S'assure que le chatbot prend toute la hauteur */
}

#chat-box {
    overflow-y: auto;
    padding: 1rem;
    flex-grow: 1; /* Permet à chat-box de remplir l'espace disponible */
}

.message {
    max-width: 75%;
    margin: 0.5rem 0;
    padding: 0.5rem 1rem;
    border-radius: 18px;
    line-height: 1.4;
    border: none;
}

.message pre code {
    background-color: #f5f5f5; /* Couleur de fond pour le code */
    color: #333; /* Couleur du texte pour le code */
    border: 1px solid #ddd; /* Bordure pour le code */
    border-radius: 5px;
    padding: 1em;
    overflow-x: auto; /* Permet le défilement horizontal si nécessaire */
    white-space: pre-wrap; /* Conserve les espaces blancs et les sauts de ligne */
    display: block; /* Affiche le code en bloc */
}

.message code {
    font-family: 'Courier New', Courier, monospace; /* Police à chasse fixe pour le code */
}

.user-message {
    align-self: flex-start;
    background-color: #0B93F6; /* Bleu pour les messages de l'utilisateur */
    color: white;
    text-align: left;
    margin-right: 1rem;
}

.assistant-message {
    align-self: flex-start;
    background-color: #23272A; /* Gris foncé pour les messages de l'assistant */
    color: white;
    text-align: left;
    margin-left: 1rem;
}

#input-area {
    padding: 1rem;
    background-color: #202225;
    display: flex;
    align-items: center;
}

#user-input {
    width: calc(100% - 90px);
    padding: 10px 15px;
    background-color: #40444B;
    border: none;
    border-radius: 4px;
    color: white;
    margin-right: 10px;
}

#send-btn {
    padding: 0.5rem 1rem;
    background-color: #57A773; /* Vert pour le bouton Envoyer */
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

#send-btn:hover {
    background-color: #45A662;
}

/* Scrollbar styles */
#chat-box::-webkit-scrollbar {
    width: 5px;
}

#chat-box::-webkit-scrollbar-thumb {
    background-color: #202225;
}

#chat-box::-webkit-scrollbar-track {
    background-color: #2F3136;
}

/* Responsive Design */
@media (max-width: 768px) {
    #chatbot-container {
        width: 95%;
        height: 60vh;
        margin: 1rem auto;
    }

    header img {
        max-height: 30px;
    }
}
