*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  background: #111112; /* visible si WebGL2 est absent */
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Fond « velvet haze » (WebGL2) */
#haze {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* Grain global : calque WebGL au-dessus de toute la page, même grain que le shader d'origine */
#grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 24rem;
}

.card {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(14, 14, 18, 0.72), rgba(8, 8, 10, 0.6));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 2px 6px 0 rgba(0, 0, 0, 0.55),
    0 6px 14px -4px rgba(0, 0, 0, 0.6);
}

@media (min-width: 640px) {
  .card { padding: 32px; }
}

.avatar {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
}

.avatar img {
  display: block;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  object-fit: cover;
  object-position: center 35%;
}

.badge {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: #090909;
  box-shadow: 0 0 0 3px #111213, 0 3px 10px rgba(0, 0, 0, 0.3);
}

.badge img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 11px;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: rgba(255, 255, 255, 0.92);
}

.place {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 16px;
  color: rgba(255, 255, 255, 0.45);
}

.place svg { flex-shrink: 0; opacity: 0.6; }

.roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
}

.roles span:not(.sep) { opacity: 0.65; }

.sep { color: rgba(255, 255, 255, 0.3); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 28px 0 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}

.dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f97316;
}

.dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(249, 115, 22, 0.6);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.contact-row {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Très petits écrans (< 300 px) : l'adresse passe à la ligne au lieu de déborder */
.contact > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact:focus-visible {
  color: #fff;
  outline: 2px solid #a78bfa;
  outline-offset: 4px;
}

.arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.arrow svg {
  transition: transform 0.3s ease;
}

/* Survol réservé aux pointeurs qui survolent : pas d'état collé après un tap sur mobile */
@media (hover: hover) {
  .contact:hover { color: #fff; }

  .contact:hover .arrow {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
  }

  .contact:hover .arrow svg {
    transform: translate(2px, -2px);
  }
}

/* Téléphone en paysage : carte resserrée pour tenir dans la hauteur */
@media (max-height: 480px) {
  body { padding: 8px 20px; }
  .card { padding: 20px 24px; }
  .avatar { margin-bottom: 16px; }
  .status { margin-top: 16px; }
  .contact-row { margin-top: 16px; padding-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .dot::after { animation: none; }
  .contact, .arrow, .arrow svg { transition: none; }
}
