/**
 * InterFilm — modal édition profil (Gérer) — ne touche PAS au Qui regarde ?
 */

#nfEditModal.nf-edit {
  position: fixed;
  inset: 0;
  z-index: 100000080;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

#nfEditModal.nf-edit.is-open {
  display: flex;
}

.nf-dialog {
  width: min(440px, 100%);
  border-radius: 16px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
  padding: 28px 28px 22px;
  position: relative;
}

.nf-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.nf-title {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.nf-sub {
  margin: 6px 0 0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}

.nf-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.nf-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nf-avatar-wrap {
  margin: 28px auto 10px;
  width: 148px;
  height: 148px;
  position: relative;
  cursor: pointer;
}

.nf-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: block;
  background: #111;
}

.nf-avatar-deco {
  position: absolute;
  top: -14%;
  left: -14%;
  width: 128%;
  height: 128%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}

.nf-avatar-hint {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 22px;
}

.nf-label {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
}

.nf-input {
  width: 100%;
  box-sizing: border-box;
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 14px 18px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  outline: none;
  margin-bottom: 18px;
}

.nf-input:focus {
  border-color: rgba(228, 179, 90, 0.55);
}

.nf-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.nf-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}

.nf-swatch.is-on {
  box-shadow: 0 0 0 2px #1a1a1a, 0 0 0 4px #e4b35a;
}

.nf-deco-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.nf-deco-btn {
  flex: 1;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.nf-deco-btn:hover {
  border-color: rgba(228, 179, 90, 0.4);
  color: #fff;
}

.nf-deco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  margin: 0 0 18px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nf-deco-grid[hidden] {
  display: none !important;
}

.nf-deco-tile {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nf-deco-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nf-deco-tile.is-locked {
  opacity: 0.45;
}

.nf-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.nf-btn-cancel {
  appearance: none;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 16px;
  cursor: pointer;
}

.nf-btn-cancel:hover {
  color: #fff;
}

.nf-btn-save {
  appearance: none;
  border: none;
  background: #e50914;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}

.nf-btn-save:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
