/* ============================================================
   Fenêtre-invitation du Gardien (mode visiteur)
   Modale CENTRÉE au style du Gardien : fond sombre premium, halo,
   orbe du Gardien. Préfixe « viv- » pour ne rien casser ailleurs.
   Fermable au doigt (✕ toujours visible). Responsive mobile/tablette/PC.
   ============================================================ */
:root {
  --viv-accent: var(--gardien-primary, var(--cyan-neon, #3da9fc));
  --viv-accent-2: var(--gardien-secondary, var(--cyan-soft, #6fc3ff));
  --viv-halo: var(--gardien-halo, rgba(61, 169, 252, 0.45));
  --viv-panel-bg: #0b1626;
  --viv-panel-bg-2: #0a1322;
  --viv-border: rgba(120, 180, 255, 0.22);
  --viv-ink: #eaf2ff;
  --viv-ink-soft: rgba(234, 242, 255, 0.68);
}

.viv-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;               /* au-dessus du contenu et du widget Gardien */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 8, 16, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .2s ease;
  box-sizing: border-box;
}
.viv-overlay.viv-show { opacity: 1; }
.viv-overlay[hidden] { display: none; }

.viv-modal {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 30px 24px 24px;
  text-align: center;
  color: var(--viv-ink);
  background: linear-gradient(180deg, var(--viv-panel-bg), var(--viv-panel-bg-2));
  border: 1px solid var(--viv-border);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 0 4px var(--viv-halo);
  transform: translateY(12px) scale(.98);
  transition: transform .22s ease;
  font-family: 'Inter', system-ui, sans-serif;
}
.viv-overlay.viv-show .viv-modal { transform: translateY(0) scale(1); }

.viv-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--viv-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--viv-ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .15s ease, transform .15s ease;
}
.viv-close:hover { background: rgba(255, 255, 255, 0.14); transform: rotate(90deg); }
.viv-close:focus-visible { outline: 3px solid var(--viv-accent-2); outline-offset: 2px; }

.viv-orb {
  width: 74px; height: 74px;
  margin: 0 auto 14px;
  border-radius: 50%;
  overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 32%, rgba(255,210,120,0.60), rgba(255,142,66,0.50) 36%, rgba(228,78,96,0.45) 66%, rgba(42,20,54,0.78) 100%);
  box-shadow: 0 0 22px rgba(245,197,66,0.55), inset 0 0 0 1.4px rgba(245,197,66,0.5);
}
.viv-orb video, .viv-orb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.viv-orb video { mix-blend-mode: screen; }

.viv-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .2px;
}
.viv-msg {
  margin: 0 auto 20px;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--viv-ink-soft);
}

.viv-actions { display: flex; flex-direction: column; gap: 10px; }
.viv-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;             /* cible tactile confortable */
  padding: 13px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: 600 15px/1.2 'Inter', system-ui, sans-serif;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform .14s ease, filter .14s ease, background .14s ease;
}
.viv-btn:hover { transform: translateY(-1px); }
.viv-btn:focus-visible { outline: 3px solid var(--viv-accent-2); outline-offset: 2px; }

.viv-btn-primary {
  color: #051020;
  background: linear-gradient(135deg, #ffcf6b, #ff8e42);
  box-shadow: 0 8px 22px rgba(255, 142, 66, 0.35);
}
.viv-btn-primary:hover { filter: brightness(1.05); }

.viv-btn-ghost {
  color: var(--viv-ink);
  background: rgba(120, 180, 255, 0.10);
  border-color: var(--viv-border);
}
.viv-btn-ghost:hover { background: rgba(120, 180, 255, 0.18); }

.viv-btn-text {
  color: var(--viv-ink-soft);
  background: transparent;
  min-height: 40px;
  font-weight: 500;
  font-size: 14px;
}
.viv-btn-text:hover { color: var(--viv-ink); }

/* Bandeau « Mode visiteur » — discret, en haut du contenu des pages à shell. */
.viv-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 9px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(20,36,60,.82), rgba(10,19,34,.82));
  border: 1px solid var(--viv-border);
  color: var(--viv-ink);
  font: 500 13px/1.35 'Inter', system-ui, sans-serif;
}
.viv-banner-eye { font-size: 15px; flex: 0 0 auto; }
.viv-banner-txt { flex: 0 0 auto; font-weight: 700; color: var(--viv-ink); }
.viv-banner-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.viv-banner-nav::-webkit-scrollbar { display: none; }
.viv-nav-link {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--viv-ink-soft);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background .14s, color .14s;
}
.viv-nav-link:hover { background: rgba(120,180,255,.14); color: var(--viv-ink); }
.viv-nav-link.is-active { background: rgba(120,180,255,.18); color: var(--viv-ink); border-color: var(--viv-border); }
.viv-banner-cta {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 12.5px;
  color: #051020;
  background: linear-gradient(135deg, #ffcf6b, #ff8e42);
  box-shadow: 0 6px 16px rgba(255,142,66,.3);
}
.viv-banner-cta:hover { filter: brightness(1.05); }

/* Cadenas discret posé sur une fonction réservée (front peut l'ajouter). */
.viv-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--viv-ink-soft);
  opacity: .85;
}

@media (max-width: 480px) {
  .viv-modal { padding: 26px 18px 20px; border-radius: 18px; }
  .viv-title { font-size: 17px; }
  .viv-msg { font-size: 14.5px; }
}
