/* v/02 — Arthur vous parle */

/* ---------- Carte d'accueil : Arthur + conversation (remplace hero + chat) ---------- */
.aw {
  display: grid; grid-template-columns: 210px minmax(0, 1fr);
  border: 1px solid var(--ag-line); border-radius: 32px;
  background: #fff;
  box-shadow: var(--ag-shadow-md);
  overflow: hidden;
}
.aw__portrait {
  position: relative;
  background:
    radial-gradient(90% 70% at 50% 35%, #d9f4e5 0%, rgba(217,244,229,0) 70%),
    linear-gradient(180deg, #f3faf6, #e8f6ee);
  border-right: 1px solid #eef3f0;
  overflow: hidden;
}
.aw__portrait img {
  position: absolute; left: 50%; bottom: -70px; transform: translateX(-46%);
  height: 350px; width: auto; max-width: none;
  filter: drop-shadow(0 16px 24px rgba(15, 80, 50, .15));
}
.aw__status {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 4px 12px -6px rgba(0,0,0,.2);
}
.aw__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--ag-green); box-shadow: 0 0 0 3px rgba(31,174,106,.2); }

.aw__conv { padding: 22px 24px 20px 26px; min-width: 0; }
.aw__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.aw__eyebrow { font-size: 12px; font-weight: 500; color: var(--ag-green-ink); letter-spacing: .01em; }
.aw__title { margin-top: 2px; font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.aw__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.aw__leads {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 11px; border-radius: 999px;
  background: var(--ag-green-softer); color: var(--ag-green-ink);
  font-size: 13px; font-weight: 500;
}
.aw__leads svg { width: 15px; height: 15px; }
.aw__custom { height: 32px; font-size: 13px; padding: 0 11px; }

.aw__thread { margin-top: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.bub {
  max-width: 600px;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 6px;
  background: #f2f4f3;
  font-size: 14.5px; line-height: 21px; color: var(--ag-ink-2);
}
.bub:first-child { border-radius: 18px 18px 18px 6px; }
.bub b { font-weight: 600; color: var(--ag-ink); }
.aw__meta { margin: 2px 0 0 4px; font-size: 11.5px; color: var(--ag-faint); }

.aw__quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.aw__quick button {
  height: 30px; padding: 0 12px;
  border: 1px solid var(--ag-line-2); border-radius: 999px;
  background: #fff; font-size: 13px; color: var(--ag-ink-2);
  transition: background .15s, border-color .15s;
}
.aw__quick button:hover { background: var(--ag-green-softer); border-color: #cfeedd; }

.aw__field {
  margin-top: 12px;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 8px 0 16px;
  border: 1.5px solid #dfe7e2; border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(31,174,106,.06);
}
.aw__field input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 14px; background: transparent; }
.aw__field input::placeholder { color: #8a8a8a; }
.aw__mic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #8a8a8a; }
.aw__mic svg { width: 17px; height: 17px; }
.aw__send { height: 36px; }

/* ---------- En-tête de section ---------- */
.sh { margin: 40px 0 22px; align-items: flex-end; }
.sh__title { display: flex; align-items: center; gap: 12px; }
.sh__title p { margin-top: 2px; font-size: 13px; color: var(--ag-muted); }
.sh .ag-search { width: 250px; flex: none; }

/* ---------- Cartes « bulle de message » ---------- */
.says { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 18px; align-items: stretch; }
.say { display: flex; flex-direction: column; }
.say__bubble {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 18px 18px 16px;
  border: 1px solid var(--ag-line);
  border-radius: 24px 24px 24px 8px;
  background: #fff;
  position: relative;
  transition: box-shadow .2s, transform .2s;
}
/* petite queue vers l'avatar */
.say__bubble::after {
  content: ""; position: absolute; left: -1px; bottom: -9px;
  width: 16px; height: 10px;
  background: #fff;
  border-left: 1px solid var(--ag-line);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.say__bubble::before {               /* trait de la queue */
  content: ""; position: absolute; left: -1px; bottom: -9.5px;
  width: 17px; height: 10.5px;
  background: var(--ag-line);
  clip-path: polygon(0 0, 100% 0, 0 100%, 0 0, 1px 0, 1px calc(100% - 1.6px), calc(100% - 1.6px) 0);
}
.say:hover .say__bubble { box-shadow: var(--ag-shadow-lg); transform: translateY(-2px); }
.say__text { font-size: 16px; line-height: 23px; font-weight: 500; letter-spacing: -.012em; color: var(--ag-ink); text-wrap: pretty; }

.say__pv {
  margin-top: 14px; padding: 10px;
  border-radius: 14px; background: #f6f7f6;
  flex: 1;
}
.say__pvhead { white-space: nowrap; overflow: hidden; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--ag-faint); text-transform: none; }
.say__pvbody { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 17px; }

/* aperçus */
.pv-ini {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: #e2e6f0; color: #5a6275; font-size: 9.5px; font-weight: 600;
}
.pv-ini--me { background: #111; color: #fff; }
.pv-ini--o { width: 26px; height: 26px; background: #fde4d7; color: #b4532a; font-size: 10px; }
.pv-c { display: flex; gap: 6px; align-items: flex-start; }
.pv-c p { padding: 6px 9px; border-radius: 12px; background: #fff; color: var(--ag-ink-2); }
.pv-c b { display: block; font-size: 11px; font-weight: 600; color: var(--ag-ink); }
.pv-c--me { margin-left: 16px; }
.pv-dm { align-self: flex-end; max-width: 92%; padding: 8px 11px; border-radius: 16px 16px 4px 16px; color: #fff; }
.pv-dm--msg { background: linear-gradient(135deg, #0a7cff, #6a5cff); }
.pv-dm--wa { background: #d9fdd3; color: #13321f; border-radius: 12px 12px 4px 12px; }
.pv-dm--wa small { display: block; text-align: right; font-size: 10px; color: #53bdeb; margin-top: 2px; letter-spacing: -2px; }
.pv-var { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(255,255,255,.22); font-weight: 600; }
.pv-crm { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: #fff; }
.pv-crm b { display: block; font-size: 12.5px; white-space: nowrap; }
.pv-crm small { white-space: nowrap; }
.pv-crm small { display: block; font-size: 11px; color: var(--ag-muted); }
.pv-tag { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: #ffe9dc; color: #c2531c; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.pv-crm-notes { display: flex; flex-wrap: wrap; gap: 4px; }
.pv-crm-notes span { padding: 2px 7px; border-radius: 999px; background: #fff; font-size: 11px; color: var(--ag-ink-2); }
.pv-crm-notes span::before { content: "✓ "; color: var(--ag-green); }
.pv-ev { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: #fff; }
.pv-ev__bar { width: 3px; align-self: stretch; border-radius: 3px; background: #1a73e8; }
.pv-ev b { display: block; font-size: 12.5px; }
.pv-ev small { display: block; font-size: 11px; color: var(--ag-muted); }
.pv-ok { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: var(--ag-green-soft); color: var(--ag-green-ink); font-size: 10.5px; font-weight: 600; }
.pv-mail { padding: 8px 10px; border-radius: 10px; background: #fff; }
.pv-mail small { display: block; font-size: 10.5px; color: var(--ag-faint); }
.pv-mail b { display: block; margin-top: 2px; font-size: 12.5px; }
.pv-mail p { margin-top: 2px; color: var(--ag-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.say__actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.say__yes { height: 34px; font-size: 13px; padding: 0 14px; }
.say:hover .say__yes { background: var(--ag-green); }
.say__later { font-size: 13px; color: var(--ag-muted); }
.say__later:hover { color: var(--ag-ink); }

/* signature sous la bulle */
.say__sig { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-left: 2px; font-size: 12.5px; }
.say__sig b { font-weight: 600; }
.say__via { display: inline-flex; align-items: center; gap: 4px; color: var(--ag-faint); }
.say__via svg { width: 11px; height: 11px; fill: none; stroke: #c2c2c2; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.say__time { margin-left: auto; font-size: 11.5px; color: var(--ag-faint); white-space: nowrap; }

.smore { display: flex; justify-content: center; margin-top: 30px; }
.smore .ag-btn { height: 34px; padding-left: 7px; }

@media (max-width: 1340px) {
  .aw { grid-template-columns: 176px minmax(0, 1fr); }
  .aw__title { font-size: 17px; }
  .say__time { display: none; }
  .aw__quick button:nth-child(3) { display: none; }
  .aw__portrait img { height: 320px; }
}
.pv-crm > div { min-width: 0; }
.pv-crm small, .pv-crm b { overflow: hidden; text-overflow: ellipsis; }
