#chatbot-header {
    background-color: #EBAA3F;
    color: white;
    padding: 17px;
    cursor: pointer;
    flex-shrink: 0;
    font-family: var(--font-main);
    font-size: var(--fs-xl);      /* was 1.5rem */
    font-weight: var(--fw-medium);/* was 500 */
}

#chatbot-messages {
    line-height: 1.1;
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    height: 100%;
    scroll-behavior: smooth;
    box-sizing: border-box;
}

#chatbot-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

.chat-bubble {
    padding: 10px;
    margin: 5px 0;
    border-radius: 10px;
    clear: both;
    display: inline-block;
    word-wrap: break-word;
}

.chat-bubble img {
    margin-top: .1em;
    width: 1em;
    height: 1em;
}

.chat-bubble p {
    text-align: left;
    padding: 0;
}

.chat-bubble.user {
    font-weight: bold;
    background-color: #4CAF50;
    color: white;
    margin-left: auto;
    text-align: left;
    align-self: flex-end;
}

.chat-bubble.bot {
    background-color: #eee;
    color: #333;
    margin-right: auto;
    text-align: left;
}

#chatbot-input-container {
    padding: 10px;
    border-top: 1px solid #ddd;
}

/* Input box — taller + clean layout */
#chatbot-input-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: var(--fs-md); /* was 1.1rem */
  gap: 8px;

  /* Allow container to expand vertically */
  min-height: calc(1.4em * 4 + 16px);
  max-height: calc(1.4em * 8 + 16px);
}

#chatbot-input-bar input {
    width: 100%;
    padding: 0px;
    margin: 0px;
    border: none;
    outline: none;
}

/* Placeholder text styling (matches global) */
#chatbot-input::placeholder {
  font-family: var(--font-main);
  font-size: var(--fs-sm);
  font-weight: var(--fw-light);
  color: var(--Light_Text);
  opacity: 0.6; /* was 1 */
}

/* Growing textarea */
#chatbot-input {
  width: 100%;
  resize: none;
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: var(--fs-md);       /* was 1.1rem */
  font-weight: var(--fw-regular);/* was 400 */
  color: var(--Default_Text);
  line-height: 1.4;
  background: transparent;

  padding: 6px 8px;
  overflow-y: auto;
  min-height: calc(1.4em * 4);
  max-height: calc(1.4em * 8);
  box-sizing: border-box;
  transition: height 0.2s ease;
  flex-grow: 1;
}

/* Send icon */
#chatbot-send {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: none;
  background-color: transparent;
  background-image: url('ressources/Send.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  margin-left: 8px;
  padding: 0;
}

#chatbot-send:hover { transform: scale(1.1); }
#chatbot-send:active { transform: scale(1); }

.hidden { display: none; }

.toggle-prompt {
    background-color: transparent;
    border: none;
    color: blue;
    cursor: pointer;
    text-decoration: underline;
}

.toggle-prompt:hover { color: darkblue; }

.user-message {
    background-color: #e0f7fa;
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 5px;
}

.bot-message {
    background-color: #f1f8e9;
    padding: 8px;
    border-radius: 5px;
    margin-bottom: 5px;
}

.user-message::before {
    content: attr(data-section) " - ";
    font-weight: bold;
    color: #00796b;
}

.bot-message::before {
    content: attr(data-section) " - ";
    font-weight: bold;
    color: #558b2f;
}

.copy-button{
    margin-left: 10px;
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: var(--fs-sm); /* was 12px */
}

.copy-button:hover { background-color: #45a049; }

/* Collaboration – Soft Rose */
.collaboration-bubble.user { background-color: #e8b3b3; color: #4a0000; }
.collaboration-bubble.bot  { background-color: #f9ecec; color: #4a0000; }

/* Analyse – Warm Sand Beige */
.analyse-bubble.user { background-color: #f2d1aa; color: #5a3b11; }
.analyse-bubble.bot  { background-color: #fcead7; color: #5a3b11; }

/* Info Préliminaire – Soft Apricot Cream */
.infoPreliminaire-bubble.user { background-color: #f6cda3; color: #704210; }
.infoPreliminaire-bubble.bot  { background-color: #fcf0dd; color: #704210; }

/* Info Technique – Misty Steel Blue */
.infoTechnique-bubble.user { background-color: #c2b6eb; color: #3c2765; }
.infoTechnique-bubble.bot  { background-color: #e7eef8; color: #3c2765; }

/* Info Pédagogique – Pale Honey */
.infoPedagogique-bubble.user { background-color: #fbeea8; color: #6b5a00; }
.infoPedagogique-bubble.bot  { background-color: #fff4cf; color: #6b5a00; }

/* Scenario Activités – Balanced Mint */
.scenarioActivites-bubble.user { background-color: #b8dbc9; color: #1e4936; }
.scenarioActivites-bubble.bot  { background-color: #e2f2e7; color: #1e4936; }

/* Production – Lavender Grey */
.production-bubble.user { background-color: #c4c9e2; color: #2f3751; }
.production-bubble.bot  { background-color: #e9ecf5; color: #2f3751; }

/* Évaluation – Dusty Lilac */
.evaluation-bubble.user { background-color: #cfb1e4; color: #3d2d53; }
.evaluation-bubble.bot  { background-color: #f1e4f7; color: #3d2d53; }

/* Calendrier – True Light Blue-Grey */
.calendrier-bubble.user { background-color: #aac8eb; color: #123d67; }
.calendrier-bubble.bot  { background-color: #e8eaf1; color: #123d67; }

/* Soumettre – Soft Neutral Ivory */
.Soumettre-bubble.user { background-color: #d9d4cc; color: #443c33; }
.Soumettre-bubble.bot  { background-color: #f4f1eb; color: #443c33; }

#chatbot-disclaimer {
    font-size: var(--fs-sm); /* was 12px */
    color: #888;
    text-align: center;
    margin-top: 5px;
    padding: 5px;
}

#chatbot-disclaimer_rag {
    font-size: var(--fs-sm);   /* was 0.8rem */
    font-weight: var(--fw-light);
    color: var(--Light_Text);
}

/* Harmonized bubble/body text */
.chat-bubble,
.chat-bubble.bot,
.chat-bubble.user,
.chat-bubble p,
.bot-message,
.user-message,
.collaboration-bubble.bot,
.collaboration-bubble.user,
.analyse-bubble.bot,
.analyse-bubble.user,
.infoPreliminaire-bubble.bot,
.infoPreliminaire-bubble.user,
.infoTechnique-bubble.bot,
.infoTechnique-bubble.user,
.infoPedagogique-bubble.bot,
.infoPedagogique-bubble.user,
.scenarioActivites-bubble.bot,
.scenarioActivites-bubble.user,
.production-bubble.bot,
.production-bubble.user,
.evaluation-bubble.bot,
.evaluation-bubble.user,
.calendrier-bubble.bot,
.calendrier-bubble.user,
.Soumettre-bubble.bot,
.Soumettre-bubble.user {
  font-family: var(--font-main);
  font-size: var(--fs-md);       /* was 1.05rem */
  font-weight: var(--fw-regular);/* was 400 */
  line-height: 1.25;
}

/* Markdown headings inside chat replies */
.chatbot-markdown h1,
.chatbot-markdown h2,
.chatbot-markdown h3 {
  font-size: var(--fs-lg);       /* was 1.2rem */
  margin: 0.5em 0;
  font-weight: var(--fw-medium); /* was 600 */
}

.chatbot-markdown ul {
  margin-left: 1.4em;
  list-style-type: disc;
}

.chatbot-markdown p {
  margin: 0.4em 0;
}
