/* Visite interactive du site (app/ui/visite.js) et son bouton dans le Guide.
   Un voile sombre percé d'un « trou » autour de l'élément expliqué, et une
   bulle aux couleurs du site. Pas de backdrop-filter (refusé, voir MEMOIRE.md). */

/* ---- Bouton « Visite interactive du site » (Guide, carte « Comment utiliser le site ? ») */
.visite-lancer {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 22px; padding: 14px 18px;
  border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: var(--accent-soft); color: var(--text); text-align: left; cursor: pointer; font: inherit;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.visite-lancer:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.visite-lancer:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.visite-lancer .vl-icone {
  flex: none; width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center;
  justify-content: center; font-size: 24px; background: var(--card); box-shadow: var(--shadow-sm);
}
.visite-lancer .vl-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.visite-lancer .vl-texte strong { font-size: 15.5px; letter-spacing: -.01em; }
.visite-lancer .vl-texte span { font-size: 13.5px; color: var(--text-dim); line-height: 1.4; }
.visite-lancer .vl-fleche { flex: none; color: var(--accent); font-size: 18px; font-weight: 700; }
.card-body > .visite-lancer { margin-top: 4px; }

/* ---- Calque de la visite */
#visite { position: fixed; inset: 0; z-index: 2700; }
/* Bloque les clics sur le site pendant la visite : on avance par la bulle. */
.visite-bouclier { position: absolute; inset: 0; }
.visite-voile { position: fixed; background: rgba(15, 14, 12, .58); pointer-events: none; }
.visite-trou {
  position: fixed; border-radius: 12px; pointer-events: none;
  outline: 3px solid var(--accent); outline-offset: 0;
}
.visite-trou[hidden] { display: none; }

.visite-bulle {
  position: fixed; width: min(380px, calc(100vw - 24px)); padding: 16px 18px 14px;
  border-radius: var(--r-lg); background: var(--card); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg); outline: none;
  transition: left .28s var(--ease), top .28s var(--ease);
}
#visite.sans-cible .visite-bulle { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
.vb-haut { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.vb-etape { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--text-faint); }
.vb-quitter {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--panel-2);
  color: var(--text-dim); cursor: pointer; font-size: 13px;
}
.vb-quitter:hover { color: var(--text); }
.vb-titre { margin: 0 0 6px; font-size: 17px; letter-spacing: -.01em; color: var(--text); }
.vb-texte, .vb-mobile { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--text-dim); }
.vb-mobile { margin-top: 8px; font-size: 13.5px; color: var(--accent); }
.vb-mobile[hidden] { display: none; }
.vb-points { display: flex; gap: 5px; justify-content: center; margin: 14px 0 12px; flex-wrap: wrap; }
.vb-points span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: width .2s var(--ease); }
.vb-points span.is-actif { width: 18px; border-radius: 3px; background: var(--accent); }
.vb-actions { display: flex; gap: 10px; justify-content: space-between; }
.vb-btn {
  flex: 1; padding: 10px 14px; border-radius: 12px; font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border);
}
.vb-sec { background: var(--panel-2); color: var(--text); }
.vb-sec:disabled { opacity: .4; cursor: default; }
.vb-prim { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.vb-btn:focus-visible, .vb-quitter:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Téléphone : la bulle devient une feuille en bas de l'écran (en haut si la
   cible est en bas), toujours lisible quelle que soit la cible. */
@media (max-width: 600px) {
  .visite-bulle, #visite.sans-cible .visite-bulle {
    left: 12px !important; right: 12px; top: auto !important; bottom: calc(12px + env(safe-area-inset-bottom));
    width: auto; transform: none;
  }
  #visite.bulle-en-haut .visite-bulle { top: calc(12px + env(safe-area-inset-top)) !important; bottom: auto; }
  .vb-titre { font-size: 16px; }
  .vb-texte { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .visite-bulle, .visite-lancer { transition: none; }
}
