/* =============================================================
   BizOS V2 — section #bizos-v2.
   Tout est scopé sous #bizos-v2 : aucune règle globale, aucune
   police chargée (on hérite du système), aucun asset externe.
   ============================================================= */

#bizos-v2 {
  --bv2-blue: #2267f5;
  --bv2-ink-blue: #1a58dc;
  --bv2-ink: rgba(11, 18, 32, .92);
  --bv2-muted: #687581;
  --bv2-line: rgba(11, 18, 32, .09);
  --bv2-line-soft: rgba(11, 18, 32, .055);
  --bv2-rail: #f6f6f7;
  --bv2-bubble: #f0f0f2;
  --bv2-ease: cubic-bezier(.2, .7, .2, 1);

  box-sizing: border-box;
  max-width: 1188px;
  margin-inline: auto;
  padding: 80px 28px;
  color: var(--bv2-ink);
  font-family: inherit;
}
#bizos-v2 *,
#bizos-v2 *::before,
#bizos-v2 *::after { box-sizing: border-box; }

#bizos-v2 .bv2-inner {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  align-items: center;
  gap: 48px;
}

/* ---------- Colonne texte ---------- */
#bizos-v2 .bv2-title {
  margin: 0;
  font-size: clamp(2.4rem, 3.8vw, 3.65rem);
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 600;
}
#bizos-v2 .bv2-title-accent { color: var(--blue, #246daf); }

#bizos-v2 .bv2-pitch {
  margin: 24px 0 0;
  max-width: 30em;
  color: var(--bv2-muted);
  font-size: 16px;
  line-height: 1.7;
}

#bizos-v2 .bv2-benefits {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
  max-width: 32em;
}
#bizos-v2 .bv2-benefit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
#bizos-v2 .bv2-benefit-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(34, 103, 245, .09);
  color: var(--bv2-ink-blue);
}
#bizos-v2 .bv2-benefit-icon svg { width: 17px; height: 17px; display: block; }
#bizos-v2 .bv2-benefit-text {
  color: var(--bv2-muted);
  font-size: 14.5px;
  line-height: 1.55;
  padding-top: 2px;
}
#bizos-v2 .bv2-benefit-text strong {
  display: block;
  color: var(--bv2-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.012em;
  margin-bottom: 2px;
}

/* ---------- Fenêtre façon app Mac ---------- */
#bizos-v2 .bv2-demo { min-width: 0; }
#bizos-v2 .bv2-window {
  overflow: hidden;
  border: 1px solid var(--bv2-line);
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(11, 18, 32, .04),
    0 10px 26px -12px rgba(11, 18, 32, .16),
    0 34px 62px -30px rgba(11, 18, 32, .22);
}

#bizos-v2 .bv2-chrome {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--bv2-line-soft);
  background: #fbfbfc;
}
#bizos-v2 .bv2-dots { display: flex; gap: 6px; }
#bizos-v2 .bv2-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(11, 18, 32, .13);
}
#bizos-v2 .bv2-chrome-title {
  position: absolute;
  inset-inline: 0;
  padding-inline: 62px;
  text-align: center;
  color: var(--bv2-muted);
  font-size: 11.5px;
  letter-spacing: .004em;
  pointer-events: none;
}

#bizos-v2 .bv2-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
}

/* ---------- Rail des agents ---------- */
#bizos-v2 .bv2-agents {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-right: 1px solid var(--bv2-line-soft);
  background: var(--bv2-rail);
}
#bizos-v2 .bv2-agent {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--bv2-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.01em;
  text-align: left;
  cursor: pointer;
  transition: background .22s var(--bv2-ease), box-shadow .22s var(--bv2-ease), transform .22s var(--bv2-ease);
}
#bizos-v2 .bv2-agent:hover { background: rgba(11, 18, 32, .045); }
#bizos-v2 .bv2-agent:active { transform: scale(.978); }
#bizos-v2 .bv2-agent[aria-pressed="true"] {
  background: #fff;
  box-shadow: 0 1px 1px rgba(11, 18, 32, .05), 0 0 0 1px rgba(11, 18, 32, .06);
}
#bizos-v2 .bv2-agent-id { display: block; min-width: 0; }
#bizos-v2 .bv2-agent-name { display: block; line-height: 16px; }
#bizos-v2 .bv2-agent-role {
  display: block;
  color: var(--bv2-muted);
  font-size: 10.5px;
  line-height: 14px;
  font-weight: 400;
  letter-spacing: .002em;
}
#bizos-v2 .bv2-agent:focus-visible,
#bizos-v2 .bv2-panel:focus-visible {
  outline: 2px solid var(--bv2-blue);
  outline-offset: 1px;
}

/* Trois teintes distinctes, comme sur la page principale. */
#bizos-v2 .bv2-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dbe6fd;
  color: #1a4fd0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .005em;
  box-shadow: inset 0 0 0 1px rgba(11, 18, 32, .045);
}
#bizos-v2 .bv2-avatar-lg { width: 32px; height: 32px; font-size: 13.5px; }
#bizos-v2 [data-bv2-agent="sam"] .bv2-avatar,
#bizos-v2 .bv2-window[data-agent="sam"] .bv2-avatar-lg { background: #d3e8ef; color: #0a6379; }
#bizos-v2 [data-bv2-agent="maya"] .bv2-avatar,
#bizos-v2 .bv2-window[data-agent="maya"] .bv2-avatar-lg { background: #cfe6cf; color: #05650a; }

