/* Closing section: the private conversation with Accueil, built from the app's message and action-block components. */
.jw-closing {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4rem; align-items: start;
  margin-top: 4.5rem; padding-top: 3.5rem; border-top: 1px solid var(--filet);
}
.jw-closing-copy h2 { font-size: 2.75rem; line-height: 1.05; letter-spacing: -0.035em; font-weight: 650; margin: 0 0 1rem; }
.jw-closing-copy .jw-post-lede { max-width: 28rem; }
.jw-points { display: grid; gap: 0.625rem; margin-top: 1.75rem; font-size: 1rem; color: var(--texte-doux); }
.jw-points li { position: relative; padding-left: 1.75rem; }
.jw-points li::before {
  content: ""; position: absolute; left: 0.25rem; top: 0.3125rem; width: 0.4375rem; height: 0.75rem;
  border-right: 2px solid var(--vert); border-bottom: 2px solid var(--vert); transform: rotate(40deg);
}
.jw-closing-main { min-width: 0; }

.jw-chat {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; background: var(--surface);
  border: 1px solid var(--filet); border-radius: var(--rayon-xl); overflow: hidden;
  box-shadow: 0 30px 70px -30px oklch(0 0 0 / 0.24); font-size: 0.9375rem; line-height: 1.55;
}
.jw-chat-head {
  display: flex; align-items: center; gap: 0.625rem; padding: 0.75rem 1.25rem;
  background: var(--page); border-bottom: 1px solid var(--filet);
}
.jw-chat-head .jw-name { font-size: 1rem; }
.jw-tag {
  margin-left: 0.25rem; padding: 0 0.4375rem; border: 1px solid var(--filet); border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; color: var(--gris-texte);
}
.jw-chat-thread {
  position: relative; display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem;
  min-height: 12rem; max-height: 31rem; overflow-y: auto; overscroll-behavior: contain;
}
.jw-chat-thread > :first-child { margin-top: auto; }
.jw-chat p { max-width: none; }
.jw-chat-thread .jw-message { grid-template-columns: 2.125rem minmax(0, 1fr); }
.jw-chat-thread .jw-message > div { display: grid; gap: 0.25rem; justify-items: start; min-width: 0; }
.jw-bubble-row { align-self: flex-end; max-width: 82%; }
.jw-bubble {
  margin: 0; padding: 0.5rem 0.875rem; background: var(--bleu-soft); color: var(--encre);
  border-radius: 0.875rem 0.875rem 0.25rem 0.875rem; overflow-wrap: anywhere;
}
.jw-typing { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--agent-accueil); }
.jw-dots { display: inline-flex; gap: 0.25rem; }
.jw-dots i { width: 0.3125rem; height: 0.3125rem; border-radius: 50%; background: var(--agent-accueil); animation: jw-dot 1s ease-in-out infinite; }
.jw-dots i:nth-child(2) { animation-delay: 0.15s; }
.jw-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes jw-dot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-0.1875rem); } }
[data-streaming], .jw-typing { cursor: pointer; }
/* Holds the greeting's place (and the panel's size) until it is typed out. */
.jw-await { visibility: hidden; }

.jw-chat-choices { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.25rem 1.25rem 1.125rem; }
.jw-chip {
  min-height: 2.75rem; padding: 0.5rem 0.9375rem; background: var(--page); border: 1px solid var(--filet);
  border-radius: var(--rayon-xl); font-size: 0.9375rem; line-height: 1.35; text-align: left; cursor: pointer;
  transition: background-color 0.15s cubic-bezier(0.2, 0, 0, 1), border-color 0.15s cubic-bezier(0.2, 0, 0, 1);
}
.jw-chip:hover { background: var(--gris-doux); border-color: var(--gris-texte); }
.jw-chip--demo { font-weight: 600; color: var(--bleu); border-color: color-mix(in oklch, var(--bleu), white 55%); background: var(--bleu-soft); }
.jw-chip--demo:hover { background: color-mix(in oklch, var(--bleu-soft), var(--bleu) 8%); border-color: var(--bleu); }

