/**
 * InterFilm — Fiche acteur (modal TMDB)
 */

:root {
  --detail-border: rgba(255, 255, 255, 0.08);
}

.person-modal-bg {
  z-index: 250;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}

.person-modal-bg.open {
  opacity: 1;
  pointer-events: all;
}

.person-modal {
  background: var(--bg);
  width: 100%;
  max-width: 960px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
}

.person-modal-close {
  position: fixed;
  top: 18px;
  right: max(18px, calc(50% - 480px + 18px));
  z-index: 260;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--detail-border);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.person-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 5rem clamp(1.5rem, 4vw, 2.5rem) 2rem;
  max-width: 960px;
  margin: 0 auto;
  border-bottom: 1px solid var(--detail-border);
}

.person-photo {
  width: 180px;
  aspect-ratio: 2/3;
  border-radius: 16px;
  object-fit: cover;
  background: #111;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}

.person-name {
  font-family: var(--ff-head);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 8px;
}

.person-meta-line {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.person-bio {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 1rem;
  white-space: pre-line;
}

.person-section {
  padding: 2rem clamp(1.5rem, 4vw, 2.5rem) 3rem;
  max-width: 960px;
  margin: 0 auto;
}

.person-section-title {
  font-family: var(--ff-head);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.25rem;
}

.person-film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 1rem;
}

.person-film-card {
  cursor: pointer;
  transition: transform 0.2s;
}

.person-film-card:hover {
  transform: translateY(-4px);
}

.person-film-card img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 14px;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.person-film-card:hover img {
  transform: scale(1.02);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.person-film-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 8px;
  line-height: 1.3;
}

.person-film-year {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.person-loading {
  padding: 4rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .person-hero {
    grid-template-columns: 120px 1fr;
    gap: 1.25rem;
  }
  .person-photo {
    width: 120px;
  }
}

@media (max-width: 600px) {
  .person-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .person-photo {
    width: 140px;
    margin: 0 auto;
  }
}
