html {
    box-sizing: border-box;
    font-size: 16px;
    color: #363636;
}

*, *:before, *:after {
    box-sizing: inherit;
}

.container {
    margin: 0 auto;
    padding: 1.5rem;
    width: 100%;
}

.section {
    padding: 3rem 0;
}

.title {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.title.is-3 {
    font-size: 2rem;
    color: #3273dc;
}

.title.is-4 {
    font-size: 1.4rem;
    color: #3273dc;
}

.box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(50, 115, 220, 0.08);
    padding: 2rem 2.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #eaeaea;
}

.field {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.has-addons {
    display: flex;
    gap: 0.5rem;
}

.control {
    flex: 1 1 0;
    min-width: 0;
}

.control.has-text-right {
    text-align: right;
}

.textarea, #userInput {
    width: 100%;
    min-height: 80px;
    padding: 0.75em 1em;
    border-radius: 6px;
    border: 1px solid #dbdbdb;
    background: #f5f7fa;
    font-size: 1em;
    resize: vertical;
    transition: border 0.2s;
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

.textarea:focus, #userInput:focus {
    border-color: #3273dc;
    outline: none;
    background: #fff;
}

.button, .button.is-link {
    display: inline-block;
    padding: 0.6em 1.4em;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1em;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-top: 0.5em;
}

.button.is-link {
    background: #3273dc;
    color: #fff;
}

.button {
    background: #f5f7fa;
    color: #363636;
    border: 1px solid #dbdbdb;
}

#chatBox {
    min-height: 190px;
    background: #fff;
    border: 1px solid #eaeaea;
    margin-bottom: 1.5em;
    font-size: 1.08em;
    border-radius: 10px;
    padding: 1.2em 1.5em;
    overflow-y: auto;
    max-height: 420px;
}

.bloc-erreur {
    background: #fff3f3;
    border: 1px solid #ffb3b3;
    color: #b71c1c;
    border-radius: 8px;
    padding: 1.2em 1.5em;
    margin-bottom: 1.5em;
}

.center {
    text-align: center;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

@media (max-width: 600px) {
    .container {
        padding: 0.5rem;
    }

    .box {
        padding: 1rem 0.7rem;
    }

    .title.is-3 {
        font-size: 1.3rem;
    }

    .title.is-4 {
        font-size: 1.1rem;
    }
}


.chat-user {
    background-color: var(--color-light-secondary);
}

.chat-codaleebs {
    background-color: var(--color-light);
}

.chat-codaleebs .message-body {
    border-color: var(--primary);
    color: var(--primary) !important;
}

.chat-user .message-body {
    border-color: var(--accent);
    color: var(--accent) !important;
}

@keyframes typing {
    0% {
        content: '\00a0';
    }
    25% {
        content: '.';
    }
    50% {
        content: '..';
    }
    75% {
        content: '...';
    }
    100% {
        content: '\00a0';
    }
}

.typing::after {
    content: '';
    animation: typing 1s steps(4, end) infinite;
}

#userInput {
    min-height: 6em !important;
}

@media (max-width: 1024px) {
    .codabot-access {
        width: 100%;
        left: 0;
        border-radius: 15px 15px 0 0;
    }

    body {
        margin-bottom: 50px;
    }
}

.message-body, .message-body p {
    justify-content: normal !important;
    text-align: left !important;
    font-size: 1.1rem !important;
}


#ask-human-btn {
    background-color: var(--color-light-secondary) !important;
    color: black !important;
    border: 1px solid var(--accent) !important;
    margin-top: 15px !important;
}

#ask-human-btn:hover {
    background-color: var(--accent) !important;
    color: white !important;
}

#ask-human-btn span::after {
    content: '🧠' !important;
}

#ask-human-btn:hover span::after {
    content: '👨‍💻' !important;
}

#ask-human-btn span {
    margin-right: 5px;
    margin-left: 0;
}

.message-body {
    border-color: #dbdbdb;
    border-radius: 4px;
    border-style: solid;
    border-width: 0 0 0 4px;
    color: #4a4a4a;
    padding: 1.25em 1.5em;
}

.message:not(:last-child) {
    margin-bottom: 1.5em;
}

.message-body a {
    text-decoration: underline !important;
}