/* Variables pour le thème sombre */
:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --accent-color: #4a9eff;
    --accent-hover: #3d84d6;
    --border-color: #404040;
}

/* Reset et styles de base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.container {
    background-color: var(--bg-secondary);
    padding: clamp(1rem, 3vw, 2rem);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    color: var(--text-primary);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chat-box {
    flex: 1;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--text-secondary);
}

select, textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
}

textarea {
    height: 100px;
    resize: vertical;
}

button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent-color);
    color: var(--text-primary);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--accent-hover);
}

.response {
    flex: 1;
}

.response-box {
    background-color: var(--bg-primary);
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    margin-top: 0.75rem;
    min-height: 50px;
}
/* Styles spécifiques pour le contenu Markdown dans #chatbot_response */
#chatbot_response {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Titres */
#chatbot_response h1,
#chatbot_response h2,
#chatbot_response h3,
#chatbot_response h4,
#chatbot_response h5,
#chatbot_response h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.2;
    color: var(--accent-color);
}

#chatbot_response h1 { font-size: 1.8em; }
#chatbot_response h2 { font-size: 1.5em; }
#chatbot_response h3 { font-size: 1.3em; }
#chatbot_response h4 { font-size: 1.2em; }
#chatbot_response h5 { font-size: 1.1em; }
#chatbot_response h6 { font-size: 1em; }

/* Paragraphes et listes */
#chatbot_response p {
    margin-bottom: 1em;
}

#chatbot_response ul,
#chatbot_response ol {
    margin: 1em 0;
    padding-left: 2em;
}

#chatbot_response li {
    margin: 0.5em 0;
}

/* Liens */
#chatbot_response a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.2s;
}

#chatbot_response a:hover {
    border-bottom-color: var(--accent-color);
}

/* Blocs de code */
#chatbot_response pre {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1em;
    margin: 1em 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

#chatbot_response code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Code en ligne (inline code) */
#chatbot_response p code,
#chatbot_response li code {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e6e6e6;
}

/* Citations */
#chatbot_response blockquote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 4px solid var(--accent-color);
    color: var(--text-secondary);
    font-style: italic;
}

/* Tableaux */
#chatbot_response table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

#chatbot_response th,
#chatbot_response td {
    padding: 0.75em;
    border: 1px solid var(--border-color);
}

#chatbot_response th {
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: bold;
}

#chatbot_response tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Images */
#chatbot_response img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1em 0;
}

/* Ligne horizontale */
#chatbot_response hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2em 0;
}

/* Éléments de mise en évidence */
#chatbot_response em {
    color: #b8c9e6;
}

#chatbot_response strong {
    color: var(--accent-color);
}

/* Listes à cocher */
#chatbot_response input[type="checkbox"] {
    margin-right: 0.5em;
}

/* Responsivité */
@media screen and (max-width: 768px) {
    #chatbot_response {
        font-size: 0.95em;
    }

    #chatbot_response pre {
        padding: 0.75em;
    }

    #chatbot_response table {
        display: block;
        overflow-x: auto;
    }
}
/* Media Queries pour la responsivité */
@media screen and (min-width: 768px) {
    .chat-container {
        flex-direction: row;
    }

    .chat-box {
        flex: 1;
        margin-bottom: 0;
    }

    .response {
        flex: 3;
    }
}

/* Pour les grands écrans */
@media screen and (min-width: 1200px) {
    .container {
        padding: 2.5rem;
    }
}

/* Pour les petits écrans */
@media screen and (max-width: 480px) {
    body {
        padding: 0rem;
    }

    .container {
        padding: 1rem;
        border-radius: 0px;
    }

    select, textarea, button {
        font-size: 16px; /* Évite le zoom sur mobile */
    }
}

