/* ============================================================
   GABONIMMO.COM — Vérification d'identité avant signature
   Trois photos prises en direct (face, profil gauche, profil droit),
   comparées au visage de référence du compte.
   ============================================================ */
.idn-back {
  position: fixed; inset: 0; z-index: 95000;
  background: rgba(28,15,9,.72);
  display: none; align-items: flex-end; justify-content: center;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.idn-back.open { display: flex; }

.idn-box {
  background: var(--surface); width: 100%; max-width: 560px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 16px var(--pad) calc(16px + env(safe-area-inset-bottom, 0px));
  max-height: 94vh; overflow-y: auto;
  animation: idnUp .22s ease;
}
@keyframes idnUp { from { transform: translateY(24px); opacity: .65; } }

.idn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.idn-head h3 { margin: 0 0 2px; font-size: 1.03rem; }
.idn-x {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 1.15rem; line-height: 1; color: var(--muted); cursor: pointer;
}

/* Étapes */
.idn-etapes { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.idn-etape {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600; color: var(--muted);
  background: var(--brand-tint); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 8px;
}
.idn-etape b {
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--line); color: var(--ink-2);
  font-size: .68rem; display: inline-flex; align-items: center; justify-content: center;
}
.idn-etape.courante { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.idn-etape.courante b { background: var(--brand); color: #fff; }
.idn-etape.fait { color: var(--brand-dark); background: var(--brand-soft); border-color: var(--brand-soft); }
.idn-etape.fait b { background: var(--brand); color: #fff; }

/* Viseur caméra */
.idn-vue {
  position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 46vh;
  background: #1F1511; border-radius: var(--radius-sm); overflow: hidden;
}
.idn-vue video, .idn-vue canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.idn-vue canvas { display: none; }
.idn-cadre {
  position: absolute; inset: 12% 20%; pointer-events: none;
  border: 2px dashed rgba(255,255,255,.5); border-radius: 50% / 42%;
}
.idn-attente {
  position: absolute; inset: 0; display: flex; align-items: center; gap: 10px;
  justify-content: center; color: #fff; font-size: .86rem;
  background: rgba(28,15,9,.6); text-align: center; padding: 0 16px;
}
.idn-spin {
  width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: idnSpin .8s linear infinite;
}
@keyframes idnSpin { to { transform: rotate(360deg); } }

/* Textes */
.idn-aide { font-size: .84rem; color: var(--ink-2); margin: 10px 0 0; }
.idn-msg { font-size: .84rem; margin: 8px 0 0; min-height: 1.1rem; }
.idn-msg.ok { color: var(--brand-dark); }
.idn-msg.err { color: #8F1D17; }
.idn-msg.warn { color: #7A5E00; }
.idn-pied { margin-top: 10px; }

/* Vignettes des trois prises */
.idn-vignettes { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.idn-vignette {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--brand-tint); text-align: center; min-height: 62px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.idn-vignette.ok { border-color: var(--brand); }
.idn-vignette img { width: 100%; height: 62px; object-fit: cover; display: block; }
.idn-vignette span { font-size: .7rem; color: var(--muted); padding: 3px 0; }
.idn-vignette .idn-vide { padding: 12px 4px; }

.idn-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Parcours depuis le téléphone */
.idn-tel { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.idn-tel h4 { margin: 0 0 6px; font-size: .96rem; }
.idn-lien { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 8px; }
.idn-lien input {
  flex: 1 1 200px; min-width: 0; font-size: 16px;
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--brand-tint); color: var(--ink-2);
}
.idn-code {
  font-size: 1.75rem; font-weight: 700; letter-spacing: .28em;
  color: var(--brand-dark); background: var(--brand-soft);
  border: 1px dashed var(--brand); border-radius: 10px;
  padding: 10px 14px; text-align: center; margin-bottom: 6px;
}

/* Mention « vérification obligatoire » posée dans les écrans de signature */
.idn-avis {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--brand-tint); border: 1px solid var(--line);
  border-left: 3px solid var(--brand); border-radius: 10px;
  padding: 10px 12px; margin: 0 0 12px;
}
.idn-avis b { display: block; font-size: .87rem; }
.idn-avis p { margin: 2px 0 0; font-size: .8rem; color: var(--muted); }
.idn-avis .idn-avis-ok { color: var(--brand-dark); font-weight: 600; }

/* Fiche de vérification dans le suivi du membre */
.idn-fiche {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: var(--surface); margin-bottom: 8px;
}
.idn-fiche .idn-fiche-tete { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; }
.idn-fiche b { font-size: .88rem; }
.idn-fiche p { margin: 4px 0 0; font-size: .78rem; color: var(--muted); }

@media (min-width: 768px) {
  .idn-back { align-items: center; }
  .idn-box { border-radius: var(--radius-lg); max-height: 90vh; }
  .idn-vue { max-height: 52vh; }
  .idn-vignette img { height: 74px; }
}
