.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.segments { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: var(--radius-button); background: var(--grey-soft); margin-bottom: 18px; }
.segments__item { min-height: 44px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 17px; cursor: pointer; }
.segments__item.is-active { background: var(--accent); color: #fff; font-weight: 500; }

.ask-form textarea { resize: vertical; }

.recorder { display: grid; justify-items: center; gap: 8px; }
/* Zone du bouton : hauteur fixe (aucun décalage pendant l'animation) ; les ondes sont rognées par la zone. */
.recorder__stage { position: relative; display: grid; place-items: center; width: 100%; height: 136px; overflow: hidden; }

.recorder__button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(242, 96, 76, 0.35);
  cursor: pointer;
}

.recorder__button:disabled { opacity: 0.6; }
.recorder__stop { width: 28px; height: 28px; border-radius: 6px; background: #fff; }

.recorder__hint { font-size: 15px; text-align: center; }
.recorder.is-error .recorder__hint { color: #A02B19; font-weight: 600; }
.recorder__timer { font-size: 18px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Ondes concentriques : 3 anneaux de 1 à 2,2 fois le bouton, en boucle de 2,4 s, décalés de 0,8 s (transform + opacity seulement). */
.rings { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; pointer-events: none; }
.rings i {
  position: absolute; inset: 0; border: 2px solid var(--accent); border-radius: 50%; opacity: 0; pointer-events: none;
  will-change: transform, opacity;
  animation: ring 2.4s ease-out infinite;
  animation-delay: calc(var(--i) * 0.8s - 2.4s); /* négatif : les trois ondes sont déjà en route à l'affichage */
}
/* Enregistrement : plus rapide, plus ample avec le niveau sonore (--niveau, 0 à 1). */
.recorder.is-recording .rings i { animation-duration: 1.2s; animation-delay: calc(var(--i) * 0.4s - 1.2s); background: rgba(242, 96, 76, 0.12); }
@keyframes ring {
  0% { transform: scale(1); opacity: 0.45; }
  100% { transform: scale(calc(2.2 + var(--niveau, 0) * 0.6)); opacity: 0; }
}

.recorder__progress { position: absolute; left: 50%; top: 50%; z-index: 1; width: 100px; height: 100px; margin: -50px 0 0 -50px; transform: rotate(-90deg); pointer-events: none; opacity: 0; transition: opacity 0.2s; }
.recorder.is-recording .recorder__progress { opacity: 1; }
.recorder__progress circle { fill: none; stroke-width: 3; }
.recorder__progress-track { stroke: rgba(242, 96, 76, 0.2); }
.recorder__progress-bar { stroke: #C8341F; stroke-linecap: round; stroke-dasharray: 295.31; stroke-dashoffset: 295.31; }

/* Mouvement réduit : un seul anneau fixe et translucide, aucune pulsation. */
@media (prefers-reduced-motion: reduce) {
  .rings i { animation: none !important; will-change: auto; }
  .rings i:first-child { opacity: 0.25; transform: scale(1.5); }
  .recorder__progress { transition: none; }
}

.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; color: var(--muted); font-size: 15px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.divider__link { padding: 0; border: 0; background: none; color: inherit; text-decoration: underline; cursor: pointer; }

.section-title { font-size: 22px; margin: 24px 0 12px; }
.questions { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.question { display: grid; gap: 10px; justify-items: start; }
.question__top { display: flex; align-items: flex-start; gap: 10px; width: 100%; }
.question__mic { color: var(--accent); margin-top: 1px; }
.question__body { flex: 1; font-weight: 700; font-size: 17px; line-height: 1.3; }
.question__answer { color: var(--muted); }

.support__button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--accent); font-weight: 700; font-size: 18px; cursor: pointer; }
.support__button.is-done { color: var(--muted); cursor: default; }
.support form, .approval form { margin: 0; }

.link--button { padding: 0; border: 0; background: none; font-size: inherit; cursor: pointer; }

@media (min-width: 900px) {
  .ask-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 48px; align-items: start; }
  .ask-layout__form { position: sticky; top: calc(var(--nav-height) + 24px); padding: 24px; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow); }
  .ask-layout__list .section-title { margin-top: 0; font-size: 26px; }
  .question__body { font-size: 18px; }
  .segments__item { font-size: 18px; }
  .recorder__hint { font-size: 16px; }
}
