/* Wafi - visite guidée (js/visite.js) */
.vg-root { position: fixed; inset: 0; z-index: 10000; pointer-events: none; }
.vg-root.is-on { pointer-events: auto; }
.vg-veil { position: absolute; inset: 0; background: rgba(8, 18, 38, .55); opacity: 0; transition: opacity .35s ease; }
.vg-root.is-on .vg-veil { opacity: 1; }
.vg-root.has-target .vg-veil { background: transparent; }

/* Projecteur : un cadre dont l'ombre géante assombrit tout le reste */
.vg-spot { position: absolute; border-radius: 14px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 9999px rgba(8, 18, 38, .62), 0 0 0 3px #D69A3C, 0 0 32px 6px rgba(214, 154, 60, .55);
  transition: top .5s cubic-bezier(.2,.8,.2,1), left .5s cubic-bezier(.2,.8,.2,1), width .5s cubic-bezier(.2,.8,.2,1), height .5s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.vg-root.has-target .vg-spot { opacity: 1; }
.vg-spot::after { content: ""; position: absolute; inset: -8px; border-radius: 18px; border: 2px solid #D69A3C; animation: vg-pulse 1.6s ease-out infinite; }
@keyframes vg-pulse { from { opacity: .9; transform: scale(.96); } to { opacity: 0; transform: scale(1.12); } }

/* Carte d'explication */
.vg-card { position: absolute; width: min(360px, calc(100vw - 32px)); background: var(--bg-surface, #fff); color: var(--text-primary, #0C1A33);
  border-radius: 18px; padding: 22px 22px 16px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.55); border: 1px solid rgba(214,154,60,.35);
  transition: top .5s cubic-bezier(.2,.8,.2,1), left .5s cubic-bezier(.2,.8,.2,1); }
.vg-card.vg-enter { animation: vg-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes vg-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.vg-card.is-center { width: min(440px, calc(100vw - 32px)); text-align: center; padding: 30px 28px 20px; }
.vg-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px; font-size: 26px;
  background: linear-gradient(135deg, #1552A3, #2E77D0); color: #fff; box-shadow: 0 10px 24px -8px rgba(21,82,163,.7); animation: vg-float 3s ease-in-out infinite; }
.vg-card.is-center .vg-icon { margin: 0 auto 14px; width: 64px; height: 64px; font-size: 32px; }
@keyframes vg-float { 50% { transform: translateY(-5px) rotate(-3deg); } }
.vg-step { font-size: 11.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: #D69A3C; }
.vg-title { font-size: 19px; font-weight: 700; margin: 4px 0 8px; letter-spacing: -.01em; }
.vg-text { font-size: 14px; line-height: 1.55; color: var(--text-secondary, #4A5872); margin: 0; }
.vg-bar { height: 4px; border-radius: 4px; background: rgba(21,82,163,.12); margin: 16px 0 12px; overflow: hidden; }
.vg-bar i { display: block; height: 100%; background: linear-gradient(90deg, #1552A3, #D69A3C); border-radius: 4px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.vg-nav { display: flex; align-items: center; gap: 8px; }
.vg-nav .vg-skip { margin-right: auto; background: none; border: 0; color: var(--text-subdued, #8A94A8); font: inherit; font-size: 13px; cursor: pointer; padding: 6px 2px; }
.vg-nav .vg-skip:hover { color: var(--text-primary, #0C1A33); }
.vg-btn { border: 0; border-radius: 10px; padding: 9px 16px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.vg-btn:active { transform: scale(.96); }
.vg-btn:focus-visible, .vg-skip:focus-visible { outline: 2px solid #D69A3C; outline-offset: 2px; }
.vg-prev { background: rgba(21,82,163,.08); color: #1552A3; }
.vg-next { background: #1552A3; color: #fff; box-shadow: 0 8px 18px -8px rgba(21,82,163,.8); }
.vg-next:hover { box-shadow: 0 10px 24px -8px rgba(21,82,163,.95); }
.vg-card.is-center .vg-nav { justify-content: center; }
.vg-card.is-center .vg-skip { margin-right: 0; }

/* Confettis de fin */
.vg-confetti { position: fixed; top: -12px; width: 9px; height: 14px; border-radius: 2px; z-index: 10001; pointer-events: none; animation: vg-fall linear forwards; }
@keyframes vg-fall { to { transform: translateY(105vh) rotate(720deg); opacity: .2; } }

/* Bouton de l'en-tête : halo tant que la visite n'a jamais été faite */
#visiteBtn.is-new { position: relative; }
#visiteBtn.is-new::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 2px solid #D69A3C; animation: vg-pulse 1.8s ease-out infinite; }

[data-theme="dark"] .vg-card { background: #13223F; color: #EEF2FA; border-color: rgba(214,154,60,.45); }
[data-theme="dark"] .vg-text { color: #B5C0D6; }
@media (prefers-reduced-motion: reduce) {
  .vg-spot, .vg-card, .vg-bar i { transition: none; }
  .vg-spot::after, .vg-icon, #visiteBtn.is-new::after, .vg-card.vg-enter { animation: none; }
}
