/**
 * IMMGO — Écrans de l'identité : inscription d'un espace (types, frise des étapes), vérification, fichiers,
 * visionneuse des pièces, invitations reçues
 * Auteur : Jacks Ngalangala
 */

/* ─── Choix Particulier / Entreprise ─── */
.insc-accueil {
  max-width: 880px;
}
.insc-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--e-6);
}
.insc-type {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--e-3);
  padding: var(--e-8);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--trait);
  border-radius: var(--r-grand);
  box-shadow: var(--ombre-1);
  color: var(--texte);
  font: inherit;
  cursor: pointer;
  transition:
    border-color var(--duree) var(--courbe),
    box-shadow var(--duree) var(--courbe);
}
.insc-type:hover,
.insc-type:focus-visible {
  border-color: var(--or);
  box-shadow: var(--ombre-2);
}
.insc-type-icone {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-moyen);
  background: var(--or-pale);
  color: var(--or-texte);
}
.insc-type-icone svg {
  width: 28px;
  height: 28px;
}
.insc-type-liste {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  margin: var(--e-2) 0 0;
  padding: var(--e-4) 0 0;
  list-style: none;
  border-top: 1px solid var(--trait);
  width: 100%;
}
.insc-type-liste li {
  display: flex;
  align-items: center;
  gap: var(--e-2);
}
.insc-type-liste svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--succes);
}
.insc-type-delai {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-weight: var(--graisse-forte);
  color: var(--or-texte);
}
.insc-type-delai svg {
  width: 18px;
  height: 18px;
}

/* ─── Frise des étapes de l'inscription ─── */
.insc-frise {
  display: flex;
  gap: var(--e-2);
  width: 100%;
  max-width: 1080px;
  margin: 0 auto var(--e-8);
  padding: 0;
  list-style: none;
  counter-reset: etape;
}
.insc-frise-etape {
  flex: 1;
  min-width: 0;
  position: relative;
}
.insc-frise-etape::before {
  content: '';
  position: absolute;
  top: 17px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--trait-fort);
}
.insc-frise-etape:first-child::before {
  display: none;
}
.insc-frise-etape[data-etat='fait']::before,
.insc-frise-etape[data-etat='actuelle']::before {
  background: var(--or);
}
.insc-frise-lien {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--e-2);
  color: var(--texte-faible);
  text-decoration: none;
  text-align: center;
}
a.insc-frise-lien:hover .insc-frise-libelle {
  color: var(--texte);
}
.insc-frise-numero {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--trait-fort);
  font-weight: var(--graisse-forte);
  font-variant-numeric: tabular-nums;
}
.insc-frise-numero svg {
  width: 18px;
  height: 18px;
}
.insc-frise-libelle {
  max-width: 100%;
  font-size: var(--taille-petit);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.insc-frise-etape[data-etat='fait'] .insc-frise-numero {
  background: var(--or-pale);
  border-color: var(--or);
  color: var(--or-texte);
}
.insc-frise-etape[data-etat='actuelle'] .insc-frise-numero {
  background: var(--or);
  border-color: var(--or);
  color: var(--texte);
}
.insc-frise-etape[data-etat='actuelle'] .insc-frise-libelle {
  color: var(--texte);
  font-weight: var(--graisse-forte);
}
.insc-frise-etape[data-etat='courant'] .insc-frise-numero {
  border-color: var(--or);
  color: var(--or-texte);
}
.insc-titre {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
}

/* ─── Suivi d'une vérification ─── */
.insc-suivi {
  display: flex;
  align-items: center;
  gap: var(--e-4);
}
.insc-suivi > .pile-serree {
  flex: 1;
  min-width: 0;
}
.insc-suivi-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--or-pale);
  color: var(--or-texte);
}
.kyc-etapes {
  display: flex;
  flex-direction: column;
  gap: var(--e-2);
  margin: 0;
  padding-left: var(--e-6);
  list-style: decimal;
}
.kyc-etapes li::marker {
  color: var(--or-texte);
  font-weight: var(--graisse-forte);
}

/* ─── Choix d'un fichier (pièce de la charte) ─── */
.fichier-zone {
  width: 100%;
  padding: var(--e-4);
  background: var(--surface);
  border: 1px dashed var(--trait-fort);
  border-radius: var(--r-moyen);
  color: var(--texte);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fichier-zone:hover,
.fichier-zone:focus-visible {
  border-color: var(--or);
  background: var(--surface-douce);
}
.fichier-contenu {
  display: flex;
  align-items: center;
  gap: var(--e-4);
}
.fichier-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r-moyen);
  background: var(--or-pale);
  color: var(--or-texte);
}
.fichier-apercu {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--r-moyen);
  object-fit: cover;
}
.fichier-texte {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-wrap: anywhere;
}
.fichier-changer {
  color: var(--or-texte);
  font-weight: var(--graisse-forte);
}

/* ─── Visionneuse des pièces ─── */
.modale.modale-large {
  width: min(960px, calc(100vw - 32px));
}
.visionneuse-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  margin: 0 auto;
  border-radius: var(--r-moyen);
  object-fit: contain;
}

/* ─── Invitations reçues (cadre d'authentification sombre) ─── */
.auth-invitations {
  display: flex;
  flex-direction: column;
  gap: var(--e-3);
}
.auth-invitation {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: var(--e-2);
  padding: var(--e-3) var(--e-4);
  border: 1px solid var(--nuit-trait);
  border-radius: var(--r-moyen);
  background: var(--nuit-surface-haute);
}
.auth-invitation-texte {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--nuit-texte);
}
.auth-invitation-texte span {
  color: var(--nuit-texte-second);
}

@media (max-width: 1023px) {
  .insc-frise-libelle {
    display: none;
  }
  .insc-frise-etape[data-etat='actuelle'] .insc-frise-libelle {
    display: block;
    position: absolute;
    top: 44px;
    white-space: nowrap;
  }
  .insc-frise {
    margin-bottom: var(--e-12);
  }
}
@media (max-width: 599px) {
  .insc-frise {
    gap: 0;
  }
  .insc-frise-numero {
    width: 30px;
    height: 30px;
    font-size: var(--taille-legende);
  }
  .insc-frise-etape::before {
    top: 14px;
  }
  .insc-frise-etape[data-etat='actuelle'] .insc-frise-libelle {
    top: 38px;
  }
  .insc-types {
    grid-template-columns: 1fr;
  }
  .insc-type {
    padding: var(--e-6);
  }
}
