/* ============================================================
   GABONIMMO.COM — Photo de profil filmée
   Fenêtre de capture caméra : lisible, centrée, doigts à l'aise.
   Mobile d'abord : la fenêtre occupe l'écran, les boutons sont
   larges et empilés, rien n'est coupé.
   ============================================================ */

.ph-fond {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(28, 20, 16, .72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  overflow-y: auto;
}

.ph-fond.open { display: flex; }

.ph-boite {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fffdfa;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
}

.ph-tete {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.ph-tete h3 {
  margin: 0 0 3px;
  font-size: 1.06rem;
  font-weight: 700;
  color: #2b2320;
}

.ph-sous {
  margin: 0;
  font-size: .84rem;
  line-height: 1.45;
  color: #7b6f66;
}

.ph-fermer {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: #f2ebe1;
  color: #4a3d35;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ph-fermer:hover { background: #e8ddd0; }

/* Cadre vidéo carré : le visage est centré, le repère est visible */
.ph-vue {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #1d1713;
}

.ph-vue video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(-1); /* effet miroir : on se reconnaît mieux */
}

.ph-cadre {
  position: absolute;
  inset: 14%;
  border: 2px dashed rgba(255, 255, 255, .55);
  border-radius: 50%;
  pointer-events: none;
}

.ph-apercu {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  display: block;
  background: #1d1713;
}

.ph-message {
  margin: 12px 0 0;
  font-size: .85rem;
  line-height: 1.45;
  min-height: 1.2em;
  color: #7b6f66;
}

.ph-message.ok   { color: #2e7d5b; font-weight: 600; }
.ph-message.warn { color: #a8760a; font-weight: 600; }
.ph-message.err  { color: #b3402f; font-weight: 600; }

.ph-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 14px;
}

.ph-note {
  margin: 12px 0 0;
  font-size: .74rem;
  line-height: 1.45;
  color: #9a8d82;
  text-align: center;
}

/* Bloc photo dans la page d'inscription et dans le profil */
.ph-bloc {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e5ded2;
  border-radius: 14px;
  background: #faf7f2;
}

.ph-bloc.ph-ok { border-color: #9dc9b3; background: #f0f7f3; }

.ph-bloc-img {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: #e8ddd0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-bloc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

#ph-vide-page {
  font-size: 1.5rem;
  color: #b0a396;
}

.ph-bloc-texte { flex: 1 1 auto; min-width: 0; }

.ph-bloc-texte b {
  display: block;
  font-size: .9rem;
  color: #2b2320;
  margin-bottom: 2px;
}

.ph-bloc-texte span {
  display: block;
  font-size: .79rem;
  line-height: 1.4;
  color: #7b6f66;
}

.ph-bloc .btn { flex: 0 0 auto; }

@media (max-width: 768px) {
  .ph-fond { padding: 0; align-items: flex-end; }
  .ph-boite {
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    max-height: 94vh;
  }
  .ph-bloc { flex-wrap: wrap; }
  .ph-bloc .btn { width: 100%; }
  .ph-actions .btn { min-height: 44px; }
}
