.spa-assistant-annale-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-width: 1200px;
  margin: 0 auto;
}

/* Ligne du haut : deux colonnes */
.spa-assistant-annale-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr);
  gap: 1.5rem;
}


/* Colonnes */
.spa-sujet-col,
.spa-chat-col {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);

  height: 60vh;        /* hauteur fixe relative à la fenêtre */
  overflow-y: auto;    /* scroll interne vertical */
  overflow-x: hidden;  /* pas de scroll horizontal moche */
}


/* En-tête sujet */
.spa-sujet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
}

.spa-sujet-badge {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
}

.spa-sujet-id {
  font-size: .8rem;
  color: #64748b;
}

/* Contenu sujet */
.spa-sujet-content {
  font-size: .9rem;
  line-height: 1.5;
}

/* En-tête chat */
.spa-chat-header {
  margin-bottom: .75rem;
}

.spa-chat-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.spa-chat-subtitle {
  display: block;
  font-size: .85rem;
  color: #64748b;
}

/* Zone messages */
.spa-chat-messages {
  height: 44vh;        /* zone fixe pour les messages */
  overflow-y: auto;
  padding-right: .25rem;
  margin-bottom: .75rem;
}


/* Messages */
.spa-chat-message {
  display: flex;
  margin-bottom: .5rem;
}

.spa-chat-message-bot {
  justify-content: flex-start;
}

.spa-chat-message-user {
  justify-content: flex-end;
}

.spa-chat-bubble {
  max-width: 80%;
  padding: .55rem .8rem;
  border-radius: 14px;
  font-size: .9rem;
  line-height: 1.4;
}

.spa-chat-message-bot .spa-chat-bubble {
  background: #eff6ff;
  border-bottom-left-radius: 4px;
}

.spa-chat-message-user .spa-chat-bubble {
  background: #0f172a;
  color: #f1f5f9;
  border-bottom-right-radius: 4px;
}

/* Input chat */
.spa-chat-input {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
}

#spa-chat-text {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  padding: .6rem .9rem;
  font-size: .9rem;
  background: #f8fafc;
  color: #0f172a;
}

#spa-chat-text::placeholder {
  color: #94a3b8;
}

/* 👉 Tu gardes ce bloc focus (inchangé) */
#spa-chat-text:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.3);
}

#spa-chat-send {
  flex: 0 0 auto;
  width: auto; /* override Elementor ou thème */
  border-radius: 999px;
  border: none;
  padding: .6rem 1.2rem;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .06em;

  /* Style identique à “SUJET D’ANNALE” */
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}

#spa-chat-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.45);
}


/* Zone corrigé */
.spa-corrige-zone {
  background: #f8fafc;
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
}

.spa-corrige-header {
  margin-bottom: .5rem;
}

.spa-corrige-badge {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
}

.spa-corrige-content {
  font-size: .9rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 900px) {
  .spa-assistant-annale-top {
    grid-template-columns: 1fr;
  }

  .spa-sujet-col,
  .spa-chat-col {
    max-height: 50vh;
  }
}
