:root {
  --pill-bg: rgba(120, 110, 105, 0.42);
  --pill-border: rgba(255, 255, 255, 0.28);
  --text: #ffffff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  /* Empêche le menu "Enregistrer l'image" et la sélection à l'appui long */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Le fond et l'avatar ne sont pas cliquables : aucun menu image possible */
.bg, .avatar, .avatar-img { pointer-events: none; }

/* On garde la saisie possible dans le champ téléphone */
input { -webkit-user-select: text; user-select: text; }

html, body {
  margin: 0;
  height: 100%;
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  overflow: hidden;
  background: #000;
}

/* ---------- Arrière-plan ---------- */
.bg {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  /* Voile sombre par-dessus le fond (comme geniexum) : la photo de profil
     est une image séparée, donc elle reste claire. */
  background: linear-gradient(180deg, rgba(0,0,0,0.34) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.76) 100%);
}

/* ---------- Carte centrale ---------- */
.card {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.avatar {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  padding: 3px;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: block;
}

.name {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 18px 0 0;
  font-size: 35px;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.4);
}
.verified { flex: 0 0 auto; width: 28px; height: 28px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3)); }

.location {
  margin-top: 7px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
  letter-spacing: 0.2px;
}
.location[hidden] { display: none; }

.view-more {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(66vw, 244px);
  height: 56px;
  border-radius: 999px;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 6px 26px rgba(0,0,0,0.25);
  transition: transform 0.12s ease, background 0.2s ease;
}
.view-more:active { transform: scale(0.97); background: rgba(140,130,125,0.5); }

/* ---------- Barre téléphone (bas) ---------- */
.phone-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 3;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.phone-label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

.phone-input {
  width: 100%;
  max-width: 270px;
  height: 48px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}

.cc-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 100%;
  padding: 0 4px 0 16px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cc-toggle .chev { opacity: 0.85; width: 15px; height: 15px; }

.phone-input input {
  flex: 1;
  height: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
  padding: 0 8px;
  outline: none;
}
.phone-input input::placeholder { color: rgba(255,255,255,0.6); }

.ok-btn {
  height: 100%;
  padding: 0 18px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.ok-btn:active { color: #fff; }
.phone-input.sent .ok-btn { color: #7CFF9B; }

.phone-error {
  font-size: 13px;
  font-weight: 500;
  color: #ffd9d9;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  margin-top: -2px;
}
.phone-error[hidden] { display: none; }
.phone-input.error { border-color: rgba(255,120,120,0.7); }

/* ---------- Menu déroulant pays ---------- */
.cc-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  width: min(58vw, 210px);
  align-self: flex-start;
  margin-left: max(18px, calc((100vw - 270px) / 2));
  background: rgba(48, 42, 40, 0.88);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  position: fixed;
  bottom: calc(74px + env(safe-area-inset-bottom));
}
.cc-menu[hidden] { display: none; }
.cc-menu li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
}
.cc-menu li:active { background: rgba(255,255,255,0.10); }
.cc-menu li .check {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  opacity: 0;
}
.cc-menu li.selected .check { opacity: 1; }

@media (max-height: 700px) {
  .name { font-size: 30px; }
  .avatar { width: 104px; height: 104px; }
  .view-more { height: 50px; font-size: 17px; margin-top: 22px; }
}
