/* ============================================================
   TALENTUM — talent-filmography.css (Step 4.3)
   Section Filmographie — spirit card, pillules gold, no table.
   ============================================================ */

/* ============================
   Layout section
   ============================ */

#talent-filmography {
  padding-top: var(--space-md); /* Step 7.11 (retouche) — compactage drastique */
  padding-bottom: var(--space-md);
}

.talent-filmography__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 4rem);
  /* Step 7.11 — catégories côte à côte (colonnes) au lieu d'empilées */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-lg);
  align-items: start;
}

/* ============================
   Eyebrow
   ============================ */

.talent-filmography__eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: calc(var(--text-eyebrow) * 1.2);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent-gold);
  margin: 0 0 var(--space-md);
  grid-column: 1 / -1; /* Step 7.11 — l'eyebrow occupe toute la largeur au-dessus des colonnes */
  text-align: center; /* Step 7.11 (retouche) — titre centré comme « EN IMAGES » */
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-cinematic), transform 0.9s var(--ease-cinematic);
  transition-delay: 0.2s;
}

.talent-filmography__inner.eyebrow-revealed .talent-filmography__eyebrow {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   Catégorie
   ============================ */

.talent-filmography__category {
  margin: 0; /* Step 7.11 — plus d'empilement vertical, chaque catégorie = une colonne */
}

.talent-filmography__cat-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-body); /* Step 7.11 (retouche) — agrandi (interversion avec titre film) */
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-on-light);
  text-align: center; /* Step 7.11 (retouche) — titre catégorie centré au-dessus des cartes */
  /* Step 7.11 (retouche) — hauteur uniforme (1 ou 2 lignes) → 1ʳᵉ rangée de pastilles alignée */
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 var(--space-md);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-cinematic), transform 0.6s var(--ease-cinematic);
  transition-delay: 0.05s;
}

.talent-filmography__category.is-revealed .talent-filmography__cat-title {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   Liste entrées
   ============================ */

.talent-filmography__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md); /* Step 7.11 (retouche) — espace régulier entre cartes (lg → md) */
}

/* Step 7.11 — carte verticale centrée : image en haut, titre + infos en dessous.
   min-height uniforme (retouche) → les pastilles s'alignent rangée par rangée entre colonnes. */
.talent-filmography__entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: var(--space-sm);
  min-height: 170px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s var(--ease-cinematic), transform 0.5s var(--ease-cinematic);
}

.talent-filmography__category.is-revealed .talent-filmography__entry {
  opacity: 1;
  transform: translateY(0);
  /* transition-delay posé inline via JS */
}

/* ============================
   Thumbnail placeholder (futur favicon → affiche)
   ============================ */

.talent-filmography__thumb {
  flex-shrink: 0;
  width: 64px;  /* Step 7.11 — pastille plus grande, en haut de la carte */
  height: 64px;
  border-radius: 50%;
  background: var(--color-text-on-light);
  opacity: 0.08;
  overflow: hidden;
  position: relative;
  transition: width 0.4s var(--ease-cinematic),
              height 0.4s var(--ease-cinematic),
              border-radius 0.4s var(--ease-cinematic),
              opacity 0.4s var(--ease-cinematic);
}

/* Quand data-poster sera renseigné */
.talent-filmography__thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.talent-filmography__thumb.has-poster {
  opacity: 1;
}

.talent-filmography__thumb.has-poster .talent-filmography__thumb-img {
  opacity: 1;
}

/* Survol (sans clic) : la pastille s'agrandit en affiche — Step 7.11 */
.talent-filmography__entry:hover .talent-filmography__thumb.has-poster {
  width: 130px;
  height: 182px; /* ratio affiche 2/3 */
  border-radius: 4px;
}

/* ============================
   Pillule année
   ============================ */

.talent-filmography__pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  background: var(--color-accent-gold);
  border-radius: 999px;
  padding: 0.2em 0.75em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-small);
  letter-spacing: 0.06em;
  color: var(--color-text-on-light);
  line-height: 1;
  white-space: nowrap;
}

/* ============================
   Infos : titre + note
   ============================ */

.talent-filmography__info {
  display: flex;
  flex-direction: column;
  align-items: center; /* Step 7.11 — titre + infos centrés sous la pastille */
  gap: var(--space-xs);
  width: 100%;
}

/* Step 7.11 — ligne info horizontale : année (pillule or) + note */
.talent-filmography__meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.5em;
}

.talent-filmography__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-small); /* Step 7.11 (retouche) — réduit (interversion avec titre catégorie) */
  color: var(--color-text-on-light);
  line-height: 1.3;
  white-space: normal; /* Step 7.11 — passe à la ligne dans les colonnes étroites */
}

.talent-filmography__note {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-small);
  color: var(--color-text-secondary-light);
  line-height: 1.4;
  white-space: normal; /* Step 7.11 — passe à la ligne */
}

/* ============================================================
   Step 7.11 (Option A) — Override SCOPÉ Mahoula uniquement.
   Filmographie longue (23 films / 2 catégories) : au lieu d'une colonne
   de cartes empilées (trop haute), les films coulent en mini-grille.
   N'affecte QUE [data-talent="mahoula-kane"] → Marlène (maîtresse) intacte.
   ============================================================ */

/* Phase 12 (2026-10-07) — override RETIRÉ : la page Mahoula passe au layout « row » commun
   (filmography.layout = "row" dans son JSON) ; la règle display:grid scopée ci-dessus aurait
   écrasé le flex de .talent-filmography--row. Plus aucune règle spécifique à Mahoula. */

/* ============================================================
   Step 8.4 (Option A validée) — Layout "row" : une seule ligne
   d'affiches réelles visibles d'emblée. SCOPÉ via .talent-filmography--row
   (posé par le JS quand le JSON déclare filmography.layout = "row").
   Marlène (maîtresse) et Mahoula intactes.
   ============================================================ */

.talent-filmography--row {
  grid-template-columns: 1fr;
}

.talent-filmography--row .talent-filmography__list {
  flex-direction: row;
  flex-wrap: wrap; /* sécurité petits écrans — une ligne tant que ça tient */
  justify-content: center;
  align-items: flex-start;
  gap: var(--space-lg);
}

.talent-filmography--row .talent-filmography__entry {
  max-width: 200px;
}

/* Affiche visible d'emblée — carte 2/3, coins 4px (valeurs du hover 7.11) */
.talent-filmography--row .talent-filmography__thumb {
  width: 130px;
  height: 182px;
  border-radius: 4px;
  background: var(--color-bg-secondary);
  opacity: 1;
}

/* Affiche entière visible — letterbox cohérent avec la galerie (Step 8.4) */
.talent-filmography--row .talent-filmography__thumb-img {
  object-fit: contain;
}

/* Mention catégorie sous la carte */
.talent-filmography__cat-mention {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary-light);
}

/* ============================
   Responsive mobile
   ============================ */

@media (max-width: 767px) {
  .talent-filmography__inner {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .talent-filmography__title {
    white-space: normal;
  }

  .talent-filmography__note {
    white-space: normal;
  }
}

/* ============================
   Reduced motion
   ============================ */

@media (prefers-reduced-motion: reduce) {
  .talent-filmography__eyebrow,
  .talent-filmography__cat-title,
  .talent-filmography__entry {
    transform: none;
    transition: opacity 0.3s ease;
  }

  .talent-filmography__thumb {
    transition: none;
  }
}
