/* Pilule de chat IA des heros (accueil, depannage, blog, articles, FAQ).
   Sortie de home/hero.css le 2026-11-13 : le hero compact l'affiche sur des pages qui ne chargent
   pas les feuilles de l'accueil (blog, articles, FAQ), elle y etait rendue sans aucun style.
   Chargee partout par includes/head.php ; les reglages propres a l'accueil (.home-hero--ask)
   restent dans home/hero.css. */

@property --hero-ask-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes hero-ask-tour { to { --hero-ask-angle: 360deg; } }

.home-hero__ask {
  flex-shrink: 0;
  width: 100%;
  margin-top: clamp(0.6rem, 1.8svh, 1.1rem);
}

.hero-ask {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 6px 8px 6px 18px;
  box-sizing: border-box;
  background: #f6f7fb;
  border: 1px solid rgba(8, 11, 20, 0.08);
  border-radius: 999px;
  box-shadow: 0 10px 34px rgba(8, 11, 20, 0.38), 0 2px 6px rgba(8, 11, 20, 0.18);
}

.hero-ask::before {
  content: "";
  position: absolute;
  inset: -3px;
  padding: 3px;
  border-radius: inherit;
  background: conic-gradient(from var(--hero-ask-angle),
    #ff8a5b 0deg, #ffb08a 30deg, #ec4899 85deg, #a855f7 140deg, #6366f1 190deg,
    #38bdf8 235deg, #6366f1 280deg, #ec4899 320deg, #ff8a5b 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  animation: hero-ask-tour 6s linear infinite;
}

/* Halo : meme anneau floute derriere la pilule (identique au lanceur flottant au scroll) */
.hero-ask::after {
  content: "";
  position: absolute;
  inset: -4px;
  padding: 6px;
  border-radius: inherit;
  background: conic-gradient(from var(--hero-ask-angle),
    #ff8a5b 0deg, #ec4899 90deg, #6366f1 190deg, #38bdf8 240deg, #a855f7 300deg, #ff8a5b 360deg);
  filter: blur(9px);
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
  animation: hero-ask-tour 6s linear infinite;
}

.hero-ask:focus-within {
  box-shadow: 0 10px 34px rgba(8, 11, 20, 0.38), 0 0 0 2px #d87043;
}

.hero-ask__spark {
  flex: none;
  color: #d87043;
}

.hero-ask__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
  font: inherit;
  font-size: 1rem;
  color: #080b14;
  background: transparent;
  border: 0;
  outline: 0;
  text-overflow: ellipsis;
}

.hero-ask__input::placeholder {
  color: #5b6480;
  opacity: 1;
}

.hero-ask__btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.hero-ask__btn:focus-visible {
  outline: 2px solid #ff8a5b;
  outline-offset: 3px;
}

.hero-ask__go {
  color: #fff;
  background: #b5552a;
}

.hero-ask__go:hover {
  background: #9a4622;
}

.hero-ask__sep {
  flex: none;
  width: 1px;
  height: 24px;
  background: rgba(8, 11, 20, 0.16);
}

.hero-ask__open {
  color: #3d4663;
  background: transparent;
}

.hero-ask__open:hover {
  color: #080b14;
  background: rgba(8, 11, 20, 0.08);
}

@media (prefers-reduced-motion: reduce) {
  .hero-ask::before { animation: none; background: #ff8a5b; }
  .hero-ask::after { display: none; }
}

.hero-compact__ask {
  margin-top: clamp(1rem, 2.5svh, 1.8rem);
  max-width: 640px;
}
