/* VTEX Wallet — écran du lien d'accès (protocole LEGDAY).
   Plein cadre, au-dessus de tout : le lien en deux temps doit s'afficher même
   pour un visiteur non authentifié, sans dépendre du routeur de vues. */

.acces-screen {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(114, 124, 246, .22), transparent 60%),
    radial-gradient(100% 70% at 100% 100%, rgba(19, 179, 155, .12), transparent 62%),
    linear-gradient(160deg, #0b0f28 0%, #0a0d22 55%, #070a1c 100%);
  font-family: var(--f-sans, 'Inter', system-ui, sans-serif);
  color: var(--c-t1, #f5f7fc);
  animation: acces-in .28s ease-out both;
}
.acces-screen[hidden] { display: none; }

/* La cinématique de chargement s'efface pendant tout le parcours du lien. */
body.acces-flow #loader-screen { display: none !important; }

.acces-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(140, 150, 200, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 150, 200, .07) 1px, transparent 1px);
  background-size: 46px 46px, 46px 46px;
  mask-image: radial-gradient(75% 60% at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(75% 60% at 50% 40%, #000 0%, transparent 78%);
}

.acces-card {
  position: relative;
  width: min(432px, 100%);
  padding: 30px 26px 24px;
  border: 1.5px solid var(--c-border-mid, rgba(140, 150, 200, .22));
  border-radius: var(--r-xl, 32px);
  background: var(--navy-card-bg, linear-gradient(150deg, #1c2352 0%, #141838 55%, #0b0f28 100%));
  box-shadow:
    0 0 0 1px rgba(20, 26, 66, .9),
    0 0 0 5px rgba(114, 124, 246, .18),
    0 26px 54px -18px rgba(0, 0, 0, .72),
    inset 0 1.5px 0 rgba(255, 255, 255, .14);
  animation: acces-rise .34s cubic-bezier(.22, .8, .28, 1) both;
}

.acces-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.acces-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(150deg, #2b3373, #1a2050);
  border: 1.5px solid rgba(140, 150, 200, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 16px -8px rgba(0, 0, 0, .7);
}
.acces-mark svg { width: 17px; height: 17px; fill: var(--c-accent, #8ea9ff); }
.acces-brand-txt {
  font-size: 15px; font-weight: 800; letter-spacing: 3.4px;
  text-transform: uppercase; color: var(--c-t1, #f5f7fc);
}

.acces-eye {
  display: inline-block; padding: 7px 16px; margin-bottom: 14px;
  border-radius: 999px;
  border: 1px solid rgba(142, 169, 255, .34);
  background: rgba(142, 169, 255, .12);
  color: var(--c-accent, #8ea9ff);
  font-size: 10px; font-weight: 800; letter-spacing: 2.6px; text-transform: uppercase;
}

.acces-title {
  margin: 0 0 8px;
  font-size: 25px; font-weight: 800; line-height: 1.18; letter-spacing: -.4px;
}
.acces-sub {
  margin: 0 0 20px;
  font-size: 13.5px; line-height: 1.6; color: var(--c-t2, #a8afd0);
}

.acces-steps {
  list-style: none; margin: 0 0 18px; padding: 14px 16px;
  border-radius: var(--r-lg, 20px);
  border: 1px solid var(--c-border, rgba(140, 150, 200, .14));
  background: rgba(9, 12, 32, .55);
}
.acces-step {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0;
  font-size: 12.5px;
}
.acces-step + .acces-step { border-top: 1px solid rgba(140, 150, 200, .1); }
.acces-step-dot {
  flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%;
  background: rgba(140, 150, 200, .35);
  box-shadow: 0 0 0 4px rgba(140, 150, 200, .08);
  transition: background .2s ease, box-shadow .2s ease;
}
.acces-step-txt { flex: 1 1 auto; color: var(--c-t2, #a8afd0); }
.acces-step-val {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; letter-spacing: .3px;
  color: var(--c-t3, #6b7396); font-family: var(--f-mono, 'JetBrains Mono', monospace);
}
.acces-step[data-state="ok"] .acces-step-dot { background: var(--c-positive, #5FB03E); box-shadow: 0 0 0 4px rgba(95, 176, 62, .16); }
.acces-step[data-state="ok"] .acces-step-val { color: var(--c-positive, #5FB03E); }
.acces-step[data-state="ok"] .acces-step-txt { color: var(--c-t1, #f5f7fc); }
.acces-step[data-state="ko"] .acces-step-dot { background: var(--c-red, #ef5a67); box-shadow: 0 0 0 4px rgba(239, 90, 103, .16); }
.acces-step[data-state="ko"] .acces-step-val { color: var(--c-red, #ef5a67); }

.acces-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.acces-btn {
  width: 100%; padding: 15px 18px; border-radius: 16px;
  font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: .2px;
  cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.acces-btn-primary {
  border: 1.5px solid rgba(160, 178, 255, .5);
  background: linear-gradient(150deg, #4a56e0, #2b3373);
  color: #fff;
  box-shadow: 0 5px 0 #141a44, 0 16px 30px -14px rgba(74, 86, 224, .7), inset 0 1.5px 0 rgba(255, 255, 255, .34);
}
.acces-btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #141a44, inset 0 1.5px 0 rgba(255, 255, 255, .3); }

.acces-foot {
  margin: 0; font-size: 11px; line-height: 1.55; text-align: center;
  color: var(--c-t3, #6b7396);
}

@keyframes acces-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes acces-rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 420px) {
  .acces-card { padding: 26px 20px 20px; border-radius: 26px; }
  .acces-title { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .acces-screen, .acces-card { animation: none; }
}

/* ══ Ce que le lien vient de révéler : l'appareil, en clair ═══════════
   Rempli par acces.js depuis la réponse du serveur. Une donnée absente
   s'affiche « — » : jamais une valeur plausible. */
.acces-device {
  margin: 0 0 16px; padding: 14px 16px;
  border-radius: var(--r-lg, 20px);
  border: 1px solid var(--c-border, rgba(140, 150, 200, .14));
  background: rgba(9, 12, 32, .55);
}
.acces-device[hidden] { display: none; }
.acces-device-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.acces-device-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #97CE5E; box-shadow: 0 0 0 4px rgba(151, 206, 94, .16);
}
.acces-device-head strong { font-size: 13px; letter-spacing: -.01em; color: var(--c-t1, #f5f7fc); }
.acces-device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.acces-device-grid div { min-width: 0; }
.acces-device-grid dt {
  margin: 0 0 2px; font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--c-t3, #6b7396);
}
.acces-device-grid dd {
  margin: 0; font-size: 12.5px; font-weight: 600;
  color: var(--c-t1, #f5f7fc); overflow-wrap: anywhere;
}
.acces-device-note { margin: 10px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--c-t3, #6b7396); }

/* ══ Protocole de sécurité : ce qu'il faut savoir, dans l'ordre ═══════ */
.acces-protocol {
  margin: 0 0 16px; padding: 14px 16px;
  border-radius: var(--r-lg, 20px);
  border: 1px solid var(--c-border, rgba(140, 150, 200, .14));
  background: rgba(9, 12, 32, .4);
}
.acces-protocol-title {
  margin: 0 0 8px; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--c-t3, #6b7396);
}
.acces-protocol-list { display: grid; gap: 7px; margin: 0; padding-left: 18px; }
.acces-protocol-list li { font-size: 11.5px; line-height: 1.55; color: var(--c-t3, #6b7396); }
.acces-protocol-list strong { color: var(--c-t1, #f5f7fc); font-weight: 700; }

@media (max-width: 520px) {
  .acces-device-grid { grid-template-columns: 1fr; }
}

/* Le parcours du lien s'allonge (guide d'installation + protocole) : la carte
   défile au lieu de pousser le bouton hors de l'écran. */
.acces-card { max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; scrollbar-width: thin; }
