.hp-leo {
  color: var(--color-white);
  background:
    radial-gradient(50% 60% at 85% 60%, rgb(8 127 131 / 0.35), transparent 70%),
    var(--color-black);
}

.hp-leo-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
}

/* Les trois moments où Leo intervient : une ligne chacun, sans icône */
.hp-leo-moments {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: rgb(255 254 251 / 0.72);
  font-size: 16px;
  line-height: 1.5;
}

.hp-leo-moments + .hp-btn {
  margin-top: 30px;
}

.hp-leo-moments strong {
  color: var(--color-white);
  font-weight: 700;
}

/* ---------- Chat démo ---------- */
.hp-chat {
  display: flex;
  flex-direction: column;
  border: 1px solid rgb(255 254 251 / 0.1);
  border-radius: var(--radius-xl);
  padding: 20px;
  background-color: rgb(255 254 251 / 0.04);
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.6);
  --reveal-delay: 120ms;
}

.hp-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgb(255 254 251 / 0.08);
}

.hp-chat-name {
  flex: 1;
  font-weight: 800;
}

.hp-chat-role {
  margin-left: 4px;
  color: rgb(255 254 251 / 0.5);
  font-weight: 600;
}

/* Le flux est plafonné en hauteur ; le JS le fait défiler vers le dernier
   message (scroll non manuel, comme le bloc 02 de la page Leo). */
.hp-chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 340px;
  overflow-y: hidden;
  padding: 18px 2px;
  scroll-behavior: smooth;
  mask-image: linear-gradient(180deg, transparent, #000 18px);
}

.hp-msg {
  max-width: 88%;
  border-radius: 16px;
  padding: 12px 15px;
  font-size: 14.5px;
  line-height: 1.55;
  animation: hp-msg-in 0.45s var(--ease-out) both;
}

.hp-msg--leo {
  align-self: flex-start;
  border: 1px solid rgb(98 231 235 / 0.16);
  border-top-left-radius: 4px;
  background-color: rgb(98 231 235 / 0.08);
}

.hp-msg--you {
  align-self: flex-end;
  border-top-right-radius: 4px;
  color: var(--color-black);
  background-color: var(--color-white);
  font-weight: 600;
}

.hp-msg-who {
  display: block;
  margin-bottom: 4px;
  color: var(--color-cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hp-msg-val {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgb(98 231 235 / 0.14);
  color: var(--color-lime);
  font-size: 12px;
  font-weight: 700;
  animation: hp-msg-in 0.4s var(--ease-out) both;
}

.hp-msg-val::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2e62f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Points de saisie */
.hp-typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}

.hp-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-cyan);
  animation: hp-dot 1.1s ease-in-out infinite;
}

.hp-typing i:nth-child(2) { animation-delay: 0.15s; }
.hp-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes hp-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@keyframes hp-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.hp-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgb(255 254 251 / 0.08);
  transition: opacity 0.3s ease;
}

.hp-chat-chips.is-busy {
  opacity: 0.35;
  pointer-events: none;
}

.hp-chip {
  border: 1px solid rgb(98 231 235 / 0.4);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  color: var(--color-cyan);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.hp-chip:hover {
  border-color: var(--color-cyan);
  background-color: rgb(98 231 235 / 0.1);
}

.hp-chip:active {
  transform: scale(0.97);
}

.hp-chip.is-used {
  border-color: rgb(255 254 251 / 0.14);
  color: rgb(255 254 251 / 0.5);
}

.hp-beta--dark {
  margin-left: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hp-msg,
  .hp-msg-val {
    animation: none;
  }
}

@media (max-width: 991px) {
  .hp-leo-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
}

@media (max-width: 640px) {
  .hp-chat {
    padding: 14px;
    border-radius: var(--radius-lg);
  }

  .hp-chat-log {
    height: 380px;
  }

  .hp-msg {
    max-width: 94%;
    font-size: 14px;
  }
}
