.voice-launch, .voice-action, .voice-close { font-family: var(--font-text, sans-serif); cursor: pointer; }
.voice-launch {
  position: fixed; z-index: 97; right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 60px);
  display: inline-flex; align-items: center; gap: .55rem; min-height: 46px;
  border: 1px solid #254453; border-radius: 30px; padding: .7rem 1.05rem;
  background: #0b1e2a; color: white; font-weight: 700; font-size: .86rem;
  box-shadow: 0 5px 20px #0b1e2a26;
}
.voice-wave { display: inline-flex; align-items: center; gap: 2px; height: 20px; }
.voice-wave i { width: 3px; height: 6px; border-radius: 3px; background: #51e0e9; }
.voice-wave i:nth-child(even) { height: 13px; }
.voice-wave i:nth-child(3) { height: 20px; }
.voice-panel {
  position: fixed; inset: auto max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) auto;
  margin: 0; width: min(390px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  overscroll-behavior: contain; padding: 1.5rem; border: 1px solid #d7e1e4;
  border-radius: 20px; color: #0b1e2a; background: white; box-shadow: 0 18px 70px #0b1e2a33;
  font: 1rem/1.45 var(--font-text, sans-serif);
}
.voice-panel:not([open]), .voice-panel [hidden] { display: none !important; }
.voice-panel::backdrop { background: #0b1e2a4d; }
.voice-head { display: flex; align-items: center; justify-content: space-between; color: #365869; font-size: .83rem; font-weight: 700; }
.voice-close { border: 0; border-radius: 50%; background: #eff4f5; color: #183343; font-size: 1.5rem; width: 40px; height: 40px; line-height: 1; }
.voice-panel h2 { margin: .9rem 0 .6rem; color: #0b1e2a; font: 700 1.85rem/1.1 var(--font-display, sans-serif); letter-spacing: -.03em; }
.voice-intro, .voice-status { margin: .65rem 0; }
.voice-status { color: #215769; font-weight: 650; }
.voice-status:empty { display: none; }
.voice-action { display: block; margin: 1.2rem 0 .8rem; width: 100%; border: 0; border-radius: 10px; padding: .86rem; color: white; background: #0b1e2a; font-size: 1rem; font-weight: 700; }
.voice-action:hover, .voice-launch:hover { background: #173b4e; }
.voice-action:disabled { opacity: .65; }
.voice-panel a { text-decoration: underline; text-underline-offset: .17em; }
.voice-note { color: #4e6068; font-size: .8rem; margin: .5rem 0 1rem; }
.voice-contact { font-size: .92rem; font-weight: 650; }
.voice-captions { padding: .8rem; border-radius: .6rem; background: #edf6f7; margin: .75rem 0; }
.voice-captions strong { font-size: .75rem; color: #325761; }
.voice-captions p { margin: .25rem 0 0; max-height: 5.8em; overflow: auto; overflow-wrap: anywhere; }
.voice-panel audio { width: 100%; }
body.nav-open .voice-launch, body.r-modal-open .voice-launch { visibility: hidden; }
@media (max-width: 560px) {
  .voice-launch { right: calc(max(12px, env(safe-area-inset-right)) + 60px); bottom: max(12px, env(safe-area-inset-bottom)); min-height: 48px; }
  .voice-panel { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media print { .voice-launch, .voice-panel { display: none !important; } }

.voice-panel { z-index: 10005; }
body:has(.voice-panel[open]) > .voice-launch { visibility: hidden; }
.voice-captions { display: grid; gap: .65rem; }
.voice-captions > div { min-width: 0; }
.voice-panel.is-live .voice-caller p:empty::before { content: "En écoute…"; color: #506573; }
.voice-agent:has(p:empty) { display: none; }
.voice-panel.is-live .voice-intro, .voice-panel.is-live .voice-note { display: none; }
.voice-view { position: fixed; inset: 0 auto auto 0; z-index: 10000; width: 100%;
  height: calc(100% - var(--voice-dock-height, 0px)); height: calc(100dvh - var(--voice-dock-height, 0px));
  border: 0; background: white; }
.voice-view[hidden] { display: none; }
body.voice-browsing { overflow: hidden; }
body.voice-browsing > :not(.voice-view, .voice-panel, .voice-launch) { visibility: hidden !important; }
body.voice-browsing > .voice-launch { z-index: 10002; }
.voice-panel.is-guiding[open] {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .4rem 1rem;
  inset: auto 0 0; width: 100%; max-width: none; max-height: 42vh; max-height: 42dvh; margin: 0;
  padding: .6rem max(1rem, env(safe-area-inset-right)) max(.6rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  border-radius: 0; border-width: 1px 0 0; box-shadow: 0 -4px 20px #0b1e2a12;
}
.voice-panel.is-guiding .voice-head { grid-area: 1 / 1 / 2 / 3; }
.voice-panel.is-guiding .voice-head span { font-size: .8rem; }
.voice-panel.is-guiding .voice-close { width: 36px; height: 36px; }
.voice-panel.is-guiding h2, .voice-panel.is-guiding .voice-intro,
.voice-panel.is-guiding .voice-note, .voice-panel.is-guiding .voice-contact { display: none; }
.voice-panel.is-guiding .voice-status { grid-column: 1 / -1; margin: 0; font-size: .8rem; }
.voice-panel.is-guiding .voice-captions { grid-column: 1; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0; padding: .35rem .65rem; gap: .8rem; }
.voice-panel.is-guiding .voice-captions p { font-size: .9rem; line-height: 1.25; max-height: 2.5em; }
.voice-panel.is-guiding .voice-action { width: auto; margin: 0; font-size: .85rem; }
@media (max-width: 600px) {
  .voice-panel.is-guiding[open] { gap: .25rem .5rem; }
  .voice-panel.is-guiding .voice-action { grid-area: 1 / 2; margin-right: 43px; padding: .55rem .65rem; }
  .voice-panel.is-guiding .voice-captions { grid-column: 1 / -1; }
  .voice-panel.is-guiding .voice-head span { max-width: 34%; }
}
