:root {
  /* Hauteur du badge « Hébergement en Europe » (site-footer__trust-item) */
  --mywie-btn-height: calc(1.5rem + 0.9rem + 2px);
}

.site-footer__trust-item {
  min-height: var(--mywie-btn-height);
  height: var(--mywie-btn-height);
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}

.btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--mywie-btn-height);
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-outline {
  background: hsl(var(--background));
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background: hsl(var(--muted) / 0.45);
}

.mywie-btn,
.btn-lg-primary,
.btn-lg-outline,
.site-footer__cta,
.ft-btn,
.ft-action-btn,
.ft-photo-btn,
.nav-auth-buttons a,
button:not(.unstyled):not(.account-avatar-trigger):not(.account-profile__photo-btn):not(.account-action-btn):not(.tree-info-form__btn):not(.family-tree-member):not(.family-tree-modal__close):not(.site-footer__store-badge):not(.footer-simple__badge--btn):not([data-carousel-dot]):not([data-carousel-prev]):not([data-carousel-next]):not([data-flipbook-period]):not([data-flipbook-prev]):not([data-flipbook-next]):not([data-flipbook-close]):not([data-ft-close]):not([aria-label="Fermer"]):not(.format-btn):not(.tone-btn):not(.persona-btn):not(.speak-voice-btn):not(.inspiration-cat-btn):not(.audio-voice-btn):not(.audio-chapter-btn),
input[type="submit"],
input[type="button"],
a.inline-flex.items-center.justify-center.rounded-lg:not(.account-action-btn):not(.account-quick-btn),
a.inline-flex.items-center.justify-center.rounded-md:not(.account-action-btn):not(.account-quick-btn),
a.inline-flex.items-center.justify-center.rounded-xl:not(.account-action-btn):not(.account-quick-btn) {
  box-sizing: border-box;
  min-height: var(--mywie-btn-height);
  height: var(--mywie-btn-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Cartes / pastilles multi-lignes (IA narrative, etc.) : pas de hauteur fixe */
button.format-btn,
button.tone-btn,
button.persona-btn,
button.speak-voice-btn,
button.inspiration-cat-btn,
button.audio-voice-btn,
button.audio-chapter-btn {
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  white-space: normal;
  align-items: stretch;
  justify-content: flex-start;
}

button.format-btn {
  display: flex;
  width: 100%;
  position: relative;
  overflow: visible;
}

#format-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  #format-selector {
    grid-template-columns: 1fr 1fr;
  }
}
