/* Widget d'assistance (bulle de chat) + popup newsletter — Atelier Aura */
.aa-help-fab {
  position: fixed;
  z-index: 15;
  right: 20px;
  bottom: 20px;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  color: var(--paper);
  background: var(--coral);
  box-shadow: 0 8px 22px rgba(217, 111, 88, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: aa-help-invite 2.2s ease-in-out 1s 2;
}
.aa-help-fab:hover,
.aa-help-fab:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(217, 111, 88, 0.5);
  outline: none;
}
.aa-help-fab svg {
  width: 24px;
  height: 24px;
}
.aa-help-fab .aa-help-fab-close {
  display: none;
}
.aa-help-fab[aria-expanded="true"] .aa-help-fab-open {
  display: none;
}
.aa-help-fab[aria-expanded="true"] .aa-help-fab-close {
  display: block;
}
@keyframes aa-help-invite {
  0%, 100% { box-shadow: 0 8px 22px rgba(217, 111, 88, 0.4); }
  50% { box-shadow: 0 8px 28px rgba(217, 111, 88, 0.7); }
}
body.reading-contrast .back-to-top,
.back-to-top {
  bottom: 86px;
}

.aa-help-panel {
  position: fixed;
  z-index: 16;
  right: 20px;
  bottom: 88px;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 20px 50px rgba(32, 34, 30, 0.22);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.aa-help-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.aa-help-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  color: var(--paper);
  background: var(--ink);
}
.aa-help-header .brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.aa-help-header-title {
  flex: 1;
  min-width: 0;
}
.aa-help-header-title strong {
  display: block;
  font: 600 14px var(--sans);
}
.aa-help-header-title span {
  display: block;
  color: rgba(247, 244, 239, 0.7);
  font: 11px var(--mono);
}
.aa-help-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  color: var(--paper);
  background: transparent;
  font-size: 18px;
  line-height: 1;
}
.aa-help-close:hover,
.aa-help-close:focus-visible {
  background: rgba(247, 244, 239, 0.14);
  outline: none;
}
.aa-help-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.aa-help-pane[hidden] {
  display: none;
}
.aa-help-welcome h3 {
  margin: 0 0 4px;
  font: 22px/1.2 var(--serif);
}
.aa-help-welcome p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}
.aa-help-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}
.aa-help-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font: 12px var(--mono);
}
.aa-help-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  animation: aa-help-pulse 1.6s ease-in-out infinite;
}
@keyframes aa-help-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 111, 88, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(217, 111, 88, 0); }
}
.aa-help-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 6px;
  color: var(--paper);
  background: var(--coral);
  font: 700 13px var(--sans);
  transition: transform 0.2s ease;
}
.aa-help-cta:hover,
.aa-help-cta:focus-visible {
  transform: translateY(-1px);
  outline: none;
}
.aa-help-social {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.aa-help-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.aa-help-social a:hover,
.aa-help-social a:focus-visible {
  border-color: var(--coral);
  color: var(--coral);
  outline: none;
}
.aa-help-social svg {
  width: 16px;
  height: 16px;
}
.aa-help-row {
  display: block;
  width: 100%;
  padding: 14px 4px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}
.aa-help-row strong {
  display: block;
  font: 600 14px var(--sans);
}
.aa-help-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.aa-help-row:hover strong,
.aa-help-row:focus-visible strong {
  color: var(--coral);
  outline: none;
}
.aa-help-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 12px var(--mono);
}
.aa-help-back:hover,
.aa-help-back:focus-visible {
  color: var(--coral);
  outline: none;
}
.aa-help-pane h3 {
  margin: 0 0 6px;
  font: 20px var(--serif);
}
.aa-help-pane > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}
.aa-help-form label {
  display: block;
  margin-bottom: 12px;
  font: 11px var(--mono);
}
.aa-help-form input,
.aa-help-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  resize: vertical;
}
.aa-help-form input:focus,
.aa-help-form textarea:focus {
  border-color: var(--coral);
}
.aa-help-form button[type="submit"] {
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px;
  border: 0;
  border-radius: 6px;
  color: var(--paper);
  background: var(--ink);
  font: 700 13px var(--sans);
}
.aa-help-form button[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.aa-help-feedback {
  margin-top: 12px;
  font-size: 12px;
}
.aa-help-feedback[data-state="ok"] {
  color: #3f6b4a;
}
.aa-help-feedback[data-state="error"] {
  color: var(--coral);
}
.aa-help-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
}
.aa-help-search svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.aa-help-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}
.aa-help-faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.aa-help-faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.aa-help-faq-item summary {
  cursor: pointer;
  font: 600 13px var(--sans);
  list-style: none;
}
.aa-help-faq-item summary::-webkit-details-marker {
  display: none;
}
.aa-help-faq-item summary::after {
  content: "+";
  float: right;
  color: var(--coral);
}
.aa-help-faq-item[open] summary::after {
  content: "–";
}
.aa-help-faq-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}
.aa-help-empty {
  color: var(--muted);
  font-size: 13px;
}
.aa-help-more {
  display: inline-block;
  margin-top: 14px;
  color: var(--coral);
  font: 700 12px var(--mono);
  text-decoration: underline;
}
.aa-help-tabs {
  display: flex;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.aa-help-tabs button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 10px var(--sans);
}
.aa-help-tabs button svg {
  width: 18px;
  height: 18px;
}
.aa-help-tabs button[aria-selected="true"] {
  color: var(--coral);
}
@media (max-width: 480px) {
  .aa-help-panel {
    right: 12px;
    left: 12px;
    bottom: 84px;
    width: auto;
  }
  .aa-help-fab {
    right: 14px;
    bottom: 14px;
  }
}

/* Popup newsletter */
.aa-newsletter-popup {
  position: fixed;
  z-index: 17;
  left: 20px;
  bottom: 20px;
  width: min(320px, calc(100vw - 40px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 20px 50px rgba(32, 34, 30, 0.22);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.aa-newsletter-popup.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.aa-newsletter-popup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.aa-newsletter-popup h3 {
  margin: 6px 0 4px;
  font: 20px var(--serif);
}
.aa-newsletter-popup p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12.5px;
}
.aa-newsletter-popup-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
.aa-newsletter-popup-close:hover,
.aa-newsletter-popup-close:focus-visible {
  color: var(--coral);
  outline: none;
}
.aa-newsletter-popup .email-field {
  border-bottom-color: var(--ink);
}
.aa-newsletter-popup .email-field input {
  color: var(--ink);
}
.aa-newsletter-popup .email-field input::placeholder {
  color: var(--muted);
}
.aa-newsletter-popup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.aa-newsletter-popup-later {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 12px var(--sans);
  text-decoration: underline;
}
.aa-newsletter-popup-submit {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  color: var(--paper);
  background: var(--coral);
  font: 700 12px var(--sans);
}
.aa-newsletter-popup-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
@media (max-width: 480px) {
  .aa-newsletter-popup {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .aa-help-fab,
  .aa-help-status .dot {
    animation: none;
  }
}
