/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f8f9fc;
  --card-bg: #ffffff;
  --accent: #6c5ce7;
  --text: #2d3436;
  --text-light: #636e72;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 40px rgba(108, 92, 231, 0.18);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacOSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.header {
  text-align: center;
  padding: 3rem 1rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.header h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.8rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.28s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.banner {
  min-height: 150px; /* ← augmenté pour laisser plus de place */
  background: linear-gradient(135deg, var(--accent), #a29bfe);
  position: relative;
}

.avatar-container {
  position: absolute;
  top: 50px; /* ancré au bord supérieur */
  left: 50%;
  transform: translate(-50%, -40%); /* ← -40% au lieu de -50% = remonte moins */
  z-index: 2;
}

.avatar {
  width: 120px; /* un peu plus grand = plus beau */
  height: 120px;
  border-radius: 50%;
  border: 6px solid white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  background: #ddd;
  object-fit: cover;
  object-position: top center; /* ← très important : force le cadrage vers le haut */
}

.content {
  padding: 3.5rem 1.5rem 1.8rem;
  text-align: center;
}

.name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.location {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.member-since {
  font-size: 0.85rem;
  color: #7f8c8d;
  font-weight: 500;
  background: #f1f2f6;
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 30px;
}

.loading {
  text-align: center;
  font-size: 1.3rem;
  color: var(--text-light);
  padding: 6rem 1rem;
  display: none;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #999;
  font-size: 0.9rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .header h1 {
    font-size: 2.2rem;
  }
  .grid {
    gap: 1.4rem;
    padding: 1.5rem 1rem;
  }
}
