* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: #f6f1ea;
  font-family: "Segoe UI", sans-serif;
  color: #1c1c1c;
}
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 40px;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}
.chat {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(80, 30, 40, 0.12);
  min-height: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  padding: 16px 16px 8px;
}
.reduire {
  display: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #222;
  padding: 0;
  cursor: pointer;
}
html.embed .reduire { display: grid; place-items: center; }
html.embed .reduire svg { transition: transform .2s ease; }
html.embed .reduire:hover svg { transform: translateY(3px); }
.logo {
  height: 52px;
  width: auto;
  display: block;
}
.messages {
  flex: 1;
  overflow: auto;
  padding: 8px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  max-width: 100%;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 15px;
}
.bubble.user {
  align-self: flex-end;
  background: #7a1230;
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 10px 12px;
}
.bubble-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.bubble-images img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
}
.catalogue-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.catalogue-photos a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #ead7dc;
  border-radius: 12px;
  overflow: hidden;
}
.catalogue-photos img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: #f6f1ea;
}
.catalogue-photos span {
  padding: 6px 8px 0;
  font-size: 12px;
  line-height: 1.3;
}
.catalogue-photos .open-site {
  color: #7a1230;
  font-size: 11px;
  padding-bottom: 8px;
}
.fiche {
  border: 1px solid #ead7dc;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.fiche-head {
  background: #7a1230;
  color: #fff;
  padding: 12px 14px 10px;
}
.fiche-head p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.fiche-head h3 {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 650;
}
.fiche-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid #f3e6e9;
  font-size: 13px;
}
.fiche-row span { color: #7a6570; }
.fiche-row strong { font-weight: 600; }
.fiche-foot {
  margin: 0;
  padding: 10px 14px 12px;
  border-top: 1px solid #f3e6e9;
  color: #8a8a8a;
  font-size: 11px;
  line-height: 1.4;
}
.thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7a1230;
  font-size: 13px;
}
.search-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7a1230;
  animation: pulse 1s ease-in-out infinite;
}
.dots i {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 3px;
  border-radius: 50%;
  background: #7a1230;
  animation: pulse 1s ease-in-out infinite;
}
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse {
  0%, 100% { opacity: 0.25; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices button, form button {
  border: 1px solid #e4c9cf;
  background: #fff;
  color: #7a1230;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}
.choices button:hover, form button.send:hover { background: #fbecef; }
.note {
  color: #8a8a8a;
  font-size: 12px;
  text-align: center;
  padding: 0 18px 8px;
}
form {
  display: flex;
  padding: 8px 12px 14px;
}
.composer {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.entry {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachments:empty { display: none; }
.attachment {
  position: relative;
  width: 64px;
  height: 64px;
}
.attachment img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.attachment button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #7a1230;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  padding: 0;
}
textarea {
  width: 100%;
  min-height: 120px;
  max-height: 320px;
  border: 1px solid #ded8d2;
  background: #f7f7f8;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  resize: none;
  overflow: auto;
  white-space: pre-wrap;
}
form button.send,
form button.mic,
form button.attach {
  width: 42px;
  flex: 1;
  height: auto;
  min-height: 0;
  border-radius: 10px;
  background: #eee;
  color: #333;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
}
.actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
form button.mic.is-on {
  background: #7a1230;
  color: #fff;
}
.side {
  background: #fff;
  border-radius: 22px;
  padding: 18px 18px 8px;
  box-shadow: 0 12px 40px rgba(80, 30, 40, 0.08);
}
.side h2 { margin: 0 0 8px; font-size: 18px; }
.side p { color: #555; line-height: 1.45; }
.side ul { padding-left: 18px; }
.side li { margin: 6px 0; }
.ready { color: #7a1230; font-weight: 700; }
@media (max-width: 800px) {
  .page { grid-template-columns: 1fr; }
}
html.embed,
html.embed body {
  background: #fff;
  height: 100%;
}
html.embed .page {
  max-width: none;
  height: 100%;
  margin: 0;
  padding: 0;
  display: block;
}
html.embed .chat {
  height: 100%;
  min-height: 100%;
  border-radius: 0;
  box-shadow: none;
}
html.embed .side { display: none; }
html.embed textarea { min-height: 72px; }