.jw-chat-composer { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem 1.25rem; background: var(--page); border-top: 1px solid var(--filet); }
.jw-chat-input, .jw-recap-input {
  width: 100%; min-height: 2.75rem; padding: 0 0.75rem; font-size: 1rem; line-height: 1.4;
  background: var(--page); border: 1px solid var(--gris-texte); border-radius: var(--rayon-md);
}
.jw-chat-input { flex: 1 1 12rem; min-width: 0; width: auto; }
.jw-chat-input::placeholder, .jw-recap-input::placeholder { color: var(--gris-texte); opacity: 1; }
.jw-chat-input:focus-visible, .jw-recap-input:focus-visible { outline: 3px solid var(--bleu); outline-offset: 1px; }
.jw-chat-input[aria-invalid="true"], .jw-recap-input[aria-invalid="true"] { border-color: var(--rouge); }
.jw-chat-composer .jw-button { min-height: 2.75rem; padding: 0 1.125rem; font-size: 0.9375rem; }

/* Recap block: the app's pending action, here inside the agent's message. */
.jw-recap { width: 100%; max-width: 32.5rem; margin-top: 0.5rem; padding: 0.75rem 1rem 1rem; font-size: 0.9375rem; }
.jw-recap:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; }
.jw-recap .jw-action-title { font-size: 1.0625rem; }
.jw-recap dl { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.625rem 0.75rem; margin: 0.875rem 0 1rem; font-size: 0.9375rem; }
.jw-recap dt { padding-top: 0.0625rem; }
.jw-recap dd { min-width: 0; overflow-wrap: anywhere; }
.jw-recap dt[hidden], .jw-recap dd[hidden] { display: none; }
.jw-recap [data-view="tools"] { white-space: pre-wrap; }
.jw-recap textarea.jw-recap-input { min-height: 5.5rem; padding: 0.625rem 0.75rem; resize: vertical; }
.jw-recap .jw-field-hint, .jw-recap .jw-field-error { margin-top: 0.25rem; }
.jw-recap-status { min-height: 0; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--gris-texte); }
.jw-recap-status:empty { display: none; }
.jw-recap .jw-action-buttons .jw-button { min-height: 2.75rem; padding: 0 1.125rem; font-size: 0.9375rem; cursor: pointer; }
.jw-recap .jw-action-buttons .jw-button:hover { background: var(--gris-doux); }
.jw-recap .jw-action-buttons .jw-button--primary:hover { background: color-mix(in oklch, var(--bleu), black 12%); }
.jw-recap .jw-action-buttons .jw-button:disabled { cursor: not-allowed; }
.jw-recap .jw-action-buttons .jw-button--primary:disabled:hover { background: var(--bleu); }
.jw-recap.jw-action--validated { box-shadow: none; }

.jw-chat-rgpd { margin-top: 0.875rem; max-width: 36rem; font-size: 0.8125rem; line-height: 1.5; color: var(--gris-texte); }
.jw-closing-main > .jw-link-button { display: inline-flex; align-items: center; margin-top: 0.5rem; }

/* No-script and fallback: the questions and answers as plain thread messages. */
.jw-qa-list { display: grid; gap: 1.25rem; max-width: 40rem; }
.jw-qa-q { display: flex; align-items: center; gap: 0.75rem; font-size: 1.0625rem; font-weight: 500; }
.jw-qa-q .jw-avatar { flex: 0 0 auto; width: 2rem; height: 2rem; font-size: 0.75rem; }
.jw-qa .jw-answer { margin: 0.625rem 0 0; }

.jw-classic { margin-top: 1.5rem; }
.jw-classic[hidden] { display: none; }
.jw-qa-list + .jw-classic { margin-top: 2.5rem; }
.jw-classic-title { font-size: 1.25rem; font-weight: 600; }
.jw-classic-lede { margin-top: 0.25rem; color: var(--texte-doux); }
.jw-classic .jw-demo-form { margin-top: 1rem; }

@media (max-width: 1100px) {
  .jw-closing { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; margin-top: 3.5rem; padding-top: 2.5rem; }
  .jw-closing-copy h2 { font-size: 2.375rem; }
}
@media (max-width: 640px) {
  .jw-closing-copy h2 { font-size: 1.75rem; }
  .jw-chat-thread { padding: 1rem; max-height: 28rem; }
  .jw-chat-choices, .jw-chat-composer { padding-inline: 1rem; }
  .jw-bubble-row { max-width: 90%; }
  .jw-recap { justify-self: stretch; min-width: 0; }
  .jw-recap .jw-action-head { flex-wrap: wrap; }
  .jw-recap dl { grid-template-columns: minmax(0, 1fr); gap: 0.125rem; }
  .jw-recap dd { margin-bottom: 0.5rem; }
  .jw-recap .jw-recap-input { min-width: 0; }
}
