/* Helyos : la bulle de l'accueil et sa fenêtre de questions. Cases en verre neutre ; le
   dégradé violet → cyan de l'IA seulement sur l'anneau de la bulle, le contour des
   questions proposées, le bouton d'envoi et la jauge d'autonomie. */
.hy-bulle, .hy-fen { --hy-ia: linear-gradient(120deg, #8f7cf0, #3fc6d9); --hy-conso: #b9a8ff; }
:root[data-mode="jour"] .hy-bulle, :root[data-mode="jour"] .hy-fen { --hy-ia: linear-gradient(120deg, #6a53dc, #1590a6); --hy-conso: #6a53dc; }

.hy-bulle { position: fixed; z-index: 40; right: max(18px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); width: 58px; height: 58px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--hy-ia) border-box;
  box-shadow: 0 10px 26px -8px rgb(143 124 240 / .6), 0 0 0 6px rgb(143 124 240 / .08); transition: transform .18s ease, opacity .18s ease; }
.hy-bulle[hidden], .hy-fen[hidden] { display: none; }
.hy-bulle img { width: 44px; height: auto; margin-top: 4px; pointer-events: none; }
.hy-bulle:hover { transform: translateY(-2px) scale(1.04); }
.hy-ouvert .hy-bulle { opacity: 0; pointer-events: none; transform: scale(.7); }
.hy-bulle:focus-visible, .hy-fen button:focus-visible, .hy-fen input:focus-visible { outline: 2px solid #3fc6d9; outline-offset: 2px; }

.hy-fen { position: fixed; z-index: 41; right: max(18px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 36px));
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; border-radius: 20px; border: 1px solid transparent; color: var(--ink);
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(140deg, rgb(143 124 240 / .7), rgb(63 198 217 / .35) 45%, var(--line-2) 75%) border-box;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .75); animation: hy-monte .2s ease; }
@keyframes hy-monte { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 560px) {
  .hy-fen { inset: auto 0 0 0; width: auto; height: min(88dvh, calc(100dvh - 40px)); border-radius: 22px 22px 0 0; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}

.hy-tete { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.hy-av { width: 38px; height: 38px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(140deg, rgb(143 124 240 / .22), rgb(63 198 217 / .14)); }
.hy-av img { width: 34px; height: auto; margin-top: 5px; }
.hy-tete div { flex: 1; min-width: 0; line-height: 1.25; }
.hy-tete strong { display: block; font-size: 16px; font-weight: 600; }
.hy-tete small { color: var(--muted); font-size: 12px; }
.hy-tete small i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #3fc6d9; vertical-align: 1px; }
.hy-fermer { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass); color: var(--ink); cursor: pointer; }
.hy-fermer svg, .hy-saisie button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.hy-fil { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; overscroll-behavior: contain; }
.hy-accueil { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 8px 6px 4px; }
.hy-accueil img { width: 109px; height: auto; filter: drop-shadow(0 12px 22px rgb(143 124 240 / .35)); }
.hy-accueil strong { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.hy-accueil p { margin: 0; color: var(--ink-2); font-size: 13.5px; max-width: 30ch; }
.hy-m { max-width: 88%; padding: 9px 13px; border-radius: 18px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.hy-m p { margin: 0; }
.hy-u { align-self: flex-end; background: var(--glass); border: 1px solid var(--line-2); border-bottom-right-radius: 6px; }
.hy-a { align-self: flex-start; width: 88%; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; display: grid; gap: 8px; }
.hy-a.hy-court { width: auto; }
.hy-gros { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hy-gros span { font-size: 15px; font-weight: 400; color: var(--ink-2); letter-spacing: 0; }
.hy-sous { color: var(--ink-2); font-size: 13px; }
.hy-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hy-liste li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13.5px; }
.hy-liste li i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.hy-liste small { display: block; color: var(--muted); font-size: 11.5px; }
.hy-liste b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hy-e-marche i, .hy-e-injecte i { background: var(--ok); }
.hy-e-soutire i { background: var(--bad); }
.hy-e-conso i { background: var(--hy-conso); }
.hy-e-batterie i { background: var(--s1); }
.hy-e-arret { color: var(--muted); }
.hy-jauge { height: 10px; border-radius: 6px; background: var(--glass); overflow: hidden; }
.hy-jauge i { display: block; height: 100%; border-radius: 6px; background: var(--hy-ia); }
.hy-jauge.hy-batterie i { background: linear-gradient(90deg, #3987e5, #7fe3f0); }
/* Barres jointives, 2 px d'écart, dégradé de la teinte de la série (clair en haut) ; le
   détail d'une barre au doigt et à la souris. */
.hy-barres { --c: var(--sun); }
.hy-barres.hy-s-conso { --c: var(--hy-conso); }
.hy-zone { display: flex; align-items: flex-end; gap: 2px; height: 62px; touch-action: none; cursor: crosshair; }
.hy-zone i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 45%, #fff), var(--c)); opacity: .9; }
.hy-zone i.hy-vide { background: var(--line); }
.hy-zone i.on { opacity: 1; box-shadow: 0 0 0 1px var(--ink); }
.hy-lg { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.hy-lg b { color: var(--ink); font-weight: 500; text-align: center; }
.hy-lien { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--glass); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.hy-lien::after { content: "›"; color: var(--muted); }
.hy-points { display: inline-flex; gap: 4px; padding: 4px 2px; }
.hy-points i { width: 6px; height: 6px; border-radius: 50%; background: #8f7cf0; animation: hy-pt 1s infinite ease-in-out; }
.hy-points i:nth-child(2) { animation-delay: .15s; background: #679fe5; } .hy-points i:nth-child(3) { animation-delay: .3s; background: #3fc6d9; }
@keyframes hy-pt { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.hy-puces { display: flex; gap: 6px; padding: 8px 14px 4px; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.hy-puces:empty { display: none; }
.hy-puces::-webkit-scrollbar { display: none; }
.hy-puces button { flex: none; padding: 7px 12px; border-radius: 99px; font: inherit; font-size: 13px; white-space: nowrap; color: var(--ink); cursor: pointer;
  border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, rgb(143 124 240 / .75), rgb(63 198 217 / .6)) border-box; }
.hy-puces button:hover { background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box, var(--hy-ia) border-box; }
.hy-saisie { display: flex; gap: 8px; padding: 8px 12px 12px; }
.hy-saisie input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--glass); color: var(--ink); font: inherit; font-size: 16px; }
.hy-saisie input::placeholder { color: var(--muted); }
.hy-saisie button { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--hy-ia); color: #fff; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .hy-fen, .hy-points i { animation: none; } .hy-bulle { transition: none; } }
