/* PrestaIA — visite guidée animée (js/prestaia-guide.js) */

.pg-launch {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px 0 6px; border-radius: 999px;
  border: 1px solid rgba(20, 212, 168, .45);
  background: linear-gradient(180deg, rgba(43, 249, 201, .16), rgba(20, 212, 168, .08));
  color: #0e9f85; font: 600 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .15s;
}
.pg-launch:hover { background: rgba(43, 249, 201, .22); box-shadow: 0 4px 14px rgba(20, 212, 168, .25); transform: translateY(-1px); }
.pg-launch__ico { display: inline-flex; }
.pg-launch__ico svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 3px rgba(13, 148, 136, .35)); }
html[data-theme="dark"] .pg-launch { color: #2BF9C9; }
.pg-launch--float { position: fixed; right: 18px; bottom: 18px; z-index: 90; background: #fff; box-shadow: 0 8px 24px rgba(0, 16, 33, .2); }
html[data-theme="dark"] .pg-launch--float { background: #122033; }
@media (max-width: 760px) { .pg-launch__lbl { display: none; } .pg-launch { padding: 0 5px; } }

.pg-root { display: none; }
.pg-root.is-on { display: block; }

.pg-block { position: fixed; inset: 0; z-index: 2147483000; cursor: default; }

.pg-spot {
  position: fixed; z-index: 2147483001; pointer-events: none; border-radius: 12px;
  box-shadow: 0 0 0 200vmax rgba(0, 16, 33, .55), 0 0 0 3px #2BF9C9, 0 0 24px 4px rgba(43, 249, 201, .45);
  transition: left .45s cubic-bezier(.4, 0, .2, 1), top .45s cubic-bezier(.4, 0, .2, 1), width .45s cubic-bezier(.4, 0, .2, 1), height .45s cubic-bezier(.4, 0, .2, 1);
}
.pg-root.is-free .pg-spot { box-shadow: 0 0 0 200vmax rgba(0, 16, 33, .55); }

.pg-cursor {
  position: fixed; left: 0; top: 0; z-index: 2147483003; pointer-events: none;
  margin: -3px 0 0 -5px; transition-property: transform; transition-timing-function: cubic-bezier(.45, .05, .25, 1);
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .35));
}
.pg-cursor svg { display: block; position: relative; z-index: 1; }
.pg-ripple {
  position: absolute; left: 5px; top: 3px; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; border: 3px solid #2BF9C9; opacity: 0; transform: scale(.2);
}
.pg-cursor.is-click svg { animation: pg-press .26s ease; }
.pg-cursor.is-click .pg-ripple { animation: pg-ripple .55s ease-out; }
@keyframes pg-press { 50% { transform: scale(.8); } }
@keyframes pg-ripple { 0% { opacity: .9; transform: scale(.2); } 100% { opacity: 0; transform: scale(1.6); } }

.pg-bubble {
  position: fixed; z-index: 2147483002; width: min(380px, calc(100vw - 24px));
  background: #0e1c36; color: #e2e8f0; border-radius: 14px; border-top: 3px solid #2BF9C9;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45); padding: 12px 14px 12px;
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: left .45s cubic-bezier(.4, 0, .2, 1), top .45s cubic-bezier(.4, 0, .2, 1);
}
.pg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pg-avatar { display: inline-flex; flex: none; }
.pg-avatar svg { filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.pg-koala {
  width: 42px; height: 42px; border-radius: 50%; object-fit: contain; display: block;
  background: radial-gradient(circle at 50% 35%, #fff 0%, #e6fffb 72%, #ccfbf1 100%);
  box-shadow: 0 0 0 2px rgba(43, 249, 201, .55);
}
.pg-launch__ico .pg-koala { width: 28px; height: 28px; box-shadow: none; }
.pg-root.is-speaking .pg-koala { box-shadow: 0 0 0 2px #2BF9C9, 0 0 14px rgba(43, 249, 201, .7); }
.pg-root.is-typing .pg-avatar svg { animation: pg-bob .9s ease-in-out infinite; }
html.pg-active.pg-koda .koda-fab,
html.pg-active.pg-koda .koda-panel { visibility: hidden !important; }
@keyframes pg-bob { 50% { transform: translateY(-2px) rotate(-6deg); } }
.pg-head-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pg-title { font-size: 14px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-step { font: 10px/1.4 ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: #5eead4; }
.pg-icon {
  flex: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: rgba(255, 255, 255, .06); color: #cbd5e1; cursor: pointer; font-size: 20px; line-height: 1;
}
.pg-icon:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.pg-text { margin: 0 0 10px; min-height: 3em; font-size: 14.5px; color: #f1f5f9; }
.pg-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 1px; vertical-align: -.15em; background: #2BF9C9; animation: pg-blink 1s steps(1) infinite; }
.pg-root.is-typing .pg-caret { animation: none; }
@keyframes pg-blink { 50% { opacity: 0; } }
.pg-progress { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-bottom: 10px; }
.pg-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #14d4a8, #2BF9C9); transition: width .4s ease; }
.pg-foot { display: flex; gap: 6px; align-items: center; }
.pg-btn {
  height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .14);
  background: transparent; color: #cbd5e1; font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1; cursor: pointer; white-space: nowrap;
}
.pg-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: #fff; }
.pg-btn:disabled { opacity: .35; cursor: default; }
.pg-btn.is-on { border-color: #fbbf24; color: #fbbf24; }
.pg-btn--main { margin-left: auto; border: 0; background: linear-gradient(135deg, #19c9a3, #0d8f80); color: #fff; }
.pg-btn--main:hover:not(:disabled) { background: linear-gradient(135deg, #2BF9C9, #0e9f85); color: #001021; }
.pg-root.is-paused .pg-bubble { border-top-color: #fbbf24; }

@media (prefers-reduced-motion: reduce) {
  .pg-spot, .pg-bubble, .pg-cursor { transition-duration: 0s !important; }
}

/* Reprise après changement de page : un clic pour réactiver la voix */
.pg-root.is-gate .pg-prev, .pg-root.is-gate .pg-pause, .pg-root.is-gate .pg-speed { visibility: hidden; }
.pg-root.is-gate .pg-block { cursor: pointer; }
.pg-root.is-gate .pg-caret { display: none; }
.pg-root.is-gate .pg-next { animation: pg-pulse 1.4s ease-in-out infinite; }
@keyframes pg-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(43, 249, 201, .55); } 50% { box-shadow: 0 0 0 8px rgba(43, 249, 201, 0); } }

/* Les icônes de la bulle ne doivent pas hériter des styles de la brique */
.pg-bubble .pg-icon svg { display: block !important; width: 17px !important; height: 17px !important; flex: none; color: inherit; fill: none; }
.pg-bubble .pg-icon svg path[fill="currentColor"] { fill: currentColor; }
