:root {
    --color-main: #6A0505; 
    --color-secondary: #F4E8C1;
    --color-user: #007bff; 
    --color-bot: var(--color-main); 
}

body {
    font-family: 'Georgia', serif;
    background-color: var(--color-secondary);
    color: #333;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

#app {
    width: 90%;
    max-width: 600px;
    height: 90vh;
    border: 5px solid var(--color-main);
    background-color: #fff;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--color-main);
    color: white;
    padding: 20px;
    text-align: center;
}

#avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: white;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: var(--color-main);
}

header h1 {
    margin: 0;
    font-size: 1.8em;
    text-transform: uppercase;
}

header p {
    margin: 5px 0 0;
    font-style: italic;
    font-size: 0.9em;
}

#chat-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 20px;
    max-width: 80%;
    line-height: 1.4;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.message p {
    margin: 0;
}

.user {
    background-color: var(--color-user);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot {
    background-color: var(--color-bot);
    color: white;
    align-self: flex-start;
    margin-right: auto;
    border-top-left-radius: 5px;
}

footer {
    padding: 15px;
    border-top: 2px solid var(--color-main);
    background-color: #eee;
}

#chat-form {
    display: flex;
    gap: 10px;
}

#user-input {
    flex-grow: 1;
    padding: 12px;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

#chat-form button {
    background-color: var(--color-main);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s;
}

#chat-form button:hover {
    background-color: #4a0404;
}

/* Message de chargement */
#loading-message {
    font-style: italic;
    animation: pulse 1.5s infinite;
    background-color: #999 !important;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top:0; left:0; width:100%; height:100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}
