/* ======================================
   Série TV - Étape 4 : Acteurs & Rôles
   Gestion du casting par saison
   ====================================== */

:root {
  --bg: #fff;
  --fg: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --brand: #0f766e;
  --brand-600: #0e615b;
  --ok: #065f46;
  --warn: #92400e;
}

/* ================================
   Barre supérieure & sélecteur saison
   ================================ */
.topbar-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 14px;
}

.season-picker {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}

.season-picker label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.season-picker select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
  min-width: 180px;
}

/* ================================
   Carte acteur (formulaire)
   ================================ */
.acteur-card {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(2, 8, 23, 0.06);
  margin: 18px 0;
}

.acteur-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(160px, 220px) auto;
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.06), transparent 60%);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 980px) {
  .acteur-head {
    grid-template-columns: 1fr;
  }
}

.acteur-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acteur-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding-left: 2px;
}

.acteur-head input[type="text"],
.acteur-head select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
}

/* ================================
   Upload fichier & statuts
   ================================ */
.file {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.js-file-name {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: var(--muted);
}

.chip-status {
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid;
}

.chip-ok {
  color: var(--ok);
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.3);
}

.chip-warn {
  color: var(--warn);
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.3);
}

/* ================================
   Preview acteur/rôle (3 colonnes)
   ================================ */
.pair-preview {
  display: grid;
  grid-template-columns: 220px 1fr 320px;
  gap: 22px;
  align-items: stretch;
  padding: 18px 22px;
}

@media (max-width: 1024px) {
  .pair-preview {
    grid-template-columns: 220px 1fr;
  }
  .role-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .pair-preview {
    grid-template-columns: 1fr;
  }
}

/* ================================
   Photo acteur (colonne 1)
   ================================ */
.actor-photo {
  width: 100%;
  height: 260px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(2, 8, 23, 0.1);
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-weight: 700;
}

.actor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.actor-caption {
  margin-top: 8px;
  text-align: center;
  font-size: 14px;
  color: #0f172a;
  font-weight: 700;
}

/* ================================
   Infos centrales (colonne 2)
   ================================ */
.mid {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
}

.mid h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.1;
}

.mid .meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mid .actorline {
  font-size: 14px;
  font-weight: 850;
  color: #0f766e;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mid .actorline a {
  color: #0f766e;
  text-decoration: none;
  font-weight: 900;
}

.mid .actorline a:hover {
  text-decoration: underline;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.25);
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge.is-empty {
  border-color: rgba(100, 116, 139, 0.25);
  background: rgba(100, 116, 139, 0.08);
  color: #475569;
}

/* ================================
   Carte rôle (colonne 3)
   ================================ */
.role-card {
  position: relative;
  background: #fff;
  color: #111827;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 30px rgba(2, 8, 23, 0.1);
  isolation: isolate;
}

.role-corner {
  position: absolute;
  font-weight: 800;
  color: #0f766e;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.role-corner.tl {
  top: 10px;
  left: 12px;
}

.role-corner.br {
  bottom: 10px;
  right: 12px;
  transform: rotate(180deg);
}

.role-image {
  width: 100%;
  aspect-ratio: 1433 / 2048;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.role-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.role-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.role-chip {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
}

/* ================================
   Boutons
   ================================ */
.btn-add-role {
  padding: 8px 12px;
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.btn-add-role:hover {
  background: #0e615b;
}

/* Boutons étape (bleus) */
.btn-etape {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.7rem 1.05rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn-etape:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
  border-color: #dbe6f5;
  background: #fbfdff;
}

/* Boutons d'action principaux (bleu) */
.etape-actions .btn-etape {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
}

.etape-actions .btn-etape:hover {
  background: #0b98d6;
  border-color: #0b98d6;
  transform: translateY(-1px);
}

/* Bouton retour */
.etape-actions .btn-retour {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
}

.etape-actions .btn-retour:hover {
  background: #0b98d6;
  border-color: #0b98d6;
}

/* Bouton ajouter (bleu) */
#acteur-zone + .btn-etape {
  background: #0ea5e9;
  color: #fff;
  border-color: #0ea5e9;
}

#acteur-zone + .btn-etape:hover {
  background: #0b98d6;
  border-color: #0b98d6;
  transform: translateY(-1px);
}

/* ================================
   Messages & aide
   ================================ */
.errors {
  background: #fff7ed;
  color: #7c2d12;
  border: 1px solid #fed7aa;
  padding: 10px;
  border-radius: 10px;
  margin: 10px 0;
}

.hint {
  font-size: 12px;
  color: #6b7280;
}