/* ---------- Conversation ---------- */
#bizos-v2 .bv2-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 300px;
}
#bizos-v2 .bv2-conv-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  height: 52px;
  padding: 0 16px;
  border-bottom: 1px solid var(--bv2-line-soft);
}
#bizos-v2 .bv2-conv-id { min-width: 0; }
#bizos-v2 .bv2-conv-name {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 17px;
  letter-spacing: -.012em;
}
#bizos-v2 .bv2-conv-sub {
  display: block;
  color: var(--bv2-muted);
  font-size: 10.5px;
  line-height: 13px;
  letter-spacing: .01em;
}

#bizos-v2 .bv2-messages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 18px 18px;
}
#bizos-v2 .bv2-msg {
  max-width: 88%;
  margin: 0;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: -.008em;
}
#bizos-v2 .bv2-msg-out {
  align-self: flex-end;
  border-bottom-right-radius: 7px;
  background: var(--bv2-blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(34, 103, 245, .22);
}
#bizos-v2 .bv2-msg-in {
  align-self: flex-start;
  border-bottom-left-radius: 7px;
  background: var(--bv2-bubble);
  color: var(--bv2-ink);
}

/* Carte fichier : un livrable proposé, pas un statut d'exécution. */
#bizos-v2 .bv2-file {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 88%;
  margin-top: 2px;
  padding: 9px 12px;
  border: 1px solid var(--bv2-line);
  border-radius: 12px;
  background: #fff;
}
#bizos-v2 .bv2-file-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(34, 103, 245, .08);
  color: var(--bv2-ink-blue);
}
#bizos-v2 .bv2-file-icon svg { width: 16px; height: 16px; display: block; }
#bizos-v2 .bv2-file-text { min-width: 0; }
#bizos-v2 .bv2-file-text strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.008em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#bizos-v2 .bv2-file-text small {
  display: block;
  color: var(--bv2-muted);
  font-size: 11px;
  line-height: 15px;
}

#bizos-v2 .bv2-note {
  margin: 16px 0 0;
  color: var(--bv2-muted);
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: .006em;
  text-align: center;
}

/* ---------- Entrée très discrète au changement d'agent ---------- */
#bizos-v2 .bv2-panel.is-entering .bv2-conv-head,
#bizos-v2 .bv2-panel.is-entering .bv2-msg,
#bizos-v2 .bv2-panel.is-entering .bv2-file {
  animation: bv2-in .34s var(--bv2-ease) both;
}
#bizos-v2 .bv2-panel.is-entering .bv2-messages > *:nth-child(1) { animation-delay: .04s; }
#bizos-v2 .bv2-panel.is-entering .bv2-messages > *:nth-child(2) { animation-delay: .09s; }
#bizos-v2 .bv2-panel.is-entering .bv2-messages > *:nth-child(3) { animation-delay: .14s; }
@keyframes bv2-in {
  from { opacity: 0; transform: translate3d(0, 5px, 0); }
  to { opacity: 1; transform: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  #bizos-v2 .bv2-inner { grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: start; }
  #bizos-v2 .bv2-title { font-size: clamp(2.05rem, 8.4vw, 3.5rem); }
  #bizos-v2 .bv2-pitch { font-size: 15px; margin-top: 20px; }
  #bizos-v2 .bv2-benefits { margin-top: 28px; gap: 16px; }

  #bizos-v2 .bv2-body { grid-template-columns: minmax(0, 1fr); }
  #bizos-v2 .bv2-agents {
    flex-direction: row;
    padding: 6px;
    border-right: 0;
    border-bottom: 1px solid var(--bv2-line-soft);
  }
  #bizos-v2 .bv2-agent {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    gap: 7px;
    padding: 7px 6px;
  }
  #bizos-v2 .bv2-agent .bv2-avatar { width: 24px; height: 24px; font-size: 11.5px; }
  #bizos-v2 .bv2-agent-name {
    font-size: 12.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #bizos-v2 .bv2-agent-role { display: none; }
  #bizos-v2 .bv2-panel { min-height: 0; }
  #bizos-v2 .bv2-messages { padding: 16px 14px; }
  #bizos-v2 .bv2-msg,
  #bizos-v2 .bv2-file { max-width: 94%; }
}

@media (max-width: 400px) {
  #bizos-v2 .bv2-chrome-title { padding-inline: 56px; font-size: 11px; }
  #bizos-v2 .bv2-agent { gap: 6px; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  #bizos-v2 .bv2-panel.is-entering .bv2-conv-head,
  #bizos-v2 .bv2-panel.is-entering .bv2-msg,
  #bizos-v2 .bv2-panel.is-entering .bv2-file { animation: none; }
  #bizos-v2 .bv2-agent { transition: none; transform: none !important; }
}
