/**
 * Planete Jeunesse v2 - Staff Page Components
 * Styles pour la page de detail d'un membre du staff
 */

/* ============================================================================
   STAFF PROFILE HEADER - Hero section avec photo et infos
============================================================================ */

.staff-profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

@media (min-width: 768px) {
  .staff-profile {
    grid-template-columns: 220px 1fr;
    gap: var(--space-8);
  }
}

/* Photo du staff */
.staff-profile__photo {
  position: relative;
}

.staff-profile__photo-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: var(--color-bg-tertiary);
  aspect-ratio: 3 / 4;
}

.staff-profile__photo-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--color-primary);
  border-radius: var(--radius-xl);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 2;
}

.staff-profile__photo-wrapper:hover::before {
  opacity: 1;
}

.staff-profile__photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.staff-profile__photo-wrapper:hover img {
  transform: scale(1.05);
}

/* Placeholder photo */
.staff-profile__photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg-tertiary) 0%, var(--color-border-light) 100%);
  color: var(--color-text-muted);
}

.staff-profile__photo-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.5;
}

/* Infos du profil */
.staff-profile__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.staff-profile__name {
  font-family: var(--font-heading);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
  margin: 0;
}

.staff-profile__role-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  width: fit-content;
}

.staff-profile__role-badge svg {
  width: 16px;
  height: 16px;
}

/* Biographie */
.staff-profile__bio {
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border-left: 4px solid var(--color-primary);
}

.staff-profile__bio p {
  margin: 0 0 var(--space-3) 0;
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

.staff-profile__bio p:last-child {
  margin-bottom: 0;
}

/* Statistiques du staff */
.staff-profile__stats {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.staff-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4);
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  min-width: 100px;
  text-align: center;
  transition: all var(--transition-normal);
}

.staff-stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.staff-stat__value {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1;
}

.staff-stat__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
}

/* ============================================================================
   FILMOGRAPHY SECTION - Liste des oeuvres
============================================================================ */

.staff-filmography {
  margin-top: var(--space-8);
}

.staff-filmography__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-border-light);
}

.staff-filmography__title {
  font-family: var(--font-heading);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.staff-filmography__title svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.staff-filmography__count {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

/* Grille de la filmographie */
.filmography-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .filmography-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .filmography-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Carte de filmographie */
.filmography-card {
  display: flex;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
}

.filmography-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.filmography-card__image {
  width: 80px;
  min-height: 100px;
  flex-shrink: 0;
  background: var(--color-bg-tertiary);
  overflow: hidden;
}

.filmography-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.filmography-card:hover .filmography-card__image img {
  transform: scale(1.1);
}

.filmography-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg-tertiary) 0%, var(--color-border-light) 100%);
  color: var(--color-text-light);
}

.filmography-card__image-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.filmography-card__content {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.filmography-card__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin: 0 0 var(--space-1) 0;
  line-height: var(--line-height-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.filmography-card:hover .filmography-card__title {
  color: var(--color-primary);
}

.filmography-card__role {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-2) 0;
  font-style: italic;
}

.filmography-card__year {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  background: var(--color-bg-tertiary);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  width: fit-content;
}

.filmography-card__year svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ============================================================================
   SIDEBAR STAFF
============================================================================ */

.staff-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.staff-sidebar__section {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.staff-sidebar__header {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-3) var(--space-4);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
}

.staff-sidebar__content {
  padding: var(--space-4);
}

/* Boutons de partage */
.share-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.share-btn svg {
  width: 20px;
  height: 20px;
}

.share-btn--facebook {
  background: #1877f2;
}

.share-btn--facebook:hover {
  background: #0d65d9;
}

.share-btn--x {
  background: #000000;
}

.share-btn--x:hover {
  background: #333333;
}

.share-btn--copy {
  background: var(--color-text-secondary);
}

.share-btn--copy:hover {
  background: var(--color-text-primary);
}

/* ============================================================================
   ANIMATIONS
============================================================================ */

.staff-profile,
.staff-filmography {
  animation: staffFadeSlideUp 0.5s var(--ease-out);
}

@keyframes staffFadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filmography-card {
  opacity: 0;
  animation: staffFadeSlideUp 0.4s var(--ease-out) forwards;
}

.filmography-card:nth-child(1) { animation-delay: 0.1s; }
.filmography-card:nth-child(2) { animation-delay: 0.15s; }
.filmography-card:nth-child(3) { animation-delay: 0.2s; }
.filmography-card:nth-child(4) { animation-delay: 0.25s; }
.filmography-card:nth-child(5) { animation-delay: 0.3s; }
.filmography-card:nth-child(6) { animation-delay: 0.35s; }
.filmography-card:nth-child(n+7) { animation-delay: 0.4s; }

/* ============================================================================
   RESPONSIVE AJUSTEMENTS
============================================================================ */

@media (max-width: 640px) {
  .staff-profile__photo-wrapper {
    max-width: 200px;
    margin: 0 auto;
  }

  .staff-profile__name {
    font-size: var(--font-size-2xl);
    text-align: center;
  }

  .staff-profile__role-badge {
    margin: 0 auto;
  }

  .staff-profile__stats {
    justify-content: center;
  }

  .staff-profile__bio {
    padding: var(--space-4);
  }

  .filmography-card {
    flex-direction: column;
  }

  .filmography-card__image {
    width: 100%;
    height: 120px;
  }

  .staff-filmography__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
}

/* Preferences pour les mouvements reduits */
@media (prefers-reduced-motion: reduce) {
  .staff-profile,
  .staff-filmography,
  .filmography-card {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .staff-profile__photo-wrapper:hover img,
  .filmography-card:hover .filmography-card__image img {
    transform: none;
  }

  .staff-stat:hover,
  .filmography-card:hover,
  .share-btn:hover {
    transform: none;
  }
}
