/* Barre d'action fixe · mobile uniquement */
#granges-barre-action {
  --barre-h: 64px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  height: var(--barre-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-sizing: content-box;
  display: none;
  align-items: stretch;
  background: rgba(10, 6, 6, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(220, 184, 102, 0.45);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.28s ease-out, opacity 0.28s ease-out;
  pointer-events: none;
}

#granges-barre-action.is-ready {
  display: flex;
}

#granges-barre-action.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#granges-barre-action .barre-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 100%;
  padding: 0 0.85rem;
  height: var(--barre-h);
  box-sizing: border-box;
}

#granges-barre-action .barre-primary,
#granges-barre-action .barre-secondary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
  -webkit-appearance: none;
  appearance: none;
}

#granges-barre-action .barre-primary {
  background: #8f6a24;
  border-color: #8f6a24;
  color: #f5f2e8;
}

#granges-barre-action .barre-primary:hover,
#granges-barre-action .barre-primary:focus-visible {
  background: #dcb866;
  border-color: #dcb866;
  color: #f5f2e8;
}

#granges-barre-action .barre-secondary {
  background: transparent;
  border-color: rgba(214, 208, 191, 0.35);
  color: #d6d0bf;
}

#granges-barre-action .barre-secondary:hover,
#granges-barre-action .barre-secondary:focus-visible {
  border-color: rgba(220, 184, 102, 0.55);
  color: #dcb866;
}

#granges-barre-action .barre-primary:focus-visible,
#granges-barre-action .barre-secondary:focus-visible {
  outline: 2px solid #dcb866;
  outline-offset: 2px;
}

@media (min-width: 721px) {
  #granges-barre-action {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  #granges-barre-action {
    transition: none;
  }
}

/* La bulle de discussion remonte au-dessus de la barre quand elle est visible. */
@media (max-width: 719px) {
  .barre-action-visible .granges-agent,
  .barre-action-visible .ga-fab { bottom: calc(64px + 0.75rem + env(safe-area-inset-bottom, 0px)) !important; transition: bottom 0.25s ease; }
}
