/* Module « Arc qui se balade » — styles autonomes.
   Couleurs : variables --arc-wander-* (sinon celles du site, sinon valeurs neutres). */
.arc-wander {
  position: fixed; top: 0; left: 0; z-index: 60; width: 56px; height: 56px;
  opacity: 0; pointer-events: none;
  transition: transform 1.2s cubic-bezier(.4, 0, .2, 1), opacity .3s ease;
}
.arc-wander.is-visible { opacity: 1; pointer-events: auto; }
.arc-wander[hidden] { display: none; }
.arc-wander__arc {
  display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
  background: var(--arc-wander-fond, var(--surface-strong, #fff)); color: var(--arc-wander-accent, var(--brass, #c19a5b));
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45), 0 0 0 2px var(--arc-wander-anneau, rgba(193, 154, 91, .45));
  cursor: pointer; transition: transform .2s ease;
}
.arc-wander__arc:hover { transform: translateY(-2px) scale(1.04); }
.arc-wander__arc:focus-visible { outline: 3px solid var(--arc-wander-accent, var(--brass, #c19a5b)); outline-offset: 3px; }
.arc-wander__arc .arc { width: 48px; height: 48px; }
.arc-wander__arc svg { display: block; width: 100%; height: 100%; }
/* Flottement léger sur place (désactivé avec « réduire les animations ») */
.arc-wander.is-visible .arc-wander__arc { animation: arc-wander-flotte 3.6s ease-in-out infinite; }
@keyframes arc-wander-flotte { 50% { translate: 0 -4px; } }

.arc-wander__masquer {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 1px solid var(--arc-wander-ligne, rgba(0, 0, 0, .15)); background: var(--arc-wander-fond, var(--surface-strong, #fff));
  color: var(--arc-wander-texte, var(--text, #222)); font: 700 14px/1 system-ui, sans-serif; cursor: pointer;
  opacity: 0; transition: opacity .2s ease;
}
.arc-wander:hover .arc-wander__masquer, .arc-wander:focus-within .arc-wander__masquer { opacity: 1; }
@media (hover: none) { .arc-wander__masquer { opacity: 1; } }
.arc-wander[data-cote="gauche"] .arc-wander__masquer { right: auto; left: -6px; }

.arc-wander__bulle {
  position: absolute; top: -4px; right: calc(100% + 8px); width: max-content; max-width: 230px; margin: 0;
  padding: 9px 13px; border-radius: 14px 14px 4px 14px;
  background: var(--arc-wander-bulle, var(--surface-strong, #fff)); color: var(--arc-wander-texte, var(--text, #222));
  border: 1px solid var(--arc-wander-ligne, rgba(193, 154, 91, .5)); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .5);
  font: 600 .88rem/1.35 var(--sans, system-ui, sans-serif);
  opacity: 0; transform: translateY(4px); transition: opacity .25s ease, transform .25s ease; pointer-events: none;
}
.arc-wander__bulle.is-visible { opacity: 1; transform: none; }
.arc-wander[data-cote="gauche"] .arc-wander__bulle { right: auto; left: calc(100% + 8px); border-radius: 14px 14px 14px 4px; }
@media (max-width: 767px) { .arc-wander__bulle { max-width: min(230px, calc(100vw - 104px)); font-size: .82rem; } }

@media (prefers-reduced-motion: reduce) {
  .arc-wander { transition: opacity .2s ease; }
  .arc-wander.is-visible .arc-wander__arc { animation: none; }
  .arc-wander__bulle { transform: none; transition: opacity .2s ease; }
}

/* Bulle au-dessus d'Arc (quand le côté est occupé) */
.arc-wander[data-bulle="dessus"] .arc-wander__bulle { top: auto; bottom: calc(100% + 8px); right: 0; border-radius: 14px 14px 4px 14px; }
.arc-wander[data-bulle="dessus"][data-cote="gauche"] .arc-wander__bulle { right: auto; left: 0; border-radius: 14px 14px 14px 4px; }

/* En bas (mobile, « réduire les animations ») : la bulle prend la place du libellé
   de la bulle de l'assistant, dans le même cadre — elle ne recouvre rien d'autre. */
.arc-wander-lanceur { position: relative; }
.arc-wander__mini {
  position: absolute; bottom: 0; display: flex; align-items: center; overflow: hidden;
  background: inherit; color: inherit; font-size: .74rem; line-height: 1.2; font-weight: 700; text-align: left;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.arc-wander__mini.is-visible { opacity: 1; }
.arc-wander__masquer--bas { position: fixed; z-index: 61; opacity: 1; }
.arc-wander__masquer--bas[hidden] { display: none; }
